Explorar el Código

暂时先推送

raingad hace 1 año
padre
commit
632ed72942
Se han modificado 8 ficheros con 673 adiciones y 2181 borrados
  1. 9 923
      dist/index.common.js
  2. 0 0
      dist/index.css
  3. 9 923
      dist/index.umd.js
  4. 0 0
      dist/index.umd.min.js
  5. 632 312
      package-lock.json
  6. 4 4
      package.json
  7. 0 6
      packages/components/editor.vue
  8. 19 13
      packages/components/index.vue

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 9 - 923
dist/index.common.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/index.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 9 - 923
dist/index.umd.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/index.umd.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 632 - 312
package-lock.json


+ 4 - 4
package.json

@@ -1,8 +1,8 @@
 {
-  "name": "lemon-imui",
-  "version": "1.7.7",
+  "name": "lemon-imui-rx",
+  "version": "1.8.1",
   "main": "dist/index.umd.min.js",
-  "description": "基于 VUE2.0 的 IM 聊天组件",
+  "description": "基于lemon-imui的vue聊天组件,支持vue2.x",
   "homepage": "http://june000.gitee.io/lemon-im/",
   "keywords": [
     "vue",
@@ -41,6 +41,6 @@
   "author": "fanjun",
   "license": "MIT",
   "dependencies": {
-    "chatarea": "^3.5.2"
+    "chatarea": "^3.5.3"
   }
 }

+ 0 - 6
packages/components/editor.vue

@@ -334,12 +334,6 @@ export default {
       const text = clipboardData.getData("Text");
       if (text) {
         this.submitDisabled = false;
-        this.clear();
-        if (window.clipboardData) {
-          this.chatArea.insertHtml(text);
-        } else {
-          command("insertText", text);
-        }
       } else {
         const { blob, blobUrl } = this._getClipboardBlob(clipboardData);
         this.clipboardBlob = blob;

+ 19 - 13
packages/components/index.vue

@@ -93,6 +93,16 @@ export default {
         return {};
       },
     },
+    latelyContacts: {
+      type: Function,
+      default(list){
+        const data = list.filter(item => !isEmpty(item.lastContent));
+        data.sort((a1, a2) => {
+          return a2.lastSendTime - a1.lastSendTime;
+        });
+        return data;
+        },
+    },
   },
   data() {
     this.CacheContactContainer = new MemoryCache();
@@ -144,11 +154,7 @@ export default {
       return DEFAULT_MENUS.includes(this.activeSidebar);
     },
     lastMessages() {
-      const data = this.contacts.filter(item => !isEmpty(item.lastContent));
-      data.sort((a1, a2) => {
-        return a2.lastSendTime - a1.lastSendTime;
-      });
-      return data;
+      return this.latelyContacts(this.contacts);
     },
   },
   watch: {
@@ -1075,14 +1081,14 @@ export default {
     },
     setAtUserList(data,callEvery) {
       this.$refs.editor.chatArea.updateConfig({
-        userList: data,
-        needCallEvery: callEvery
-      });
-    },
-    setUserTag(data) {
-      this.$refs.editor.chatArea.setUserTag(data);
-      this.$refs.editor._checkSubmitDisabled();
-    },
+          userList: data,
+          needCallEvery: callEvery
+        });
+      },
+      setUserTag(data) {
+        this.$refs.editor.chatArea.setUserTag(data);
+        this.$refs.editor._checkSubmitDisabled();
+      },
   },
 };
 </script>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio