|
@@ -574,6 +574,10 @@ $(document).ready(function() {
|
|
|
},
|
|
|
cut: function (sheet, sel, callback) {
|
|
|
if (!sheet || !sel) return;
|
|
|
+ if (sel.colCount >= sheet.zh_setting.cols.length) {
|
|
|
+ toast('请勿选中整行剪切', 'warnning');
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
const sortData = SpreadJsObj.getSortData(sheet), datas = [];
|
|
|
for (let iRow = sel.row; iRow < sel.row + sel.rowCount; iRow++) {
|
|
@@ -605,7 +609,7 @@ $(document).ready(function() {
|
|
|
|
|
|
if (datas.length > 0) {
|
|
|
postData(window.location.pathname + '/update', {postType: 'update', postData: datas}, function (result) {
|
|
|
- const refreshNode = tree.loadPostData(result);
|
|
|
+ const refreshNode = sheet.zh_tree.loadPostData(result);
|
|
|
callback();
|
|
|
treeOperationObj.refreshTree(sheet, refreshNode);
|
|
|
});
|
|
@@ -623,10 +627,9 @@ $(document).ready(function() {
|
|
|
ledgerSpread.bind(GC.Spread.Sheets.Events.ClipboardPasted, treeOperationObj.clipboardPasted);
|
|
|
SpreadJsObj.addDeleteBind(ledgerSpread, treeOperationObj.deletePress);
|
|
|
ledgerSpread.bind(GC.Spread.Sheets.Events.ClipboardChanging, function (e, info) {
|
|
|
+ //info.cancel = true;
|
|
|
const copyText = SpreadJsObj.getFilterCopyText(info.sheet);
|
|
|
- });
|
|
|
- ledgerSpread.bind(GC.Spread.Sheets.Events.ClipboardChanged, function (e, info) {
|
|
|
- console.log(info.copyData.text);
|
|
|
+ copyToClipboard(copyText);
|
|
|
});
|
|
|
ledgerSpread.bind(GC.Spread.Sheets.Events.ClipboardPasting, function (e, info) {
|
|
|
});
|