修复样式布局问题,修复为空也能保存草稿的问题
This commit is contained in:
Vendored
+3418
-5327
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
+3418
-5327
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",
|
||||
"version": "1.6.11",
|
||||
"version": "1.6.12",
|
||||
"main": "dist/index.umd.min.js",
|
||||
"description": "基于 VUE2.0 的 IM 聊天组件",
|
||||
"homepage": "http://june000.gitee.io/lemon-im/",
|
||||
|
||||
@@ -14,25 +14,25 @@ export default {
|
||||
from: "IMUI",
|
||||
default() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
props: {
|
||||
tools: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
default: () => [],
|
||||
},
|
||||
sendText: {
|
||||
type: String,
|
||||
default: "发 送"
|
||||
default: "发 送",
|
||||
},
|
||||
sendKey: {
|
||||
type: Function,
|
||||
default(e) {
|
||||
return e.keyCode == 13 && e.ctrlKey === true;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
this.clipboardBlob = null;
|
||||
@@ -41,7 +41,7 @@ export default {
|
||||
clipboardUrl: "",
|
||||
submitDisabled: true,
|
||||
proxyTools: [],
|
||||
accept: ""
|
||||
accept: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
this.initTools([
|
||||
{ name: "emoji" },
|
||||
{ name: "uploadFile" },
|
||||
{ name: "uploadImage" }
|
||||
{ name: "uploadImage" },
|
||||
]);
|
||||
}
|
||||
this.IMUI.$on("change-contact", () => {
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
click = click || new Function();
|
||||
const classes = [
|
||||
"lemon-editor__tool-item",
|
||||
{ "lemon-editor__tool-item--right": isRight }
|
||||
{ "lemon-editor__tool-item--right": isRight },
|
||||
];
|
||||
let node;
|
||||
if (name == "emoji") {
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
<div class="lemon-editor__tip">
|
||||
{useScopedSlot(
|
||||
this.IMUI.$scopedSlots["editor-footer"],
|
||||
"使用 ctrl + enter 快捷发送消息"
|
||||
"使用 ctrl + enter 快捷发送消息",
|
||||
)}
|
||||
</div>
|
||||
<div class="lemon-editor__submit">
|
||||
@@ -178,7 +178,7 @@ export default {
|
||||
click: null,
|
||||
render: menu => {
|
||||
return <i class="lemon-icon-emoji" />;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "uploadFile",
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
click: () => this.selectFile("*"),
|
||||
render: menu => {
|
||||
return <i class="lemon-icon-folder" />;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "uploadImage",
|
||||
@@ -194,22 +194,22 @@ export default {
|
||||
click: () => this.selectFile("image/*"),
|
||||
render: menu => {
|
||||
return <i class="lemon-icon-image" />;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
let tools = [];
|
||||
if (Array.isArray(data)) {
|
||||
const indexMap = {
|
||||
emoji: 0,
|
||||
uploadFile: 1,
|
||||
uploadImage: 2
|
||||
uploadImage: 2,
|
||||
};
|
||||
const indexKeys = Object.keys(indexMap);
|
||||
tools = data.map(item => {
|
||||
if (indexKeys.includes(item.name)) {
|
||||
return {
|
||||
...defaultTools[indexMap[item.name]],
|
||||
...item
|
||||
...item,
|
||||
};
|
||||
}
|
||||
return item;
|
||||
@@ -320,7 +320,7 @@ export default {
|
||||
},
|
||||
_checkSubmitDisabled() {
|
||||
this.submitDisabled = !clearHtmlExcludeImg(
|
||||
this.$refs.textarea.innerHTML.trim()
|
||||
this.$refs.textarea.innerHTML.trim(),
|
||||
);
|
||||
},
|
||||
_handleSend(e) {
|
||||
@@ -346,8 +346,8 @@ export default {
|
||||
setValue(val) {
|
||||
this.$refs.textarea.innerHTML = this.IMUI.emojiNameToImage(val);
|
||||
this._checkSubmitDisabled();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="stylus">
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<script>
|
||||
import { useScopedSlot, funCall, generateUUID } from "utils";
|
||||
import {
|
||||
useScopedSlot,
|
||||
funCall,
|
||||
generateUUID,
|
||||
clearHtmlExcludeImg,
|
||||
} from "utils";
|
||||
import { isFunction, isString, isEmpty } from "utils/validate";
|
||||
import contextmenu from "../directives/contextmenu";
|
||||
import {
|
||||
@@ -577,9 +582,7 @@ export default {
|
||||
lastContentRender(message) {
|
||||
if (!isFunction(lastContentRender[message.type])) {
|
||||
console.error(
|
||||
`not found '${
|
||||
message.type
|
||||
}' of the latest message renderer,try to use ‘setLastContentRender()’`,
|
||||
`not found '${message.type}' of the latest message renderer,try to use ‘setLastContentRender()’`,
|
||||
);
|
||||
return "";
|
||||
}
|
||||
@@ -657,8 +660,9 @@ export default {
|
||||
|
||||
//保存上个聊天目标的草稿
|
||||
if (this.currentContactId) {
|
||||
const editorValue = this.getEditorValue();
|
||||
const editorValue = clearHtmlExcludeImg(this.getEditorValue()).trim();
|
||||
if (editorValue) {
|
||||
alert(editorValue);
|
||||
this.setDraft(this.currentContactId, editorValue);
|
||||
this.setEditorValue();
|
||||
} else {
|
||||
@@ -1095,11 +1099,11 @@ bezier = cubic-bezier(0.645, 0.045, 0.355, 1)
|
||||
+b(lemon-vessel)
|
||||
display flex
|
||||
flex 1
|
||||
min-height 100px
|
||||
+e(left)
|
||||
display flex
|
||||
flex-direction column
|
||||
flex 1
|
||||
height 100%
|
||||
+e(right)
|
||||
flex none
|
||||
+b(lemon-messages)
|
||||
|
||||
Reference in New Issue
Block a user