修复样式布局问题,修复为空也能保存草稿的问题
This commit is contained in:
Vendored
+3421
-5330
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3421
-5330
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=favicon.ico><title>Lemon IMUI</title><link href=css/index.35edd0f9.css rel=preload as=style><link href=js/chunk-vendors.e4810482.js rel=preload as=script><link href=js/index.f81901eb.js rel=preload as=script><link href=css/index.35edd0f9.css rel=stylesheet></head><body><noscript><strong>We're sorry but flat-im doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.e4810482.js></script><script src=js/index.f81901eb.js></script></body></html>
|
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=favicon.ico><title>Lemon IMUI</title><link href=css/index.fb7c8942.css rel=preload as=style><link href=js/chunk-vendors.2abee366.js rel=preload as=script><link href=js/index.f2122123.js rel=preload as=script><link href=css/index.fb7c8942.css rel=stylesheet></head><body><noscript><strong>We're sorry but flat-im doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.2abee366.js></script><script src=js/index.f2122123.js></script></body></html>
|
||||||
+7
File diff suppressed because one or more lines are too long
-7
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lemon-imui",
|
"name": "lemon-imui",
|
||||||
"version": "1.6.11",
|
"version": "1.6.12",
|
||||||
"main": "dist/index.umd.min.js",
|
"main": "dist/index.umd.min.js",
|
||||||
"description": "基于 VUE2.0 的 IM 聊天组件",
|
"description": "基于 VUE2.0 的 IM 聊天组件",
|
||||||
"homepage": "http://june000.gitee.io/lemon-im/",
|
"homepage": "http://june000.gitee.io/lemon-im/",
|
||||||
|
|||||||
@@ -14,25 +14,25 @@ export default {
|
|||||||
from: "IMUI",
|
from: "IMUI",
|
||||||
default() {
|
default() {
|
||||||
return this;
|
return this;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
tools: {
|
tools: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
sendText: {
|
sendText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "发 送"
|
default: "发 送",
|
||||||
},
|
},
|
||||||
sendKey: {
|
sendKey: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default(e) {
|
default(e) {
|
||||||
return e.keyCode == 13 && e.ctrlKey === true;
|
return e.keyCode == 13 && e.ctrlKey === true;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
this.clipboardBlob = null;
|
this.clipboardBlob = null;
|
||||||
@@ -41,7 +41,7 @@ export default {
|
|||||||
clipboardUrl: "",
|
clipboardUrl: "",
|
||||||
submitDisabled: true,
|
submitDisabled: true,
|
||||||
proxyTools: [],
|
proxyTools: [],
|
||||||
accept: ""
|
accept: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
this.initTools([
|
this.initTools([
|
||||||
{ name: "emoji" },
|
{ name: "emoji" },
|
||||||
{ name: "uploadFile" },
|
{ name: "uploadFile" },
|
||||||
{ name: "uploadImage" }
|
{ name: "uploadImage" },
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
this.IMUI.$on("change-contact", () => {
|
this.IMUI.$on("change-contact", () => {
|
||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
click = click || new Function();
|
click = click || new Function();
|
||||||
const classes = [
|
const classes = [
|
||||||
"lemon-editor__tool-item",
|
"lemon-editor__tool-item",
|
||||||
{ "lemon-editor__tool-item--right": isRight }
|
{ "lemon-editor__tool-item--right": isRight },
|
||||||
];
|
];
|
||||||
let node;
|
let node;
|
||||||
if (name == "emoji") {
|
if (name == "emoji") {
|
||||||
@@ -141,7 +141,7 @@ export default {
|
|||||||
<div class="lemon-editor__tip">
|
<div class="lemon-editor__tip">
|
||||||
{useScopedSlot(
|
{useScopedSlot(
|
||||||
this.IMUI.$scopedSlots["editor-footer"],
|
this.IMUI.$scopedSlots["editor-footer"],
|
||||||
"使用 ctrl + enter 快捷发送消息"
|
"使用 ctrl + enter 快捷发送消息",
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div class="lemon-editor__submit">
|
<div class="lemon-editor__submit">
|
||||||
@@ -178,7 +178,7 @@ export default {
|
|||||||
click: null,
|
click: null,
|
||||||
render: menu => {
|
render: menu => {
|
||||||
return <i class="lemon-icon-emoji" />;
|
return <i class="lemon-icon-emoji" />;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "uploadFile",
|
name: "uploadFile",
|
||||||
@@ -186,7 +186,7 @@ export default {
|
|||||||
click: () => this.selectFile("*"),
|
click: () => this.selectFile("*"),
|
||||||
render: menu => {
|
render: menu => {
|
||||||
return <i class="lemon-icon-folder" />;
|
return <i class="lemon-icon-folder" />;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "uploadImage",
|
name: "uploadImage",
|
||||||
@@ -194,22 +194,22 @@ export default {
|
|||||||
click: () => this.selectFile("image/*"),
|
click: () => this.selectFile("image/*"),
|
||||||
render: menu => {
|
render: menu => {
|
||||||
return <i class="lemon-icon-image" />;
|
return <i class="lemon-icon-image" />;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
let tools = [];
|
let tools = [];
|
||||||
if (Array.isArray(data)) {
|
if (Array.isArray(data)) {
|
||||||
const indexMap = {
|
const indexMap = {
|
||||||
emoji: 0,
|
emoji: 0,
|
||||||
uploadFile: 1,
|
uploadFile: 1,
|
||||||
uploadImage: 2
|
uploadImage: 2,
|
||||||
};
|
};
|
||||||
const indexKeys = Object.keys(indexMap);
|
const indexKeys = Object.keys(indexMap);
|
||||||
tools = data.map(item => {
|
tools = data.map(item => {
|
||||||
if (indexKeys.includes(item.name)) {
|
if (indexKeys.includes(item.name)) {
|
||||||
return {
|
return {
|
||||||
...defaultTools[indexMap[item.name]],
|
...defaultTools[indexMap[item.name]],
|
||||||
...item
|
...item,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
@@ -320,7 +320,7 @@ export default {
|
|||||||
},
|
},
|
||||||
_checkSubmitDisabled() {
|
_checkSubmitDisabled() {
|
||||||
this.submitDisabled = !clearHtmlExcludeImg(
|
this.submitDisabled = !clearHtmlExcludeImg(
|
||||||
this.$refs.textarea.innerHTML.trim()
|
this.$refs.textarea.innerHTML.trim(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_handleSend(e) {
|
_handleSend(e) {
|
||||||
@@ -346,8 +346,8 @@ export default {
|
|||||||
setValue(val) {
|
setValue(val) {
|
||||||
this.$refs.textarea.innerHTML = this.IMUI.emojiNameToImage(val);
|
this.$refs.textarea.innerHTML = this.IMUI.emojiNameToImage(val);
|
||||||
this._checkSubmitDisabled();
|
this._checkSubmitDisabled();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<script>
|
<script>
|
||||||
import { useScopedSlot, funCall, generateUUID } from "utils";
|
import {
|
||||||
|
useScopedSlot,
|
||||||
|
funCall,
|
||||||
|
generateUUID,
|
||||||
|
clearHtmlExcludeImg,
|
||||||
|
} from "utils";
|
||||||
import { isFunction, isString, isEmpty } from "utils/validate";
|
import { isFunction, isString, isEmpty } from "utils/validate";
|
||||||
import contextmenu from "../directives/contextmenu";
|
import contextmenu from "../directives/contextmenu";
|
||||||
import {
|
import {
|
||||||
@@ -577,9 +582,7 @@ export default {
|
|||||||
lastContentRender(message) {
|
lastContentRender(message) {
|
||||||
if (!isFunction(lastContentRender[message.type])) {
|
if (!isFunction(lastContentRender[message.type])) {
|
||||||
console.error(
|
console.error(
|
||||||
`not found '${
|
`not found '${message.type}' of the latest message renderer,try to use ‘setLastContentRender()’`,
|
||||||
message.type
|
|
||||||
}' of the latest message renderer,try to use ‘setLastContentRender()’`,
|
|
||||||
);
|
);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -657,8 +660,9 @@ export default {
|
|||||||
|
|
||||||
//保存上个聊天目标的草稿
|
//保存上个聊天目标的草稿
|
||||||
if (this.currentContactId) {
|
if (this.currentContactId) {
|
||||||
const editorValue = this.getEditorValue();
|
const editorValue = clearHtmlExcludeImg(this.getEditorValue()).trim();
|
||||||
if (editorValue) {
|
if (editorValue) {
|
||||||
|
alert(editorValue);
|
||||||
this.setDraft(this.currentContactId, editorValue);
|
this.setDraft(this.currentContactId, editorValue);
|
||||||
this.setEditorValue();
|
this.setEditorValue();
|
||||||
} else {
|
} else {
|
||||||
@@ -1095,11 +1099,11 @@ bezier = cubic-bezier(0.645, 0.045, 0.355, 1)
|
|||||||
+b(lemon-vessel)
|
+b(lemon-vessel)
|
||||||
display flex
|
display flex
|
||||||
flex 1
|
flex 1
|
||||||
|
min-height 100px
|
||||||
+e(left)
|
+e(left)
|
||||||
display flex
|
display flex
|
||||||
flex-direction column
|
flex-direction column
|
||||||
flex 1
|
flex 1
|
||||||
height 100%
|
|
||||||
+e(right)
|
+e(right)
|
||||||
flex none
|
flex none
|
||||||
+b(lemon-messages)
|
+b(lemon-messages)
|
||||||
|
|||||||
Reference in New Issue
Block a user