|
@@ -477,11 +477,32 @@ $(document).ready(() => {
|
|
|
}
|
|
}
|
|
|
// 事件
|
|
// 事件
|
|
|
selectionChanged(e, info) {
|
|
selectionChanged(e, info) {
|
|
|
- if (info.newSelections) {
|
|
|
|
|
- if (!info.oldSelections || info.newSelections[0].row !== info.oldSelections[0].row) {
|
|
|
|
|
- templateObj.loadTemplate();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (info.newSelections[0].col === 0) {
|
|
|
|
|
+ info.sheet.setSelection(info.oldSelections[0].row, info.oldSelections[0].col, info.oldSelections[0].rowCount, info.oldSelections[0].colCount);
|
|
|
|
|
+ } else if (!info.oldSelections || info.newSelections[0].row !== info.oldSelections[0].row) {
|
|
|
|
|
+ templateObj.loadTemplate();
|
|
|
}
|
|
}
|
|
|
|
|
+ // if (templateObj._restoringSelection) return;
|
|
|
|
|
+ // if (info.newSelections) {
|
|
|
|
|
+ // const selection = info.newSelections[0];
|
|
|
|
|
+ // const col = info.sheet.zh_setting.cols[selection.col];
|
|
|
|
|
+ // const previous = info.oldSelections && info.oldSelections[0];
|
|
|
|
|
+ // if (col && col.field === 'selected') {
|
|
|
|
|
+ // if (previous) {
|
|
|
|
|
+ // templateObj._restoringSelection = true;
|
|
|
|
|
+ // try {
|
|
|
|
|
+ // info.sheet.setActiveCell(previous.row, previous.col);
|
|
|
|
|
+ // info.sheet.setSelection(previous.row, previous.col, previous.rowCount, previous.colCount);
|
|
|
|
|
+ // } finally {
|
|
|
|
|
+ // templateObj._restoringSelection = false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (!info.oldSelections || info.newSelections[0].row !== info.oldSelections[0].row) {
|
|
|
|
|
+ // templateObj.loadTemplate();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
editStarting(e, info) {
|
|
editStarting(e, info) {
|
|
|
const select = SpreadJsObj.getSelectObject(info.sheet);
|
|
const select = SpreadJsObj.getSelectObject(info.sheet);
|