Quellcode durchsuchen

粘贴前拦截

daiqisheng vor 3 Jahren
Ursprung
Commit
90307a29d8
1 geänderte Dateien mit 16 neuen und 8 gelöschten Zeilen
  1. 16 8
      src/pages/main/performance/components/sheet.vue

+ 16 - 8
src/pages/main/performance/components/sheet.vue

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-12-04 14:23:58
  * @LastEditors: daiqisheng
- * @LastEditTime: 2022-04-18 18:09:32
+ * @LastEditTime: 2022-04-25 18:13:58
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
 -->
 <template>
@@ -692,6 +692,7 @@ export default {
           //   that.rowList.push(row);
           // },
           cellUpdateBefore: function (row, column) {
+            console.log(row, column);
             if (!that.handleAllow({ row, column })) {
               return false;
             }
@@ -707,13 +708,20 @@ export default {
               }
             }
           },
-          updated: function ({ range }) {
-            const middle = range.map((el) => {
-              return that.paramsArr(el.row[0], el.row[1]);
-            });
-            let changedList = middle.join(",").split(",");
-            that.rowList.push(...changedList);
-            console.log(that.rowList, "that.rowList");
+          rangePasteBefore: function ([
+            { row_focus: row, column_focus: column },
+          ]) {
+            if (!that.handleAllow({ row, column })) {
+              that.$message.error("您没有编辑权限");
+            }
+          },
+          updated: function (res) {
+            console.log(res);
+            // const middle = range.map((el) => {
+            //   return that.paramsArr(el.row[0], el.row[1]);
+            // });
+            // let changedList = middle.join(",").split(",");
+            // that.rowList.push(...changedList);
           },
         },
       };