Просмотр исходного кода

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/SCCommon

qinlaiqiao 4 лет назад
Родитель
Сommit
8737b41925

+ 1 - 1
handsontable/package.json

@@ -10,7 +10,7 @@
     "url": "https://github.com/handsontable/handsontable/issues"
   },
   "author": "Handsoncode <hello@handsontable.com>",
-  "version": "6.3.14",
+  "version": "6.3.15",
   "browser": "dist/handsontable.js",
   "main": "commonjs/index.js",
   "module": "es/index.js",

+ 8 - 8
handsontable/src/plugins/manualColumnResize/manualColumnResize.js

@@ -143,14 +143,14 @@ class ManualColumnResize extends BasePlugin {
     this.currentTH = TH;
     // getCoords returns CellCoords
     // const col = this.hot.view.wt.wtTable.getCoords(TH).col;
-    // const col = this.hot.getColHeader().indexOf(TH.innerText);
-    let col = 0;
-    for (let i = 0; i < TH.parentNode.childNodes.length; i += 1) {
-      if (TH.parentNode.childNodes[i] === TH) col = i;
-    }
-
-    if (!TH.parentNode.childNodes[0].innerText.replace(/(\s| )/gi, '')) {
-      col -= 1;
+    const text = TH.innerText.replace('\n', '<br>');
+    let col = this.hot.getColHeader().indexOf(text);
+    // 如果这里调大说明存在列头一模一样的情况,这时就直接用 html element里的顺序来
+    if (this.hot.getSettings().viewportColumnRenderingOffset >= 20) {
+      col = TH.cellIndex;
+      if (!TH.parentNode.childNodes[0].innerText.replace(/(\s| )/gi, '')) {
+        col -= 1;
+      }
     }
 
     const headerHeight = outerHeight(this.currentTH);

+ 2 - 0
types/src/interface/share.ts

@@ -247,6 +247,8 @@ export interface IReceivedShareProject {
   enterpriseID?: string;
   // 分享项目来自的企业名称
   enterpriseName?: string;
+  // 是否允许拷贝
+  allowCopy?: boolean;
 }
 
 // 分享库指定用户