修复BUG,v-lemon-contextmenu支持左键触发
This commit is contained in:
1 parent
93dc874ea6
commit
0e9504f9b4
24 files changed
+15783
-11476
No files matched your search
Vendored
+7379
-5457
File diff suppressed because it is too large.
Load diff
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
.lemon-popover{border:1px solid #eee;font-size:14px;font-variant:tabular-nums;line-height:1.5;color:rgba(0,0,0,.65);z-index:10;background-color:#fff;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.08);box-shadow:0 2px 8px rgba(0,0,0,.08);position:absolute;-webkit-transform-origin:50% 150%;transform-origin:50% 150%}.lemon-popover__content{padding:15px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;z-index:1}.lemon-popover__arrow{left:50%;-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg);position:absolute;z-index:0;bottom:-4px;-webkit-box-shadow:3px 3px 7px rgba(0,0,0,.07);box-shadow:3px 3px 7px rgba(0,0,0,.07);width:8px;height:8px;background:#fff}.lemon-slide-top-enter-active,.lemon-slide-top-leave-active{-webkit-transition:all .2s cubic-bezier(.645,.045,.355,1);transition:all .2s cubic-bezier(.645,.045,.355,1)}.lemon-slide-top-enter,.lemon-slide-top-leave-to{-webkit-transform:translateY(-10px) scale(.8);transform:translateY(-10px) scale(.8);opacity:0}.lemon-tabs{background:#f6f6f6}.lemon-tabs-content{padding:15px}.lemon-tabs-content,.lemon-tabs-content__pane{width:100%;height:100%}.lemon-tabs-nav{display:-webkit-box;display:-ms-flexbox;display:flex;background:#eee}.lemon-tabs-nav__item{line-height:38px;padding:0 15px;cursor:pointer;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1)}.lemon-tabs-nav__item--active{background:#f6f6f6}.lemon-button{outline:none;line-height:1.499;display:inline-block;font-weight:400;text-align:center;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid #ddd;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;padding:0 15px;font-size:14px;border-radius:4px;height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1);color:rgba(0,0,0,.65);background-color:#fff;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.015);box-shadow:0 2px 0 rgba(0,0,0,.015);text-shadow:0 -1px 0 rgba(0,0,0,.12)}.lemon-button--color-default:hover:not([disabled]){border-color:#666;color:#333}.lemon-button--color-default:active{background-color:#ddd}.lemon-button--color-default[disabled]{cursor:not-allowed;color:#aaa;background:#eee}.lemon-button--color-grey{background:#e1e1e1;border-color:#e1e1e1;color:#666}.lemon-button--color-grey:hover:not([disabled]){border-color:#bbb}.lemon-badge{position:relative;display:inline-block}.lemon-badge__label{border-radius:10px;background:#f5222d;color:#fff;text-align:center;font-size:12px;font-weight:400;white-space:nowrap;-webkit-box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px #fff;z-index:10;position:absolute;-webkit-transform:translateX(50%);transform:translateX(50%);-webkit-transform-origin:100%;transform-origin:100%;display:inline-block;padding:0 4px;height:18px;line-height:17px;min-width:10px;top:-4px;right:6px}.lemon-badge__label--dot{width:10px;height:10px;min-width:auto;padding:0;top:-3px;right:2px}.lemon-avatar{font-variant:tabular-nums;line-height:1.5;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;list-style:none;display:inline-block;text-align:center;background:#ccc;color:hsla(0,0%,100%,.7);white-space:nowrap;position:relative;overflow:hidden;vertical-align:middle;border-radius:4px}.lemon-avatar--circle{border-radius:50%}.lemon-avatar img{width:100%;height:100%;display:block}.lemon-contact{padding:10px 14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;background:#efefef;text-align:left}.lemon-contact p{margin:0}.lemon-contact--active{background:#bebdbd}.lemon-contact:hover:not(.lemon-contact--active){background:#e3e3e3}.lemon-contact:hover:not(.lemon-contact--active) .el-badge__content{border-color:#ddd}.lemon-contact__avatar{float:left;margin-right:10px}.lemon-contact__avatar img{display:block}.lemon-contact__avatar .ant-badge-count{display:inline-block;padding:0 4px;height:18px;line-height:18px;min-width:18px;top:-4px;right:7px}.lemon-contact__label{display:-webkit-box;display:-ms-flexbox;display:flex}.lemon-contact__time{font-size:12px;line-height:18px;padding-left:6px;color:#999;white-space:nowrap}.lemon-contact__name{display:block;width:100%}.lemon-contact__content,.lemon-contact__name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.lemon-contact__content{font-size:12px;color:#999;height:18px;line-height:18px;margin-top:1px!important}.lemon-contact__content img{height:14px;display:inline-block;vertical-align:middle;margin:0 1px;position:relative;top:-1px}.lemon-contact--name-center .lemon-contact__label{padding-bottom:0;line-height:38px}.lemon-editor{height:200px;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-diLine truncated
|
.lemon-popover{border:1px solid #eee;font-size:14px;font-variant:tabular-nums;line-height:1.5;color:rgba(0,0,0,.65);z-index:10;background-color:#fff;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.08);box-shadow:0 2px 8px rgba(0,0,0,.08);position:absolute;-webkit-transform-origin:50% 150%;transform-origin:50% 150%}.lemon-popover__content{padding:15px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;z-index:1}.lemon-popover__arrow{left:50%;-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg);position:absolute;z-index:0;bottom:-4px;-webkit-box-shadow:3px 3px 7px rgba(0,0,0,.07);box-shadow:3px 3px 7px rgba(0,0,0,.07);width:8px;height:8px;background:#fff}.lemon-slide-top-enter-active,.lemon-slide-top-leave-active{-webkit-transition:all .2s cubic-bezier(.645,.045,.355,1);transition:all .2s cubic-bezier(.645,.045,.355,1)}.lemon-slide-top-enter,.lemon-slide-top-leave-to{-webkit-transform:translateY(-10px) scale(.8);transform:translateY(-10px) scale(.8);opacity:0}.lemon-tabs{background:#f6f6f6}.lemon-tabs-content{padding:15px}.lemon-tabs-content,.lemon-tabs-content__pane{width:100%;height:100%}.lemon-tabs-nav{display:-webkit-box;display:-ms-flexbox;display:flex;background:#eee}.lemon-tabs-nav__item{line-height:38px;padding:0 15px;cursor:pointer;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1)}.lemon-tabs-nav__item--active{background:#f6f6f6}.lemon-button{outline:none;line-height:1.499;display:inline-block;font-weight:400;text-align:center;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid #ddd;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;padding:0 15px;font-size:14px;border-radius:4px;height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1);color:rgba(0,0,0,.65);background-color:#fff;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.015);box-shadow:0 2px 0 rgba(0,0,0,.015);text-shadow:0 -1px 0 rgba(0,0,0,.12)}.lemon-button--color-default:hover:not([disabled]){border-color:#666;color:#333}.lemon-button--color-default:active{background-color:#ddd}.lemon-button--color-default[disabled]{cursor:not-allowed;color:#aaa;background:#eee}.lemon-button--color-grey{background:#e1e1e1;border-color:#e1e1e1;color:#666}.lemon-button--color-grey:hover:not([disabled]){border-color:#bbb}.lemon-badge{position:relative;display:inline-block}.lemon-badge__label{border-radius:10px;background:#f5222d;color:#fff;text-align:center;font-size:12px;font-weight:400;white-space:nowrap;-webkit-box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px #fff;z-index:10;position:absolute;-webkit-transform:translateX(50%);transform:translateX(50%);-webkit-transform-origin:100%;transform-origin:100%;display:inline-block;padding:0 4px;height:18px;line-height:17px;min-width:10px;top:-4px;right:6px}.lemon-badge__label--dot{width:10px;height:10px;min-width:auto;padding:0;top:-3px;right:2px}.lemon-avatar{font-variant:tabular-nums;line-height:1.5;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;list-style:none;display:inline-block;text-align:center;background:#ccc;color:hsla(0,0%,100%,.7);white-space:nowrap;position:relative;overflow:hidden;vertical-align:middle;border-radius:4px}.lemon-avatar--circle{border-radius:50%}.lemon-avatar img{width:100%;height:100%;display:block}.lemon-contact{padding:10px 14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;background:#efefef;text-align:left}.lemon-contact p{margin:0}.lemon-contact--active{background:#bebdbd}.lemon-contact:hover:not(.lemon-contact--active){background:#e3e3e3}.lemon-contact:hover:not(.lemon-contact--active) .el-badge__content{border-color:#ddd}.lemon-contact__avatar{float:left;margin-right:10px}.lemon-contact__avatar img{display:block}.lemon-contact__avatar .ant-badge-count{display:inline-block;padding:0 4px;height:18px;line-height:18px;min-width:18px;top:-4px;right:7px}.lemon-contact__label{display:-webkit-box;display:-ms-flexbox;display:flex}.lemon-contact__time{font-size:12px;line-height:18px;padding-left:6px;color:#999;white-space:nowrap}.lemon-contact__name{display:block;width:100%}.lemon-contact__content,.lemon-contact__name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.lemon-contact__content{font-size:12px;color:#999;height:18px;line-height:18px;margin-top:1px!important}.lemon-contact__content img{height:14px;display:inline-block;vertical-align:middle;margin:0 1px;position:relative;top:-1px}.lemon-contact--name-center .lemon-contact__label{padding-bottom:0;line-height:38px}.lemon-editor{height:200px;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-diLine truncated
|
||||||
Vendored
+7379
-5457
File diff suppressed because it is too large.
Load diff
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["index"]=e(require("vue")):t["index"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="112a")}({"01be":function(t,e,n){},"0353":function(t,e,n){"use strict";var r=n("6bf8"),i=RegExp.prototype.exec,o=String.prototype.replace,a=i,c="lastIndex",s=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t[c]||0!==e[c]}(),u=void 0!==/()??/.exec("")[1],l=s||u;l&&(a=function(t){var e,n,a,l,f=this;return u&&(n=new RegExp("^"+f.source+"$(?!\\s)",r.call(f))),s&&(e=f[c]),a=i.call(f,t),s&&a&&(f[c]=f.global?a.index+a[0].length:e),u&&a&&a.length>1&&o.call(a[0],n,(function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(a[l]=void 0)})),a}),t.exports=a},"0451":function(t,e,n){var r=n("9cff"),i=n("d1cb"),o=n("839a")("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&(e=e[o],null===e&&(e=void 0))),void 0===e?Array:e}},"0484":function(t,e,n){},"04f4":function(t,e,n){"use strict";n("de97")},"05fd":function(t,e,n){t.exports=n("baa7")("native-function-to-string",Function.toString)},"065d":function(t,e,n){var r=n("bb8b"),i=n("5edc");t.exports=n("26df")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"065e":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"0926":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"0b34":function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"0c29":function(t,e){e.f=Object.getOwnPropertySymbols},"0c84":function(t,e,n){"use strict";var r=n("1663")(!0);n("120f")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},"0e15":function(t,e,n){"use strict";n("d5e9")},"112a":function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("e67d"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("a450"),n("1bc7");var i=n("8bbf"),o=n.n(i);n("3269"),n("25ba"),n("b3d7"),n("4057");function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function c(t){return"string"==typeof t}function s(t){return(new Date).getTime()-t<864e5}function u(t){return!t||(!(!Array.isArray(t)||0!=t.length)||!(!a(t)||0!=Object.values(t).length))}function l(t){return t&&"function"===typeof t}n("6a61");function f(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,i)}function d(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,c,"next",t)}function c(t){f(o,r,i,a,c,"throw",t)}a(void 0)}))}}n("32ea"),n("aa18"),n("982e");var h,p,m=[],v={hover:function(t){},focus:function(t){var e=this;t.addEventListener("focus",(function(t){e.changeVisible()})),t.addEventListener("blur",(function(t){e.changeVisible()}))},click:function(t){var e=this;t.addEventListener("click",(function(t){t.stopPropagation(),$.hide(),e.changeVisible()}))},contextmenu:function(t){var e=this;t.addEventListener("contextmenu",(function(t){t.preventDefault(),e.changeVisible()}))}},g={name:"LemonPopover",props:{trigger:{type:String,default:"click",validator:function(t){return Object.keys(v).includes(t)}}},data:function(){return{popoverStyle:{},visible:!1}},created:function(){document.addEventListener("click",this._documentClickEvent),m.push(this.close)},mounted:function(){v[this.trigger].call(this,this.$slots.default[0].elm)},render:function(){var t=arguments[0];return t("span",{style:"position:relative"},[t("transition",{attrs:{name:"lemon-slide-top"}},[this.visible&&t("div",{class:"lemoLine truncated
|
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["index"]=e(require("vue")):t["index"]=e(t["Vue"])})("undefined"!==typeof self?self:this,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),i=n("5ca1"),o=n("2aba"),a=n("32e9"),c=n("84f2"),s=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",p="keys",v="values",m=function(){return this};t.exports=function(t,e,n,g,b,y,x){s(n,e,g);var _,w,S,C=function(t){if(!d&&t in M)return M[t];switch(t){case p:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",j=b==v,I=!1,M=t.prototype,k=M[l]||M[h]||b&&M[b],T=k||C(b),E=b?j?C("entries"):T:void 0,L="Array"==e&&M.entries||k;if(L&&(S=f(L.call(new t)),S!==Object.prototype&&S.next&&(u(S,O,!0),r||"function"==typeof S[l]||a(S,l,m))),j&&k&&k.name!==v&&(I=!0,T=function(){return k.call(this)}),r&&!x||!d&&!I&&M[l]||a(M,l,T),c[e]=T,c[O]=m,b)if(_={values:j?T:C(v),keys:y?T:C(p),entries:E},x)for(w in _)w in M||o(M,w,_[w]);else i(i.P+i.F*(d||I),e,_);return _}},"02f4":function(t,e,n){var r=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var o,a,c=String(i(e)),s=r(n),u=c.length;return s<0||s>=u?t?"":void 0:(o=c.charCodeAt(s),o<55296||o>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):o:t?c.slice(s,s+2):a-56320+(o-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"04f4":function(t,e,n){"use strict";var r=n("26f7"),i=n.n(r);i.a},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0a49":function(t,e,n){var r=n("9b43"),i=n("626a"),o=n("4bf8"),a=n("9def"),c=n("cd1c");t.exports=function(t,e){var n=1==t,s=2==t,u=3==t,f=4==t,l=6==t,d=5==t||l,h=e||c;return function(e,c,p){for(var v,m,g=o(e),b=i(g),y=r(c,p,3),x=a(b.length),_=0,w=n?h(e,x):s?h(e,0):void 0;x>_;_++)if((d||_ in b)&&(v=b[_],m=y(v,_,g),t))if(n)w[_]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:w.push(v)}else if(f)return!1;return l?-1:u||f?f:w}}},"0af2":function(t,e,n){},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return r(t,i)}},"0e15":function(t,e,n){"use strict";var r=n("9768"),i=n.n(r);i.a},"0fc9":function(t,e,n){var r=n("3a38"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},1021:function(t,e,n){},"107a":function(t,e,n){},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},1173:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"11e9":function(t,e,n){var r=n("52a7"),i=n("4630"),o=n("6821"),a=n("6a99"),c=n("69a8"),s=n("c69a"),u=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?u:function(t,e){if(t=o(t),e=a(e,!0),s)try{return u(t,e)}catch(n){}if(c(t,e))return i(!r.f.call(t,e),t[e])}},1495:function(t,e,n){var r=n("86cc"),i=n("cb7c"),o=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);var n,a=o(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},"15cf":function(t,e,n){},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},1663:function(t,e,n){"use strict";var r=n("e86c"),i=n.n(r);i.a},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isALine truncated
|
||||||
+59
-425
@@ -92,80 +92,8 @@
|
|||||||
|
|
||||||
<div style="display:flex;">
|
<div style="display:flex;">
|
||||||
<div>
|
<div>
|
||||||
<div class="title">插槽演示</div>
|
<div class="title">自定义</div>
|
||||||
<div class="imui-center">
|
<div class="imui-center"><qq-imui>12312312</qq-imui></div>
|
||||||
<lemon-imui
|
|
||||||
:user="user"
|
|
||||||
class="lemon-slot"
|
|
||||||
ref="SlotIMUI"
|
|
||||||
@pull-messages="handlePullMessages"
|
|
||||||
@message-click="handleMessageClick"
|
|
||||||
@change-contact="handleChangeContact"
|
|
||||||
@send="handleSend"
|
|
||||||
send-text="发送消息"
|
|
||||||
:send-key="e => e.ctrlKey == true"
|
|
||||||
>
|
|
||||||
<template #editor-footer>
|
|
||||||
按 ctrl 键发送消息
|
|
||||||
</template>
|
|
||||||
<template #cover>
|
|
||||||
<div class="cover">
|
|
||||||
<i class="lemon-icon-message"></i>
|
|
||||||
<p><b>自定义封面 Lemon</b> IMUI</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #message-title="contact">
|
|
||||||
<span>{{ contact.displayName }}</span>
|
|
||||||
<small class="more" @click="changeDrawer(contact, $refs.SlotIMUI)"
|
|
||||||
>{{
|
|
||||||
($refs.SlotIMUI
|
|
||||||
? $refs.SlotIMUI.drawerVisible
|
|
||||||
: false)
|
|
||||||
? "关闭"
|
|
||||||
: "打开"
|
|
||||||
}}抽屉</small
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
<template #message-after="message">
|
|
||||||
<span>未读</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #contact-info="contact">
|
|
||||||
自定义通讯录信息 {{ contact.displayName }}
|
|
||||||
</template>
|
|
||||||
<template #sidebar-message="contact">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</lemon-badge>
|
|
||||||
</template>
|
|
||||||
<template #sidebar-contact="contact">
|
|
||||||
<span>{{ contact.displayName }}</span>
|
|
||||||
</template>
|
|
||||||
<template #sidebar-message-top>
|
|
||||||
<div class="bar">最新消息顶部</div>
|
|
||||||
</template>
|
|
||||||
<template #sidebar-contact-top>
|
|
||||||
<div class="bar">联系人顶部</div>
|
|
||||||
</template>
|
|
||||||
<template #sidebar-message-fixedtop>
|
|
||||||
<div class="bar">最新消息顶部 Fixed</div>
|
|
||||||
</template>
|
|
||||||
<template #sidebar-contact-fixedtop>
|
|
||||||
<div class="bar">联系人顶部 Fixed</div>
|
|
||||||
</template>
|
|
||||||
</lemon-imui>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin:0 55px;">
|
<div style="margin:0 55px;">
|
||||||
@@ -1041,8 +969,11 @@ WebSocket.onmessage = function(event) {
|
|||||||
<script>
|
<script>
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import LemonMessageVoice from "./lemon-message-voice";
|
import LemonMessageVoice from "./lemon-message-voice";
|
||||||
|
import QQIMUI from "./qq";
|
||||||
import packageData from "../package.json";
|
import packageData from "../package.json";
|
||||||
|
import EmojiData from "./database/emoji";
|
||||||
Vue.component(LemonMessageVoice.name, LemonMessageVoice);
|
Vue.component(LemonMessageVoice.name, LemonMessageVoice);
|
||||||
|
Vue.component(QQIMUI.name, QQIMUI);
|
||||||
|
|
||||||
const tip = `export default {
|
const tip = `export default {
|
||||||
//组件的name必须以lemonMessage开头,后面跟上 Message.type
|
//组件的name必须以lemonMessage开头,后面跟上 Message.type
|
||||||
@@ -1094,7 +1025,7 @@ const generateMessage = (toContactId = "", fromUser) => {
|
|||||||
fromUser = {
|
fromUser = {
|
||||||
id: "system",
|
id: "system",
|
||||||
displayName: "系统测试",
|
displayName: "系统测试",
|
||||||
avatar: "http://upload.qqbodys.com/allimg/1710/1035512943-0.jpg"
|
avatar: "http://upload.qqbodys.com/allimg/1710/1035512943-0.jpg",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -1106,7 +1037,7 @@ const generateMessage = (toContactId = "", fromUser) => {
|
|||||||
//fileSize: 1231,
|
//fileSize: 1231,
|
||||||
//fileName: "asdasd.doc",
|
//fileName: "asdasd.doc",
|
||||||
toContactId,
|
toContactId,
|
||||||
fromUser
|
fromUser,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1122,17 +1053,17 @@ export default {
|
|||||||
const { IMUI, contact } = instance;
|
const { IMUI, contact } = instance;
|
||||||
IMUI.updateContact({
|
IMUI.updateContact({
|
||||||
id: contact.id,
|
id: contact.id,
|
||||||
lastContent: null
|
lastContent: null,
|
||||||
});
|
});
|
||||||
if (IMUI.currentContactId == contact.id) IMUI.changeContact(null);
|
if (IMUI.currentContactId == contact.id) IMUI.changeContact(null);
|
||||||
hide();
|
hide();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "设置备注和标签"
|
text: "设置备注和标签",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "投诉"
|
text: "投诉",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "lemon-icon-message",
|
icon: "lemon-icon-message",
|
||||||
@@ -1148,7 +1079,7 @@ export default {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
click(e, instance, hide) {
|
click(e, instance, hide) {
|
||||||
@@ -1158,8 +1089,8 @@ export default {
|
|||||||
hide();
|
hide();
|
||||||
},
|
},
|
||||||
color: "red",
|
color: "red",
|
||||||
text: "删除好友"
|
text: "删除好友",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
contextmenu: [
|
contextmenu: [
|
||||||
{
|
{
|
||||||
@@ -1188,7 +1119,7 @@ export default {
|
|||||||
),
|
),
|
||||||
|
|
||||||
toContactId: message.toContactId,
|
toContactId: message.toContactId,
|
||||||
sendTime: getTime()
|
sendTime: getTime(),
|
||||||
};
|
};
|
||||||
IMUI.removeMessage(message.id);
|
IMUI.removeMessage(message.id);
|
||||||
IMUI.appendMessage(data, true);
|
IMUI.appendMessage(data, true);
|
||||||
@@ -1197,34 +1128,34 @@ export default {
|
|||||||
visible: instance => {
|
visible: instance => {
|
||||||
return instance.message.fromUser.id == this.user.id;
|
return instance.message.fromUser.id == this.user.id;
|
||||||
},
|
},
|
||||||
text: "撤回消息"
|
text: "撤回消息",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
visible: instance => {
|
visible: instance => {
|
||||||
return instance.message.fromUser.id != this.user.id;
|
return instance.message.fromUser.id != this.user.id;
|
||||||
},
|
},
|
||||||
text: "举报"
|
text: "举报",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "转发"
|
text: "转发",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
visible: instance => {
|
visible: instance => {
|
||||||
return instance.message.type == "text";
|
return instance.message.type == "text";
|
||||||
},
|
},
|
||||||
text: "复制文字"
|
text: "复制文字",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
visible: instance => {
|
visible: instance => {
|
||||||
return instance.message.type == "image";
|
return instance.message.type == "image";
|
||||||
},
|
},
|
||||||
text: "下载图片"
|
text: "下载图片",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
visible: instance => {
|
visible: instance => {
|
||||||
return instance.message.type == "file";
|
return instance.message.type == "file";
|
||||||
},
|
},
|
||||||
text: "下载文件"
|
text: "下载文件",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
click: (e, instance, hide) => {
|
click: (e, instance, hide) => {
|
||||||
@@ -1234,8 +1165,8 @@ export default {
|
|||||||
},
|
},
|
||||||
icon: "lemon-icon-folder",
|
icon: "lemon-icon-folder",
|
||||||
color: "red",
|
color: "red",
|
||||||
text: "删除"
|
text: "删除",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
tip: tip,
|
tip: tip,
|
||||||
packageData,
|
packageData,
|
||||||
@@ -1246,8 +1177,8 @@ export default {
|
|||||||
user: {
|
user: {
|
||||||
id: "1",
|
id: "1",
|
||||||
displayName: "June",
|
displayName: "June",
|
||||||
avatar: ""
|
avatar: "",
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -1258,7 +1189,7 @@ export default {
|
|||||||
index: "[1]群组",
|
index: "[1]群组",
|
||||||
unread: 0,
|
unread: 0,
|
||||||
lastSendTime: 1566047865417,
|
lastSendTime: 1566047865417,
|
||||||
lastContent: "2"
|
lastContent: "2",
|
||||||
};
|
};
|
||||||
const contactData2 = {
|
const contactData2 = {
|
||||||
id: "contact-2",
|
id: "contact-2",
|
||||||
@@ -1273,7 +1204,7 @@ export default {
|
|||||||
},
|
},
|
||||||
lastSendTime: 1345209465000,
|
lastSendTime: 1345209465000,
|
||||||
lastContent: "12312",
|
lastContent: "12312",
|
||||||
unread: 2
|
unread: 2,
|
||||||
};
|
};
|
||||||
const contactData3 = {
|
const contactData3 = {
|
||||||
id: "contact-3",
|
id: "contact-3",
|
||||||
@@ -1282,7 +1213,7 @@ export default {
|
|||||||
index: "T",
|
index: "T",
|
||||||
unread: 32,
|
unread: 32,
|
||||||
lastSendTime: 3,
|
lastSendTime: 3,
|
||||||
lastContent: "你好123"
|
lastContent: "你好123",
|
||||||
};
|
};
|
||||||
const contactData4 = {
|
const contactData4 = {
|
||||||
id: "contact-4",
|
id: "contact-4",
|
||||||
@@ -1292,12 +1223,12 @@ export default {
|
|||||||
index: "",
|
index: "",
|
||||||
unread: 1,
|
unread: 1,
|
||||||
lastSendTime: 3,
|
lastSendTime: 3,
|
||||||
lastContent: "吃饭了嘛"
|
lastContent: "吃饭了嘛",
|
||||||
};
|
};
|
||||||
|
|
||||||
const { IMUI } = this.$refs;
|
const { IMUI } = this.$refs;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
IMUI.changeContact('contact-1');
|
IMUI.changeContact("contact-1");
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
IMUI.setLastContentRender("event", message => {
|
IMUI.setLastContentRender("event", message => {
|
||||||
@@ -1307,17 +1238,17 @@ export default {
|
|||||||
let contactList = [
|
let contactList = [
|
||||||
{ ...contactData1 },
|
{ ...contactData1 },
|
||||||
{ ...contactData2 },
|
{ ...contactData2 },
|
||||||
{ ...contactData3 }
|
{ ...contactData3 },
|
||||||
//...Array(100).fill(contactData1)
|
//...Array(100).fill(contactData1)
|
||||||
];
|
];
|
||||||
|
|
||||||
IMUI.initContacts(contactList);
|
IMUI.initContacts(contactList);
|
||||||
IMUI.initMenus([
|
IMUI.initMenus([
|
||||||
{
|
{
|
||||||
name: "messages"
|
name: "messages",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "contacts"
|
name: "contacts",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "custom1",
|
name: "custom1",
|
||||||
@@ -1357,7 +1288,7 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
isBottom: true
|
isBottom: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "custom2",
|
name: "custom2",
|
||||||
@@ -1369,19 +1300,19 @@ export default {
|
|||||||
render: menu => {
|
render: menu => {
|
||||||
return <i class="lemon-icon-group" />;
|
return <i class="lemon-icon-group" />;
|
||||||
},
|
},
|
||||||
isBottom: true
|
isBottom: true,
|
||||||
}
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
IMUI.initEditorTools([
|
IMUI.initEditorTools([
|
||||||
{
|
{
|
||||||
name: "emoji"
|
name: "emoji",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "uploadFile"
|
name: "uploadFile",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "uploadImage"
|
name: "uploadImage",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "test1",
|
name: "test1",
|
||||||
@@ -1390,7 +1321,7 @@ export default {
|
|||||||
},
|
},
|
||||||
render: () => {
|
render: () => {
|
||||||
return <span>Excel</span>;
|
return <span>Excel</span>;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "test1",
|
name: "test1",
|
||||||
@@ -1399,7 +1330,7 @@ export default {
|
|||||||
},
|
},
|
||||||
render: () => {
|
render: () => {
|
||||||
return <span>重制工具栏</span>;
|
return <span>重制工具栏</span>;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "test2",
|
name: "test2",
|
||||||
@@ -1410,302 +1341,10 @@ export default {
|
|||||||
},
|
},
|
||||||
render: () => {
|
render: () => {
|
||||||
return <b>···</b>;
|
return <b>···</b>;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]);
|
]);
|
||||||
let emojiData = [
|
IMUI.initEmoji(EmojiData);
|
||||||
{
|
|
||||||
label: "表情",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "1f600",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f600.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f62c",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f62c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f601",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f601.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f602",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f602.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f923",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f923.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f973",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f973.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f603",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f603.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f604",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f604.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f605",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f605.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f606",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f606.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f607",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f607.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f609",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f609.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f60a",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f60a.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f642",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f642.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f643",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f643.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1263a",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/263a.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f60b",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f60b.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f60c",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f60c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f60d",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f60d.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f970",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f970.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f618",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f618.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f617",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f617.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f619",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f619.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f61a",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f61a.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f61c",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f61c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f92a",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f92a.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f928",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f928.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f9d0",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f9d0.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f61d",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f61d.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f61b",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f61b.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f911",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f911.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f913",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f913.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f60e",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f60e.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f929",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f929.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f921",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f921.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f920",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f920.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f917",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f917.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f60f",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f60f.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f636",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f636.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f610",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f610.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f611",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f611.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f612",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f612.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f644",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f644.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f914",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f914.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f925",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f925.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f92d",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f92d.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f92b",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f92b.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f92c",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f92c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f92f",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f92f.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f633",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f633.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f61e",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f61e.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f61f",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f61f.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f620",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f620.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f621",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f621.png"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "收藏",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "1f62c",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f62c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "1f621",
|
|
||||||
title: "微笑",
|
|
||||||
src: "https://twemoji.maxcdn.com/2/72x72/1f621.png"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
IMUI.initEmoji(emojiData);
|
|
||||||
|
|
||||||
IMUI.setLastContentRender("voice", message => {
|
IMUI.setLastContentRender("voice", message => {
|
||||||
return <span>[语音]</span>;
|
return <span>[语音]</span>;
|
||||||
@@ -1714,13 +1353,8 @@ export default {
|
|||||||
const { SimpleIMUI } = this.$refs;
|
const { SimpleIMUI } = this.$refs;
|
||||||
contactData1.id = "11";
|
contactData1.id = "11";
|
||||||
SimpleIMUI.initContacts([contactData1]);
|
SimpleIMUI.initContacts([contactData1]);
|
||||||
SimpleIMUI.initEmoji(emojiData);
|
SimpleIMUI.initEmoji(EmojiData);
|
||||||
SimpleIMUI.changeContact(contactData1.id);
|
SimpleIMUI.changeContact(contactData1.id);
|
||||||
|
|
||||||
const { SlotIMUI } = this.$refs;
|
|
||||||
contactData3.id = "333";
|
|
||||||
SlotIMUI.initContacts([contactData4, contactData3]);
|
|
||||||
SlotIMUI.initEmoji(emojiData);
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeTheme() {
|
changeTheme() {
|
||||||
@@ -1739,13 +1373,13 @@ export default {
|
|||||||
instance.updateMessage({
|
instance.updateMessage({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
status: "going",
|
status: "going",
|
||||||
content: "正在重新发送消息..."
|
content: "正在重新发送消息...",
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
instance.updateMessage({
|
instance.updateMessage({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
status: "succeed",
|
status: "succeed",
|
||||||
content: "发送成功"
|
content: "发送成功",
|
||||||
});
|
});
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
@@ -1780,7 +1414,7 @@ export default {
|
|||||||
status: "succeed",
|
status: "succeed",
|
||||||
type: "file",
|
type: "file",
|
||||||
fileName: "被修改成文件了.txt",
|
fileName: "被修改成文件了.txt",
|
||||||
fileSize: "4200000"
|
fileSize: "4200000",
|
||||||
};
|
};
|
||||||
if (message.type == "event") {
|
if (message.type == "event") {
|
||||||
update.fromUser = this.user;
|
update.fromUser = this.user;
|
||||||
@@ -1800,7 +1434,7 @@ export default {
|
|||||||
params1: "1",
|
params1: "1",
|
||||||
params2: "2",
|
params2: "2",
|
||||||
toContactId: "contact-1",
|
toContactId: "contact-1",
|
||||||
fromUser: this.user
|
fromUser: this.user,
|
||||||
};
|
};
|
||||||
IMUI.appendMessage(message, true);
|
IMUI.appendMessage(message, true);
|
||||||
},
|
},
|
||||||
@@ -1810,7 +1444,7 @@ export default {
|
|||||||
const message = generateMessage("contact-3");
|
const message = generateMessage("contact-3");
|
||||||
message.fromUser = {
|
message.fromUser = {
|
||||||
...message.fromUser,
|
...message.fromUser,
|
||||||
...this.user
|
...this.user,
|
||||||
};
|
};
|
||||||
IMUI.appendMessage(message, true);
|
IMUI.appendMessage(message, true);
|
||||||
},
|
},
|
||||||
@@ -1831,7 +1465,7 @@ export default {
|
|||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
toContactId: "contact-3",
|
toContactId: "contact-3",
|
||||||
sendTime: getTime()
|
sendTime: getTime(),
|
||||||
};
|
};
|
||||||
IMUI.appendMessage(message, true);
|
IMUI.appendMessage(message, true);
|
||||||
},
|
},
|
||||||
@@ -1841,7 +1475,7 @@ export default {
|
|||||||
unread: 10,
|
unread: 10,
|
||||||
displayName: generateRandWord(),
|
displayName: generateRandWord(),
|
||||||
lastSendTime: getTime(),
|
lastSendTime: getTime(),
|
||||||
lastContent: "修改昵称为随机字母"
|
lastContent: "修改昵称为随机字母",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeDrawer(contact, instance) {
|
changeDrawer(contact, instance) {
|
||||||
@@ -1863,14 +1497,14 @@ export default {
|
|||||||
<p>{contact.displayName}</p>
|
<p>{contact.displayName}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleChangeContact(contact, instance) {
|
handleChangeContact(contact, instance) {
|
||||||
console.log("Event:change-contact");
|
console.log("Event:change-contact");
|
||||||
instance.updateContact({
|
instance.updateContact({
|
||||||
id: contact.id,
|
id: contact.id,
|
||||||
unread: 0
|
unread: 0,
|
||||||
});
|
});
|
||||||
instance.closeDrawer();
|
instance.closeDrawer();
|
||||||
},
|
},
|
||||||
@@ -1884,7 +1518,7 @@ export default {
|
|||||||
const otheruser = {
|
const otheruser = {
|
||||||
id: contact.id,
|
id: contact.id,
|
||||||
displayName: contact.displayName,
|
displayName: contact.displayName,
|
||||||
avatar: contact.avatar
|
avatar: contact.avatar,
|
||||||
};
|
};
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const messages = [
|
const messages = [
|
||||||
@@ -1897,8 +1531,8 @@ export default {
|
|||||||
generateMessage(instance.currentContactId, otheruser),
|
generateMessage(instance.currentContactId, otheruser),
|
||||||
{
|
{
|
||||||
...generateMessage(instance.currentContactId, this.user),
|
...generateMessage(instance.currentContactId, this.user),
|
||||||
...{ status: "failed" }
|
...{ status: "failed" },
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
let isEnd = false;
|
let isEnd = false;
|
||||||
if (
|
if (
|
||||||
@@ -1913,8 +1547,8 @@ export default {
|
|||||||
handleChangeMenu() {
|
handleChangeMenu() {
|
||||||
console.log("Event:change-menu");
|
console.log("Event:change-menu");
|
||||||
},
|
},
|
||||||
openCustomContainer() {}
|
openCustomContainer() {},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
displayName: "像梦一样自由",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-2/2020022821001845128.jpg",
|
||||||
|
index: "X",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "你开心吗",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
displayName: "梦醒时分、",
|
||||||
|
avatar: "https://p.qqan.com/up/2021-1/20211301122243621.jpg",
|
||||||
|
index: "M",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
displayName: "凌云",
|
||||||
|
avatar: "https://p.qqan.com/up/2021-1/2021129102387841.jpg",
|
||||||
|
index: "L",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
displayName: "小郭",
|
||||||
|
avatar: "https://p.qqan.com/up/2021-1/2021122135507881.jpg",
|
||||||
|
index: "X",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
displayName: "杨玉泉",
|
||||||
|
avatar: "https://p.qqan.com/up/2021-1/20211211131598147.jpg",
|
||||||
|
index: "Y",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
displayName: "森系Style",
|
||||||
|
avatar: "https://p.qqan.com/up/2021-1/2021113104111220.jpg",
|
||||||
|
index: "S",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 7,
|
||||||
|
displayName: "霸王花",
|
||||||
|
avatar: "https://p.qqan.com/up/2021-1/20211411391666.jpg",
|
||||||
|
index: "B",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "你怎么还不睡呀?",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 8,
|
||||||
|
displayName: "曾平",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-12/202012291044425822.jpg",
|
||||||
|
index: "Z",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 9,
|
||||||
|
displayName: "淡然",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-12/202012141813343503.jpg",
|
||||||
|
index: "D",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 10,
|
||||||
|
displayName: "叶子。",
|
||||||
|
avatar: "https://p.qqan.com/up/2021-1/20211301122243621.jpg",
|
||||||
|
index: "Y",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 11,
|
||||||
|
displayName: "土豆",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-12/202012111157268739.jpg",
|
||||||
|
index: "T",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 12,
|
||||||
|
displayName: "清沫",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-12/202012415467996.jpg",
|
||||||
|
index: "Q",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 13,
|
||||||
|
displayName: "Lemon-imui交流群",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-11/20201127157109035.jpg",
|
||||||
|
index: "L",
|
||||||
|
isGroup: true,
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "这个咋处理啊?",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 14,
|
||||||
|
displayName: "系统通知",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-6/2020061117234279854.jpg",
|
||||||
|
index: "[1]系統通知",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "宁静致远通过了你的好友请求",
|
||||||
|
renderContainer() {
|
||||||
|
return (
|
||||||
|
<div style="padding:15px;">
|
||||||
|
<div>宁静致远通过了你的好友请求</div>
|
||||||
|
<div>宁静致远通过了你的好友请求</div>
|
||||||
|
<div>宁静致远通过了你的好友请求</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 15,
|
||||||
|
displayName: "宁静致远。",
|
||||||
|
avatar: "https://p.qqan.com/up/2020-6/2020060308522797777.jpg",
|
||||||
|
index: "N",
|
||||||
|
unread: 0,
|
||||||
|
lastSendTime: 1566047865417,
|
||||||
|
lastContent: "",
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -0,0 +1,292 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
label: "表情",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: "1f600",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f600.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f62c",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f62c.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f601",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f601.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f602",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f602.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f923",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f923.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f973",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f973.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f603",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f603.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f604",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f604.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f605",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f605.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f606",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f606.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f607",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f607.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f609",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f609.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f60a",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f60a.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f642",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f642.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f643",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f643.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1263a",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/263a.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f60b",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f60b.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f60c",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f60c.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f60d",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f60d.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f970",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f970.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f618",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f618.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f617",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f617.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f619",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f619.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f61a",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f61a.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f61c",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f61c.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f92a",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f92a.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f928",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f928.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f9d0",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f9d0.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f61d",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f61d.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f61b",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f61b.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f911",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f911.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f913",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f913.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f60e",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f60e.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f929",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f929.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f921",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f921.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f920",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f920.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f917",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f917.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f60f",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f60f.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f636",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f636.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f610",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f610.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f611",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f611.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f612",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f612.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f644",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f644.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f914",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f914.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f925",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f925.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f92d",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f92d.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f92b",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f92b.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f92c",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f92c.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f92f",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f92f.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f633",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f633.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f61e",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f61e.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f61f",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f61f.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f620",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f620.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f621",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f621.png",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "收藏",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: "1f62c",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f62c.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "1f621",
|
||||||
|
title: "微笑",
|
||||||
|
src: "https://twemoji.maxcdn.com/2/72x72/1f621.png",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
import ContactsData from "./contacts";
|
||||||
|
import UserData from "./user";
|
||||||
|
const generateRandId = () => {
|
||||||
|
return Math.random()
|
||||||
|
.toString(36)
|
||||||
|
.substr(-8);
|
||||||
|
};
|
||||||
|
const getContact = id => {
|
||||||
|
const data = ContactsData.find(contact => contact.id == id);
|
||||||
|
return { id: data.id, avatar: data.avatar, displayName: data.displayName };
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
1: [
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "问你件事",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: UserData,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "啥子。",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(1),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "为什么",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: UserData,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "你穿了高跟鞋还这么矮",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: UserData,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "因为我矮啊。[!1f600][!1f600][!1f600]",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(1),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "你开心吗",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(1),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
2: [],
|
||||||
|
3: [],
|
||||||
|
4: [],
|
||||||
|
5: [],
|
||||||
|
6: [],
|
||||||
|
7: [],
|
||||||
|
8: [],
|
||||||
|
9: [],
|
||||||
|
10: [],
|
||||||
|
11: [],
|
||||||
|
12: [],
|
||||||
|
13: [
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "我是测试时候看到的",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(4),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "上新版本了,玩玩",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(4),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "项目内没有搞这个",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(4),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "@awesome 最新的,不然哪有这功能",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(5),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "其实是跟你的遮罩层有冲突",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(4),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "自己修改index哈",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: UserData,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "你们升级到最近版了吗?",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(6),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: generateRandId(),
|
||||||
|
status: "succeed",
|
||||||
|
type: "text",
|
||||||
|
sendTime: 1566047865417,
|
||||||
|
content: "wo 现在用的142",
|
||||||
|
toContactId: 1,
|
||||||
|
fromUser: getContact(7),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
14: [],
|
||||||
|
15: [],
|
||||||
|
};
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
id: 1000,
|
||||||
|
avatar: "https://p.qqan.com/up/2018-4/15244505348390471.jpg",
|
||||||
|
displayName: "野火。",
|
||||||
|
};
|
||||||
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
.lemon-message.lemon-message-voice{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lemon-message.lemon-message-voice .lemon-message__content{border:2px solid #000;font-size:12px;cursor:pointer}.lemon-message.lemon-message-voice .lemon-message__content:before{display:none}::-moz-selection{background:#000;color:#fff}::selection{background:#000;color:#fff}body{font-family:Microsoft YaHei;background:#f6f6f6!important}#app{width:90%;margin:0 auto;padding-bottom:100px}#app .scroll-top{cursor:pointer;position:fixed;bottom:40px;left:50%;border-radius:50%;background:#fff;font-size:18px;overflow:hidden;width:40px;height:40px;line-height:40px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;-webkit-transform:rotate(-45deg) translateX(-50%);transform:rotate(-45deg) translateX(-50%);-webkit-box-shadow:0 0 30px rgba(0,0,0,.1);box-shadow:0 0 30px rgba(0,0,0,.1)}#app .scroll-top:hover{font-size:22px}a{color:#0c5ed9;text-decoration:none;font-size:12px}.action{margin-top:20px}.action .lemon-button{margin-right:10px;margin-bottom:10px}.link{font-size:14px;margin-top:15px}.link a{margin:0 5px;text-decoration:none;background:#ffba00;border-radius:4px;padding:5px 10px;color:rgba(0,0,0,.8)}.link a,.logo{display:inline-block}.logo{position:relative;margin:60px auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.logo-text{font-size:38px}.logo-sub{font-size:18px;color:#999;font-weight:300}.logo-badge{position:absolute;top:-10px;left:230px;background:#000;border-radius:16px;color:#f9f9f9;font-size:12px;padding:4px 8px}.title{font-size:24px;line-height:26px;border-left:1px solid #ffba00;padding-left:15px;margin-bottom:15px;margin-top:30px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.table{width:100%;border-radius:10px;background:#fff;border-collapse:collapse}.table tr{cursor:pointer}.table tr:not(.table-head):hover{background:#ffba00!important}.table tr:nth-of-type(2n){background:#f9f9f9}.table th{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#999}.table td,.table th{text-align:left;padding:10px 15px;font-size:14px;font-weight:400}.imui-center{margin-bottom:60px}.imui-center .lemon-wrapper{border:1px solid #ddd}.imui-center .lemon-drawer{border:1px solid #ddd;border-left:0}.drawer-content{padding:15px}.more{font-size:12px;line-height:24px;height:24px;position:absolute;top:14px;right:14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#f1f1f1;display:inline-block;border-radius:4px;background:#111;padding:0 8px}.more:active{background:#999}.bar{line-height:30px;background:#fff;margin:15px;color:#666;font-size:12px}.bar,.cover{text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cover{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cover i{font-size:84px;color:#e6e6e6}.cover p{font-size:18px;color:#ddd;line-height:50px}.article-item{line-height:34px;cursor:pointer}.article-item:hover{text-decoration:underline;color:#318efd}pre{background:#fff;border-radius:8px;padding:15px}.lemon-simple .lemon-container{z-index:5}.lemon-simple .lemon-drawer{z-index:4}input#switch[type=checkbox]{height:0;width:0;display:none}label#switch-label{cursor:pointer;text-indent:-9999px;width:34px;height:20px;background:#aaa;display:block;border-radius:100px;position:relative}label#switch-label:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;background:#fff;border-radius:20px;-webkit-transition:.3s;transition:.3s}input#switch:checked+label{background:#0fd547}input#switch:checked+label:after{left:calc(100% - 2px);-webkit-transform:translateX(-100%);transform:translateX(-100%)}label#switch-label:active:after{width:20px}.lemon-popover{border:1px solid #eee;font-size:14px;font-variant:tabular-nums;line-height:1.5;color:rgba(0,0,0,.65);z-index:10;background-color:#fff;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.08);box-shadow:0 2px 8px rgba(0,0,0,.08);position:absolute;-webkit-transform-origin:50% 150%;transform-origin:50% 150%}.lemon-popover__content{padding:15px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;z-index:1}.lemon-popover__arrow{left:50%;-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg);position:absolute;z-index:0;bottom:-4px;-webkit-box-shadow:3px 3px 7px rgba(0,0,0,.07);box-shadow:3px 3px 7px rgba(0,0,0,.07);width:8px;height:8px;background:#fff}.lemon-slide-top-enter-active,.lemon-slide-top-leave-active{-webkit-transition:all .2s cubic-bezier(.645,.045,.355,1);transition:all .2s cubic-bezier(.645,.045,.355,1)}.lemon-slide-top-enter,.lemon-slide-top-leave-to{-webkit-transform:translateY(-10px) scale(.8);transform:translateY(-10px) scale(.8);opacity:0}.lemon-tabs{background:Line truncated
|
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
.lemon-message.lemon-message-voice{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lemon-message.lemon-message-voice .lemon-message__content{border:2px solid #000;font-size:12px;cursor:pointer}.lemon-message.lemon-message-voice .lemon-message__content:before{display:none}.slot-group{width:170px;border-left:1px solid #ddd;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:10px}.slot-group .slot-search{margin:5px 0}.slot-group-notice{color:#999;padding:6px 0;font-size:12px}.slot-group-title{font-size:12px}.slot-group-member{font-size:12px;line-height:18px}.slot-group-menu span{display:inline-block;cursor:pointer;color:#888;margin:4px 10px 0 0;border-bottom:2px solid transparent}.slot-group-menu span:hover{color:#000;border-color:#333}.slot-contact-fixedtop{padding:10px;border-bottom:1px solid #ddd}.slot-search{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px;border:1px solid #bbb;padding:5px 10px}::-moz-selection{background:#000;color:#fff}::selection{background:#000;color:#fff}body{font-family:Microsoft YaHei;background:#f6f6f6!important}#app{width:90%;margin:0 auto;padding-bottom:100px}#app .scroll-top{cursor:pointer;position:fixed;bottom:40px;left:50%;border-radius:50%;background:#fff;font-size:18px;overflow:hidden;width:40px;height:40px;line-height:40px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;-webkit-transform:rotate(-45deg) translateX(-50%);transform:rotate(-45deg) translateX(-50%);-webkit-box-shadow:0 0 30px rgba(0,0,0,.1);box-shadow:0 0 30px rgba(0,0,0,.1)}#app .scroll-top:hover{font-size:22px}a{color:#0c5ed9;text-decoration:none;font-size:12px}.action{margin-top:20px}.action .lemon-button{margin-right:10px;margin-bottom:10px}.link{font-size:14px;margin-top:15px}.link a{margin:0 5px;text-decoration:none;background:#ffba00;border-radius:4px;padding:5px 10px;color:rgba(0,0,0,.8)}.link a,.logo{display:inline-block}.logo{position:relative;margin:60px auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.logo-text{font-size:38px}.logo-sub{font-size:18px;color:#999;font-weight:300}.logo-badge{position:absolute;top:-10px;left:230px;background:#000;border-radius:16px;color:#f9f9f9;font-size:12px;padding:4px 8px}.title{font-size:24px;line-height:26px;border-left:1px solid #ffba00;padding-left:15px;margin-bottom:15px;margin-top:30px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.table{width:100%;border-radius:10px;background:#fff;border-collapse:collapse}.table tr{cursor:pointer}.table tr:not(.table-head):hover{background:#ffba00!important}.table tr:nth-of-type(2n){background:#f9f9f9}.table th{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#999}.table td,.table th{text-align:left;padding:10px 15px;font-size:14px;font-weight:400}.imui-center{margin-bottom:60px}.imui-center .lemon-wrapper{border:1px solid #ddd}.imui-center .lemon-drawer{border:1px solid #ddd;border-left:0}.drawer-content{padding:15px}.more{font-size:12px;line-height:24px;height:24px;position:absolute;top:14px;right:14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#f1f1f1;display:inline-block;border-radius:4px;background:#111;padding:0 8px}.more:active{background:#999}.bar{line-height:30px;background:#fff;margin:15px;color:#666;font-size:12px}.bar,.cover{text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cover{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cover i{font-size:84px;color:#e6e6e6}.cover p{font-size:18px;color:#ddd;line-height:50px}.article-item{line-height:34px;cursor:pointer}.article-item:hover{text-decoration:underline;color:#318efd}pre{background:#fff;border-radius:8px;padding:15px}.lemon-simple .lemon-container{z-index:5}.lemon-simple .lemon-drawer{z-index:4}input#switch[type=checkbox]{height:0;width:0;display:none}label#switch-label{cursor:pointer;text-indent:-9999px;width:34px;height:20px;background:#aaa;display:block;border-radius:100px;position:relative}label#switch-label:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;background:#fff;border-radius:20px;-webkit-transition:.3s;transition:.3s}input#switch:checked+label{background:#0fd547}input#switch:checked+label:after{left:calc(100% - 2px);-webkit-transform:translateX(-100%);transform:translateX(-100%)}label#switch-label:active:after{width:20px}.lemon-popover{border:1px solid #eee;font-size:14px;font-variant:tabular-nums;line-height:1.5;color:rgba(0,0,0,.65);z-index:10;background-color:#fff;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.08);box-shadow:0 2px 8px rgba(0,0,0,.08);position:absolute;-webkit-transform-origin:50% 150%;transform-origin:50% 150%}.lemon-popover__content{padding:15px;-webkit-box-Line truncated
|
||||||
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.4c3079e2.css rel=preload as=style><link href=js/chunk-vendors.2abee366.js rel=preload as=script><link href=js/index.eb3bbc56.js rel=preload as=script><link href=css/index.4c3079e2.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.eb3bbc56.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.ef88e8c1.css rel=preload as=style><link href=js/chunk-vendors.e4810482.js rel=preload as=script><link href=js/index.1eaba05d.js rel=preload as=script><link href=css/index.ef88e8c1.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.1eaba05d.js></script></body></html>
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"0353":function(t,e,n){"use strict";var r=n("6bf8"),o=RegExp.prototype.exec,i=String.prototype.replace,a=o,c="lastIndex",s=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[c]||0!==e[c]}(),u=void 0!==/()??/.exec("")[1],f=s||u;f&&(a=function(t){var e,n,a,f,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),s&&(e=l[c]),a=o.call(l,t),s&&a&&(l[c]=l.global?a.index+a[0].length:e),u&&a&&a.length>1&&i.call(a[0],n,(function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(a[f]=void 0)})),a}),t.exports=a},"0451":function(t,e,n){var r=n("9cff"),o=n("d1cb"),i=n("839a")("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},"05fd":function(t,e,n){t.exports=n("baa7")("native-function-to-string",Function.toString)},"065d":function(t,e,n){var r=n("bb8b"),o=n("5edc");t.exports=n("26df")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"065e":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"0926":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"0b34":function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"0c29":function(t,e){e.f=Object.getOwnPropertySymbols},"0c84":function(t,e,n){"use strict";var r=n("1663")(!0);n("120f")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},"0e4d":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},"120f":function(t,e,n){"use strict";var r=n("3d8a"),o=n("e99b"),i=n("84e8"),a=n("065d"),c=n("953d"),s=n("3460"),u=n("bac3"),f=n("addc"),l=n("839a")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",h="values",y=function(){return this};t.exports=function(t,e,n,m,g,b,_){s(n,e,m);var w,x,A,O=function(t){if(!p&&t in k)return k[t];switch(t){case v:return function(){return new n(this,t)};case h:return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",S=g==h,$=!1,k=t.prototype,E=k[l]||k[d]||g&&k[g],j=E||O(g),T=g?S?O("entries"):j:void 0,I="Array"==e&&k.entries||E;if(I&&(A=f(I.call(new t)),A!==Object.prototype&&A.next&&(u(A,C,!0),r||"function"==typeof A[l]||a(A,l,y))),S&&E&&E.name!==h&&($=!0,j=function(){return E.call(this)}),r&&!_||!p&&!$&&k[l]||a(k,l,j),c[e]=j,c[C]=y,g)if(w={values:S?j:O(h),keys:b?j:O(v),entries:T},_)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(p||$),e,w);return w}},1374:function(t,e,n){"use strict";var r=n("bb8b"),o=n("5edc");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},1663:function(t,e,n){var r=n("212e"),o=n("3ab0");t.exports=function(t){return function(e,n){var i,a,c=String(o(e)),s=r(n),u=c.length;return s<0||s>=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},"1a9a":function(t,e,n){var r=n("839a")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],c=i[r]();c.next=function(){return{done:n=!0}},i[r]=function(){return c},t(i)}catch(a){}return n}},"1b0b":function(t,e,n){var r=n("a86f"),o=n("3250"),i=n("839a")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},"1b96":function(t,e,n){var r=n("cea2");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"1bc7":function(t,e,n){for(var r=n("25ba"),o=n("93ca"),i=n("84e8"),a=n("0b34"),c=n("065d"),s=n("953d"),u=n("839a"),f=u("iterator"),l=u("toStringTag"),p=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(d),h=0;h<v.length;h++){var y,m=v[h],g=d[m],b=a[m],_=b&&b.prototype;if(_&&(_[f]||c(_,f,p),_[l]||c(_,l,m),s[m]=p,g))for(y in r)_[y]||i(_,y,r[y],!0)}},"1e4d":function(t,e,n){var r=n("3250");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.cLine truncated
|
|
||||||
/*!
|
|
||||||
* Vue.js v2.6.12
|
|
||||||
* (c) 2014-2020 Evan You
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function c(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function s(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function v(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function h(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}y("slot,component",!0);var m=y("key,ref,slot,slot-scope,is");function g(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function _(t,e){return b.call(t,e)}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var x=/-(\w)/g,A=w((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),O=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),C=/\B([A-Z])/g,S=w((function(t){return t.replace(C,"-$1").toLowerCase()}));function $(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function k(t,e){return t.bind(e)}var E=Function.prototype.bind?k:$;function j(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function I(t){for(var e={},n=0;n<t.length;n++)t[n]&&T(e,t[n]);return e}function L(t,e,n){}var P=function(t,e,n){return!1},N=function(t){return t};function F(t,e){if(t===e)return!0;var n=s(t),r=s(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return F(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var a=Object.keys(t),c=Object.keys(e);return a.length===c.length&&a.every((function(n){return F(t[n],e[n])}))}catch(u){return!1}}function M(t,e){for(var n=0;n<t.length;n++)if(F(t[n],e))return n;return-1}function D(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var R="data-server-rendered",V=["component","directive","filter"],U=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],H={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:P,isReservedAttr:P,isUnknownElement:P,getTagNamespace:L,parsePlatformTagName:N,mustUseProp:P,async:!0,_lifecycleHooks:U},B=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function G(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function z(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var W=new RegExp("[^"+B.source+".$_\\d]");function K(t){if(!W.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}var q,X="__proto__"in{},Y="undefined"!==typeof window,J="undefined"!==typeof WXEnvironment&&!!WXEnvironment.platform,Z=J&&WXEnvironment.platform.toLowerCase(),Q=Y&&window.navigator.userAgent.toLowerCase(),tt=Q&&/msie|trident/.test(Q),et=Q&&Q.indexOf("msie 9.0")>0,nt=Q&&Q.indexOf("edge/")>0,rt=(Q&&Q.indexOf("android"),Q&&/iphone|ipad|ipod|ios/.test(Q)||"ios"===Z),ot=(Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q),Q&&Q.match(/firefox\/(\d+)/)),it={}.watch,at=!1;if(Y)try{var ct={};Object.defineProperty(ct,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,ct)}catch(Aa){}var st=function(){return void 0===q&&(q=!Y&&!J&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),q},ut=Y&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ft(t){return"function"===typeof t&&/native code/.test(t.toString())}var lt,pt="undefined"!==typeof Symbol&&ft(Symbol)&&"undefined"!==typeof Reflect&&ft(Reflect.ownKeys);lt="undefined"!==typeof Set&&ft(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var dt=L,vt=0,ht=function(){this.id=vt++,this.subs=[]};ht.prototype.addSub=function(t){this.subs.push(t)},ht.prototype.removeSub=function(t){g(this.subs,t)},ht.prototype.depend=funcLine truncated
|
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),c=n("84f2"),s=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",h="values",y=function(){return this};t.exports=function(t,e,n,m,g,b,_){s(n,e,m);var x,w,O,A=function(t){if(!p&&t in E)return E[t];switch(t){case v:return function(){return new n(this,t)};case h:return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",C=g==h,k=!1,E=t.prototype,j=E[l]||E[d]||g&&E[g],$=j||A(g),T=g?C?A("entries"):$:void 0,P="Array"==e&&E.entries||j;if(P&&(O=f(P.call(new t)),O!==Object.prototype&&O.next&&(u(O,S,!0),r||"function"==typeof O[l]||a(O,l,y))),C&&j&&j.name!==h&&(k=!0,$=function(){return j.call(this)}),r&&!_||!p&&!k&&E[l]||a(E,l,$),c[e]=$,c[S]=y,g)if(x={values:C?$:A(h),keys:b?$:A(v),entries:T},_)for(w in x)w in E||i(E,w,x[w]);else o(o.P+o.F*(p||k),e,x);return x}},"02f4":function(t,e,n){var r=n("4588"),o=n("be13");t.exports=function(t){return function(e,n){var i,a,c=String(o(e)),s=r(n),u=c.length;return s<0||s>=u?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):i:t?c.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"097d":function(t,e,n){"use strict";var r=n("5ca1"),o=n("8378"),i=n("7726"),a=n("ebd6"),c=n("bcaa");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then(function(){return n})}:t,n?function(n){return c(e,t()).then(function(){throw n})}:t)}})},"0a49":function(t,e,n){var r=n("9b43"),o=n("626a"),i=n("4bf8"),a=n("9def"),c=n("cd1c");t.exports=function(t,e){var n=1==t,s=2==t,u=3==t,f=4==t,l=6==t,p=5==t||l,d=e||c;return function(e,c,v){for(var h,y,m=i(e),g=o(m),b=r(c,v,3),_=a(g.length),x=0,w=n?d(e,_):s?d(e,0):void 0;_>x;x++)if((p||x in g)&&(h=g[x],y=b(h,x,m),t))if(n)w[x]=y;else if(y)switch(t){case 3:return!0;case 5:return h;case 6:return x;case 2:w.push(h)}else if(f)return!1;return l?-1:u||f?f:w}}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},"0fc9":function(t,e,n){var r=n("3a38"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},1173:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"11e9":function(t,e,n){var r=n("52a7"),o=n("4630"),i=n("6821"),a=n("6a99"),c=n("69a8"),s=n("c69a"),u=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?u:function(t,e){if(t=i(t),e=a(e,!0),s)try{return u(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),c=a.length,s=0;while(c>s)r.f(t,n=a[s++],e[n]);return t}},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},1991:function(t,e,n){var r,o,i,a=n("9b43"),c=n("31f4"),s=n("fab2"),u=n("230e"),f=n("7726"),l=f.process,p=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=f.Dispatch,y=0,m={},g="onreadystatechange",b=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},_=function(t){b.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return m[++y]=function(){c("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete m[t]},"process"==n("2d95")(l)?r=function(t){l.nextTick(a(b,t,1))}:h&&h.now?r=function(t){h.now(a(b,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r=g in u("script")?function(t){s.appendChild(u("script"))[g]=function(){s.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:p,clear:d}},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==tLine truncated
|
||||||
|
/*!
|
||||||
|
* Vue.js v2.6.10
|
||||||
|
* (c) 2014-2019 Evan You
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function c(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function s(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function v(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function h(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}y("slot,component",!0);var m=y("key,ref,slot,slot-scope,is");function g(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function _(t,e){return b.call(t,e)}function x(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var w=/-(\w)/g,O=x(function(t){return t.replace(w,function(t,e){return e?e.toUpperCase():""})}),A=x(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),S=/\B([A-Z])/g,C=x(function(t){return t.replace(S,"-$1").toLowerCase()});function k(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function E(t,e){return t.bind(e)}var j=Function.prototype.bind?E:k;function $(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function P(t){for(var e={},n=0;n<t.length;n++)t[n]&&T(e,t[n]);return e}function L(t,e,n){}var I=function(t,e,n){return!1},M=function(t){return t};function N(t,e){if(t===e)return!0;var n=s(t),r=s(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every(function(t,n){return N(t,e[n])});if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var a=Object.keys(t),c=Object.keys(e);return a.length===c.length&&a.every(function(n){return N(t[n],e[n])})}catch(u){return!1}}function F(t,e){for(var n=0;n<t.length;n++)if(N(t[n],e))return n;return-1}function D(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var R="data-server-rendered",V=["component","directive","filter"],U=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],G={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:I,isReservedAttr:I,isUnknownElement:I,getTagNamespace:L,parsePlatformTagName:M,mustUseProp:I,async:!0,_lifecycleHooks:U},H=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function B(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function z(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var W=new RegExp("[^"+H.source+".$_\\d]");function K(t){if(!W.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}var q,X="__proto__"in{},Y="undefined"!==typeof window,J="undefined"!==typeof WXEnvironment&&!!WXEnvironment.platform,Z=J&&WXEnvironment.platform.toLowerCase(),Q=Y&&window.navigator.userAgent.toLowerCase(),tt=Q&&/msie|trident/.test(Q),et=Q&&Q.indexOf("msie 9.0")>0,nt=Q&&Q.indexOf("edge/")>0,rt=(Q&&Q.indexOf("android"),Q&&/iphone|ipad|ipod|ios/.test(Q)||"ios"===Z),ot=(Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q),Q&&Q.match(/firefox\/(\d+)/)),it={}.watch,at=!1;if(Y)try{var ct={};Object.defineProperty(ct,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,ct)}catch(Oa){}var st=function(){return void 0===q&&(q=!Y&&!J&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),q},ut=Y&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ft(t){return"function"===typeof t&&/native code/.test(t.toString())}var lt,pt="undefined"!==typeof Symbol&&ft(Symbol)&&"undefined"!==typeof Reflect&&ft(Reflect.ownKeys);lt="undefined"!==typeof Set&&ft(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var dt=L,vt=0,ht=function(){this.id=vt++,this.subs=[]};ht.prototype.addSub=function(t){this.subs.push(t)},ht.prototype.removeSub=function(t){g(this.subs,t)},ht.prototype.depend=function(){ht.taLine truncated
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
(function(t){function e(e){for(var i,r,o=e[0],c=e[1],d=e[2],u=0,m=[];u<o.length;u++)r=o[u],a[r]&&m.push(a[r][0]),a[r]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(t[i]=c[i]);l&&l(e);while(m.length)m.shift()();return s.push.apply(s,d||[]),n()}function n(){for(var t,e=0;e<s.length;e++){for(var n=s[e],i=!0,o=1;o<n.length;o++){var c=n[o];0!==a[c]&&(i=!1)}i&&(s.splice(e--,1),t=r(r.s=n[0]))}return t}var i={},a={index:0},s=[];function r(e){if(i[e])return i[e].exports;var n=i[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var d=0;d<o.length;d++)e(o[d]);var l=c;s.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("c31f")},"04f4":function(t,e,n){"use strict";var i=n("26f7"),a=n.n(i);a.a},"08dd":function(t,e,n){},"0af2":function(t,e,n){},"0e15":function(t,e,n){"use strict";var i=n("9768"),a=n.n(i);a.a},1021:function(t,e,n){},"107a":function(t,e,n){},"15cf":function(t,e,n){},1663:function(t,e,n){"use strict";var i=n("e86c"),a=n.n(i);a.a},"1e45":function(t,e,n){"use strict";var i=n("83d7"),a=n.n(i);a.a},"26f7":function(t,e,n){},3423:function(t,e,n){"use strict";var i=n("107a"),a=n.n(i);a.a},"428f":function(t,e,n){},"436f":function(t,e,n){"use strict";var i=n("0af2"),a=n.n(i);a.a},"476d":function(t,e,n){"use strict";var i=n("428f"),a=n.n(i);a.a},"49c2":function(t,e,n){"use strict";var i=n("acce"),a=n.n(i);a.a},"4d21":function(t,e,n){"use strict";var i=n("917b"),a=n.n(i);a.a},"6a2b":function(t,e,n){},"6da9":function(t,e,n){},7802:function(t,e,n){},"820e":function(t,e,n){},"83d7":function(t,e,n){},"909e":function(t,e,n){"use strict";var i=n("1021"),a=n.n(i);a.a},"917b":function(t,e,n){},9224:function(t){t.exports={name:"lemon-imui",version:"1.6.8",main:"dist/index.umd.min.js",description:"基于 VUE2.0 的 IM 聊天组件",homepage:"http://june000.gitee.io/lemon-im/",keywords:["vue","im","chat","vueim","vuechat","webim","webchat"],repository:{type:"git",url:"git+https://github.com/fanjyy/lemon-imui.git"},scripts:{serve:"vue-cli-service serve",build:"vue-cli-service build --target lib --name index packages/index.js","build-examples":"vue-cli-service build --dest examples/dist examples/main.js",lint:"vue-cli-service lint"},dependencies:{vue:"^2.6.10"},devDependencies:{"@vue/cli-plugin-babel":"^3.6.0","@vue/cli-plugin-eslint":"^3.6.0","@vue/cli-service":"^3.6.0","@vue/eslint-config-prettier":"^4.0.1","babel-eslint":"^10.0.2",eslint:"^5.16.0","eslint-plugin-vue":"^5.2.3",stylus:"^0.54.5","stylus-loader":"^3.0.2","vue-template-compiler":"^2.5.21"},author:"fanjun",license:"MIT"}},9768:function(t,e,n){},9800:function(t,e,n){},"9b01":function(t,e,n){"use strict";var i=n("6da9"),a=n.n(i);a.a},"9c9b":function(t,e,n){"use strict";var i=n("9800"),a=n.n(i);a.a},a215:function(t,e,n){},acce:function(t,e,n){},c31f:function(t,e,n){"use strict";n.r(e);n("cadf"),n("551c"),n("f751"),n("097d");var i=n("2b0e"),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("div",{staticClass:"scroll-top",on:{click:t.scrollToTop}},[t._v("🚀")]),n("div",{staticClass:"logo"},[n("div",{staticClass:"logo-text"},[n("b",[t._v("Lemon")]),t._v(" IMUI"),n("span",{staticClass:"logo-badge"},[t._v(t._s(this.packageData.version))])]),n("div",{staticClass:"logo-sub"},[t._v(t._s(this.packageData.description))]),t._m(0),n("br"),t._m(1),t._m(2)]),n("div",{staticClass:"imui-center"},[n("lemon-imui",{ref:"IMUI",attrs:{user:t.user,contextmenu:t.contextmenu,"contact-contextmenu":t.contactContextmenu,theme:t.theme,"hide-menu":t.hideMenu,"hide-menu-avatar":t.hideMenuAvatar,"hide-message-name":t.hideMessageName,"hide-message-time":t.hideMessageTime},on:{"change-menu":t.handleChangeMenu,"change-contact":t.handleChangeContact,"pull-messages":t.handlePullMessages,"message-click":t.handleMessageClick,"menu-avatar-click":t.handleMenuAvatarClick,send:t.handleSend},scopedSlots:t._u([{key:"cover",fn:function(){return[n("div",{staticClass:"cover"},[n("i",{staticClass:"lemon-icon-message"}),n("p",[n("b",[t._v("自定义封面 Lemon")]),t._v(" IMUI")])])]},proxy:!0},{key:"message-title",fn:function(e){return[n("span",[t._v(t._s(e.displayName))]),n("smallLine truncated
|
||||||
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
(function(t){function e(e){for(var i,r,o=e[0],c=e[1],d=e[2],u=0,m=[];u<o.length;u++)r=o[u],Object.prototype.hasOwnProperty.call(s,r)&&s[r]&&m.push(s[r][0]),s[r]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(t[i]=c[i]);l&&l(e);while(m.length)m.shift()();return a.push.apply(a,d||[]),n()}function n(){for(var t,e=0;e<a.length;e++){for(var n=a[e],i=!0,o=1;o<n.length;o++){var c=n[o];0!==s[c]&&(i=!1)}i&&(a.splice(e--,1),t=r(r.s=n[0]))}return t}var i={},s={index:0},a=[];function r(e){if(i[e])return i[e].exports;var n=i[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var d=0;d<o.length;d++)e(o[d]);var l=c;a.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("c31f")},"01be":function(t,e,n){},"0484":function(t,e,n){},"04f4":function(t,e,n){"use strict";n("de97")},"0e15":function(t,e,n){"use strict";n("d5e9")},1179:function(t,e,n){},16636:function(t,e,n){"use strict";n("e706")},"1c18":function(t,e,n){},"1e45":function(t,e,n){"use strict";n("e021")},3423:function(t,e,n){"use strict";n("4942")},3550:function(t,e,n){},"436f":function(t,e,n){"use strict";n("1179")},"476d":function(t,e,n){"use strict";n("9c51")},4942:function(t,e,n){},"49c2":function(t,e,n){"use strict";n("5d33")},"4c4e":function(t,e,n){},"4d21":function(t,e,n){"use strict";n("1c18")},"5d33":function(t,e,n){},"6a2b":function(t,e,n){},"909e":function(t,e,n){"use strict";n("0484")},9224:function(t){t.exports=JSON.parse('{"name":"lemon-imui","version":"1.6.7","main":"dist/index.umd.min.js","description":"基于 VUE2.0 的 IM 聊天组件","homepage":"http://june000.gitee.io/lemon-im/","keywords":["vue","im","chat","vueim","vuechat","webim","webchat"],"repository":{"type":"git","url":"git+https://github.com/fanjyy/lemon-imui.git"},"scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build --target lib --name index packages/index.js","build-examples":"vue-cli-service build --dest examples/dist examples/main.js","lint":"vue-cli-service lint"},"dependencies":{"vue":"^2.6.10"},"devDependencies":{"@vue/cli-plugin-babel":"^3.6.0","@vue/cli-plugin-eslint":"^3.6.0","@vue/cli-service":"^3.6.0","@vue/eslint-config-prettier":"^4.0.1","babel-eslint":"^10.0.2","eslint":"^5.16.0","eslint-plugin-vue":"^5.2.3","stylus":"^0.54.5","stylus-loader":"^3.0.2","vue-template-compiler":"^2.5.21"},"author":"fanjun","license":"MIT"}')},"9b01":function(t,e,n){"use strict";n("aa55")},"9c51":function(t,e,n){},"9c9b":function(t,e,n){"use strict";n("dbd8")},aa55:function(t,e,n){},c31f:function(t,e,n){"use strict";n.r(e);n("25ba"),n("5f1c"),n("6ba0"),n("b47f");var i=n("a593"),s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("div",{staticClass:"scroll-top",on:{click:t.scrollToTop}},[t._v("🚀")]),n("div",{staticClass:"logo"},[n("div",{staticClass:"logo-text"},[n("b",[t._v("Lemon")]),t._v(" IMUI"),n("span",{staticClass:"logo-badge"},[t._v(t._s(this.packageData.version))])]),n("div",{staticClass:"logo-sub"},[t._v(t._s(this.packageData.description))]),t._m(0),n("br"),t._m(1),t._m(2)]),n("div",{staticClass:"imui-center"},[n("lemon-imui",{ref:"IMUI",attrs:{user:t.user,contextmenu:t.contextmenu,"contact-contextmenu":t.contactContextmenu,theme:t.theme,"hide-menu":t.hideMenu,"hide-menu-avatar":t.hideMenuAvatar,"hide-message-name":t.hideMessageName,"hide-message-time":t.hideMessageTime},on:{"change-menu":t.handleChangeMenu,"change-contact":t.handleChangeContact,"pull-messages":t.handlePullMessages,"message-click":t.handleMessageClick,"menu-avatar-click":t.handleMenuAvatarClick,send:t.handleSend},scopedSlots:t._u([{key:"cover",fn:function(){return[n("div",{staticClass:"cover"},[n("i",{staticClass:"lemon-icon-message"}),n("p",[n("b",[t._v("自定义封面 Lemon")]),t._v(" IMUI")])])]},proxy:!0},{key:"message-title",fn:function(e){return[n("span",[t._v(t._s(e.displayName))]),n("small",{staticClass:"more",on:{click:function(n){return t.changeDrawer(e,t.$refs.IMUI)}}},[t._v(t._s(t.$refs.IMUI&&t.$refs.IMUI.drawerVisible?"关闭":"打开")+"抽屉")])]}}])}),n("a",{staticStyle:{"font-size":"14px"},attrs:{target:"_blank",href:"https://codesandbox.io/s/sweet-c
Line truncated
|
|
||||||
@@ -0,0 +1,200 @@
|
|||||||
|
<script>
|
||||||
|
import UserData from "../database/user";
|
||||||
|
import ContactsData from "../database/contacts";
|
||||||
|
import MessagesData from "../database/messages";
|
||||||
|
import EmojiData from "../database/emoji";
|
||||||
|
export default {
|
||||||
|
name: "QqImui",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div class="qq-lemon-imui">
|
||||||
|
<lemon-imui
|
||||||
|
class="lemon-slot"
|
||||||
|
user={UserData}
|
||||||
|
width={900}
|
||||||
|
avatar-cricle
|
||||||
|
hide-message-time
|
||||||
|
ref="IMUI"
|
||||||
|
on={{
|
||||||
|
"pull-messages": this.handlePullMessages,
|
||||||
|
"change-contact": this.handleChangeContact,
|
||||||
|
send: this.handleSend,
|
||||||
|
}}
|
||||||
|
scopedSlots={{
|
||||||
|
"message-title": contact => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div style="display:flex;justify-content:space-between">
|
||||||
|
<span>{contact.displayName}</span>
|
||||||
|
<span style="font-size:12px;">
|
||||||
|
<span>打开抽屉:</span>
|
||||||
|
<span
|
||||||
|
class="cursor:pointer;"
|
||||||
|
on-click={() => this.openDrawer("right")}
|
||||||
|
>
|
||||||
|
右侧 |{" "}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="cursor:pointer;"
|
||||||
|
on-click={() => this.openDrawer("rightInside")}
|
||||||
|
>
|
||||||
|
右侧内部 |{" "}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="cursor:pointer;"
|
||||||
|
on-click={() => this.openDrawer("center")}
|
||||||
|
>
|
||||||
|
居中
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{contact.isGroup && (
|
||||||
|
<div class="slot-group-menu">
|
||||||
|
<span>聊天</span>
|
||||||
|
<span>公告</span>
|
||||||
|
<span>相册</span>
|
||||||
|
<span>文件</span>
|
||||||
|
<span>活动</span>
|
||||||
|
<span
|
||||||
|
v-lemon-contextmenu_click={[
|
||||||
|
{
|
||||||
|
text: "操作一",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "操作二",
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
设置(左键弹出菜单)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
"sidebar-contact-fixedtop": contact => {
|
||||||
|
return (
|
||||||
|
<div class="slot-contact-fixedtop">
|
||||||
|
<input class="slot-search" placeholder="搜索通讯录" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
"message-side": contact => {
|
||||||
|
if (contact.isGroup) {
|
||||||
|
return (
|
||||||
|
<div class="slot-group">
|
||||||
|
<div class="slot-group-title">群通知</div>
|
||||||
|
<div class="slot-group-notice">
|
||||||
|
进群请改备注,格式,工作地点-姓名,请大家配合谢谢
|
||||||
|
</div>
|
||||||
|
<div class="slot-group-title">群成员</div>
|
||||||
|
<div class="slot-group-panel">
|
||||||
|
<input class="slot-search" placeholder="搜索群成员" />
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
<div class="slot-group-member">河南-96-十里青山</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {},
|
||||||
|
mounted() {
|
||||||
|
const IMUI = this.$refs.IMUI;
|
||||||
|
//contactData3.id = "333";
|
||||||
|
IMUI.initContacts(ContactsData);
|
||||||
|
IMUI.changeContact(13);
|
||||||
|
//console.log(IMUI.getContacts());
|
||||||
|
// SlotIMUI.initEmoji(emojiData);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openDrawer(position) {
|
||||||
|
const IMUI = this.$refs.IMUI;
|
||||||
|
const params = {
|
||||||
|
position,
|
||||||
|
render: contact => {
|
||||||
|
return (
|
||||||
|
<div style="padding:15px">
|
||||||
|
<h5>{contact.displayName}</h5>
|
||||||
|
<span on-click={IMUI.closeDrawer}>关闭抽屉</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
if (position == "center") {
|
||||||
|
params.width = "50%";
|
||||||
|
params.height = "50%";
|
||||||
|
} else if (position == "rightInside") {
|
||||||
|
params.height = "90%";
|
||||||
|
params.offsetY = "10%";
|
||||||
|
}
|
||||||
|
IMUI.openDrawer(params);
|
||||||
|
},
|
||||||
|
handlePullMessages(contact, next) {
|
||||||
|
next(MessagesData[contact.id], true);
|
||||||
|
},
|
||||||
|
handleChangeContact() {},
|
||||||
|
handleSend(message, next, file) {
|
||||||
|
console.log(message, next, file);
|
||||||
|
setTimeout(() => {
|
||||||
|
next();
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="stylus">
|
||||||
|
.slot-group
|
||||||
|
width 170px
|
||||||
|
border-left 1px solid #ddd;
|
||||||
|
height 100%
|
||||||
|
box-sizing border-box
|
||||||
|
padding 10px
|
||||||
|
.slot-search
|
||||||
|
margin 5px 0
|
||||||
|
.slot-group-notice
|
||||||
|
color #999
|
||||||
|
padding 6px 0
|
||||||
|
font-size 12px
|
||||||
|
.slot-group-title
|
||||||
|
font-size 12px
|
||||||
|
.slot-group-member
|
||||||
|
font-size 12px
|
||||||
|
line-height 18px
|
||||||
|
.slot-group-menu span
|
||||||
|
display inline-block
|
||||||
|
cursor pointer
|
||||||
|
color #888
|
||||||
|
margin 4px 10px 0 0
|
||||||
|
border-bottom 2px solid transparent;
|
||||||
|
&:hover
|
||||||
|
color #000
|
||||||
|
border-color #333
|
||||||
|
.slot-contact-fixedtop
|
||||||
|
padding 10px
|
||||||
|
border-bottom 1px solid #ddd
|
||||||
|
.slot-search
|
||||||
|
width 100%
|
||||||
|
box-sizing border-box
|
||||||
|
font-size 14px
|
||||||
|
border 1px solid #bbb
|
||||||
|
padding 5px 10px
|
||||||
|
</style>
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lemon-imui",
|
"name": "lemon-imui",
|
||||||
"version": "1.6.7",
|
"version": "1.6.8",
|
||||||
"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/",
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ export default {
|
|||||||
from: "IMUI",
|
from: "IMUI",
|
||||||
default() {
|
default() {
|
||||||
return this;
|
return this;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
@@ -22,19 +22,20 @@ export default {
|
|||||||
type: Function,
|
type: Function,
|
||||||
default(val) {
|
default(val) {
|
||||||
return timeFormat(val, isToday(val) ? "h:i" : "y/m/d");
|
return timeFormat(val, isToday(val) ? "h:i" : "y/m/d");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class={["lemon-contact", { "lemon-contact--name-center": this.simple }]}
|
class={["lemon-contact", { "lemon-contact--name-center": this.simple }]}
|
||||||
|
title={this.contact.displayName}
|
||||||
on-click={e => this._handleClick(e, this.contact)}
|
on-click={e => this._handleClick(e, this.contact)}
|
||||||
>
|
>
|
||||||
{useScopedSlot(
|
{useScopedSlot(
|
||||||
this.$scopedSlots.default,
|
this.$scopedSlots.default,
|
||||||
this._renderInner(),
|
this._renderInner(),
|
||||||
this.contact
|
this.contact,
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -71,13 +72,13 @@ export default {
|
|||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>,
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
_handleClick(e, data) {
|
_handleClick(e, data) {
|
||||||
this.$emit("click", data);
|
this.$emit("click", data);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import contextmenu from "../directives/contextmenu";
|
|||||||
import {
|
import {
|
||||||
DEFAULT_MENUS,
|
DEFAULT_MENUS,
|
||||||
DEFAULT_MENU_LASTMESSAGES,
|
DEFAULT_MENU_LASTMESSAGES,
|
||||||
DEFAULT_MENU_CONTACTS
|
DEFAULT_MENU_CONTACTS,
|
||||||
} from "utils/constant";
|
} from "utils/constant";
|
||||||
import lastContentRender from "../lastContentRender";
|
import lastContentRender from "../lastContentRender";
|
||||||
|
|
||||||
@@ -26,25 +26,25 @@ export default {
|
|||||||
name: "LemonImui",
|
name: "LemonImui",
|
||||||
provide() {
|
provide() {
|
||||||
return {
|
return {
|
||||||
IMUI: this
|
IMUI: this,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
width: {
|
width: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 850
|
default: 850,
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 580
|
default: 580,
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "default"
|
default: "default",
|
||||||
},
|
},
|
||||||
simple: {
|
simple: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 消息时间格式化规则
|
* 消息时间格式化规则
|
||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
hideDrawer: {
|
hideDrawer: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true,
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 是否隐藏导航按钮上的头像
|
* 是否隐藏导航按钮上的头像
|
||||||
@@ -83,8 +83,8 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {};
|
return {};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
this.CacheContactContainer = new MemoryCache();
|
this.CacheContactContainer = new MemoryCache();
|
||||||
@@ -98,7 +98,7 @@ export default {
|
|||||||
activeSidebar: DEFAULT_MENU_LASTMESSAGES,
|
activeSidebar: DEFAULT_MENU_LASTMESSAGES,
|
||||||
contacts: [],
|
contacts: [],
|
||||||
menus: [],
|
menus: [],
|
||||||
editorTools: []
|
editorTools: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ export default {
|
|||||||
this._renderSidebarMessage(),
|
this._renderSidebarMessage(),
|
||||||
this._renderSidebarContact(),
|
this._renderSidebarContact(),
|
||||||
this._renderContainer(),
|
this._renderContainer(),
|
||||||
this._renderDrawer()
|
this._renderDrawer(),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -133,10 +133,10 @@ export default {
|
|||||||
return a2.lastSendTime - a1.lastSendTime;
|
return a2.lastSendTime - a1.lastSendTime;
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
activeSidebar() {}
|
activeSidebar() {},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
_menuIsContacts() {
|
_menuIsContacts() {
|
||||||
@@ -154,10 +154,10 @@ export default {
|
|||||||
sendTime: new Date().getTime(),
|
sendTime: new Date().getTime(),
|
||||||
toContactId: this.currentContactId,
|
toContactId: this.currentContactId,
|
||||||
fromUser: {
|
fromUser: {
|
||||||
...this.user
|
...this.user,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
...message
|
},
|
||||||
|
...message,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -169,14 +169,14 @@ export default {
|
|||||||
id: message.toContactId,
|
id: message.toContactId,
|
||||||
unread: "+1",
|
unread: "+1",
|
||||||
lastSendTime: message.sendTime,
|
lastSendTime: message.sendTime,
|
||||||
lastContent: this.lastContentRender(message)
|
lastContent: this.lastContentRender(message),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._addMessage(message, message.toContactId, 1);
|
this._addMessage(message, message.toContactId, 1);
|
||||||
const updateContact = {
|
const updateContact = {
|
||||||
id: message.toContactId,
|
id: message.toContactId,
|
||||||
lastContent: this.lastContentRender(message),
|
lastContent: this.lastContentRender(message),
|
||||||
lastSendTime: message.sendTime
|
lastSendTime: message.sendTime,
|
||||||
};
|
};
|
||||||
if (message.toContactId == this.currentContactId) {
|
if (message.toContactId == this.currentContactId) {
|
||||||
if (scrollToBottom == true) {
|
if (scrollToBottom == true) {
|
||||||
@@ -197,7 +197,7 @@ export default {
|
|||||||
next();
|
next();
|
||||||
this.updateMessage(Object.assign(message, replaceMessage));
|
this.updateMessage(Object.assign(message, replaceMessage));
|
||||||
},
|
},
|
||||||
file
|
file,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_handleSend(text) {
|
_handleSend(text) {
|
||||||
@@ -207,7 +207,7 @@ export default {
|
|||||||
this.updateContact({
|
this.updateContact({
|
||||||
id: message.toContactId,
|
id: message.toContactId,
|
||||||
lastContent: this.lastContentRender(message),
|
lastContent: this.lastContentRender(message),
|
||||||
lastSendTime: message.sendTime
|
lastSendTime: message.sendTime,
|
||||||
});
|
});
|
||||||
this.CacheDraft.remove(message.toContactId);
|
this.CacheDraft.remove(message.toContactId);
|
||||||
});
|
});
|
||||||
@@ -218,14 +218,14 @@ export default {
|
|||||||
if (imageTypes.includes(file.type)) {
|
if (imageTypes.includes(file.type)) {
|
||||||
joinMessage = {
|
joinMessage = {
|
||||||
type: "image",
|
type: "image",
|
||||||
content: URL.createObjectURL(file)
|
content: URL.createObjectURL(file),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
joinMessage = {
|
joinMessage = {
|
||||||
type: "file",
|
type: "file",
|
||||||
fileSize: file.size,
|
fileSize: file.size,
|
||||||
fileName: file.name,
|
fileName: file.name,
|
||||||
content: ""
|
content: "",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const message = this._createMessage(joinMessage);
|
const message = this._createMessage(joinMessage);
|
||||||
@@ -236,10 +236,10 @@ export default {
|
|||||||
this.updateContact({
|
this.updateContact({
|
||||||
id: message.toContactId,
|
id: message.toContactId,
|
||||||
lastContent: this.lastContentRender(message),
|
lastContent: this.lastContentRender(message),
|
||||||
lastSendTime: message.sendTime
|
lastSendTime: message.sendTime,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
file
|
file,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_emitPullMessages(next) {
|
_emitPullMessages(next) {
|
||||||
@@ -247,7 +247,7 @@ export default {
|
|||||||
this.$emit(
|
this.$emit(
|
||||||
"pull-messages",
|
"pull-messages",
|
||||||
this.currentContact,
|
this.currentContact,
|
||||||
(messages, isEnd = false) => {
|
(messages = [], isEnd = false) => {
|
||||||
this._addMessage(messages, this.currentContactId, 0);
|
this._addMessage(messages, this.currentContactId, 0);
|
||||||
this.CacheMessageLoaded.set(this.currentContactId, isEnd);
|
this.CacheMessageLoaded.set(this.currentContactId, isEnd);
|
||||||
if (isEnd == true) this.$refs.messages.loaded();
|
if (isEnd == true) this.$refs.messages.loaded();
|
||||||
@@ -255,7 +255,7 @@ export default {
|
|||||||
this._changeContactLock = false;
|
this._changeContactLock = false;
|
||||||
next(isEnd);
|
next(isEnd);
|
||||||
},
|
},
|
||||||
this
|
this,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
clearCacheContainer(name) {
|
clearCacheContainer(name) {
|
||||||
@@ -267,14 +267,14 @@ export default {
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: toPx(this.width),
|
width: toPx(this.width),
|
||||||
height: toPx(this.height)
|
height: toPx(this.height),
|
||||||
}}
|
}}
|
||||||
ref="wrapper"
|
ref="wrapper"
|
||||||
class={[
|
class={[
|
||||||
"lemon-wrapper",
|
"lemon-wrapper",
|
||||||
`lemon-wrapper--theme-${this.theme}`,
|
`lemon-wrapper--theme-${this.theme}`,
|
||||||
{ "lemon-wrapper--simple": this.simple },
|
{ "lemon-wrapper--simple": this.simple },
|
||||||
this.drawerVisible && "lemon-wrapper--drawer-show"
|
this.drawerVisible && "lemon-wrapper--drawer-show",
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
@@ -316,7 +316,7 @@ export default {
|
|||||||
<div
|
<div
|
||||||
class={[
|
class={[
|
||||||
"lemon-menu__item",
|
"lemon-menu__item",
|
||||||
{ "lemon-menu__item--active": this.activeSidebar == name }
|
{ "lemon-menu__item--active": this.activeSidebar == name },
|
||||||
]}
|
]}
|
||||||
on-click={() => {
|
on-click={() => {
|
||||||
funCall(click, () => {
|
funCall(click, () => {
|
||||||
@@ -332,7 +332,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
top,
|
top,
|
||||||
bottom
|
bottom,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
_renderSidebarMessage() {
|
_renderSidebarMessage() {
|
||||||
@@ -343,22 +343,26 @@ export default {
|
|||||||
return this._renderContact(
|
return this._renderContact(
|
||||||
{
|
{
|
||||||
contact,
|
contact,
|
||||||
timeFormat: this.contactTimeFormat
|
timeFormat: this.contactTimeFormat,
|
||||||
},
|
},
|
||||||
() => this.changeContact(contact.id),
|
() => this.changeContact(contact.id),
|
||||||
this.$scopedSlots["sidebar-message"]
|
this.$scopedSlots["sidebar-message"],
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
DEFAULT_MENU_LASTMESSAGES,
|
DEFAULT_MENU_LASTMESSAGES,
|
||||||
useScopedSlot(this.$scopedSlots["sidebar-message-fixedtop"], null, this)
|
useScopedSlot(
|
||||||
|
this.$scopedSlots["sidebar-message-fixedtop"],
|
||||||
|
null,
|
||||||
|
this,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_renderContact(props, onClick, slot) {
|
_renderContact(props, onClick, slot) {
|
||||||
const {
|
const {
|
||||||
click: customClick,
|
click: customClick,
|
||||||
renderContainer,
|
renderContainer,
|
||||||
id: contactId
|
id: contactId,
|
||||||
} = props.contact;
|
} = props.contact;
|
||||||
const click = () => {
|
const click = () => {
|
||||||
funCall(customClick, () => {
|
funCall(customClick, () => {
|
||||||
@@ -366,7 +370,7 @@ export default {
|
|||||||
this._customContainerReady(
|
this._customContainerReady(
|
||||||
renderContainer,
|
renderContainer,
|
||||||
this.CacheContactContainer,
|
this.CacheContactContainer,
|
||||||
contactId
|
contactId,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -374,13 +378,13 @@ export default {
|
|||||||
return (
|
return (
|
||||||
<lemon-contact
|
<lemon-contact
|
||||||
class={{
|
class={{
|
||||||
"lemon-contact--active": this.currentContactId == props.contact.id
|
"lemon-contact--active": this.currentContactId == props.contact.id,
|
||||||
}}
|
}}
|
||||||
v-lemon-contextmenu_contact={this.contactContextmenu}
|
v-lemon-contextmenu_contact={this.contactContextmenu}
|
||||||
props={props}
|
props={props}
|
||||||
on-click={click}
|
on-click={click}
|
||||||
scopedSlots={{ default: slot }}
|
scopedSlots={{ default: slot }}
|
||||||
></lemon-contact>
|
/>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_renderSidebarContact() {
|
_renderSidebarContact() {
|
||||||
@@ -398,20 +402,24 @@ export default {
|
|||||||
this._renderContact(
|
this._renderContact(
|
||||||
{
|
{
|
||||||
contact: contact,
|
contact: contact,
|
||||||
simple: true
|
simple: true,
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.changeContact(contact.id);
|
this.changeContact(contact.id);
|
||||||
},
|
},
|
||||||
this.$scopedSlots["sidebar-contact"]
|
this.$scopedSlots["sidebar-contact"],
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
prevIndex = contact.index;
|
prevIndex = contact.index;
|
||||||
return node;
|
return node;
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
DEFAULT_MENU_CONTACTS,
|
DEFAULT_MENU_CONTACTS,
|
||||||
useScopedSlot(this.$scopedSlots["sidebar-contact-fixedtop"], null, this)
|
useScopedSlot(
|
||||||
|
this.$scopedSlots["sidebar-contact-fixedtop"],
|
||||||
|
null,
|
||||||
|
this,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_renderSidebar(children, name, fixedtop) {
|
_renderSidebar(children, name, fixedtop) {
|
||||||
@@ -429,7 +437,7 @@ export default {
|
|||||||
_renderDrawer() {
|
_renderDrawer() {
|
||||||
return this._menuIsMessages() && this.currentContactId ? (
|
return this._menuIsMessages() && this.currentContactId ? (
|
||||||
<div class="lemon-drawer" ref="drawer">
|
<div class="lemon-drawer" ref="drawer">
|
||||||
{renderDrawerContent()}
|
{renderDrawerContent(this.currentContact)}
|
||||||
{useScopedSlot(this.$scopedSlots.drawer, "", this.currentContact)}
|
{useScopedSlot(this.$scopedSlots.drawer, "", this.currentContact)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
@@ -450,7 +458,7 @@ export default {
|
|||||||
nodes.push(
|
nodes.push(
|
||||||
<div class={cls} v-show={show}>
|
<div class={cls} v-show={show}>
|
||||||
{this.CacheContactContainer.get(name)}
|
{this.CacheContactContainer.get(name)}
|
||||||
</div>
|
</div>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
for (const name in this.CacheMenuContainer.get()) {
|
for (const name in this.CacheMenuContainer.get()) {
|
||||||
@@ -460,7 +468,7 @@ export default {
|
|||||||
v-show={this.activeSidebar == name && !this.currentIsDefSidebar}
|
v-show={this.activeSidebar == name && !this.currentIsDefSidebar}
|
||||||
>
|
>
|
||||||
{this.CacheMenuContainer.get(name)}
|
{this.CacheMenuContainer.get(name)}
|
||||||
</div>
|
</div>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,7 +483,7 @@ export default {
|
|||||||
<div class="lemon-container__displayname">
|
<div class="lemon-container__displayname">
|
||||||
{curact.displayName}
|
{curact.displayName}
|
||||||
</div>,
|
</div>,
|
||||||
curact
|
curact,
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div class="lemon-vessel">
|
<div class="lemon-vessel">
|
||||||
@@ -499,19 +507,15 @@ export default {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="lemon-vessel__right">
|
<div class="lemon-vessel__right">
|
||||||
{useScopedSlot(
|
{useScopedSlot(this.$scopedSlots["message-side"], null, curact)}
|
||||||
this.$scopedSlots["message-side"],
|
|
||||||
null,
|
|
||||||
curact
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>,
|
||||||
);
|
);
|
||||||
nodes.push(
|
nodes.push(
|
||||||
<div class={cls} v-show={!curact.id && this.currentIsDefSidebar}>
|
<div class={cls} v-show={!curact.id && this.currentIsDefSidebar}>
|
||||||
{this.$slots.cover}
|
{this.$slots.cover}
|
||||||
</div>
|
</div>,
|
||||||
);
|
);
|
||||||
nodes.push(
|
nodes.push(
|
||||||
<div
|
<div
|
||||||
@@ -528,7 +532,7 @@ export default {
|
|||||||
if (isEmpty(curact.lastContent)) {
|
if (isEmpty(curact.lastContent)) {
|
||||||
this.updateContact({
|
this.updateContact({
|
||||||
id: curact.id,
|
id: curact.id,
|
||||||
lastContent: " "
|
lastContent: " ",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.changeContact(curact.id, DEFAULT_MENU_LASTMESSAGES);
|
this.changeContact(curact.id, DEFAULT_MENU_LASTMESSAGES);
|
||||||
@@ -537,9 +541,9 @@ export default {
|
|||||||
发送消息
|
发送消息
|
||||||
</lemon-button>
|
</lemon-button>
|
||||||
</div>,
|
</div>,
|
||||||
curact
|
curact,
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>,
|
||||||
);
|
);
|
||||||
return nodes;
|
return nodes;
|
||||||
},
|
},
|
||||||
@@ -549,14 +553,14 @@ export default {
|
|||||||
_addContact(data, t) {
|
_addContact(data, t) {
|
||||||
const type = {
|
const type = {
|
||||||
0: "unshift",
|
0: "unshift",
|
||||||
1: "push"
|
1: "push",
|
||||||
}[t];
|
}[t];
|
||||||
this.contacts[type](data);
|
this.contacts[type](data);
|
||||||
},
|
},
|
||||||
_addMessage(data, contactId, t) {
|
_addMessage(data, contactId, t) {
|
||||||
const type = {
|
const type = {
|
||||||
0: "unshift",
|
0: "unshift",
|
||||||
1: "push"
|
1: "push",
|
||||||
}[t];
|
}[t];
|
||||||
if (!Array.isArray(data)) data = [data];
|
if (!Array.isArray(data)) data = [data];
|
||||||
allMessages[contactId] = allMessages[contactId] || [];
|
allMessages[contactId] = allMessages[contactId] || [];
|
||||||
@@ -573,7 +577,9 @@ export default {
|
|||||||
lastContentRender(message) {
|
lastContentRender(message) {
|
||||||
if (!isFunction(lastContentRender[message.type])) {
|
if (!isFunction(lastContentRender[message.type])) {
|
||||||
console.error(
|
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 "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -615,13 +621,13 @@ export default {
|
|||||||
if (isEmpty(contact)) return false;
|
if (isEmpty(contact)) return false;
|
||||||
this.CacheDraft.set(contactId, {
|
this.CacheDraft.set(contactId, {
|
||||||
editorValue: editorValue,
|
editorValue: editorValue,
|
||||||
lastContent: contact.lastContent
|
lastContent: contact.lastContent,
|
||||||
});
|
});
|
||||||
this.updateContact({
|
this.updateContact({
|
||||||
id: contactId,
|
id: contactId,
|
||||||
lastContent: `<span style="color:red;">[草稿]</span><span>${this.lastContentRender(
|
lastContent: `<span style="color:red;">[草稿]</span><span>${this.lastContentRender(
|
||||||
{ type: "text", content: editorValue }
|
{ type: "text", content: editorValue },
|
||||||
)}</span>`
|
)}</span>`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -632,7 +638,7 @@ export default {
|
|||||||
if (draft) {
|
if (draft) {
|
||||||
this.updateContact({
|
this.updateContact({
|
||||||
id: contactId,
|
id: contactId,
|
||||||
lastContent: draft.lastContent
|
lastContent: draft.lastContent,
|
||||||
});
|
});
|
||||||
this.CacheDraft.remove(contactId);
|
this.CacheDraft.remove(contactId);
|
||||||
}
|
}
|
||||||
@@ -696,7 +702,7 @@ export default {
|
|||||||
const message = this.findMessage(messageId);
|
const message = this.findMessage(messageId);
|
||||||
if (!message) return false;
|
if (!message) return false;
|
||||||
const index = allMessages[message.toContactId].findIndex(
|
const index = allMessages[message.toContactId].findIndex(
|
||||||
({ id }) => id == messageId
|
({ id }) => id == messageId,
|
||||||
);
|
);
|
||||||
allMessages[message.toContactId].splice(index, 1);
|
allMessages[message.toContactId].splice(index, 1);
|
||||||
return true;
|
return true;
|
||||||
@@ -711,7 +717,7 @@ export default {
|
|||||||
let historyMessage = this.findMessage(message.id);
|
let historyMessage = this.findMessage(message.id);
|
||||||
if (!historyMessage) return false;
|
if (!historyMessage) return false;
|
||||||
historyMessage = Object.assign(historyMessage, message, {
|
historyMessage = Object.assign(historyMessage, message, {
|
||||||
toContactId: historyMessage.toContactId
|
toContactId: historyMessage.toContactId,
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@@ -726,7 +732,7 @@ export default {
|
|||||||
const components = this.$refs.messages.$refs.message;
|
const components = this.$refs.messages.$refs.message;
|
||||||
if (components) {
|
if (components) {
|
||||||
const messageComponent = components.find(
|
const messageComponent = components.find(
|
||||||
com => com.$attrs.message.id == messageId
|
com => com.$attrs.message.id == messageId,
|
||||||
);
|
);
|
||||||
if (messageComponent) messageComponent.$forceUpdate();
|
if (messageComponent) messageComponent.$forceUpdate();
|
||||||
}
|
}
|
||||||
@@ -782,7 +788,7 @@ export default {
|
|||||||
render: menu => {
|
render: menu => {
|
||||||
return <i class="lemon-icon-message" />;
|
return <i class="lemon-icon-message" />;
|
||||||
},
|
},
|
||||||
isBottom: false
|
isBottom: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: DEFAULT_MENU_CONTACTS,
|
name: DEFAULT_MENU_CONTACTS,
|
||||||
@@ -792,14 +798,14 @@ export default {
|
|||||||
render: menu => {
|
render: menu => {
|
||||||
return <i class="lemon-icon-addressbook" />;
|
return <i class="lemon-icon-addressbook" />;
|
||||||
},
|
},
|
||||||
isBottom: false
|
isBottom: false,
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
let menus = [];
|
let menus = [];
|
||||||
if (Array.isArray(data)) {
|
if (Array.isArray(data)) {
|
||||||
const indexMap = {
|
const indexMap = {
|
||||||
messages: 0,
|
messages: 0,
|
||||||
contacts: 1
|
contacts: 1,
|
||||||
};
|
};
|
||||||
const indexKeys = Object.keys(indexMap);
|
const indexKeys = Object.keys(indexMap);
|
||||||
menus = data.map(item => {
|
menus = data.map(item => {
|
||||||
@@ -807,7 +813,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
...defaultMenus[indexMap[item.name]],
|
...defaultMenus[indexMap[item.name]],
|
||||||
...item,
|
...item,
|
||||||
...{ renderContainer: null }
|
...{ renderContainer: null },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -815,7 +821,7 @@ export default {
|
|||||||
this._customContainerReady(
|
this._customContainerReady(
|
||||||
item.renderContainer,
|
item.renderContainer,
|
||||||
this.CacheMenuContainer,
|
this.CacheMenuContainer,
|
||||||
item.name
|
item.name,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -859,10 +865,10 @@ export default {
|
|||||||
index: "",
|
index: "",
|
||||||
unread: 0,
|
unread: 0,
|
||||||
lastSendTime: "",
|
lastSendTime: "",
|
||||||
lastContent: ""
|
lastContent: "",
|
||||||
},
|
},
|
||||||
contact
|
contact,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@@ -893,7 +899,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$set(this.contacts, index, {
|
this.$set(this.contacts, index, {
|
||||||
...this.contacts[index],
|
...this.contacts[index],
|
||||||
...data
|
...data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1000,8 +1006,8 @@ export default {
|
|||||||
},
|
},
|
||||||
closeDrawer() {
|
closeDrawer() {
|
||||||
this.drawerVisible = false;
|
this.drawerVisible = false;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
@@ -1093,7 +1099,7 @@ bezier = cubic-bezier(0.645, 0.045, 0.355, 1)
|
|||||||
height 100%
|
height 100%
|
||||||
flex 1
|
flex 1
|
||||||
+e(right)
|
+e(right)
|
||||||
flex 0
|
flex none
|
||||||
+b(lemon-messages)
|
+b(lemon-messages)
|
||||||
flex 1
|
flex 1
|
||||||
height auto
|
height auto
|
||||||
@@ -1102,7 +1108,6 @@ bezier = cubic-bezier(0.645, 0.045, 0.355, 1)
|
|||||||
top 0
|
top 0
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #f6f6f6
|
background #f6f6f6
|
||||||
transition width .4s bezier
|
|
||||||
z-index 11
|
z-index 11
|
||||||
display none
|
display none
|
||||||
+b(lemon-wrapper)
|
+b(lemon-wrapper)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ export default {
|
|||||||
from: "IMUI",
|
from: "IMUI",
|
||||||
default() {
|
default() {
|
||||||
return this;
|
return this;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
contextmenu: Array,
|
contextmenu: Array,
|
||||||
@@ -16,21 +16,22 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {};
|
return {};
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
timeFormat: {
|
timeFormat: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => ""
|
default: () => "",
|
||||||
},
|
},
|
||||||
reverse: Boolean,
|
reverse: Boolean,
|
||||||
hideName: Boolean,
|
hideName: Boolean,
|
||||||
hideTime: Boolean
|
hideTime: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const { fromUser, status, sendTime } = this.message;
|
const { fromUser, status, sendTime } = this.message;
|
||||||
|
const hideTitle = this.hideName == true && this.hideTime == true;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class={[
|
class={[
|
||||||
@@ -38,8 +39,8 @@ export default {
|
|||||||
`lemon-message--status-${status}`,
|
`lemon-message--status-${status}`,
|
||||||
{
|
{
|
||||||
"lemon-message--reverse": this.reverse,
|
"lemon-message--reverse": this.reverse,
|
||||||
"lemon-message--hide-name": this.hideName
|
"lemon-message--hide-title": hideTitle,
|
||||||
}
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<div class="lemon-message__avatar">
|
<div class="lemon-message__avatar">
|
||||||
@@ -54,6 +55,7 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<div class="lemon-message__inner">
|
<div class="lemon-message__inner">
|
||||||
<div class="lemon-message__title">
|
<div class="lemon-message__title">
|
||||||
|
{this.hideName == false && (
|
||||||
<span
|
<span
|
||||||
on-click={e => {
|
on-click={e => {
|
||||||
this._emitClick(e, "displayName");
|
this._emitClick(e, "displayName");
|
||||||
@@ -61,7 +63,8 @@ export default {
|
|||||||
>
|
>
|
||||||
{fromUser.displayName}
|
{fromUser.displayName}
|
||||||
</span>
|
</span>
|
||||||
{this.hideTime == true && (
|
)}
|
||||||
|
{this.hideTime == false && (
|
||||||
<span
|
<span
|
||||||
class="lemon-message__time"
|
class="lemon-message__time"
|
||||||
on-click={e => {
|
on-click={e => {
|
||||||
@@ -86,7 +89,7 @@ export default {
|
|||||||
{useScopedSlot(
|
{useScopedSlot(
|
||||||
this.IMUI.$scopedSlots["message-after"],
|
this.IMUI.$scopedSlots["message-after"],
|
||||||
null,
|
null,
|
||||||
this.message
|
this.message,
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -101,7 +104,7 @@ export default {
|
|||||||
title="重发消息"
|
title="重发消息"
|
||||||
style={{
|
style={{
|
||||||
color: "#ff2525",
|
color: "#ff2525",
|
||||||
cursor: "pointer"
|
cursor: "pointer",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,8 +120,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
_emitClick(e, key) {
|
_emitClick(e, key) {
|
||||||
this.IMUI.$emit("message-click", e, key, this.message, this.IMUI);
|
this.IMUI.$emit("message-click", e, key, this.message, this.IMUI);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
@@ -223,12 +226,12 @@ arrow()
|
|||||||
+e(avatar)
|
+e(avatar)
|
||||||
padding-right 0
|
padding-right 0
|
||||||
padding-left 10px
|
padding-left 10px
|
||||||
+m(hide-name)
|
+m(hide-title)
|
||||||
+e(status)
|
+e(status)
|
||||||
top 3px
|
top 5px
|
||||||
+e(title)
|
|
||||||
display none
|
|
||||||
+e(content)
|
+e(content)
|
||||||
|
position relative
|
||||||
|
top -5px
|
||||||
&:before
|
&:before
|
||||||
top 14px
|
top 14px
|
||||||
</style>
|
</style>
|
||||||
@@ -9,26 +9,26 @@ export default {
|
|||||||
hideName: Boolean,
|
hideName: Boolean,
|
||||||
//是否隐藏显示消息时间
|
//是否隐藏显示消息时间
|
||||||
hideTime: Boolean,
|
hideTime: Boolean,
|
||||||
reverseUserId: String,
|
reverseUserId: [String, Number],
|
||||||
timeRange: {
|
timeRange: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 1
|
default: 1,
|
||||||
},
|
},
|
||||||
timeFormat: {
|
timeFormat: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default(val) {
|
default(val) {
|
||||||
return hoursTimeFormat(val);
|
return hoursTimeFormat(val);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
_loading: false,
|
_loading: false,
|
||||||
_loadend: false
|
_loadend: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
@@ -37,7 +37,7 @@ export default {
|
|||||||
<div
|
<div
|
||||||
class={[
|
class={[
|
||||||
"lemon-messages__load",
|
"lemon-messages__load",
|
||||||
`lemon-messages__load--${this._loadend ? "end" : "ing"}`
|
`lemon-messages__load--${this._loadend ? "end" : "ing"}`,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{this._loadend ? this._renderLoadEnd() : this._renderLoading()}
|
{this._loadend ? this._renderLoadEnd() : this._renderLoading()}
|
||||||
@@ -57,10 +57,10 @@ export default {
|
|||||||
message: {
|
message: {
|
||||||
id: "__time__",
|
id: "__time__",
|
||||||
type: "event",
|
type: "event",
|
||||||
content: hoursTimeFormat(message.sendTime)
|
content: hoursTimeFormat(message.sendTime),
|
||||||
}
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ export default {
|
|||||||
message: message,
|
message: message,
|
||||||
reverse: this.reverseUserId == message.fromUser.id,
|
reverse: this.reverseUserId == message.fromUser.id,
|
||||||
hideTime: this.hideTime,
|
hideTime: this.hideTime,
|
||||||
hideName: this.hideName
|
hideName: this.hideName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
node.push(<tagName ref="message" refInFor={true} attrs={attrs} />);
|
node.push(<tagName ref="message" refInFor={true} attrs={attrs} />);
|
||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
msecRange() {
|
msecRange() {
|
||||||
return this.timeRange * 1000 * 60;
|
return this.timeRange * 1000 * 60;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -129,10 +129,10 @@ export default {
|
|||||||
if (wrap) {
|
if (wrap) {
|
||||||
wrap.scrollTop = wrap.scrollHeight;
|
wrap.scrollTop = wrap.scrollHeight;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
mounted() {}
|
mounted() {},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
|
|||||||
@@ -15,8 +15,11 @@ document.addEventListener("click", e => {
|
|||||||
export default {
|
export default {
|
||||||
hide: hidePopover,
|
hide: hidePopover,
|
||||||
bind(el, binding, vnode) {
|
bind(el, binding, vnode) {
|
||||||
el.addEventListener("contextmenu", e => {
|
el.addEventListener(
|
||||||
|
binding.modifiers.click ? "click" : "contextmenu",
|
||||||
|
e => {
|
||||||
if (isEmpty(binding.value) || !Array.isArray(binding.value)) return;
|
if (isEmpty(binding.value) || !Array.isArray(binding.value)) return;
|
||||||
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
LemonPopover.methods.closeAll();
|
LemonPopover.methods.closeAll();
|
||||||
let component;
|
let component;
|
||||||
@@ -42,7 +45,11 @@ export default {
|
|||||||
const icon = item.icon
|
const icon = item.icon
|
||||||
? `<i class="lemon-contextmenu__icon ${item.icon}"></i>`
|
? `<i class="lemon-contextmenu__icon ${item.icon}"></i>`
|
||||||
: "";
|
: "";
|
||||||
return `<div style="color:${item.color}" title="${item.text}" class="lemon-contextmenu__item">${icon}<span>${item.text}</span></div>`;
|
return `<div style="color:${item.color}" title="${
|
||||||
|
item.text
|
||||||
|
}" class="lemon-contextmenu__item">${icon}<span>${
|
||||||
|
item.text
|
||||||
|
}</span></div>`;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
})
|
})
|
||||||
@@ -61,14 +68,16 @@ export default {
|
|||||||
const ins = Vue.extend({
|
const ins = Vue.extend({
|
||||||
render: h => {
|
render: h => {
|
||||||
return render(h, component, hidePopover);
|
return render(h, component, hidePopover);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
const renderComponent = new ins().$mount();
|
const renderComponent = new ins().$mount();
|
||||||
node.querySelector("span").innerHTML = renderComponent.$el.outerHTML;
|
node.querySelector("span").innerHTML =
|
||||||
|
renderComponent.$el.outerHTML;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
showPopover();
|
showPopover();
|
||||||
});
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
module.exports = {
|
||||||
|
printWidth: 80, // 每行代码长度(默认80)
|
||||||
|
tabWidth: 2, // 每个tab相当于多少个空格(默认2)
|
||||||
|
useTabs: false, // 是否使用tab进行缩进(默认false)
|
||||||
|
singleQuote: false, // 使用单引号(默认false)
|
||||||
|
semi: true, // 声明结尾使用分号(默认true)
|
||||||
|
trailingComma: 'all', // 多行使用拖尾逗号(默认none)
|
||||||
|
bracketSpacing: true, // 对象字面量的大括号间使用空格(默认true)
|
||||||
|
jsxBracketSameLine: false, // 多行JSX中的>放置在最后一行的结尾,而不是另起一行(默认false)
|
||||||
|
arrowParens: 'avoid', // 只有一个参数的箭头函数的参数是否带圆括号(默认avoid)
|
||||||
|
};
|
||||||
Reference in new issue
Block a user