修复使用sidebar-message插槽时切换联系人会报错的问题
This commit is contained in:
Vendored
+15
-24
@@ -7766,7 +7766,6 @@ function () {
|
||||
|
||||
|
||||
|
||||
|
||||
function componentsvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function componentsvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { componentsvue_type_script_lang_js_ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { componentsvue_type_script_lang_js_ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
@@ -8427,31 +8426,29 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
regeneratorRuntime.mark(function _callee2(contactId, menuName) {
|
||||
var _this13 = this;
|
||||
|
||||
var h, prevCurrentContactId, editorValue, draft;
|
||||
var prevCurrentContactId, editorValue, draft;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
h = this.$createElement;
|
||||
|
||||
if (!menuName) {
|
||||
_context2.next = 5;
|
||||
_context2.next = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
this.changeMenu(menuName);
|
||||
_context2.next = 7;
|
||||
_context2.next = 6;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 4:
|
||||
if (!(this._changeContactLock || this.currentContactId == contactId)) {
|
||||
_context2.next = 7;
|
||||
_context2.next = 6;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context2.abrupt("return", false);
|
||||
|
||||
case 7:
|
||||
case 6:
|
||||
prevCurrentContactId = this.currentContactId; //保存上个聊天目标的草稿
|
||||
|
||||
if (prevCurrentContactId) {
|
||||
@@ -8461,16 +8458,10 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
this.CacheDraft.set(prevCurrentContactId, editorValue);
|
||||
this.updateContact({
|
||||
id: prevCurrentContactId,
|
||||
lastContent: [h("span", {
|
||||
"style": "color:red;"
|
||||
}, ["[\u8349\u7A3F]"]), h("span", helper_default()([{}, {
|
||||
"domProps": {
|
||||
innerHTML: this.lastContentRender({
|
||||
type: 'text',
|
||||
content: editorValue
|
||||
})
|
||||
}
|
||||
}]))]
|
||||
lastContent: "<span style=\"color:red;\">[\u8349\u7A3F]</span><span>".concat(this.lastContentRender({
|
||||
type: 'text',
|
||||
content: editorValue
|
||||
}), "</span>")
|
||||
});
|
||||
this.setEditorValue('');
|
||||
}
|
||||
@@ -8479,23 +8470,23 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
this.currentContactId = contactId;
|
||||
|
||||
if (this.currentContactId) {
|
||||
_context2.next = 12;
|
||||
_context2.next = 11;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context2.abrupt("return", false);
|
||||
|
||||
case 12:
|
||||
case 11:
|
||||
this.$emit("change-contact", this.currentContact, this);
|
||||
|
||||
if (!isFunction(this.currentContact.renderContainer)) {
|
||||
_context2.next = 15;
|
||||
_context2.next = 14;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context2.abrupt("return");
|
||||
|
||||
case 15:
|
||||
case 14:
|
||||
//填充草稿内容
|
||||
draft = this.CacheDraft.get(contactId) || "";
|
||||
if (draft) this.setEditorValue(draft);
|
||||
@@ -8520,7 +8511,7 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
}, 0);
|
||||
}
|
||||
|
||||
case 19:
|
||||
case 18:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
|
||||
Vendored
+15
-24
@@ -7775,7 +7775,6 @@ function () {
|
||||
|
||||
|
||||
|
||||
|
||||
function componentsvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function componentsvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { componentsvue_type_script_lang_js_ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { componentsvue_type_script_lang_js_ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
@@ -8436,31 +8435,29 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
regeneratorRuntime.mark(function _callee2(contactId, menuName) {
|
||||
var _this13 = this;
|
||||
|
||||
var h, prevCurrentContactId, editorValue, draft;
|
||||
var prevCurrentContactId, editorValue, draft;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
h = this.$createElement;
|
||||
|
||||
if (!menuName) {
|
||||
_context2.next = 5;
|
||||
_context2.next = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
this.changeMenu(menuName);
|
||||
_context2.next = 7;
|
||||
_context2.next = 6;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 4:
|
||||
if (!(this._changeContactLock || this.currentContactId == contactId)) {
|
||||
_context2.next = 7;
|
||||
_context2.next = 6;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context2.abrupt("return", false);
|
||||
|
||||
case 7:
|
||||
case 6:
|
||||
prevCurrentContactId = this.currentContactId; //保存上个聊天目标的草稿
|
||||
|
||||
if (prevCurrentContactId) {
|
||||
@@ -8470,16 +8467,10 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
this.CacheDraft.set(prevCurrentContactId, editorValue);
|
||||
this.updateContact({
|
||||
id: prevCurrentContactId,
|
||||
lastContent: [h("span", {
|
||||
"style": "color:red;"
|
||||
}, ["[\u8349\u7A3F]"]), h("span", helper_default()([{}, {
|
||||
"domProps": {
|
||||
innerHTML: this.lastContentRender({
|
||||
type: 'text',
|
||||
content: editorValue
|
||||
})
|
||||
}
|
||||
}]))]
|
||||
lastContent: "<span style=\"color:red;\">[\u8349\u7A3F]</span><span>".concat(this.lastContentRender({
|
||||
type: 'text',
|
||||
content: editorValue
|
||||
}), "</span>")
|
||||
});
|
||||
this.setEditorValue('');
|
||||
}
|
||||
@@ -8488,23 +8479,23 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
this.currentContactId = contactId;
|
||||
|
||||
if (this.currentContactId) {
|
||||
_context2.next = 12;
|
||||
_context2.next = 11;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context2.abrupt("return", false);
|
||||
|
||||
case 12:
|
||||
case 11:
|
||||
this.$emit("change-contact", this.currentContact, this);
|
||||
|
||||
if (!isFunction(this.currentContact.renderContainer)) {
|
||||
_context2.next = 15;
|
||||
_context2.next = 14;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context2.abrupt("return");
|
||||
|
||||
case 15:
|
||||
case 14:
|
||||
//填充草稿内容
|
||||
draft = this.CacheDraft.get(contactId) || "";
|
||||
if (draft) this.setEditorValue(draft);
|
||||
@@ -8529,7 +8520,7 @@ var renderDrawerContent = function renderDrawerContent() {};
|
||||
}, 0);
|
||||
}
|
||||
|
||||
case 19:
|
||||
case 18:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+4
-1
@@ -102,7 +102,10 @@
|
||||
<lemon-badge :count="contact.unread" style="width:100%">
|
||||
<div>
|
||||
<p><span>{{ contact.displayName }}</span></p>
|
||||
<p class="lemon-contact__content" style="height:18px;font-size:12px;color:#aaa;">最新消息:<span v-html="contact.lastContent"></span></p>
|
||||
<p class="lemon-contact__content" style="height:18px;font-size:12px;color:#aaa;">
|
||||
最新消息:
|
||||
<span v-html="contact.lastContent"></span>
|
||||
</p>
|
||||
</div>
|
||||
</lemon-badge>
|
||||
</template>
|
||||
|
||||
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.e1dce1e3.css rel=preload as=style><link href=js/chunk-vendors.e4810482.js rel=preload as=script><link href=js/index.0d1f8beb.js rel=preload as=script><link href=css/index.e1dce1e3.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.0d1f8beb.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.e1dce1e3.css rel=preload as=style><link href=js/chunk-vendors.e4810482.js rel=preload as=script><link href=js/index.9936f86d.js rel=preload as=script><link href=css/index.e1dce1e3.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.9936f86d.js></script></body></html>
|
||||
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.3",
|
||||
"version": "1.6.4",
|
||||
"main": "dist/index.umd.min.js",
|
||||
"description": "基于 VUE2.0 的 IM 聊天组件",
|
||||
"homepage": "https://github.com/fanjyy/lemon-imui",
|
||||
|
||||
@@ -602,12 +602,7 @@ export default {
|
||||
this.CacheDraft.set(prevCurrentContactId,editorValue);
|
||||
this.updateContact({
|
||||
id:prevCurrentContactId,
|
||||
lastContent:[
|
||||
<span style="color:red;">[草稿]</span>,
|
||||
<span domProps={{
|
||||
innerHTML:this.lastContentRender({type:'text',content:editorValue})
|
||||
}}></span>
|
||||
],
|
||||
lastContent:`<span style="color:red;">[草稿]</span><span>${this.lastContentRender({type:'text',content:editorValue})}</span>`,
|
||||
});
|
||||
this.setEditorValue('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user