tianyun 9 月之前
父节点
当前提交
7f1820f480
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      simple-demo/memos.html

+ 9 - 1
simple-demo/memos.html

@@ -13,6 +13,7 @@
         body {
             font-family: "LXGW WenKai Screen", sans-serif !important;
         }
+
         img {
             border: 1px solid #b7b6b6;
         }
@@ -97,7 +98,7 @@
 
                 <!-- 添加发送按钮 -->
                 <el-button style="margin-left: 20px; width: 10%; font-size: 2rem" @click="sendData" :disabled="!sendBtnAble">记录</el-button>
-                <el-button style="margin-left: 20px; width: 10%; font-size: 1rem" @click="sendData">合并</el-button>
+                <el-button style="margin-left: 20px; width: 10%; font-size: 1rem" @click="mergeByIds">合并</el-button>
             </div>
             <div style="display: flex">
                 <div v-for="item in tmpFileIds">
@@ -337,6 +338,13 @@
             });
         },
         methods: {
+            mergeByIds() {
+                if (this.selectedIds.length < 2) {
+                    return;
+                }
+                requestUtil.sync("https://web_history.tianyunperfect.cn/memos/mergeMemo", 'post', {ids: this.selectedIds}, {});
+                location.reload();
+            },
             handleCheckboxChange(id, checked) {
                 if (checked) {
                     this.selectedIds.push(id);