@opentinyvue/vue-grid 3.27.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +494 -332
- package/package.json +17 -17
- package/src/composable/index.d.ts +1 -0
- package/src/composable/useNormalData.d.ts +8 -0
- package/src/config.d.ts +380 -20
- package/src/table/src/methods.d.ts +15 -1
- package/src/table/src/table.d.ts +19 -9
package/lib/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import { Interceptor, StoreMap } from '@opentinyvue/vue-renderless/grid/core';
|
|
|
4
4
|
import { debounce, PopupManager, PopperJS, extend, browserInfo, isObject, isEmptyObject, isServer, throttle, addClass, removeClass, getDataset, random, isNull, getActualTarget, fastdom, toDecimal, logger, tryToCurrency, tryToDecimal, tryToInt, toFileSize, truncate, toRate, isNumber as isNumber$1, toBoolValue, toDate, getDateWithNewTimezone, isDate, formatDateByPattern, toDateStr, on, Validator as Validator$1, getObj, getStyle, preventDefault, off, callInterceptor, hasClass } from '@opentinyvue/utils';
|
|
5
5
|
import { iconError, iconSortTriangleDescending, iconSortTriangleAscending, iconSortTriangle, iconUnfilter, iconEdit, iconConmentRefresh, iconMinscreen, iconFullscreen, iconSetting, iconChevronRight, iconChevronDown, iconGridNoData, iconRadio, iconRadioselected, iconSearch, iconCheckedSur, iconCheck, iconHalfselect, iconArrowBottom, IconEllipsis, iconClose, iconYes, iconExpand, iconPutAway, iconEllipsis, iconMarkOn } from '@opentinyvue/vue-icon';
|
|
6
6
|
import { $prefix, hooks, defineComponent, h, $install, isVue2, isVnode, $props, mergeClass, resolveTheme, useInstanceSlots, useRelation, emitter, resolveMode, useBreakpoint, setup as setup$1 } from '@opentinyvue/vue-common';
|
|
7
|
-
import { uniqueId, toNumber as toNumber$1, isBoolean, each, isObject as isObject$1, isFunction, isArray, findIndexOf, get, set, clone, clear, destructuring, mapTree, has, isUndefined, find as find$1,
|
|
8
|
-
import { getFuncText, getDomNode, getRowid, getEventTargetNode, isScale, emitEvent, hasChildrenList, getListeners, getOffsetPos, getFilters, getColumnConfig, formatText, getRowkey,
|
|
7
|
+
import { uniqueId, toNumber as toNumber$1, isBoolean, each, isObject as isObject$1, isFunction, isArray, findIndexOf, get, set, clone, clear, destructuring, mapTree, eachTree, has, isUndefined, isEqual, find as find$1, filterTree, arrayEach, isNumber, findTree as findTree$1, sum, template, assign, objectMap, sortBy, isString, remove, toStringJSON, toArray, arrayIndexOf } from '@opentinyvue/vue-renderless/grid/static/';
|
|
8
|
+
import { getFuncText, getDomNode, getRowid, getEventTargetNode, isScale, emitEvent, hasChildrenList, getListeners, getOffsetPos, getFilters, getColumnConfig, formatText, getRowkey, getRowUniqueId, setCellValue, getColumnList, repairFixed, rowToVisible, colToVisible, getCell, assemColumn, GlobalEvent, getCellValue, updateCellTitle, isPx, getClass, getRowNodes, getCellNodeIndex } from '@opentinyvue/vue-renderless/grid/utils';
|
|
9
9
|
import Tooltip$1 from '@opentinyvue/vue-tooltip';
|
|
10
10
|
import { createVNode, mergeProps, isVNode, createTextVNode, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, normalizeStyle, Fragment, renderList } from 'vue';
|
|
11
11
|
import { toNumber, findTree, find, isEqual as isEqual$1, arrayEach as arrayEach$1 } from '@opentinyvue/vue-renderless/grid/static';
|
|
@@ -1795,7 +1795,7 @@ var useData = function useData2(props) {
|
|
|
1795
1795
|
}], function(_ref15) {
|
|
1796
1796
|
_ref15[0]; var length = _ref15[1];
|
|
1797
1797
|
tiledLength.value = length;
|
|
1798
|
-
$table
|
|
1798
|
+
$table.updateRawData(props.data);
|
|
1799
1799
|
});
|
|
1800
1800
|
return {
|
|
1801
1801
|
tiledLength
|
|
@@ -1818,7 +1818,7 @@ var calcHeader = function calcHeader2(collectColumn2) {
|
|
|
1818
1818
|
levelMap.set(item, level);
|
|
1819
1819
|
_traverseTree(item.children, level + 1, item);
|
|
1820
1820
|
});
|
|
1821
|
-
} else {
|
|
1821
|
+
} else if (parent) {
|
|
1822
1822
|
leafColumns.push(parent);
|
|
1823
1823
|
}
|
|
1824
1824
|
};
|
|
@@ -1904,12 +1904,12 @@ var useHeader = function useHeader2(props, bodyVm, headerRowHeight) {
|
|
|
1904
1904
|
};
|
|
1905
1905
|
};
|
|
1906
1906
|
var getEventSource = function getEventSource2(e, $table) {
|
|
1907
|
-
var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset,
|
|
1907
|
+
var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset, _rowid;
|
|
1908
1908
|
var target = e.target;
|
|
1909
1909
|
var tableEl = target.closest(".tiny-grid__body");
|
|
1910
1910
|
if (((_tableEl$dataset = tableEl.dataset) == null ? void 0 : _tableEl$dataset.tableid) !== String($table.id)) return;
|
|
1911
1911
|
var cellEl = target.closest(".tiny-grid-header__column");
|
|
1912
|
-
var rowEl, part, rowType, row2, column;
|
|
1912
|
+
var rowEl, part, rowType, row2, column, rowid2;
|
|
1913
1913
|
if (cellEl) {
|
|
1914
1914
|
rowEl = cellEl.parentNode;
|
|
1915
1915
|
part = "header";
|
|
@@ -1922,12 +1922,17 @@ var getEventSource = function getEventSource2(e, $table) {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
if (!part || !cellEl || !rowEl) return;
|
|
1924
1924
|
column = (_$table$getColumnNode = $table.getColumnNode(cellEl)) == null ? void 0 : _$table$getColumnNode.item;
|
|
1925
|
-
|
|
1925
|
+
rowid2 = (_rowEl$dataset = rowEl.dataset) == null ? void 0 : _rowEl$dataset.rowid;
|
|
1926
|
+
if ((_rowid = rowid2) != null && _rowid.startsWith("row_g_")) {
|
|
1926
1927
|
rowType = "virtual";
|
|
1927
1928
|
} else if (part === "body") {
|
|
1928
|
-
var _$table$getRowNode;
|
|
1929
1929
|
rowType = "normal";
|
|
1930
|
-
|
|
1930
|
+
if ($table.editStore.insertMap.has(rowid2)) {
|
|
1931
|
+
row2 = $table.editStore.insertMap.get(rowid2);
|
|
1932
|
+
} else {
|
|
1933
|
+
var _$table$getRowNode;
|
|
1934
|
+
row2 = (_$table$getRowNode = $table.getRowNode(rowEl)) == null ? void 0 : _$table$getRowNode.item;
|
|
1935
|
+
}
|
|
1931
1936
|
}
|
|
1932
1937
|
return {
|
|
1933
1938
|
part,
|
|
@@ -2506,6 +2511,69 @@ var adjustColspan = function adjustColspan2(table, pos, isLeft) {
|
|
|
2506
2511
|
}
|
|
2507
2512
|
}
|
|
2508
2513
|
};
|
|
2514
|
+
var useNormalData = function useNormalData2(_ref34) {
|
|
2515
|
+
var _hooks$getCurrentInst4;
|
|
2516
|
+
var props = _ref34.props, tableFullColumn = _ref34.tableFullColumn;
|
|
2517
|
+
var $table = (_hooks$getCurrentInst4 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst4.proxy;
|
|
2518
|
+
var rawData = hooks.ref([]);
|
|
2519
|
+
var rawDataVersion = hooks.ref(0);
|
|
2520
|
+
var editorColumns = hooks.ref([]);
|
|
2521
|
+
var editorColumnKey = hooks.ref("");
|
|
2522
|
+
hooks.watch(tableFullColumn, function(_tableFullColumn) {
|
|
2523
|
+
var columns2 = [];
|
|
2524
|
+
var columnKeys = [];
|
|
2525
|
+
for (var i = 0; i < _tableFullColumn.length; i++) {
|
|
2526
|
+
var column = _tableFullColumn[i];
|
|
2527
|
+
if (column.property && column.editor) {
|
|
2528
|
+
columns2.push(column);
|
|
2529
|
+
columnKeys.push(column.propety);
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
var keyString = columnKeys.sort().join();
|
|
2533
|
+
if (editorColumnKey.value !== keyString) {
|
|
2534
|
+
editorColumnKey.value = keyString;
|
|
2535
|
+
editorColumns.value = columns2;
|
|
2536
|
+
}
|
|
2537
|
+
});
|
|
2538
|
+
hooks.watch(editorColumns, function(_editorColumns) {
|
|
2539
|
+
if (props.editConfig && _editorColumns.length > 0) {
|
|
2540
|
+
var _insertData = $table.editStore.insertList || [];
|
|
2541
|
+
var _rawData = rawData.value || [];
|
|
2542
|
+
var _data = [].concat(_insertData, _rawData);
|
|
2543
|
+
if (Array.isArray(_data)) {
|
|
2544
|
+
_data.forEach(function(row2) {
|
|
2545
|
+
return $table.defineField(row2, false, _editorColumns, true);
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
hooks.watch(rawData, function(_rawData) {
|
|
2551
|
+
var _editorColumns = editorColumns.value;
|
|
2552
|
+
if (props.editConfig && _editorColumns.length > 0) {
|
|
2553
|
+
var _data = _rawData || [];
|
|
2554
|
+
if (Array.isArray(_data)) {
|
|
2555
|
+
_data.forEach(function(row2) {
|
|
2556
|
+
return $table.defineField(row2, false, _editorColumns);
|
|
2557
|
+
});
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
rawDataVersion.value += 1;
|
|
2561
|
+
});
|
|
2562
|
+
hooks.watch(rawDataVersion, function() {
|
|
2563
|
+
var optimizeOpts = $table.optimizeOpts;
|
|
2564
|
+
var scrollY = optimizeOpts.scrollY;
|
|
2565
|
+
var _rawData = rawData.value || [];
|
|
2566
|
+
var tableFullData = Array.isArray(_rawData) ? _rawData.slice(0) : [];
|
|
2567
|
+
$table.tableFullData = tableFullData;
|
|
2568
|
+
$table.scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
|
|
2569
|
+
$table.updateCache(true, props.saveSource === "deep");
|
|
2570
|
+
$table.handleDataChange();
|
|
2571
|
+
});
|
|
2572
|
+
return {
|
|
2573
|
+
rawData,
|
|
2574
|
+
rawDataVersion
|
|
2575
|
+
};
|
|
2576
|
+
};
|
|
2509
2577
|
var toRaw = hooks.toRaw;
|
|
2510
2578
|
var VIRTUAL_ROW_KEY = "_$virtual_";
|
|
2511
2579
|
var difference$1 = function difference$12(arr, other) {
|
|
@@ -2605,7 +2673,7 @@ var orderingGroupBy = function orderingGroupBy2(arr, key, equals, active, rowKey
|
|
|
2605
2673
|
};
|
|
2606
2674
|
var buildRowGroupFullData = function buildRowGroupFullData2(fullData, _vm) {
|
|
2607
2675
|
var treeConfig = _vm.treeConfig, rowGroup = _vm.rowGroup;
|
|
2608
|
-
var
|
|
2676
|
+
var _ref35 = rowGroup || {}, field = _ref35.field, equals = _ref35.equals, activeMethod = _ref35.activeMethod;
|
|
2609
2677
|
_vm.hasVirtualRow = !treeConfig && rowGroup && field && fullData.length > 0;
|
|
2610
2678
|
if (_vm.hasVirtualRow) {
|
|
2611
2679
|
_vm.groupFullData = orderingGroupBy(fullData, field, equals || isEqual$1, activeMethod, getRowkey(_vm));
|
|
@@ -2629,14 +2697,14 @@ var handleRowGroupFold = function handleRowGroupFold2(row2, _vm) {
|
|
|
2629
2697
|
buildRenderGraph(_vm);
|
|
2630
2698
|
_vm.handleTableData().then(_vm.recalculate);
|
|
2631
2699
|
};
|
|
2632
|
-
var getFixedStyle = function getFixedStyle2(
|
|
2633
|
-
var fixedDetails =
|
|
2634
|
-
var overflowX =
|
|
2700
|
+
var getFixedStyle = function getFixedStyle2(_ref36, _ref37) {
|
|
2701
|
+
var fixedDetails = _ref36.fixedDetails;
|
|
2702
|
+
var overflowX = _ref37.overflowX;
|
|
2635
2703
|
return fixedDetails && overflowX ? fixedDetails.getStyle() : {};
|
|
2636
2704
|
};
|
|
2637
|
-
var getFixedClass = function getFixedClass2(
|
|
2638
|
-
var fixedDetails =
|
|
2639
|
-
var overflowX =
|
|
2705
|
+
var getFixedClass = function getFixedClass2(_ref38, _ref39) {
|
|
2706
|
+
var fixedDetails = _ref38.fixedDetails;
|
|
2707
|
+
var overflowX = _ref39.overflowX;
|
|
2640
2708
|
return _extends({
|
|
2641
2709
|
"fixed__column": fixedDetails && overflowX
|
|
2642
2710
|
}, fixedDetails && overflowX ? fixedDetails.getClass() : {});
|
|
@@ -2763,21 +2831,21 @@ var renderBorder = function renderBorder2(type) {
|
|
|
2763
2831
|
"class": "tiny-grid-border-left"
|
|
2764
2832
|
}, null)]);
|
|
2765
2833
|
};
|
|
2766
|
-
function renderColumn(
|
|
2767
|
-
var _normalRows$rowid,
|
|
2768
|
-
var $columnIndex =
|
|
2834
|
+
function renderColumn(_ref40) {
|
|
2835
|
+
var _normalRows$rowid, _ref42;
|
|
2836
|
+
var $columnIndex = _ref40.$columnIndex, $table = _ref40.$table, _vm = _ref40._vm, column = _ref40.column, id3 = _ref40.id, row2 = _ref40.row, rowid2 = _ref40.rowid, seq = _ref40.seq, used = _ref40.used;
|
|
2769
2837
|
var allAlign = $table.align, cellClassName = $table.cellClassName, _$table$dropConfig = $table.dropConfig, dropConfig = _$table$dropConfig === void 0 ? {} : _$table$dropConfig, editConfig = $table.editConfig, editRules = $table.editRules, editStore = $table.editStore;
|
|
2770
2838
|
var height2 = $table.height, rowId = $table.rowId, scrollXLoad = $table.scrollXLoad, scrollYLoad = $table.scrollYLoad, validOpts2 = $table.validOpts, validStore = $table.validStore, validatedMap = $table.validatedMap;
|
|
2771
2839
|
var normalRows = _vm.normalRows;
|
|
2772
|
-
var
|
|
2840
|
+
var _ref41 = ((_normalRows$rowid = normalRows[rowid2]) == null ? void 0 : _normalRows$rowid[column.id]) || {}, _ref41$attrs = _ref41.attrs, attrs = _ref41$attrs === void 0 ? {
|
|
2773
2841
|
rowspan: 1,
|
|
2774
2842
|
colspan: 1,
|
|
2775
2843
|
visible: true
|
|
2776
|
-
} :
|
|
2844
|
+
} : _ref41$attrs, _ref41$params = _ref41.params, params = _ref41$params === void 0 ? {
|
|
2777
2845
|
$table,
|
|
2778
2846
|
row: row2,
|
|
2779
2847
|
column
|
|
2780
|
-
} :
|
|
2848
|
+
} : _ref41$params;
|
|
2781
2849
|
var isMessageDefault = validOpts2.isMessageDefault, isMessageInline = validOpts2.isMessageInline, highlightError = validOpts2.highlightError;
|
|
2782
2850
|
var actived = editStore.actived;
|
|
2783
2851
|
var validated = validatedMap[column.id + "-" + row2[rowId]];
|
|
@@ -2805,7 +2873,7 @@ function renderColumn(_ref39) {
|
|
|
2805
2873
|
"data-colindex": $columnIndex,
|
|
2806
2874
|
"rowspan": attrs.rowspan > 1 ? attrs.rowspan : void 0,
|
|
2807
2875
|
"colspan": attrs.colspan > 1 ? attrs.colspan : void 0,
|
|
2808
|
-
"class": ["tiny-grid-body__column", column.id, (
|
|
2876
|
+
"class": ["tiny-grid-body__column", column.id, (_ref42 = {}, _ref42["col__" + cellAlign] = cellAlign, _ref42["col__edit"] = editor, _ref42["col__index"] = column.type === "index", _ref42["col__radio"] = column.type === "radio", _ref42["col__selection"] = column.type === "selection", _ref42["col__ellipsis"] = cellOverflowHint, _ref42["edit__visible"] = editor && editor.type === "visible", _ref42["col__dirty"] = isDirty, _ref42["col__actived"] = columnActived, _ref42["col__highlight-error"] = highlightError && validated, _ref42["col__valid-error"] = validError && validated, _ref42["col__valid-success"] = columnActived ? !validError && !validated : isDirty && !validated, _ref42["col__treenode"] = column.treeNode, _ref42), getClass(className, params), getClass(cellClassName, params), getFixedClass(column, $table), attrs._stickyClass || ""]
|
|
2809
2877
|
}, [[
|
|
2810
2878
|
// 行拖拽手柄
|
|
2811
2879
|
dropConfig.rowHandle === "index" && column.type === "index" ? createVNode("div", {
|
|
@@ -2846,9 +2914,9 @@ function renderHeaderRows(_vm) {
|
|
|
2846
2914
|
$table,
|
|
2847
2915
|
$rowIndex
|
|
2848
2916
|
}) : headerRowClassName : ""]
|
|
2849
|
-
}, [cols.map(function(
|
|
2850
|
-
var _column$children,
|
|
2851
|
-
var id3 =
|
|
2917
|
+
}, [cols.map(function(_ref43, $columnIndex) {
|
|
2918
|
+
var _column$children, _ref44;
|
|
2919
|
+
var id3 = _ref43.id, column = _ref43.column, colspan = _ref43.colspan, rowspan = _ref43.rowspan, height2 = _ref43.height, top = _ref43.top;
|
|
2852
2920
|
var isColGroup = (_column$children = column.children) == null ? void 0 : _column$children.length;
|
|
2853
2921
|
var headerAlign = column.headerAlign, align = column.align, headerClassName = column.headerClassName;
|
|
2854
2922
|
var _getConfigOverflow3 = getConfigOverflow(column, $table), headerTip = _getConfigOverflow3.headerTip, headerOverflowTitle = _getConfigOverflow3.headerOverflowTitle, headerOverflowTooltip = _getConfigOverflow3.headerOverflowTooltip, headerOverflowEllipsis = _getConfigOverflow3.headerOverflowEllipsis, headerOverflowHint = _getConfigOverflow3.headerOverflowHint;
|
|
@@ -2877,7 +2945,7 @@ function renderHeaderRows(_vm) {
|
|
|
2877
2945
|
top: top + "px",
|
|
2878
2946
|
zIndex: column.fixed ? 20 : 10
|
|
2879
2947
|
}],
|
|
2880
|
-
"class": ["tiny-grid-header__column", column.id, (
|
|
2948
|
+
"class": ["tiny-grid-header__column", column.id, (_ref44 = {}, _ref44["col__" + headAlign] = headAlign, _ref44["col__fixed"] = column.fixed, _ref44["col__index"] = column.type === "index", _ref44["col__radio"] = column.type === "radio", _ref44["col__selection"] = column.type === "selection", _ref44["col__group"] = isColGroup, _ref44["col__ellipsis"] = headerOverflowHint, _ref44["is__sortable"] = !["index", "radio", "selection"].includes(column.type) && column.sortable, _ref44["is__editable"] = column.editor, _ref44["is__filter"] = isObject(column.filter), _ref44["filter__active"] = column.filter && column.filter.hasFilter, _ref44["is__multilevel"] = rowspan > 1, _ref44), getClass(headerClassName, params), getClass(headerCellClassName, params), getFixedClass(column, $table)]
|
|
2881
2949
|
}, [[
|
|
2882
2950
|
!isColGroup && !(isBoolean(column.resizable) ? column.resizable : resizable) && column.type !== "index" ? createVNode("div", {
|
|
2883
2951
|
"class": {
|
|
@@ -2927,20 +2995,20 @@ function renderFooterRows(_vm) {
|
|
|
2927
2995
|
$table,
|
|
2928
2996
|
$rowIndex
|
|
2929
2997
|
}) : footerRowClassName : ""]
|
|
2930
|
-
}, [columnPool.map(function(
|
|
2931
|
-
var _footerRows$$rowIndex,
|
|
2932
|
-
var id3 =
|
|
2998
|
+
}, [columnPool.map(function(_ref45, $columnIndex) {
|
|
2999
|
+
var _footerRows$$rowIndex, _ref47;
|
|
3000
|
+
var id3 = _ref45.id, column = _ref45.item, used = _ref45.used;
|
|
2933
3001
|
var footerAlign = column.footerAlign, align = column.align, footerClassName = column.footerClassName;
|
|
2934
3002
|
var ftAlign = footerAlign || align || allFooterAlign || allAlign;
|
|
2935
3003
|
var _getConfigOverflow4 = getConfigOverflow(column, $table), cellOverflowHint = _getConfigOverflow4.cellOverflowHint;
|
|
2936
|
-
var
|
|
3004
|
+
var _ref46 = ((_footerRows$$rowIndex = footerRows[$rowIndex]) == null ? void 0 : _footerRows$$rowIndex[column.id]) || {}, _ref46$attrs = _ref46.attrs, attrs = _ref46$attrs === void 0 ? {
|
|
2937
3005
|
rowspan: 1,
|
|
2938
3006
|
colspan: 1,
|
|
2939
3007
|
visible: true
|
|
2940
|
-
} :
|
|
3008
|
+
} : _ref46$attrs, _ref46$params = _ref46.params, params = _ref46$params === void 0 ? {
|
|
2941
3009
|
$table,
|
|
2942
3010
|
column
|
|
2943
|
-
} :
|
|
3011
|
+
} : _ref46$params;
|
|
2944
3012
|
var rowspan = (attrs == null ? void 0 : attrs.rowspan) || 1;
|
|
2945
3013
|
var tdBottom = trBottom - (rowspan > 1 ? (rowspan - 1) * rowHeight : 0);
|
|
2946
3014
|
params.$columnIndex = $columnIndex;
|
|
@@ -2955,7 +3023,7 @@ function renderFooterRows(_vm) {
|
|
|
2955
3023
|
zIndex: column.fixed ? 20 : 10,
|
|
2956
3024
|
display: used && attrs.visible ? void 0 : "none"
|
|
2957
3025
|
}],
|
|
2958
|
-
"class": ["tiny-grid-footer__column", column.id, (
|
|
3026
|
+
"class": ["tiny-grid-footer__column", column.id, (_ref47 = {}, _ref47["col__" + ftAlign] = ftAlign, _ref47["col__ellipsis"] = cellOverflowHint, _ref47["filter__active"] = column.filter && column.filter.hasFilter, _ref47), getClass(footerClassName, params), getClass(footerCellClassName, params), getFixedClass(column, $table), attrs._stickyClass || ""]
|
|
2959
3027
|
}, [createVNode("div", {
|
|
2960
3028
|
"class": {
|
|
2961
3029
|
"tiny-grid-cell": true,
|
|
@@ -2972,17 +3040,13 @@ function renderRows(_vm) {
|
|
|
2972
3040
|
var expandMethod = expandConfig.activeMethod;
|
|
2973
3041
|
var startIndex = scrollYStore.startIndex;
|
|
2974
3042
|
var isOrdered = treeConfig ? !!treeOrdered : false;
|
|
2975
|
-
var
|
|
3043
|
+
var _ref48 = treeConfig || {}, hideMethod = _ref48.hideMethod;
|
|
2976
3044
|
var actived = editStore.actived;
|
|
2977
3045
|
var rows = [];
|
|
2978
3046
|
var seqCount = {
|
|
2979
3047
|
value: 0
|
|
2980
3048
|
};
|
|
2981
3049
|
var $seq = "";
|
|
2982
|
-
var lastVisibleIndex = rowPool.findLastIndex(function(_ref48) {
|
|
2983
|
-
var used = _ref48.used;
|
|
2984
|
-
return Boolean(used);
|
|
2985
|
-
});
|
|
2986
3050
|
rowPool.forEach(function(_ref49, $rowIndex) {
|
|
2987
3051
|
var id3 = _ref49.id, _ref49$item = _ref49.item, row2 = _ref49$item.payload, rowLevel = _ref49$item.level, used = _ref49.used;
|
|
2988
3052
|
var rowActived = editConfig && actived.row === row2;
|
|
@@ -3021,8 +3085,7 @@ function renderRows(_vm) {
|
|
|
3021
3085
|
isSkipRowRender,
|
|
3022
3086
|
row: row2,
|
|
3023
3087
|
rowActived,
|
|
3024
|
-
rowClassName
|
|
3025
|
-
lastVisibleIndex
|
|
3088
|
+
rowClassName
|
|
3026
3089
|
};
|
|
3027
3090
|
Object.assign(args, {
|
|
3028
3091
|
rowIndex,
|
|
@@ -3119,7 +3182,7 @@ function renderRowAfter(_ref50) {
|
|
|
3119
3182
|
function renderRow(args) {
|
|
3120
3183
|
var _ref51;
|
|
3121
3184
|
var $rowIndex = args.$rowIndex, $seq = args.$seq, $table = args.$table, _vm = args._vm, editStore = args.editStore, id3 = args.id, isSkipRowRender = args.isSkipRowRender, row2 = args.row, rowActived = args.rowActived, rowClassName = args.rowClassName;
|
|
3122
|
-
var rowIndex = args.rowIndex, rowLevel = args.rowLevel, rowid2 = args.rowid, rows = args.rows, selection = args.selection, selectRow = args.selectRow, seq = args.seq, treeConfig = args.treeConfig, used = args.used
|
|
3185
|
+
var rowIndex = args.rowIndex, rowLevel = args.rowLevel, rowid2 = args.rowid, rows = args.rows, selection = args.selection, selectRow = args.selectRow, seq = args.seq, treeConfig = args.treeConfig, used = args.used;
|
|
3123
3186
|
if (isSkipRowRender) {
|
|
3124
3187
|
return;
|
|
3125
3188
|
}
|
|
@@ -3141,7 +3204,7 @@ function renderRow(args) {
|
|
|
3141
3204
|
"style": {
|
|
3142
3205
|
display: used ? void 0 : "none"
|
|
3143
3206
|
},
|
|
3144
|
-
"class": ["tiny-grid-body__row", (_ref51 = {}, _ref51["row__level-" + rowLevel] = treeConfig, _ref51["row__new"] = editStore.insertList.includes(row2), _ref51["row__selected"] = selection.includes(row2), _ref51["row__radio"] = selectRow === row2, _ref51["row__actived"] = rowActived, _ref51
|
|
3207
|
+
"class": ["tiny-grid-body__row", (_ref51 = {}, _ref51["row__level-" + rowLevel] = treeConfig, _ref51["row__new"] = editStore.insertList.includes(row2), _ref51["row__selected"] = selection.includes(row2), _ref51["row__radio"] = selectRow === row2, _ref51["row__actived"] = rowActived, _ref51), rowClassName ? isFunction(rowClassName) ? rowClassName({
|
|
3145
3208
|
$table,
|
|
3146
3209
|
$seq,
|
|
3147
3210
|
seq,
|
|
@@ -3370,9 +3433,9 @@ var Body = /* @__PURE__ */ defineComponent({
|
|
|
3370
3433
|
footerData: Array
|
|
3371
3434
|
},
|
|
3372
3435
|
setup: function setup3(props, _ref57) {
|
|
3373
|
-
var _hooks$
|
|
3436
|
+
var _hooks$getCurrentInst5;
|
|
3374
3437
|
var slots = _ref57.slots;
|
|
3375
|
-
var vm = (_hooks$
|
|
3438
|
+
var vm = (_hooks$getCurrentInst5 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst5.proxy;
|
|
3376
3439
|
var $table = vm == null ? void 0 : vm.$parent;
|
|
3377
3440
|
var rowHeight = hooks.computed(function() {
|
|
3378
3441
|
return $table.rowHeight;
|
|
@@ -3524,8 +3587,6 @@ var Body = /* @__PURE__ */ defineComponent({
|
|
|
3524
3587
|
"no-data": isNoData && $table.isShapeTable
|
|
3525
3588
|
},
|
|
3526
3589
|
"style": {
|
|
3527
|
-
"--body-container-scroll-height": containerScrollHeight + "px",
|
|
3528
|
-
"--body-container-scroll-width": containerScrollWidth + "px",
|
|
3529
3590
|
height: bodyWrapperHeight ? bodyWrapperHeight + "px" : void 0,
|
|
3530
3591
|
minHeight: bodyWrapperMinHeight ? bodyWrapperMinHeight + "px" : void 0,
|
|
3531
3592
|
maxHeight: bodyWrapperMaxHeight ? bodyWrapperMaxHeight + "px" : void 0
|
|
@@ -7541,7 +7602,7 @@ var Methods$d = {
|
|
|
7541
7602
|
_this15.tableData = [];
|
|
7542
7603
|
_this15.cellStatus.clear();
|
|
7543
7604
|
_this15.clearValidateMap();
|
|
7544
|
-
return _this15.
|
|
7605
|
+
return _this15.updateRawData(data7 || _this15.tableFullData);
|
|
7545
7606
|
};
|
|
7546
7607
|
return this.$nextTick().then(next);
|
|
7547
7608
|
},
|
|
@@ -7593,18 +7654,10 @@ var Methods$d = {
|
|
|
7593
7654
|
// 全量加载表格数据
|
|
7594
7655
|
loadTableData: function loadTableData(datas, notRefresh) {
|
|
7595
7656
|
var _this17 = this;
|
|
7596
|
-
var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop,
|
|
7597
|
-
var scrollY = optimizeOpts.scrollY;
|
|
7598
|
-
var tableFullData = isArray(datas) ? datas.slice(0) : [];
|
|
7599
|
-
var scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
|
|
7657
|
+
var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop, scrollYLoad = this.scrollYLoad;
|
|
7600
7658
|
editStore.insertList = [];
|
|
7659
|
+
editStore.insertMap = /* @__PURE__ */ new Map();
|
|
7601
7660
|
editStore.removeList = [];
|
|
7602
|
-
Object.assign(this, {
|
|
7603
|
-
tableFullData,
|
|
7604
|
-
tableSynchData: datas,
|
|
7605
|
-
scrollYLoad
|
|
7606
|
-
});
|
|
7607
|
-
this.updateCache(true, true);
|
|
7608
7661
|
if (scrollYLoad && !(height2 || maxHeight)) {
|
|
7609
7662
|
error("ui.grid.error.scrollYHeight");
|
|
7610
7663
|
}
|
|
@@ -7620,31 +7673,51 @@ var Methods$d = {
|
|
|
7620
7673
|
lastScrollTop
|
|
7621
7674
|
});
|
|
7622
7675
|
}
|
|
7676
|
+
}).then(function() {
|
|
7677
|
+
var _this17$resolveMap$lo;
|
|
7678
|
+
if (((_this17$resolveMap$lo = _this17.resolveMap.loadDataResolve) == null ? void 0 : _this17$resolveMap$lo.data) === datas) {
|
|
7679
|
+
_this17.resolveMap.loadDataResolve.resolveQueue.forEach(function(resolve) {
|
|
7680
|
+
return resolve();
|
|
7681
|
+
});
|
|
7682
|
+
_this17.resolveMap.loadDataResolve = null;
|
|
7683
|
+
}
|
|
7623
7684
|
});
|
|
7624
7685
|
},
|
|
7625
7686
|
// 重新加载数据
|
|
7626
7687
|
reloadData: function reloadData(datas) {
|
|
7627
7688
|
var _this18 = this;
|
|
7628
7689
|
return this.clearAll().then(function() {
|
|
7629
|
-
return _this18.
|
|
7690
|
+
return _this18.updateRawData(datas);
|
|
7630
7691
|
});
|
|
7631
7692
|
},
|
|
7632
7693
|
// 加载全量数据
|
|
7633
7694
|
loadData: function loadData(datas) {
|
|
7634
7695
|
var _this19 = this;
|
|
7635
7696
|
return new Promise(function(resolve) {
|
|
7636
|
-
_this19.
|
|
7637
|
-
|
|
7697
|
+
_this19.updateRawData(datas);
|
|
7698
|
+
if (_this19.resolveMap.loadDataResolve) {
|
|
7699
|
+
_this19.resolveMap.loadDataResolve.data = datas;
|
|
7700
|
+
_this19.resolveMap.loadDataResolve.resolveQueue.push(resolve);
|
|
7701
|
+
} else {
|
|
7702
|
+
_this19.resolveMap.loadDataResolve = {
|
|
7703
|
+
data: datas,
|
|
7704
|
+
resolveQueue: [resolve]
|
|
7705
|
+
};
|
|
7706
|
+
}
|
|
7638
7707
|
});
|
|
7639
7708
|
},
|
|
7709
|
+
updateRawData: function updateRawData(datas) {
|
|
7710
|
+
this.rawData = datas;
|
|
7711
|
+
this.rawDataVersion += 1;
|
|
7712
|
+
},
|
|
7640
7713
|
getOriginRow: function getOriginRow(row2) {
|
|
7641
|
-
var
|
|
7642
|
-
return
|
|
7714
|
+
var rowid2 = getRowid(this, row2);
|
|
7715
|
+
return rowid2 ? this.rowidCacheMap.get(rowid2) : null;
|
|
7643
7716
|
},
|
|
7644
7717
|
setOriginRow: function setOriginRow(row2, record) {
|
|
7645
|
-
var
|
|
7646
|
-
if (
|
|
7647
|
-
|
|
7718
|
+
var rowid2 = getRowid(this, row2);
|
|
7719
|
+
if (rowid2 && record) {
|
|
7720
|
+
this.rowidCacheMap.set(rowid2, record);
|
|
7648
7721
|
}
|
|
7649
7722
|
},
|
|
7650
7723
|
reloadRow: function reloadRow(row2, record, field) {
|
|
@@ -7718,14 +7791,14 @@ var Methods$d = {
|
|
|
7718
7791
|
if (deepCopy === void 0) {
|
|
7719
7792
|
deepCopy = false;
|
|
7720
7793
|
}
|
|
7721
|
-
var tableFullData = this.tableFullData, treeConfig = this.treeConfig, treeOrdered = this.treeOrdered;
|
|
7794
|
+
var tableFullData = this.tableFullData, treeConfig = this.treeConfig, treeOrdered = this.treeOrdered, editConfig = this.editConfig, _this$saveSource = this.saveSource, saveSource = _this$saveSource === void 0 ? false : _this$saveSource;
|
|
7722
7795
|
var rowKey = getRowkey(this);
|
|
7723
7796
|
var _ref157 = treeConfig || {}, childrenKey = _ref157.children, _ref157$temporaryInde = _ref157.temporaryIndex, temporaryIndex = _ref157$temporaryInde === void 0 ? "_$index_" : _ref157$temporaryInde;
|
|
7724
7797
|
var isTreeOrderedFalse = treeConfig && !treeOrdered;
|
|
7725
|
-
var
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7798
|
+
var fullDataRowIdData = this.fullDataRowIdData = {};
|
|
7799
|
+
var fullDataRowMap = this.fullDataRowMap;
|
|
7800
|
+
fullDataRowMap.clear();
|
|
7801
|
+
eachTree(tableFullData, function(row2, index2, _array, _path, parent) {
|
|
7729
7802
|
var rowId = getRowid(_this22, row2);
|
|
7730
7803
|
if (!rowId) {
|
|
7731
7804
|
rowId = getRowUniqueId();
|
|
@@ -7736,31 +7809,78 @@ var Methods$d = {
|
|
|
7736
7809
|
rowid: rowId,
|
|
7737
7810
|
index: index2
|
|
7738
7811
|
};
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
|
|
7812
|
+
if (fullDataRowIdData[rowId]) {
|
|
7813
|
+
warn("ui.grid.error.duplicateRowId", rowId);
|
|
7814
|
+
}
|
|
7815
|
+
fullDataRowIdData[rowId] = rowCache;
|
|
7816
|
+
fullDataRowMap.set(_this22.getRaw(row2), rowCache);
|
|
7817
|
+
if (isTreeOrderedFalse) {
|
|
7818
|
+
var parentIndex;
|
|
7819
|
+
if (parent) {
|
|
7820
|
+
parentIndex = get(parent, temporaryIndex);
|
|
7749
7821
|
}
|
|
7750
|
-
|
|
7751
|
-
var backupRow = deepCopy ? clone(_extends({}, row2, childrenField), true) : _extends({}, row2, childrenField);
|
|
7752
|
-
backupMap.set(row2, backupRow);
|
|
7753
|
-
return backupRow;
|
|
7822
|
+
set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
|
|
7754
7823
|
}
|
|
7755
|
-
};
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7824
|
+
}, treeConfig);
|
|
7825
|
+
if (backup && (editConfig || saveSource)) {
|
|
7826
|
+
requestIdleCallback(function() {
|
|
7827
|
+
var rowidCacheMap = /* @__PURE__ */ new Map();
|
|
7828
|
+
var callback = function callback2(row2) {
|
|
7829
|
+
var _extends6;
|
|
7830
|
+
return rowidCacheMap.set(getRowid(_this22, row2), clone(childrenKey ? _extends({}, row2, (_extends6 = {}, _extends6[childrenKey] = null, _extends6)) : _extends({}, row2), deepCopy));
|
|
7831
|
+
};
|
|
7832
|
+
eachTree(tableFullData, callback, treeConfig);
|
|
7833
|
+
_this22.rowidCacheMap = rowidCacheMap;
|
|
7761
7834
|
});
|
|
7762
7835
|
}
|
|
7763
7836
|
},
|
|
7837
|
+
getRaw: function getRaw(object) {
|
|
7838
|
+
var hooks_vue = hooks;
|
|
7839
|
+
return !isVue2 && hooks_vue.isProxy(object) ? hooks.toRaw(object) : object;
|
|
7840
|
+
},
|
|
7841
|
+
/**
|
|
7842
|
+
* 递归地将 Proxy 对象(如 Vue 3 的响应式对象)转换为普通对象。
|
|
7843
|
+
* @param {any} data 待处理的数据
|
|
7844
|
+
* @returns {any} 转换后的普通对象或原始数据
|
|
7845
|
+
*/
|
|
7846
|
+
deepUnwrap: function deepUnwrap(data7) {
|
|
7847
|
+
if (data7 === null || typeof data7 !== "object") {
|
|
7848
|
+
return data7;
|
|
7849
|
+
}
|
|
7850
|
+
if (data7 instanceof Map) {
|
|
7851
|
+
return this.cloneMapAndUnwrap(data7);
|
|
7852
|
+
}
|
|
7853
|
+
if (data7 instanceof Set) {
|
|
7854
|
+
return new Set(Array.from(data7).map(this.deepUnwrap));
|
|
7855
|
+
}
|
|
7856
|
+
if (Array.isArray(data7)) {
|
|
7857
|
+
return data7.map(this.deepUnwrap);
|
|
7858
|
+
}
|
|
7859
|
+
var result = {};
|
|
7860
|
+
for (var key in data7) {
|
|
7861
|
+
if (Object.prototype.hasOwnProperty.call(data7, key)) {
|
|
7862
|
+
result[key] = this.deepUnwrap(data7[key]);
|
|
7863
|
+
}
|
|
7864
|
+
}
|
|
7865
|
+
return result;
|
|
7866
|
+
},
|
|
7867
|
+
/**
|
|
7868
|
+
* 复制 Map,并递归地将 Map 的值中包含的 Proxy 转换为普通对象。
|
|
7869
|
+
* @param {Map<any, any>} originalMap 原始 Map
|
|
7870
|
+
* @returns {Map<any, any>} 复制并解包后的新 Map
|
|
7871
|
+
*/
|
|
7872
|
+
cloneMapAndUnwrap: function cloneMapAndUnwrap(originalMap) {
|
|
7873
|
+
if (!(originalMap instanceof Map)) {
|
|
7874
|
+
return originalMap;
|
|
7875
|
+
}
|
|
7876
|
+
var newMap = /* @__PURE__ */ new Map();
|
|
7877
|
+
for (var _iterator0 = _createForOfIteratorHelperLoose(originalMap.entries()), _step0; !(_step0 = _iterator0()).done; ) {
|
|
7878
|
+
var _step0$value = _step0.value, key = _step0$value[0], value = _step0$value[1];
|
|
7879
|
+
var unwrappedValue = this.deepUnwrap(value);
|
|
7880
|
+
newMap.set(key, unwrappedValue);
|
|
7881
|
+
}
|
|
7882
|
+
return newMap;
|
|
7883
|
+
},
|
|
7764
7884
|
// 更新列的 Map
|
|
7765
7885
|
cacheColumnMap: function cacheColumnMap(options) {
|
|
7766
7886
|
var fullColumnMap = this.fullColumnMap;
|
|
@@ -7788,9 +7908,7 @@ var Methods$d = {
|
|
|
7788
7908
|
return null;
|
|
7789
7909
|
},
|
|
7790
7910
|
getColumnNode: function getColumnNode(cell) {
|
|
7791
|
-
if (!cell)
|
|
7792
|
-
return null;
|
|
7793
|
-
}
|
|
7911
|
+
if (!cell) return null;
|
|
7794
7912
|
var fullColumnIdData = this.fullColumnIdData, tableFullColumn = this.tableFullColumn;
|
|
7795
7913
|
var dataColid = cell.dataset.colid;
|
|
7796
7914
|
var colCache = fullColumnIdData[dataColid];
|
|
@@ -7804,31 +7922,41 @@ var Methods$d = {
|
|
|
7804
7922
|
return null;
|
|
7805
7923
|
},
|
|
7806
7924
|
getRowIndex: function getRowIndex(row2) {
|
|
7807
|
-
var rawRow = hooks.toRaw(row2);
|
|
7808
7925
|
var fullDataRowMap = this.fullDataRowMap;
|
|
7809
|
-
|
|
7926
|
+
row2 = this.getRaw(row2);
|
|
7927
|
+
return fullDataRowMap.has(row2) ? fullDataRowMap.get(row2).index : -1;
|
|
7810
7928
|
},
|
|
7811
7929
|
getColumnIndex: function getColumnIndex(column) {
|
|
7812
7930
|
var fullColumnMap = this.fullColumnMap;
|
|
7813
|
-
return fullColumnMap.has(column) ? fullColumnMap.get(column).
|
|
7931
|
+
return fullColumnMap.has(column) ? fullColumnMap.get(column).columnIndex : -1;
|
|
7814
7932
|
},
|
|
7815
7933
|
hasIndexColumn: function hasIndexColumn(column) {
|
|
7816
7934
|
return (column == null ? void 0 : column.type) === "index";
|
|
7817
7935
|
},
|
|
7818
|
-
defineField: function defineField(row2, copy) {
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
}
|
|
7936
|
+
defineField: function defineField(row2, copy, editorColumns, cache) {
|
|
7937
|
+
var _this23 = this;
|
|
7938
|
+
if (!row2 || typeof row2 !== "object") return row2;
|
|
7822
7939
|
if (copy) {
|
|
7823
7940
|
row2 = clone(row2, true);
|
|
7824
7941
|
}
|
|
7825
7942
|
var rowKey = getRowkey(this);
|
|
7826
|
-
this.visibleColumn
|
|
7827
|
-
|
|
7943
|
+
var columns2 = editorColumns || this.visibleColumn;
|
|
7944
|
+
columns2.forEach(function(column) {
|
|
7945
|
+
var property = column.property, editor = column.editor;
|
|
7828
7946
|
var propNotExist = property && !has(row2, property);
|
|
7829
7947
|
var propDefaultValue = editor && !isUndefined(editor.defaultValue) ? editor.defaultValue : null;
|
|
7830
7948
|
if (propNotExist) {
|
|
7831
|
-
|
|
7949
|
+
if (cache) {
|
|
7950
|
+
var originRow = _this23.getOriginRow(row2);
|
|
7951
|
+
if (originRow) {
|
|
7952
|
+
originRow[property] = propDefaultValue;
|
|
7953
|
+
}
|
|
7954
|
+
}
|
|
7955
|
+
if (isVue2) {
|
|
7956
|
+
_this23.$set(row2, property, propDefaultValue);
|
|
7957
|
+
} else {
|
|
7958
|
+
set(row2, property, propDefaultValue);
|
|
7959
|
+
}
|
|
7832
7960
|
}
|
|
7833
7961
|
});
|
|
7834
7962
|
var rowId = get(row2, rowKey);
|
|
@@ -7838,11 +7966,8 @@ var Methods$d = {
|
|
|
7838
7966
|
return row2;
|
|
7839
7967
|
},
|
|
7840
7968
|
isTemporaryRow: function isTemporaryRow(row2) {
|
|
7841
|
-
var _this23 = this;
|
|
7842
7969
|
var rowid2 = getRowid(this, row2);
|
|
7843
|
-
return
|
|
7844
|
-
return rowid2 === getRowid(_this23, r);
|
|
7845
|
-
});
|
|
7970
|
+
return this.editStore.insertMap.has(rowid2);
|
|
7846
7971
|
},
|
|
7847
7972
|
createData: function createData(records, copy) {
|
|
7848
7973
|
var _this24 = this;
|
|
@@ -7882,7 +8007,7 @@ var Methods$d = {
|
|
|
7882
8007
|
return this.$nextTick();
|
|
7883
8008
|
},
|
|
7884
8009
|
hasRowInsert: function hasRowInsert(row2) {
|
|
7885
|
-
return this.
|
|
8010
|
+
return this.isTemporaryRow(row2);
|
|
7886
8011
|
},
|
|
7887
8012
|
compareRow: function compareRow(row2, originalRow, field) {
|
|
7888
8013
|
var value = get(row2, field);
|
|
@@ -7908,20 +8033,20 @@ var Methods$d = {
|
|
|
7908
8033
|
},
|
|
7909
8034
|
hasRowChange: function hasRowChange(row2, field) {
|
|
7910
8035
|
var _editConfig$insertCha;
|
|
7911
|
-
var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn,
|
|
8036
|
+
var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn, _this$editConfig2 = this.editConfig, editConfig = _this$editConfig2 === void 0 ? {} : _this$editConfig2;
|
|
7912
8037
|
var insertChanged = (_editConfig$insertCha = editConfig == null ? void 0 : editConfig.insertChanged) != null ? _editConfig$insertCha : false;
|
|
7913
8038
|
var argsLength = arguments.length;
|
|
7914
8039
|
var originRow;
|
|
7915
8040
|
if (this.isTemporaryRow(row2)) {
|
|
7916
8041
|
return insertChanged;
|
|
7917
8042
|
}
|
|
7918
|
-
var cacheRow =
|
|
8043
|
+
var cacheRow = this.getOriginRow(row2);
|
|
7919
8044
|
if (cacheRow) {
|
|
7920
8045
|
if (treeConfig) {
|
|
7921
|
-
var
|
|
8046
|
+
var _extends7, _extends8;
|
|
7922
8047
|
var children = treeConfig.children;
|
|
7923
|
-
row2 = _extends({}, row2, (
|
|
7924
|
-
originRow = _extends({}, cacheRow, (
|
|
8048
|
+
row2 = _extends({}, row2, (_extends7 = {}, _extends7[children] = null, _extends7));
|
|
8049
|
+
originRow = _extends({}, cacheRow, (_extends8 = {}, _extends8[children] = null, _extends8));
|
|
7925
8050
|
} else {
|
|
7926
8051
|
originRow = _extends({}, cacheRow);
|
|
7927
8052
|
}
|
|
@@ -7968,7 +8093,7 @@ var Methods$d = {
|
|
|
7968
8093
|
},
|
|
7969
8094
|
// 获取表格所有数据
|
|
7970
8095
|
getData: function getData(rowIndex) {
|
|
7971
|
-
var allRows = this.
|
|
8096
|
+
var allRows = this.rawData || [];
|
|
7972
8097
|
if (!arguments.length) {
|
|
7973
8098
|
return allRows.slice(0);
|
|
7974
8099
|
}
|
|
@@ -7982,7 +8107,7 @@ var Methods$d = {
|
|
|
7982
8107
|
var _this$selectConfig = this.selectConfig, selectConfig = _this$selectConfig === void 0 ? {} : _this$selectConfig, selection = this.selection;
|
|
7983
8108
|
var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
|
|
7984
8109
|
var checkField = selectConfig.checkField;
|
|
7985
|
-
var
|
|
8110
|
+
var _ref158 = {}, _ref158$rowList = _ref158.rowList, rowList = _ref158$rowList === void 0 ? [] : _ref158$rowList;
|
|
7986
8111
|
if (checkField && treeConfig) {
|
|
7987
8112
|
rowList = filterTree(tableFullData, function(row2) {
|
|
7988
8113
|
return get(row2, checkField);
|
|
@@ -8011,8 +8136,8 @@ var Methods$d = {
|
|
|
8011
8136
|
var tableData = this.tableFullData;
|
|
8012
8137
|
var updateFilter = function updateFilter2(tableData2) {
|
|
8013
8138
|
var remoteFilter = _this26.remoteFilter, visibleColumn = _this26.visibleColumn;
|
|
8014
|
-
var filterColumn = visibleColumn.filter(function(
|
|
8015
|
-
var filter2 =
|
|
8139
|
+
var filterColumn = visibleColumn.filter(function(_ref159) {
|
|
8140
|
+
var filter2 = _ref159.filter;
|
|
8016
8141
|
return !!filter2;
|
|
8017
8142
|
});
|
|
8018
8143
|
return tableData2.filter(function(row2) {
|
|
@@ -8041,8 +8166,8 @@ var Methods$d = {
|
|
|
8041
8166
|
} else {
|
|
8042
8167
|
var sortedFlag = false;
|
|
8043
8168
|
if (sortOpts2.multipleColumnSort) {
|
|
8044
|
-
var sortColumns = visibleColumn.filter(function(
|
|
8045
|
-
var order2 =
|
|
8169
|
+
var sortColumns = visibleColumn.filter(function(_ref160) {
|
|
8170
|
+
var order2 = _ref160.order;
|
|
8046
8171
|
return !!order2;
|
|
8047
8172
|
});
|
|
8048
8173
|
if (sortColumns.length > 1) {
|
|
@@ -8104,9 +8229,10 @@ var Methods$d = {
|
|
|
8104
8229
|
return this.scrollLoad ? this.scrollLoad.pageSize || 10 : ((_this$_graphInfo = this._graphInfo) == null ? void 0 : _this$_graphInfo.graphed.length) || 0;
|
|
8105
8230
|
},
|
|
8106
8231
|
getRowById: function getRowById(rowid2) {
|
|
8107
|
-
var
|
|
8108
|
-
var
|
|
8109
|
-
|
|
8232
|
+
var _fullDataRowIdData$ro, _editStore$insertMap;
|
|
8233
|
+
var fullDataRowIdData = this.fullDataRowIdData, editStore = this.editStore;
|
|
8234
|
+
var rowCache = ((_fullDataRowIdData$ro = fullDataRowIdData[rowid2]) == null ? void 0 : _fullDataRowIdData$ro.row) || (editStore == null ? void 0 : (_editStore$insertMap = editStore.insertMap) == null ? void 0 : _editStore$insertMap.get(rowid2));
|
|
8235
|
+
return rowCache || null;
|
|
8110
8236
|
},
|
|
8111
8237
|
// 获取处理后的表格数据
|
|
8112
8238
|
getTableData: function getTableData() {
|
|
@@ -8150,7 +8276,7 @@ var Methods$d = {
|
|
|
8150
8276
|
});
|
|
8151
8277
|
}
|
|
8152
8278
|
if (hasCustomsOrColWidth && !isGroupOrNonSort) {
|
|
8153
|
-
var
|
|
8279
|
+
var _ref161 = {}, _ref161$collectColumn = _ref161.collectColumn, collectColumn2 = _ref161$collectColumn === void 0 ? [] : _ref161$collectColumn, _ref161$customMap = _ref161.customMap, customMap = _ref161$customMap === void 0 ? {} : _ref161$customMap, _ref161$orderColumn = _ref161.orderColumn, orderColumn = _ref161$orderColumn === void 0 ? [] : _ref161$orderColumn;
|
|
8154
8280
|
mapTree(customColumns, function(customCol) {
|
|
8155
8281
|
var targetCol = find$1(fullColumn, function(item) {
|
|
8156
8282
|
return customCol.property && item.property === customCol.property;
|
|
@@ -8216,7 +8342,8 @@ var Methods$d = {
|
|
|
8216
8342
|
var options = {
|
|
8217
8343
|
columnCaches: []
|
|
8218
8344
|
};
|
|
8219
|
-
|
|
8345
|
+
this.markColumnIndex = 0;
|
|
8346
|
+
var fullColumn = getColumnList(this, value, options);
|
|
8220
8347
|
if (options.isGroup && options.hasFixed) {
|
|
8221
8348
|
value.forEach(function(root) {
|
|
8222
8349
|
return repairFixed(root);
|
|
@@ -8487,8 +8614,8 @@ var Methods$d = {
|
|
|
8487
8614
|
}
|
|
8488
8615
|
end && end();
|
|
8489
8616
|
},
|
|
8490
|
-
blurOutside: function blurOutside(
|
|
8491
|
-
var row2 =
|
|
8617
|
+
blurOutside: function blurOutside(_ref162, event) {
|
|
8618
|
+
var row2 = _ref162.row, args = _ref162.args, column = _ref162.column;
|
|
8492
8619
|
var editConfig = this.editConfig, getEventTargetNode2 = this.getEventTargetNode, $el = this.$el;
|
|
8493
8620
|
if (column && row2) {
|
|
8494
8621
|
var editor = column.editor;
|
|
@@ -8548,7 +8675,7 @@ var Methods$d = {
|
|
|
8548
8675
|
// 处理单选框默认勾选
|
|
8549
8676
|
handleRadioDefChecked: function handleRadioDefChecked() {
|
|
8550
8677
|
var fullDataRowIdData = this.fullDataRowIdData;
|
|
8551
|
-
var
|
|
8678
|
+
var _ref163 = this.radioConfig || {}, checkRowKey = _ref163.checkRowKey;
|
|
8552
8679
|
var rowid2 = checkRowKey && encodeURIComponent(checkRowKey);
|
|
8553
8680
|
var rowCache = fullDataRowIdData[rowid2];
|
|
8554
8681
|
if (rowid2 && rowCache) {
|
|
@@ -8558,7 +8685,7 @@ var Methods$d = {
|
|
|
8558
8685
|
// 单选,行选中事件
|
|
8559
8686
|
triggerRadioRowEvent: function triggerRadioRowEvent(event, params) {
|
|
8560
8687
|
var selectRow = this.selectRow;
|
|
8561
|
-
var
|
|
8688
|
+
var _ref164 = this.radioConfig || {}, checkMethod = _ref164.checkMethod;
|
|
8562
8689
|
if (checkMethod && !checkMethod(params)) {
|
|
8563
8690
|
return;
|
|
8564
8691
|
}
|
|
@@ -8813,8 +8940,8 @@ var Methods$d = {
|
|
|
8813
8940
|
this.groupExpandeds.push(row2);
|
|
8814
8941
|
},
|
|
8815
8942
|
// 展开行事件
|
|
8816
|
-
triggerRowExpandEvent: function triggerRowExpandEvent(event,
|
|
8817
|
-
var row2 =
|
|
8943
|
+
triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref165) {
|
|
8944
|
+
var row2 = _ref165.row;
|
|
8818
8945
|
var rest = this.toggleRowExpansion(row2);
|
|
8819
8946
|
var eventParams = {
|
|
8820
8947
|
$table: this,
|
|
@@ -8831,7 +8958,7 @@ var Methods$d = {
|
|
|
8831
8958
|
// 处理默认展开行
|
|
8832
8959
|
handleDefaultRowExpand: function handleDefaultRowExpand() {
|
|
8833
8960
|
var fullDataRowIdData = this.fullDataRowIdData, tableFullData = this.tableFullData;
|
|
8834
|
-
var
|
|
8961
|
+
var _ref166 = this.expandConfig || {}, expandAll = _ref166.expandAll, expandRowKeys = _ref166.expandRowKeys;
|
|
8835
8962
|
if (expandAll) {
|
|
8836
8963
|
this.expandeds = tableFullData.slice(0);
|
|
8837
8964
|
return;
|
|
@@ -8852,7 +8979,7 @@ var Methods$d = {
|
|
|
8852
8979
|
// 设置展开行,二个参数设置这一行展开与否;支持单行;支持多行
|
|
8853
8980
|
setRowExpansion: function setRowExpansion(rows, expanded) {
|
|
8854
8981
|
var expandeds = this.expandeds;
|
|
8855
|
-
var
|
|
8982
|
+
var _ref167 = this.expandConfig || {}, accordion = _ref167.accordion;
|
|
8856
8983
|
var isToggle = arguments.length === 1;
|
|
8857
8984
|
var isAccordionCloseAll = false;
|
|
8858
8985
|
if (!rows) {
|
|
@@ -8928,7 +9055,7 @@ var Methods$d = {
|
|
|
8928
9055
|
var scrollXStore = this.scrollXStore, visibleColumn = this.visibleColumn;
|
|
8929
9056
|
var offsetSize = scrollXStore.offsetSize, renderSize = scrollXStore.renderSize, startIndex = scrollXStore.startIndex, visibleIndex = scrollXStore.visibleIndex, visibleSize = scrollXStore.visibleSize;
|
|
8930
9057
|
var scrollLeft = this.$refs.tableBody.$el.scrollLeft;
|
|
8931
|
-
var
|
|
9058
|
+
var _ref168 = {}, _ref168$preload = _ref168.preload, preload = _ref168$preload === void 0 ? false : _ref168$preload, _ref168$toVisibleInde = _ref168.toVisibleIndex, toVisibleIndex = _ref168$toVisibleInde === void 0 ? 0 : _ref168$toVisibleInde, _ref168$width = _ref168.width, width = _ref168$width === void 0 ? 0 : _ref168$width;
|
|
8932
9059
|
for (var i = 0; i < visibleColumn.length; i++) {
|
|
8933
9060
|
width += visibleColumn[i].renderWidth;
|
|
8934
9061
|
if (scrollLeft < width) {
|
|
@@ -9118,7 +9245,7 @@ var Methods$d = {
|
|
|
9118
9245
|
return this.$nextTick();
|
|
9119
9246
|
},
|
|
9120
9247
|
scrollToRow: function scrollToRow(row2, column, isDelay, move) {
|
|
9121
|
-
var hasRowCache = this.fullDataRowMap.has(
|
|
9248
|
+
var hasRowCache = this.fullDataRowMap.has(this.getRaw(row2));
|
|
9122
9249
|
var isDelayArg = isDelay || isBoolean(column);
|
|
9123
9250
|
row2 && hasRowCache && rowToVisible(this, row2);
|
|
9124
9251
|
return this.scrollToColumn(column, isDelayArg, move);
|
|
@@ -9259,8 +9386,8 @@ var Methods$d = {
|
|
|
9259
9386
|
return _this43.validCellRules(type, row2, column, cellValue).then(function() {
|
|
9260
9387
|
refreshStatus();
|
|
9261
9388
|
_this43.clearValidate();
|
|
9262
|
-
}).catch(function(
|
|
9263
|
-
var rule =
|
|
9389
|
+
}).catch(function(_ref169) {
|
|
9390
|
+
var rule = _ref169.rule;
|
|
9264
9391
|
refreshStatus();
|
|
9265
9392
|
_this43.showValidTooltip({
|
|
9266
9393
|
rule,
|
|
@@ -9307,8 +9434,8 @@ var Methods$d = {
|
|
|
9307
9434
|
return fetchColumns;
|
|
9308
9435
|
}
|
|
9309
9436
|
tableColumn2.forEach(function(col) {
|
|
9310
|
-
var
|
|
9311
|
-
var
|
|
9437
|
+
var _ref170 = col.format || {}, async = _ref170.async;
|
|
9438
|
+
var _ref171 = async || {}, fetch = _ref171.fetch, _ref171$splitConfig = _ref171.splitConfig, splitConfig = _ref171$splitConfig === void 0 ? {} : _ref171$splitConfig;
|
|
9312
9439
|
if (typeof fetch === "function") {
|
|
9313
9440
|
var columnValues = [];
|
|
9314
9441
|
tableData.forEach(function(row2) {
|
|
@@ -9368,8 +9495,8 @@ var Methods$d = {
|
|
|
9368
9495
|
}, this));
|
|
9369
9496
|
},
|
|
9370
9497
|
// Publish methods 与工具栏对接
|
|
9371
|
-
connect: function connect(
|
|
9372
|
-
var toolbar =
|
|
9498
|
+
connect: function connect(_ref172) {
|
|
9499
|
+
var toolbar = _ref172.toolbar;
|
|
9373
9500
|
this.$toolbar = toolbar;
|
|
9374
9501
|
},
|
|
9375
9502
|
// 检查触发源是否属于目标节点
|
|
@@ -9394,8 +9521,8 @@ var Methods$d = {
|
|
|
9394
9521
|
return column.order ? column.order === "asc" ? "desc" : null : "asc";
|
|
9395
9522
|
},
|
|
9396
9523
|
handleDataChange: function handleDataChange() {
|
|
9397
|
-
if (Array.isArray(this.
|
|
9398
|
-
!this._isUpdateData && this.loadTableData(this.
|
|
9524
|
+
if (Array.isArray(this.rawData)) {
|
|
9525
|
+
!this._isUpdateData && this.loadTableData(this.rawData);
|
|
9399
9526
|
this._isUpdateData = false;
|
|
9400
9527
|
}
|
|
9401
9528
|
},
|
|
@@ -9429,7 +9556,7 @@ var Methods$d = {
|
|
|
9429
9556
|
// 尝试恢复滚动位置,规范了最大滚动位置的取值
|
|
9430
9557
|
attemptRestoreScroll: function attemptRestoreScroll(options) {
|
|
9431
9558
|
var _this46 = this;
|
|
9432
|
-
var
|
|
9559
|
+
var _ref173 = options || this, lastScrollTop = _ref173.lastScrollTop, lastScrollLeft = _ref173.lastScrollLeft;
|
|
9433
9560
|
var scrollXLoad = this.scrollXLoad, scrollYLoad = this.scrollYLoad, elemStore = this.elemStore;
|
|
9434
9561
|
var tableBodyElem = elemStore["main-body-wrapper"];
|
|
9435
9562
|
if ((lastScrollTop || lastScrollLeft) && tableBodyElem) {
|
|
@@ -9679,8 +9806,8 @@ var _sfc_main$7 = defineComponent({
|
|
|
9679
9806
|
return typeof hidden === "boolean" && hidden || typeof hidden === "function" && hidden(row2);
|
|
9680
9807
|
};
|
|
9681
9808
|
var handleItemClick = function handleItemClick2(name) {
|
|
9682
|
-
var buttonConfig = visibleButtons.find(function(
|
|
9683
|
-
var buttonName =
|
|
9809
|
+
var buttonConfig = visibleButtons.find(function(_ref174) {
|
|
9810
|
+
var buttonName = _ref174.name;
|
|
9684
9811
|
return buttonName === name;
|
|
9685
9812
|
});
|
|
9686
9813
|
buttonConfig.click(window.event || {}, _extends({
|
|
@@ -10421,7 +10548,7 @@ function mergeScrollDirStore(scrollDir, scrollDirStore) {
|
|
|
10421
10548
|
}
|
|
10422
10549
|
function loadStatic(data7, _vm) {
|
|
10423
10550
|
if (data7 && data7.length > 0) {
|
|
10424
|
-
_vm.
|
|
10551
|
+
_vm.updateRawData(data7);
|
|
10425
10552
|
_vm.updateStyle();
|
|
10426
10553
|
}
|
|
10427
10554
|
}
|
|
@@ -10825,6 +10952,7 @@ var Table = defineComponent({
|
|
|
10825
10952
|
columns: []
|
|
10826
10953
|
},
|
|
10827
10954
|
insertList: [],
|
|
10955
|
+
insertMap: /* @__PURE__ */ new Map(),
|
|
10828
10956
|
removeList: [],
|
|
10829
10957
|
// 选中源
|
|
10830
10958
|
selected: {
|
|
@@ -10906,15 +11034,7 @@ var Table = defineComponent({
|
|
|
10906
11034
|
// 在编辑模式下 单元格在失去焦点验证的状态
|
|
10907
11035
|
validatedMap: {},
|
|
10908
11036
|
// 表格父容器的高度
|
|
10909
|
-
parentHeight: 0
|
|
10910
|
-
// 水平滚动条的状态
|
|
10911
|
-
horizonScroll: {
|
|
10912
|
-
fixed: false,
|
|
10913
|
-
threshold: 2,
|
|
10914
|
-
max: 0,
|
|
10915
|
-
isLeft: true,
|
|
10916
|
-
isRight: false
|
|
10917
|
-
}
|
|
11037
|
+
parentHeight: 0
|
|
10918
11038
|
};
|
|
10919
11039
|
},
|
|
10920
11040
|
computed: {
|
|
@@ -11039,9 +11159,10 @@ var Table = defineComponent({
|
|
|
11039
11159
|
// 选项式监控在vue2可以检测到顶层数组splice项替换/$set项替换
|
|
11040
11160
|
// array.splice(index, 1, newItem)
|
|
11041
11161
|
// this.$set(array, index, newItem)
|
|
11162
|
+
// 在数组中的行对象上动态添加字段也会触发此选项式监听
|
|
11042
11163
|
data: function data5(array1, array2) {
|
|
11043
11164
|
if (isVue2 && array1 === array2 && array1.length === array2.length) {
|
|
11044
|
-
this.
|
|
11165
|
+
this.updateRawData(this.data);
|
|
11045
11166
|
}
|
|
11046
11167
|
}
|
|
11047
11168
|
},
|
|
@@ -11058,8 +11179,6 @@ var Table = defineComponent({
|
|
|
11058
11179
|
fullColumnMap: /* @__PURE__ */ new Map(),
|
|
11059
11180
|
fullDataRowIdData: {},
|
|
11060
11181
|
fullDataRowMap: /* @__PURE__ */ new Map(),
|
|
11061
|
-
// 临时插入数据集
|
|
11062
|
-
temporaryRows: [],
|
|
11063
11182
|
// 最后滚动位置
|
|
11064
11183
|
lastScrollLeft: 0,
|
|
11065
11184
|
lastScrollTop: 0,
|
|
@@ -11153,6 +11272,13 @@ var Table = defineComponent({
|
|
|
11153
11272
|
// 百分比最小宽度列表集合
|
|
11154
11273
|
scaleMinList: []
|
|
11155
11274
|
});
|
|
11275
|
+
var horizonScroll = hooks.ref({
|
|
11276
|
+
fixed: false,
|
|
11277
|
+
threshold: 2,
|
|
11278
|
+
max: 0,
|
|
11279
|
+
isLeft: true,
|
|
11280
|
+
isRight: false
|
|
11281
|
+
});
|
|
11156
11282
|
var bodyProps = hooks.computed(function() {
|
|
11157
11283
|
return {
|
|
11158
11284
|
collectColumn: collectColumn2.value,
|
|
@@ -11172,6 +11298,10 @@ var Table = defineComponent({
|
|
|
11172
11298
|
};
|
|
11173
11299
|
});
|
|
11174
11300
|
var tableWrapper = hooks.ref();
|
|
11301
|
+
var _useNormalData = useNormalData({
|
|
11302
|
+
props,
|
|
11303
|
+
tableFullColumn
|
|
11304
|
+
}), rawData = _useNormalData.rawData, rawDataVersion = _useNormalData.rawDataVersion;
|
|
11175
11305
|
var tinyTheme = hooks.ref(resolveTheme(props, context));
|
|
11176
11306
|
var $table = hooks.getCurrentInstance().proxy;
|
|
11177
11307
|
var $grid = hooks.inject("$grid", null);
|
|
@@ -11217,6 +11347,38 @@ var Table = defineComponent({
|
|
|
11217
11347
|
columnStore
|
|
11218
11348
|
});
|
|
11219
11349
|
var _useData = useData(props), tiledLength = _useData.tiledLength;
|
|
11350
|
+
var updateFixedClasses = function updateFixedClasses2(isLeft, isRight) {
|
|
11351
|
+
if (!$table.$el) return;
|
|
11352
|
+
var el = $table.$el;
|
|
11353
|
+
var hasLeftClass = el.classList.contains("tiny-grid-fixed__left");
|
|
11354
|
+
var hasRightClass = el.classList.contains("tiny-grid-fixed__right");
|
|
11355
|
+
var shouldHaveLeft = !isLeft;
|
|
11356
|
+
var shouldHaveRight = !isRight;
|
|
11357
|
+
if (hasLeftClass !== shouldHaveLeft) {
|
|
11358
|
+
if (shouldHaveLeft) {
|
|
11359
|
+
el.classList.add("tiny-grid-fixed__left");
|
|
11360
|
+
} else {
|
|
11361
|
+
el.classList.remove("tiny-grid-fixed__left");
|
|
11362
|
+
}
|
|
11363
|
+
}
|
|
11364
|
+
if (hasRightClass !== shouldHaveRight) {
|
|
11365
|
+
if (shouldHaveRight) {
|
|
11366
|
+
el.classList.add("tiny-grid-fixed__right");
|
|
11367
|
+
} else {
|
|
11368
|
+
el.classList.remove("tiny-grid-fixed__right");
|
|
11369
|
+
}
|
|
11370
|
+
}
|
|
11371
|
+
};
|
|
11372
|
+
var resolveMap = {};
|
|
11373
|
+
hooks.watch(function() {
|
|
11374
|
+
var _horizonScroll$value, _horizonScroll$value2;
|
|
11375
|
+
return [(_horizonScroll$value = horizonScroll.value) == null ? void 0 : _horizonScroll$value.isLeft, (_horizonScroll$value2 = horizonScroll.value) == null ? void 0 : _horizonScroll$value2.isRight];
|
|
11376
|
+
}, function(_ref175) {
|
|
11377
|
+
var newIsLeft = _ref175[0], newIsRight = _ref175[1];
|
|
11378
|
+
hooks.nextTick(function() {
|
|
11379
|
+
return updateFixedClasses(newIsLeft, newIsRight);
|
|
11380
|
+
});
|
|
11381
|
+
});
|
|
11220
11382
|
hooks.onMounted(function() {
|
|
11221
11383
|
$table.addIntersectionObserver();
|
|
11222
11384
|
if (tableWrapper.value) {
|
|
@@ -11224,6 +11386,18 @@ var Table = defineComponent({
|
|
|
11224
11386
|
}
|
|
11225
11387
|
hooks.nextTick(function() {
|
|
11226
11388
|
$table.afterMounted = true;
|
|
11389
|
+
setTimeout(function() {
|
|
11390
|
+
if ($table.$el && $table.horizonScroll) {
|
|
11391
|
+
var _horizonScroll$value3, _horizonScroll$value4;
|
|
11392
|
+
var el = $table.$el;
|
|
11393
|
+
if (!((_horizonScroll$value3 = horizonScroll.value) != null && _horizonScroll$value3.isLeft)) {
|
|
11394
|
+
el.classList.add("tiny-grid-fixed__left");
|
|
11395
|
+
}
|
|
11396
|
+
if (!((_horizonScroll$value4 = horizonScroll.value) != null && _horizonScroll$value4.isRight)) {
|
|
11397
|
+
el.classList.add("tiny-grid-fixed__right");
|
|
11398
|
+
}
|
|
11399
|
+
}
|
|
11400
|
+
});
|
|
11227
11401
|
if (props.autoResize && Grid$1._resize) {
|
|
11228
11402
|
$table.bindResize();
|
|
11229
11403
|
}
|
|
@@ -11247,6 +11421,7 @@ var Table = defineComponent({
|
|
|
11247
11421
|
}
|
|
11248
11422
|
unbindEvent($table);
|
|
11249
11423
|
$table._tileInfo = $table._graphInfo = null;
|
|
11424
|
+
$table.rowidCacheMap = null;
|
|
11250
11425
|
});
|
|
11251
11426
|
hooks.onActivated(function() {
|
|
11252
11427
|
var lastScrollLeft = $table.lastScrollLeft, lastScrollTop = $table.lastScrollTop;
|
|
@@ -11265,6 +11440,8 @@ var Table = defineComponent({
|
|
|
11265
11440
|
unbindEvent($table);
|
|
11266
11441
|
});
|
|
11267
11442
|
var tableListeners = getListeners(attrs, listeners);
|
|
11443
|
+
var markColumnIndex = hooks.ref(0);
|
|
11444
|
+
var rowidCacheMap = /* @__PURE__ */ new Map();
|
|
11268
11445
|
return {
|
|
11269
11446
|
slots,
|
|
11270
11447
|
tableListeners,
|
|
@@ -11297,7 +11474,13 @@ var Table = defineComponent({
|
|
|
11297
11474
|
bodyTableWidth,
|
|
11298
11475
|
scrollLoadScrollHeight,
|
|
11299
11476
|
columnStore,
|
|
11300
|
-
tiledLength
|
|
11477
|
+
tiledLength,
|
|
11478
|
+
rawDataVersion,
|
|
11479
|
+
rawData,
|
|
11480
|
+
markColumnIndex,
|
|
11481
|
+
rowidCacheMap,
|
|
11482
|
+
horizonScroll,
|
|
11483
|
+
resolveMap
|
|
11301
11484
|
};
|
|
11302
11485
|
},
|
|
11303
11486
|
render: function render14() {
|
|
@@ -11315,7 +11498,7 @@ var Table = defineComponent({
|
|
|
11315
11498
|
return h("div", {
|
|
11316
11499
|
class: (_class4 = {
|
|
11317
11500
|
"tiny-grid h-full sm:h-auto !bg-transparent sm:!bg-color-bg-1 after:border-none sm:after:border-solid": true
|
|
11318
|
-
}, _class4["row__valid-" + validOpts2.message] = true, _class4["size__" + vSize3] = vSize3, _class4["tiny-grid-editable"] = editConfig, _class4["show__head"] = showHeader, _class4["show__foot"] = showFooter, _class4["scroll__y"] = overflowY, _class4["scroll__x"] = overflowX, _class4["all-overflow"] = showOverflow, _class4["all-head-overflow"] = showHeaderOverflow, _class4["tiny-grid-cell__highlight"] = highlightCell, _class4["tiny-grid__animat"] = optimizeOpts.animat, _class4["tiny-grid__stripe"] = !isThemeSaas3 && stripe, _class4["tiny-grid__stripe-saas"] = isThemeSaas3 && stripeSaas, _class4["tiny-grid__border"] = border || isGroup2, _class4["tiny-grid__border-saas"] = isThemeSaas3 && borderSaas, _class4["tiny-grid__group-saas"] = isThemeSaas3 && isGroup2, _class4["tiny-grid__border-vertical"] = borderVertical, _class4["tiny-grid__checked"] = mouseConfig.checked, _class4["tiny-grid__hover-align"] = mouseConfig.hover, _class4["mark-insert"] = editConfig && editConfig.markInsert, _class4["edit__no-border"] = editConfig && editConfig.showBorder === false, _class4["is__loading"] = loading, _class4["row__highlight"] = highlightHoverRow, _class4["column__highlight"] = highlightHoverColumn, _class4["is__row-span"] = rowSpan && rowSpan.length > 0 || typeof spanMethod === "function", _class4["row__drop-handle--index"] = dropConfig.rowHandle === "index", _class4["fixed__sticky"] = horizonScroll.fixed, _class4
|
|
11501
|
+
}, _class4["row__valid-" + validOpts2.message] = true, _class4["size__" + vSize3] = vSize3, _class4["tiny-grid-editable"] = editConfig, _class4["show__head"] = showHeader, _class4["show__foot"] = showFooter, _class4["scroll__y"] = overflowY, _class4["scroll__x"] = overflowX, _class4["all-overflow"] = showOverflow, _class4["all-head-overflow"] = showHeaderOverflow, _class4["tiny-grid-cell__highlight"] = highlightCell, _class4["tiny-grid__animat"] = optimizeOpts.animat, _class4["tiny-grid__stripe"] = !isThemeSaas3 && stripe, _class4["tiny-grid__stripe-saas"] = isThemeSaas3 && stripeSaas, _class4["tiny-grid__border"] = border || isGroup2, _class4["tiny-grid__border-saas"] = isThemeSaas3 && borderSaas, _class4["tiny-grid__group-saas"] = isThemeSaas3 && isGroup2, _class4["tiny-grid__border-vertical"] = borderVertical, _class4["tiny-grid__checked"] = mouseConfig.checked, _class4["tiny-grid__hover-align"] = mouseConfig.hover, _class4["mark-insert"] = editConfig && editConfig.markInsert, _class4["edit__no-border"] = editConfig && editConfig.showBorder === false, _class4["is__loading"] = loading, _class4["row__highlight"] = highlightHoverRow, _class4["column__highlight"] = highlightHoverColumn, _class4["is__row-span"] = rowSpan && rowSpan.length > 0 || typeof spanMethod === "function", _class4["row__drop-handle--index"] = dropConfig.rowHandle === "index", _class4["fixed__sticky"] = horizonScroll.fixed, _class4)
|
|
11319
11502
|
}, [
|
|
11320
11503
|
// 隐藏列
|
|
11321
11504
|
h("div", {
|
|
@@ -11546,8 +11729,8 @@ var Column = defineComponent({
|
|
|
11546
11729
|
default: null
|
|
11547
11730
|
}
|
|
11548
11731
|
},
|
|
11549
|
-
setup: function setup7(props,
|
|
11550
|
-
var slots =
|
|
11732
|
+
setup: function setup7(props, _ref176) {
|
|
11733
|
+
var slots = _ref176.slots;
|
|
11551
11734
|
var reactive = hooks.reactive, inject = hooks.inject, getCurrentInstance = hooks.getCurrentInstance, onUpdated = hooks.onUpdated, watch = hooks.watch, nextTick = hooks.nextTick;
|
|
11552
11735
|
var currentInstance = getCurrentInstance();
|
|
11553
11736
|
var instance = currentInstance.proxy;
|
|
@@ -11601,7 +11784,7 @@ var Column = defineComponent({
|
|
|
11601
11784
|
warn("ui.grid.error.chainCallError");
|
|
11602
11785
|
}
|
|
11603
11786
|
var hasSubColumn = findTree(slotVnode, function(node) {
|
|
11604
|
-
var
|
|
11787
|
+
var _ref177 = node || {}, componentOptions = _ref177.componentOptions, type = _ref177.type;
|
|
11605
11788
|
var componentName = type && type.name || componentOptions && componentOptions.Ctor.extendOptions.name;
|
|
11606
11789
|
return $table.isValidCustomColumn(componentName);
|
|
11607
11790
|
}, null, null);
|
|
@@ -11849,8 +12032,8 @@ var Grid = defineComponent({
|
|
|
11849
12032
|
var tinyTheme = hooks.ref(resolveTheme(props, context));
|
|
11850
12033
|
var tinyMode = hooks.ref(resolveMode(props, context));
|
|
11851
12034
|
var breakpoint = useBreakpoint();
|
|
11852
|
-
var renderless = function renderless2(props2, hooks2,
|
|
11853
|
-
var
|
|
12035
|
+
var renderless = function renderless2(props2, hooks2, _ref178) {
|
|
12036
|
+
var _ref178$designConfig = _ref178.designConfig, designConfig = _ref178$designConfig === void 0 ? null : _ref178$designConfig;
|
|
11854
12037
|
return {
|
|
11855
12038
|
tableListeners,
|
|
11856
12039
|
designConfig,
|
|
@@ -11957,8 +12140,8 @@ var Grid = defineComponent({
|
|
|
11957
12140
|
this.tasks.updateParentHeight();
|
|
11958
12141
|
},
|
|
11959
12142
|
// 向缓存添加实例
|
|
11960
|
-
connect: function connect2(
|
|
11961
|
-
var name =
|
|
12143
|
+
connect: function connect2(_ref179) {
|
|
12144
|
+
var name = _ref179.name, vm = _ref179.vm;
|
|
11962
12145
|
if (name && typeof name === "string" && vm) {
|
|
11963
12146
|
this.vmStore[name] = vm;
|
|
11964
12147
|
}
|
|
@@ -12030,30 +12213,25 @@ var Grid = defineComponent({
|
|
|
12030
12213
|
Grid.install = function(Vue) {
|
|
12031
12214
|
Vue.component(Grid.name, Grid);
|
|
12032
12215
|
};
|
|
12033
|
-
function operArrs(
|
|
12034
|
-
var _vm =
|
|
12216
|
+
function operArrs(_ref180) {
|
|
12217
|
+
var _vm = _ref180._vm, editStore = _ref180.editStore, newRecords = _ref180.newRecords, row2 = _ref180.row, tableFullData = _ref180.tableFullData;
|
|
12035
12218
|
if (row2 === -1) {
|
|
12036
|
-
Array.prototype.push.apply(nowData, newRecords);
|
|
12037
12219
|
Array.prototype.push.apply(tableFullData, newRecords);
|
|
12038
|
-
Array.prototype.push.apply(tableSourceData, newRecordsCopy);
|
|
12039
12220
|
}
|
|
12040
12221
|
if (row2 && row2 !== -1) {
|
|
12041
|
-
var
|
|
12042
|
-
if (
|
|
12222
|
+
var insertIndex = tableFullData.indexOf(row2);
|
|
12223
|
+
if (insertIndex === -1) {
|
|
12043
12224
|
throw new Error(error("ui.grid.error.unableInsert"));
|
|
12044
12225
|
}
|
|
12045
|
-
var insertIndex = tableFullData.indexOf(row2);
|
|
12046
|
-
Array.prototype.splice.apply(nowData, [targetIndex, 0].concat(newRecords));
|
|
12047
12226
|
Array.prototype.splice.apply(tableFullData, [insertIndex, 0].concat(newRecords));
|
|
12048
|
-
Array.prototype.splice.apply(tableSourceData, [insertIndex, 0].concat(newRecordsCopy));
|
|
12049
12227
|
}
|
|
12050
12228
|
if (!row2) {
|
|
12051
|
-
Array.prototype.unshift.apply(nowData, newRecords);
|
|
12052
12229
|
Array.prototype.unshift.apply(tableFullData, newRecords);
|
|
12053
|
-
Array.prototype.unshift.apply(tableSourceData, newRecordsCopy);
|
|
12054
12230
|
}
|
|
12055
12231
|
Array.prototype.unshift.apply(editStore.insertList, newRecords);
|
|
12056
|
-
|
|
12232
|
+
newRecords.forEach(function(row22) {
|
|
12233
|
+
return editStore.insertMap.set(getRowid(_vm, row22), row22);
|
|
12234
|
+
});
|
|
12057
12235
|
}
|
|
12058
12236
|
var _setActiveCell = function _setActiveCell2(row2, field) {
|
|
12059
12237
|
var _this52 = this;
|
|
@@ -12098,35 +12276,27 @@ var Methods$c = {
|
|
|
12098
12276
|
// 根据位置从指定行添加数据
|
|
12099
12277
|
_insertAt: function _insertAt(records, row2) {
|
|
12100
12278
|
var _this53 = this;
|
|
12101
|
-
var
|
|
12279
|
+
var editStore = this.editStore, isAsyncColumn = this.isAsyncColumn, scrollYLoad = this.scrollYLoad, tableFullData = this.tableFullData, treeConfig = this.treeConfig, visibleColumn = this.visibleColumn;
|
|
12102
12280
|
if (treeConfig) {
|
|
12103
12281
|
throw new Error(error("ui.grid.error.treeInsert"));
|
|
12104
12282
|
}
|
|
12105
|
-
if (isAsyncColumn) {
|
|
12106
|
-
var columnSet = this.getColumns();
|
|
12107
|
-
columnSet.forEach(function(column) {
|
|
12108
|
-
if (column.format && column.format.async && column.format.async.fetch) {
|
|
12109
|
-
records[GlobalConfig$1.constant.insertedField] = true;
|
|
12110
|
-
}
|
|
12111
|
-
});
|
|
12112
|
-
}
|
|
12113
12283
|
if (!isArray(records)) {
|
|
12114
12284
|
records = [records];
|
|
12115
12285
|
}
|
|
12116
|
-
var
|
|
12286
|
+
var isColumnFormat = isAsyncColumn && visibleColumn.some(function(column) {
|
|
12287
|
+
var _column$format, _column$format$async;
|
|
12288
|
+
return (_column$format = column.format) == null ? void 0 : (_column$format$async = _column$format.async) == null ? void 0 : _column$format$async.fetch;
|
|
12289
|
+
});
|
|
12117
12290
|
var newRecords = records.map(function(record) {
|
|
12118
|
-
|
|
12291
|
+
isColumnFormat && (record[GlobalConfig$1.constant.insertedField] = true);
|
|
12292
|
+
return hooks.reactive(_this53.defineField(Object.assign({}, record)));
|
|
12119
12293
|
});
|
|
12120
|
-
var newRecordsCopy = clone(newRecords, true);
|
|
12121
12294
|
operArrs({
|
|
12122
12295
|
_vm: this,
|
|
12123
12296
|
editStore,
|
|
12124
|
-
newRecords,
|
|
12125
|
-
newRecordsCopy,
|
|
12126
|
-
nowData,
|
|
12127
12297
|
row: row2,
|
|
12128
12298
|
tableFullData,
|
|
12129
|
-
|
|
12299
|
+
newRecords
|
|
12130
12300
|
});
|
|
12131
12301
|
this.updateCache();
|
|
12132
12302
|
this.handleTableData(true);
|
|
@@ -12151,9 +12321,9 @@ var Methods$c = {
|
|
|
12151
12321
|
*/
|
|
12152
12322
|
_remove: function _remove(rows) {
|
|
12153
12323
|
var _this54 = this;
|
|
12154
|
-
var afterFullData = this.afterFullData,
|
|
12155
|
-
var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig
|
|
12156
|
-
var _this$editStore = this.editStore, insertList = _this$editStore.insertList, removeList = _this$editStore.removeList;
|
|
12324
|
+
var afterFullData = this.afterFullData, _this$selectConfig3 = this.selectConfig, selectConfig = _this$selectConfig3 === void 0 ? {} : _this$selectConfig3;
|
|
12325
|
+
var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig;
|
|
12326
|
+
var _this$editStore = this.editStore, insertList = _this$editStore.insertList, insertMap = _this$editStore.insertMap, removeList = _this$editStore.removeList;
|
|
12157
12327
|
var checkField = selectConfig.checkField;
|
|
12158
12328
|
var nowData = afterFullData;
|
|
12159
12329
|
var rest = [];
|
|
@@ -12172,7 +12342,7 @@ var Methods$c = {
|
|
|
12172
12342
|
}
|
|
12173
12343
|
for (var i = 0; i < rows.length; i++) {
|
|
12174
12344
|
var row2 = rows[i];
|
|
12175
|
-
if (this.
|
|
12345
|
+
if (this.isTemporaryRow(row2)) continue;
|
|
12176
12346
|
removeList.push(row2);
|
|
12177
12347
|
}
|
|
12178
12348
|
if (!checkField) {
|
|
@@ -12192,23 +12362,15 @@ var Methods$c = {
|
|
|
12192
12362
|
return inArr(row3, rows);
|
|
12193
12363
|
});
|
|
12194
12364
|
}
|
|
12195
|
-
remove(tableSourceData, function(row3) {
|
|
12196
|
-
return find$1(insertList, function(r) {
|
|
12197
|
-
return getRowid(_this54, r) === getRowid(_this54, row3);
|
|
12198
|
-
}) && find$1(rows, function(r) {
|
|
12199
|
-
return getRowid(_this54, r) === getRowid(_this54, row3);
|
|
12200
|
-
});
|
|
12201
|
-
});
|
|
12202
12365
|
remove(insertList, function(row3) {
|
|
12203
|
-
|
|
12366
|
+
var exist = inArr(row3, rows);
|
|
12367
|
+
exist && insertMap.delete(getRowid(_this54, row3));
|
|
12368
|
+
return exist;
|
|
12204
12369
|
});
|
|
12205
12370
|
this.updateCache();
|
|
12206
12371
|
this.handleTableData(true);
|
|
12207
12372
|
this.checkSelectionStatus();
|
|
12208
12373
|
this.updateFooter();
|
|
12209
|
-
if (scrollYLoad) {
|
|
12210
|
-
this.updateScrollYSpace();
|
|
12211
|
-
}
|
|
12212
12374
|
var res = {
|
|
12213
12375
|
row: rows && rows.length ? rows[rows.length - 1] : null,
|
|
12214
12376
|
rows: rest
|
|
@@ -12242,12 +12404,12 @@ var Methods$c = {
|
|
|
12242
12404
|
* 如果还额外传了field则还原指定单元格。
|
|
12243
12405
|
*/
|
|
12244
12406
|
_revertData: function _revertData(rows, field) {
|
|
12245
|
-
var
|
|
12407
|
+
var rawData = this.rawData;
|
|
12246
12408
|
if (arguments.length && rows && !isArray(rows)) {
|
|
12247
12409
|
rows = [rows];
|
|
12248
12410
|
}
|
|
12249
12411
|
if (!arguments.length) {
|
|
12250
|
-
rows =
|
|
12412
|
+
rows = rawData || [];
|
|
12251
12413
|
}
|
|
12252
12414
|
for (var i = 0; i < rows.length; i++) {
|
|
12253
12415
|
var row2 = rows[i];
|
|
@@ -12264,7 +12426,7 @@ var Methods$c = {
|
|
|
12264
12426
|
if (arguments.length) {
|
|
12265
12427
|
return this.$nextTick();
|
|
12266
12428
|
}
|
|
12267
|
-
return this.reloadData(
|
|
12429
|
+
return this.reloadData(rawData || []);
|
|
12268
12430
|
},
|
|
12269
12431
|
/**
|
|
12270
12432
|
* 获取表格操作数据集
|
|
@@ -12399,7 +12561,7 @@ var Methods$c = {
|
|
|
12399
12561
|
*/
|
|
12400
12562
|
_clearActived: function _clearActived(event) {
|
|
12401
12563
|
var _this58 = this;
|
|
12402
|
-
var _this$
|
|
12564
|
+
var _this$editConfig3 = this.editConfig, editConfig = _this$editConfig3 === void 0 ? {} : _this$editConfig3, editStore = this.editStore, tableColumn2 = this.tableColumn;
|
|
12403
12565
|
var actived = editStore.actived;
|
|
12404
12566
|
var args = actived.args, column = actived.column, row2 = actived.row;
|
|
12405
12567
|
var isActived = row2 || column;
|
|
@@ -12416,7 +12578,7 @@ var Methods$c = {
|
|
|
12416
12578
|
this.updateRowStatus(actived.row);
|
|
12417
12579
|
this.updateFooter();
|
|
12418
12580
|
var row22 = args.row, column2 = args.column;
|
|
12419
|
-
var
|
|
12581
|
+
var _ref181 = column2 || {}, editor = _ref181.editor;
|
|
12420
12582
|
if ((editor == null ? void 0 : editor.component) === "input" && (editor == null ? void 0 : (_editor$attrs = editor.attrs) == null ? void 0 : _editor$attrs.type) === "number") {
|
|
12421
12583
|
row22[column2.property] = +row22[column2.property];
|
|
12422
12584
|
}
|
|
@@ -12537,7 +12699,7 @@ var Methods$c = {
|
|
|
12537
12699
|
var _this60 = this;
|
|
12538
12700
|
var editConfig = this.editConfig, editStore = this.editStore, elemStore = this.elemStore, _this$mouseConfig3 = this.mouseConfig, mouseConfig = _this$mouseConfig3 === void 0 ? {} : _this$mouseConfig3;
|
|
12539
12701
|
var actived = editStore.actived, selected = editStore.selected;
|
|
12540
|
-
var
|
|
12702
|
+
var _ref182 = params || {}, cell = _ref182.cell, column = _ref182.column, row2 = _ref182.row;
|
|
12541
12703
|
var selectMethod = function selectMethod2() {
|
|
12542
12704
|
var _cell$parentNode;
|
|
12543
12705
|
if (selected.row === row2 && selected.column === column || actived.row === row2 && (editConfig.mode !== "cell" || actived.column === column)) {
|
|
@@ -12718,7 +12880,7 @@ function handleCellMousedownEvent(args1) {
|
|
|
12718
12880
|
var $el = args1.$el, _vm = args1._vm, bodyList = args1.bodyList, cell = args1.cell, cellFirstElementChild = args1.cellFirstElementChild;
|
|
12719
12881
|
var cellLastElementChild = args1.cellLastElementChild, headStart = args1.headStart, headerList = args1.headerList, isIndex = args1.isIndex, startCellNode = args1.startCellNode;
|
|
12720
12882
|
var _vm$mouseConfig2 = _vm.mouseConfig, mouseConfig = _vm$mouseConfig2 === void 0 ? {} : _vm$mouseConfig2;
|
|
12721
|
-
var
|
|
12883
|
+
var _ref183 = mouseConfig || {}, _ref183$updateInterva = _ref183.updateInterval, updateInterval = _ref183$updateInterva === void 0 ? 10 : _ref183$updateInterva;
|
|
12722
12884
|
var oldMousemove = document.onmousemove;
|
|
12723
12885
|
var oldMouseup = document.onmouseup;
|
|
12724
12886
|
var updateEvent = function updateEvent2(event) {
|
|
@@ -12757,8 +12919,8 @@ function onCellMousedownSelectEditable(args) {
|
|
|
12757
12919
|
_vm.handleSelected(params, event);
|
|
12758
12920
|
}
|
|
12759
12921
|
}
|
|
12760
|
-
function onCellMousedownSelect(
|
|
12761
|
-
var _vm =
|
|
12922
|
+
function onCellMousedownSelect(_ref184) {
|
|
12923
|
+
var _vm = _ref184._vm, editConfig = _ref184.editConfig, event = _ref184.event, mouseConfig = _ref184.mouseConfig, params = _ref184.params;
|
|
12762
12924
|
if (!editConfig && mouseConfig.selected) {
|
|
12763
12925
|
_vm.handleSelected(params, event);
|
|
12764
12926
|
}
|
|
@@ -12777,8 +12939,8 @@ function onCellMousedownIndexColumn(args) {
|
|
|
12777
12939
|
_vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cell)));
|
|
12778
12940
|
}
|
|
12779
12941
|
}
|
|
12780
|
-
function onCellMousedownNotIndexColumn(
|
|
12781
|
-
var _vm =
|
|
12942
|
+
function onCellMousedownNotIndexColumn(_ref185) {
|
|
12943
|
+
var _vm = _ref185._vm, cell = _ref185.cell, column = _ref185.column, event = _ref185.event, headerList = _ref185.headerList, isIndex = _ref185.isIndex, params = _ref185.params;
|
|
12782
12944
|
if (!isIndex) {
|
|
12783
12945
|
var firstCell = cell.parentNode.firstElementChild;
|
|
12784
12946
|
_vm.handleSelected(params, event);
|
|
@@ -12786,8 +12948,8 @@ function onCellMousedownNotIndexColumn(_ref186) {
|
|
|
12786
12948
|
_vm.handleIndexChecked([[firstCell]]);
|
|
12787
12949
|
}
|
|
12788
12950
|
}
|
|
12789
|
-
function handleHeaderCellMousedownEvent(
|
|
12790
|
-
var $el =
|
|
12951
|
+
function handleHeaderCellMousedownEvent(_ref186) {
|
|
12952
|
+
var $el = _ref186.$el, _vm = _ref186._vm, bodyList = _ref186.bodyList, cell = _ref186.cell, headerList = _ref186.headerList, startCell = _ref186.startCell;
|
|
12791
12953
|
var oldMousemove = document.onmousemove;
|
|
12792
12954
|
var oldMouseup = document.onmouseup;
|
|
12793
12955
|
var updateEvent = function updateEvent2(event) {
|
|
@@ -12820,8 +12982,8 @@ var removeCellClass = function removeCellClass2(bodyRef, clazz) {
|
|
|
12820
12982
|
return removeClass(elem, clazz);
|
|
12821
12983
|
});
|
|
12822
12984
|
};
|
|
12823
|
-
var getCellIndex = function getCellIndex2(
|
|
12824
|
-
var cell =
|
|
12985
|
+
var getCellIndex = function getCellIndex2(_ref187) {
|
|
12986
|
+
var cell = _ref187.cell, bodyList = _ref187.bodyList;
|
|
12825
12987
|
var trElem = cell.parentNode;
|
|
12826
12988
|
var cIndex = arrayIndexOf(trElem.children, cell);
|
|
12827
12989
|
var rIndex = arrayIndexOf(bodyList, trElem);
|
|
@@ -12830,8 +12992,8 @@ var getCellIndex = function getCellIndex2(_ref188) {
|
|
|
12830
12992
|
cIndex
|
|
12831
12993
|
};
|
|
12832
12994
|
};
|
|
12833
|
-
var getModify = function getModify2(
|
|
12834
|
-
var offsetTop =
|
|
12995
|
+
var getModify = function getModify2(_ref188) {
|
|
12996
|
+
var offsetTop = _ref188.offsetTop, offsetLeft = _ref188.offsetLeft, cWidth = _ref188.cWidth, cHeight = _ref188.cHeight;
|
|
12835
12997
|
var modifyDomStyle = function modifyDomStyle2(dom, styleOptions) {
|
|
12836
12998
|
return dom && Object.assign(dom.style, styleOptions);
|
|
12837
12999
|
};
|
|
@@ -12858,8 +13020,8 @@ var getModify = function getModify2(_ref189) {
|
|
|
12858
13020
|
});
|
|
12859
13021
|
};
|
|
12860
13022
|
};
|
|
12861
|
-
var writeClipboardText = function writeClipboardText2(
|
|
12862
|
-
var $table =
|
|
13023
|
+
var writeClipboardText = function writeClipboardText2(_ref189) {
|
|
13024
|
+
var $table = _ref189.$table, columns2 = _ref189.columns, rows = _ref189.rows, rowNodes = _ref189.rowNodes;
|
|
12863
13025
|
var _$table$keyboardConfi = $table.keyboardConfig, keyboardConfig = _$table$keyboardConfi === void 0 ? {} : _$table$keyboardConfi;
|
|
12864
13026
|
var _keyboardConfig$clipb = keyboardConfig.clipboard, clipboard = _keyboardConfig$clipb === void 0 ? {} : _keyboardConfig$clipb;
|
|
12865
13027
|
var writeMethod = clipboard.writeMethod, _clipboard$cellSplit = clipboard.cellSplit, cellSplit = _clipboard$cellSplit === void 0 ? "," : _clipboard$cellSplit, _clipboard$rowSplit = clipboard.rowSplit, rowSplit = _clipboard$rowSplit === void 0 ? ";" : _clipboard$rowSplit;
|
|
@@ -12906,7 +13068,7 @@ var Methods$b = {
|
|
|
12906
13068
|
var params = _extends({}, args);
|
|
12907
13069
|
var columnIndex = visibleColumn.indexOf(params.column);
|
|
12908
13070
|
var rowIndex = tableData.indexOf(params.row);
|
|
12909
|
-
var
|
|
13071
|
+
var _ref190 = {}, targetColumn = _ref190.targetColumn, targetColumnIndex = _ref190.targetColumnIndex, targetRow = _ref190.targetRow, targetRowIndex = _ref190.targetRowIndex;
|
|
12910
13072
|
event.preventDefault();
|
|
12911
13073
|
var checkColumn = function checkColumn2(column) {
|
|
12912
13074
|
return !hasIndexColumn2(column) && (edit ? column.editor : true);
|
|
@@ -13000,9 +13162,9 @@ var Methods$b = {
|
|
|
13000
13162
|
}
|
|
13001
13163
|
},
|
|
13002
13164
|
// 可编辑方向键移动处理
|
|
13003
|
-
moveSelected: function moveSelected(
|
|
13165
|
+
moveSelected: function moveSelected(_ref191) {
|
|
13004
13166
|
var _this62 = this;
|
|
13005
|
-
var args =
|
|
13167
|
+
var args = _ref191.args, isLeftArrow = _ref191.isLeftArrow, isUpArrow = _ref191.isUpArrow, isRightArrow = _ref191.isRightArrow, isDownArrow = _ref191.isDownArrow, event = _ref191.event;
|
|
13006
13168
|
var hasIndexColumn2 = this.hasIndexColumn, visibleColumn = this.tableColumn, tableData = this.tableFullData;
|
|
13007
13169
|
var params = _extends({}, args);
|
|
13008
13170
|
var column = params.column;
|
|
@@ -13224,7 +13386,7 @@ var Methods$b = {
|
|
|
13224
13386
|
_getMouseCheckeds: function _getMouseCheckeds() {
|
|
13225
13387
|
var _this64 = this;
|
|
13226
13388
|
var _this$editStore$check = this.editStore.checked.rowNodes, rowNodes = _this$editStore$check === void 0 ? [] : _this$editStore$check;
|
|
13227
|
-
var
|
|
13389
|
+
var _ref192 = {}, _ref192$rows = _ref192.rows, rows = _ref192$rows === void 0 ? [] : _ref192$rows, _ref192$columns = _ref192.columns, columns2 = _ref192$columns === void 0 ? [] : _ref192$columns;
|
|
13228
13390
|
var res = {
|
|
13229
13391
|
rows,
|
|
13230
13392
|
columns: columns2,
|
|
@@ -13253,7 +13415,7 @@ var Methods$b = {
|
|
|
13253
13415
|
if (!mouseConfig || !mouseConfig.checked) {
|
|
13254
13416
|
return;
|
|
13255
13417
|
}
|
|
13256
|
-
var
|
|
13418
|
+
var _ref193 = {}, cHeight = _ref193.cHeight, cWidth = _ref193.cWidth, offsetLeft = _ref193.offsetLeft, offsetTop = _ref193.offsetTop;
|
|
13257
13419
|
cWidth = cHeight = -2;
|
|
13258
13420
|
offsetTop = offsetLeft = 0;
|
|
13259
13421
|
this.clearChecked();
|
|
@@ -13382,7 +13544,7 @@ var Methods$b = {
|
|
|
13382
13544
|
var editStore = this.editStore, tableColumn2 = this.tableColumn, tableData = this.tableData;
|
|
13383
13545
|
var copyed = editStore.copyed;
|
|
13384
13546
|
var rowNodes = editStore.checked.rowNodes;
|
|
13385
|
-
var
|
|
13547
|
+
var _ref194 = {}, cHeight = _ref194.cHeight, cWidth = _ref194.cWidth, offsetLeft = _ref194.offsetLeft, offsetTop = _ref194.offsetTop, _ref194$rows = _ref194.rows, rows = _ref194$rows === void 0 ? [] : _ref194$rows, _ref194$columns = _ref194.columns, columns2 = _ref194$columns === void 0 ? [] : _ref194$columns;
|
|
13386
13548
|
cWidth = cHeight = -3;
|
|
13387
13549
|
offsetTop = offsetLeft = 0;
|
|
13388
13550
|
this.clearCopyed();
|
|
@@ -13505,13 +13667,13 @@ function adjustParams(rows, cb, vaildDatas) {
|
|
|
13505
13667
|
vaildDatas
|
|
13506
13668
|
};
|
|
13507
13669
|
}
|
|
13508
|
-
var columnHandler = function columnHandler2(
|
|
13509
|
-
var _vm =
|
|
13670
|
+
var columnHandler = function columnHandler2(_ref195) {
|
|
13671
|
+
var _vm = _ref195._vm, colValidPromiseArr = _ref195.colValidPromiseArr, editRules = _ref195.editRules, isAll = _ref195.isAll, row2 = _ref195.row, validRest = _ref195.validRest;
|
|
13510
13672
|
return function(column, columnIndex) {
|
|
13511
13673
|
if (has(editRules, column.property)) {
|
|
13512
13674
|
colValidPromiseArr.push(new Promise(function(resolve, reject) {
|
|
13513
|
-
_vm.validCellRules("all", row2, column).then(resolve).catch(function(
|
|
13514
|
-
var rule =
|
|
13675
|
+
_vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref196) {
|
|
13676
|
+
var rule = _ref196.rule, rules = _ref196.rules;
|
|
13515
13677
|
var rowIndex = _vm.getRowIndex(row2);
|
|
13516
13678
|
var rest = {
|
|
13517
13679
|
rule,
|
|
@@ -13535,8 +13697,8 @@ var columnHandler = function columnHandler2(_ref196) {
|
|
|
13535
13697
|
}
|
|
13536
13698
|
};
|
|
13537
13699
|
};
|
|
13538
|
-
function validTree(
|
|
13539
|
-
var treeConfig =
|
|
13700
|
+
function validTree(_ref197) {
|
|
13701
|
+
var treeConfig = _ref197.treeConfig, handleVaild = _ref197.handleVaild, hasTreeExpand2 = _ref197.hasTreeExpand, vaildDatas = _ref197.vaildDatas, treeOpts = _ref197.treeOpts;
|
|
13540
13702
|
if (treeConfig.validHidden === false) {
|
|
13541
13703
|
var _recurValid = function recurValid(row2) {
|
|
13542
13704
|
var children = row2[treeConfig.children || "children"];
|
|
@@ -13550,8 +13712,8 @@ function validTree(_ref198) {
|
|
|
13550
13712
|
eachTree(vaildDatas, handleVaild, treeOpts);
|
|
13551
13713
|
}
|
|
13552
13714
|
}
|
|
13553
|
-
var realValid = function realValid2(
|
|
13554
|
-
var _vm =
|
|
13715
|
+
var realValid = function realValid2(_ref198) {
|
|
13716
|
+
var _vm = _ref198._vm, editRules = _ref198.editRules, isAll = _ref198.isAll, validRest = _ref198.validRest, treeConfig = _ref198.treeConfig, hasTreeExpand2 = _ref198.hasTreeExpand, vaildDatas = _ref198.vaildDatas, treeOpts = _ref198.treeOpts;
|
|
13555
13717
|
var rowValids = [];
|
|
13556
13718
|
var columns2 = _vm.getColumns();
|
|
13557
13719
|
var handleVaild = function handleVaild2(row2) {
|
|
@@ -13603,8 +13765,8 @@ var Rule = /* @__PURE__ */ (function() {
|
|
|
13603
13765
|
var onRejected = function onRejected2(opt, _this) {
|
|
13604
13766
|
var isAll = opt.isAll, validRest = opt.validRest, cb = opt.cb, afterFullData = opt.afterFullData, treeConfig = opt.treeConfig;
|
|
13605
13767
|
return function(params) {
|
|
13606
|
-
var
|
|
13607
|
-
var args = isAll ? validRest : (
|
|
13768
|
+
var _ref199;
|
|
13769
|
+
var args = isAll ? validRest : (_ref199 = {}, _ref199[params.column.property] = params, _ref199);
|
|
13608
13770
|
var funcFinish = function funcFinish2(args2, reject, resolve) {
|
|
13609
13771
|
return function() {
|
|
13610
13772
|
opt.status = false;
|
|
@@ -13671,10 +13833,10 @@ var Methods$a = {
|
|
|
13671
13833
|
},
|
|
13672
13834
|
validatePromise: function validatePromise(row2, column, columnIndex, isAll, validRest) {
|
|
13673
13835
|
var _this67 = this;
|
|
13674
|
-
function onrejected(
|
|
13675
|
-
var _vm =
|
|
13676
|
-
return function(
|
|
13677
|
-
var rule =
|
|
13836
|
+
function onrejected(_ref201) {
|
|
13837
|
+
var _vm = _ref201._vm, reject = _ref201.reject, resolve = _ref201.resolve;
|
|
13838
|
+
return function(_ref202) {
|
|
13839
|
+
var rule = _ref202.rule, rules = _ref202.rules;
|
|
13678
13840
|
var rest = {
|
|
13679
13841
|
$table: _vm,
|
|
13680
13842
|
column,
|
|
@@ -13710,7 +13872,7 @@ var Methods$a = {
|
|
|
13710
13872
|
*/
|
|
13711
13873
|
beginValidate: function beginValidate(rows, callback, isAll) {
|
|
13712
13874
|
var afterFullData = this.afterFullData, editRules = this.editRules, hasTreeExpand2 = this.hasTreeExpand, treeConfig = this.treeConfig, treeOpts = this.treeOpts;
|
|
13713
|
-
var
|
|
13875
|
+
var _ref203 = {}, _ref203$status = _ref203.status, status = _ref203$status === void 0 ? true : _ref203$status, _ref203$validRest = _ref203.validRest, validRest = _ref203$validRest === void 0 ? {} : _ref203$validRest;
|
|
13714
13876
|
var _adjustParams = adjustParams(rows, callback, afterFullData), vaildDatas = _adjustParams.vaildDatas, cb = _adjustParams.cb;
|
|
13715
13877
|
var opt = {
|
|
13716
13878
|
isAll,
|
|
@@ -13748,8 +13910,8 @@ var Methods$a = {
|
|
|
13748
13910
|
};
|
|
13749
13911
|
return Promise.all(rowValids).then(onFulfilled).catch(onRejected(opt, this));
|
|
13750
13912
|
},
|
|
13751
|
-
hasCellRules: function hasCellRules(type, row2,
|
|
13752
|
-
var property =
|
|
13913
|
+
hasCellRules: function hasCellRules(type, row2, _ref204) {
|
|
13914
|
+
var property = _ref204.property;
|
|
13753
13915
|
if (!property || !this.editRules) {
|
|
13754
13916
|
return false;
|
|
13755
13917
|
}
|
|
@@ -13782,7 +13944,7 @@ var Methods$a = {
|
|
|
13782
13944
|
var _this68 = this;
|
|
13783
13945
|
var editRules = this.editRules, rowId = this.rowId;
|
|
13784
13946
|
var property = column.property;
|
|
13785
|
-
var
|
|
13947
|
+
var _ref205 = {}, _ref205$descriptor = _ref205.descriptor, descriptor = _ref205$descriptor === void 0 ? {} : _ref205$descriptor, _ref205$model = _ref205.model, model = _ref205$model === void 0 ? {} : _ref205$model;
|
|
13786
13948
|
if (property && editRules) {
|
|
13787
13949
|
var rules = get(editRules, property);
|
|
13788
13950
|
var cellValue = isUndefined(defaultValue) ? get(row2, property) : defaultValue;
|
|
@@ -13807,8 +13969,8 @@ var Methods$a = {
|
|
|
13807
13969
|
column
|
|
13808
13970
|
}
|
|
13809
13971
|
};
|
|
13810
|
-
var onRejected3 = function onRejected32(
|
|
13811
|
-
var fields =
|
|
13972
|
+
var onRejected3 = function onRejected32(_ref206) {
|
|
13973
|
+
var fields = _ref206.fields;
|
|
13812
13974
|
var cellErrors = Object.keys(fields).map(function(prop) {
|
|
13813
13975
|
var rules2 = _descriptor[prop];
|
|
13814
13976
|
_descriptor[prop] = !rules2.message ? Object.assign(rules2, {
|
|
@@ -13867,8 +14029,8 @@ var Methods$a = {
|
|
|
13867
14029
|
var onfulfilled = function onfulfilled2() {
|
|
13868
14030
|
editConfig.mode === "row" && validStore.visible && validStore.row === row2 && validStore.column === column && _this69.clearValidate();
|
|
13869
14031
|
};
|
|
13870
|
-
var onrejected = function onrejected2(
|
|
13871
|
-
var rule =
|
|
14032
|
+
var onrejected = function onrejected2(_ref207) {
|
|
14033
|
+
var rule = _ref207.rule;
|
|
13872
14034
|
if (rule.trigger && type !== rule.trigger) {
|
|
13873
14035
|
return Promise.resolve();
|
|
13874
14036
|
}
|
|
@@ -13962,7 +14124,7 @@ var Methods$8 = {
|
|
|
13962
14124
|
initFetchOption: function initFetchOption() {
|
|
13963
14125
|
var _this$fetchData = this.fetchData, fetchData = _this$fetchData === void 0 ? {} : _this$fetchData, _this$dataset = this.dataset, dataset = _this$dataset === void 0 ? {} : _this$dataset;
|
|
13964
14126
|
if (fetchData.api || dataset.source || dataset.value || dataset.api) {
|
|
13965
|
-
var
|
|
14127
|
+
var _ref208 = fetchData || dataset.source || dataset.api || {}, loading = _ref208.loading, fields = _ref208.fields, api = _ref208.api, reloadConfig = _ref208.reloadConfig;
|
|
13966
14128
|
var isReloadFilter = false;
|
|
13967
14129
|
var isReloadScroll = false;
|
|
13968
14130
|
if (reloadConfig) {
|
|
@@ -14000,7 +14162,7 @@ var Methods$8 = {
|
|
|
14000
14162
|
error("ui.grid.error.notQuery");
|
|
14001
14163
|
return this.$nextTick();
|
|
14002
14164
|
}
|
|
14003
|
-
var
|
|
14165
|
+
var _ref209 = fetchData || dataset.source || dataset.api || {}, args = _ref209.args, loading = _ref209.loading;
|
|
14004
14166
|
var field = sortData.field, order = sortData.order, prop = sortData.prop, property = sortData.property;
|
|
14005
14167
|
var sortByData = {
|
|
14006
14168
|
field,
|
|
@@ -14108,8 +14270,8 @@ var Methods$7 = {
|
|
|
14108
14270
|
}
|
|
14109
14271
|
},
|
|
14110
14272
|
// 表格内置分页渲染器
|
|
14111
|
-
renderPager: function renderPager(
|
|
14112
|
-
var $slots =
|
|
14273
|
+
renderPager: function renderPager(_ref210) {
|
|
14274
|
+
var $slots = _ref210.$slots, _vm = _ref210._vm, loading = _ref210.loading, pager = _ref210.pager, pagerConfig = _ref210.pagerConfig, tableLoading = _ref210.tableLoading, vSize3 = _ref210.vSize;
|
|
14113
14275
|
var res = null;
|
|
14114
14276
|
var fetchData = _vm.fetchData;
|
|
14115
14277
|
if ($slots.pager) {
|
|
@@ -14203,8 +14365,8 @@ var Pager = {
|
|
|
14203
14365
|
Object.assign(host.methods, Methods$7);
|
|
14204
14366
|
}
|
|
14205
14367
|
};
|
|
14206
|
-
function setBodyRecords(
|
|
14207
|
-
var body =
|
|
14368
|
+
function setBodyRecords(_ref211) {
|
|
14369
|
+
var body = _ref211.body, insertRecords = _ref211.insertRecords, pendingRecords = _ref211.pendingRecords;
|
|
14208
14370
|
if (insertRecords.length) {
|
|
14209
14371
|
body.pendingRecords = pendingRecords.filter(function(row2) {
|
|
14210
14372
|
return !insertRecords.includes(row2);
|
|
@@ -14219,8 +14381,8 @@ function setBodyRecords(_ref212) {
|
|
|
14219
14381
|
function canInvokeSaveDataApi(body, removeRecords, updateRecords) {
|
|
14220
14382
|
return body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length;
|
|
14221
14383
|
}
|
|
14222
|
-
function doRemoveOrShowMsg(
|
|
14223
|
-
var _vm =
|
|
14384
|
+
function doRemoveOrShowMsg(_ref212) {
|
|
14385
|
+
var _vm = _ref212._vm, canInvoke = _ref212.canInvoke, code = _ref212.code, isMsg2 = _ref212.isMsg, pendingRecords = _ref212.pendingRecords, resolve = _ref212.resolve, valid = _ref212.valid;
|
|
14224
14386
|
if (valid && !canInvoke) {
|
|
14225
14387
|
if (isMsg2) {
|
|
14226
14388
|
if (pendingRecords.length) {
|
|
@@ -14236,8 +14398,8 @@ function doRemoveOrShowMsg(_ref213) {
|
|
|
14236
14398
|
resolve();
|
|
14237
14399
|
}
|
|
14238
14400
|
}
|
|
14239
|
-
function invokeSaveDataApi(
|
|
14240
|
-
var _vm =
|
|
14401
|
+
function invokeSaveDataApi(_ref213) {
|
|
14402
|
+
var _vm = _ref213._vm, args = _ref213.args, body = _ref213.body, code = _ref213.code, removeRecords = _ref213.removeRecords, resolve = _ref213.resolve, saveData = _ref213.saveData, updateRecords = _ref213.updateRecords, valid = _ref213.valid;
|
|
14241
14403
|
var canInvoke = false;
|
|
14242
14404
|
if (valid) {
|
|
14243
14405
|
canInvoke = canInvokeSaveDataApi(body, removeRecords, updateRecords);
|
|
@@ -14264,8 +14426,8 @@ function invokeSaveDataApi(_ref214) {
|
|
|
14264
14426
|
}
|
|
14265
14427
|
var Methods$6 = {
|
|
14266
14428
|
// 表格工具栏渲染器
|
|
14267
|
-
getRenderedToolbar: function getRenderedToolbar(
|
|
14268
|
-
var $slots =
|
|
14429
|
+
getRenderedToolbar: function getRenderedToolbar(_ref214) {
|
|
14430
|
+
var $slots = _ref214.$slots, _vm = _ref214._vm, loading = _ref214.loading, tableLoading = _ref214.tableLoading, toolbar = _ref214.toolbar;
|
|
14269
14431
|
return _vm.renderedToolbar = (function() {
|
|
14270
14432
|
var res = null;
|
|
14271
14433
|
if ($slots.toolbar) {
|
|
@@ -14367,9 +14529,9 @@ var Methods$6 = {
|
|
|
14367
14529
|
};
|
|
14368
14530
|
this.remove(selecteds).then(afterRemove);
|
|
14369
14531
|
},
|
|
14370
|
-
handleFullScreen: function handleFullScreen(
|
|
14532
|
+
handleFullScreen: function handleFullScreen(_ref215) {
|
|
14371
14533
|
var _this77 = this;
|
|
14372
|
-
var show2 =
|
|
14534
|
+
var show2 = _ref215[0];
|
|
14373
14535
|
this.fullScreenClass = show2 ? "tiny-fullscreen-full" : "";
|
|
14374
14536
|
this.$nextTick(function() {
|
|
14375
14537
|
_this77.recalculate();
|
|
@@ -14386,8 +14548,8 @@ var Methods$6 = {
|
|
|
14386
14548
|
if (code === "insert") {
|
|
14387
14549
|
this.insert();
|
|
14388
14550
|
} else if (code === "insert_actived") {
|
|
14389
|
-
this.insert().then(function(
|
|
14390
|
-
var row2 =
|
|
14551
|
+
this.insert().then(function(_ref216) {
|
|
14552
|
+
var row2 = _ref216.row;
|
|
14391
14553
|
return _this78.setActiveRow(row2);
|
|
14392
14554
|
});
|
|
14393
14555
|
} else if (code === "mark_cancel") {
|
|
@@ -14474,7 +14636,7 @@ var Methods$6 = {
|
|
|
14474
14636
|
});
|
|
14475
14637
|
}
|
|
14476
14638
|
if (selecteds.length) {
|
|
14477
|
-
var
|
|
14639
|
+
var _ref217 = {}, _ref217$plus = _ref217.plus, plus = _ref217$plus === void 0 ? [] : _ref217$plus, _ref217$minus = _ref217.minus, minus = _ref217$minus === void 0 ? [] : _ref217$minus, tmp = _ref217.tmp;
|
|
14478
14640
|
selecteds.forEach(function(data7) {
|
|
14479
14641
|
var selectedPending = pendings.includes(data7);
|
|
14480
14642
|
tmp = selectedPending ? minus : plus;
|
|
@@ -14497,8 +14659,8 @@ var Toolbar = {
|
|
|
14497
14659
|
};
|
|
14498
14660
|
var Methods$5 = {
|
|
14499
14661
|
renderColumnAnchor: function renderColumnAnchor(params, _vm) {
|
|
14500
|
-
var
|
|
14501
|
-
} :
|
|
14662
|
+
var _ref218 = params || {}, _ref218$anchors = _ref218.anchors, anchors = _ref218$anchors === void 0 ? [] : _ref218$anchors, _ref218$action = _ref218.action, action = _ref218$action === void 0 ? function() {
|
|
14663
|
+
} : _ref218$action;
|
|
14502
14664
|
var viewType2 = _vm.viewType;
|
|
14503
14665
|
return h("div", {
|
|
14504
14666
|
class: ["tiny-grid__column-anchor", _vm.viewCls("columnAnchor")],
|
|
@@ -14533,8 +14695,8 @@ var Methods$5 = {
|
|
|
14533
14695
|
}, [iconVnode, spanVnode]);
|
|
14534
14696
|
}));
|
|
14535
14697
|
},
|
|
14536
|
-
buildColumnAnchor: function buildColumnAnchor(
|
|
14537
|
-
var property =
|
|
14698
|
+
buildColumnAnchor: function buildColumnAnchor(_ref219) {
|
|
14699
|
+
var property = _ref219.property, label = _ref219.label, anchors = _ref219.anchors, activeAnchor = _ref219.activeAnchor;
|
|
14538
14700
|
var visibleColumn = this.getColumns();
|
|
14539
14701
|
var column = visibleColumn.find(function(col) {
|
|
14540
14702
|
return !col.type && col.property === property;
|
|
@@ -14625,8 +14787,8 @@ var Methods$5 = {
|
|
|
14625
14787
|
}, activeAnchor.delay);
|
|
14626
14788
|
};
|
|
14627
14789
|
},
|
|
14628
|
-
anchorAction: function anchorAction(
|
|
14629
|
-
var field =
|
|
14790
|
+
anchorAction: function anchorAction(_ref220) {
|
|
14791
|
+
var field = _ref220.field, anchors = _ref220.anchors, _vm = _ref220._vm;
|
|
14630
14792
|
var fromAnchor = anchors.find(function(anchor) {
|
|
14631
14793
|
return anchor.active;
|
|
14632
14794
|
});
|
|
@@ -14672,8 +14834,8 @@ var ColumnAnchor = {
|
|
|
14672
14834
|
Object.assign(host.methods, Methods$5);
|
|
14673
14835
|
}
|
|
14674
14836
|
};
|
|
14675
|
-
var createHandlerOnEnd = function createHandlerOnEnd2(
|
|
14676
|
-
var _vm =
|
|
14837
|
+
var createHandlerOnEnd = function createHandlerOnEnd2(_ref221) {
|
|
14838
|
+
var _vm = _ref221._vm, refresh = _ref221.refresh;
|
|
14677
14839
|
return function(event) {
|
|
14678
14840
|
var insertRecords = _vm.getInsertRecords();
|
|
14679
14841
|
if (insertRecords.length) {
|
|
@@ -14685,7 +14847,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
|
|
|
14685
14847
|
var targetTrElem = event.item;
|
|
14686
14848
|
var wrapperElem = targetTrElem.parentNode, prevEl = targetTrElem.previousElementSibling, nextEl = targetTrElem.nextElementSibling;
|
|
14687
14849
|
var prevTrElem = prevEl && prevEl.classList.contains("tiny-grid-body__row") ? prevEl : prevEl && prevEl.previousElementSibling;
|
|
14688
|
-
var tableTreeData = _vm.
|
|
14850
|
+
var tableTreeData = _vm.rawData || _vm.tableData;
|
|
14689
14851
|
var selfRow = _vm.getRowNode(targetTrElem).item;
|
|
14690
14852
|
var selfNode = findTree$1(tableTreeData, function(row2) {
|
|
14691
14853
|
return row2 === selfRow;
|
|
@@ -14719,7 +14881,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
|
|
|
14719
14881
|
_vm.tableFullData = [].concat(tableTreeData);
|
|
14720
14882
|
}
|
|
14721
14883
|
_vm.$emit("row-drop-end", event, _vm, _vm.scrollYLoad ? tableTreeData : _vm.tableFullData);
|
|
14722
|
-
refresh && _vm.
|
|
14884
|
+
refresh && _vm.rawData && _vm.refreshData(_vm.rawData);
|
|
14723
14885
|
};
|
|
14724
14886
|
};
|
|
14725
14887
|
var getSortColumns = function getSortColumns2(columns2) {
|
|
@@ -14742,7 +14904,7 @@ var Methods$4 = {
|
|
|
14742
14904
|
// 处理列拖拽
|
|
14743
14905
|
columnDrop: function columnDrop(headerEl) {
|
|
14744
14906
|
var _this80 = this;
|
|
14745
|
-
var
|
|
14907
|
+
var _ref222 = this.dropConfig || {}, plugin = _ref222.plugin, onBeforeMove = _ref222.onBeforeMove, filter2 = _ref222.filter;
|
|
14746
14908
|
var columnDropContainer = headerEl.querySelector(".tiny-grid-header__row");
|
|
14747
14909
|
var columnDropOptions = _extends({}, this.dropConfig, {
|
|
14748
14910
|
handle: ".tiny-grid-header__column:not(.col__fixed)",
|
|
@@ -14835,8 +14997,8 @@ var Sort = {
|
|
|
14835
14997
|
Object.assign(host.methods, Methods$3);
|
|
14836
14998
|
}
|
|
14837
14999
|
};
|
|
14838
|
-
function createTooltipRange(
|
|
14839
|
-
var _vm =
|
|
15000
|
+
function createTooltipRange(_ref223) {
|
|
15001
|
+
var _vm = _ref223._vm, cell = _ref223.cell, column = _ref223.column, isHeader = _ref223.isHeader;
|
|
14840
15002
|
var range = document.createRange();
|
|
14841
15003
|
var rangeEnd;
|
|
14842
15004
|
range.setStart(cell, 0);
|
|
@@ -14854,8 +15016,8 @@ function createTooltipRange(_ref224) {
|
|
|
14854
15016
|
range.setEnd(cell, rangeEnd);
|
|
14855
15017
|
return range;
|
|
14856
15018
|
}
|
|
14857
|
-
function processContentMethod(
|
|
14858
|
-
var _vm =
|
|
15019
|
+
function processContentMethod(_ref224) {
|
|
15020
|
+
var _vm = _ref224._vm, column = _ref224.column, content = _ref224.content, contentMethod = _ref224.contentMethod, event = _ref224.event, isHeader = _ref224.isHeader, row2 = _ref224.row, showTip = _ref224.showTip;
|
|
14859
15021
|
if (contentMethod) {
|
|
14860
15022
|
_vm.tooltipContent = contentMethod({
|
|
14861
15023
|
event,
|
|
@@ -15007,15 +15169,15 @@ var Tooltip = {
|
|
|
15007
15169
|
Object.assign(host.methods, Methods$2);
|
|
15008
15170
|
}
|
|
15009
15171
|
};
|
|
15010
|
-
function onHalfSelectionProperty(
|
|
15011
|
-
var checkStrictly =
|
|
15172
|
+
function onHalfSelectionProperty(_ref225) {
|
|
15173
|
+
var checkStrictly = _ref225.checkStrictly, property = _ref225.property, row2 = _ref225.row, treeConfig = _ref225.treeConfig, treeIndeterminates = _ref225.treeIndeterminates, value = _ref225.value;
|
|
15012
15174
|
if (property && treeConfig && !checkStrictly && value === -1) {
|
|
15013
15175
|
treeIndeterminates.push(row2);
|
|
15014
15176
|
set(row2, property, false);
|
|
15015
15177
|
}
|
|
15016
15178
|
}
|
|
15017
|
-
function onFullSelectionProperty(
|
|
15018
|
-
var checkMethod =
|
|
15179
|
+
function onFullSelectionProperty(_ref226) {
|
|
15180
|
+
var checkMethod = _ref226.checkMethod, checkStrictly = _ref226.checkStrictly, property = _ref226.property, row2 = _ref226.row, treeConfig = _ref226.treeConfig, treeIndeterminates = _ref226.treeIndeterminates, value = _ref226.value;
|
|
15019
15181
|
if (property && treeConfig && !checkStrictly && value !== -1) {
|
|
15020
15182
|
eachTree([row2], function(item, $rowIndex) {
|
|
15021
15183
|
if (row2 === item || !checkMethod || checkMethod({
|
|
@@ -15030,8 +15192,8 @@ function onFullSelectionProperty(_ref227) {
|
|
|
15030
15192
|
}, treeConfig);
|
|
15031
15193
|
}
|
|
15032
15194
|
}
|
|
15033
|
-
function getVItemsOnParentSlctProp(
|
|
15034
|
-
var checkMethod =
|
|
15195
|
+
function getVItemsOnParentSlctProp(_ref227) {
|
|
15196
|
+
var checkMethod = _ref227.checkMethod, matchObj = _ref227.matchObj;
|
|
15035
15197
|
var tinyItems;
|
|
15036
15198
|
if (checkMethod) {
|
|
15037
15199
|
tinyItems = matchObj.items.filter(function(item, $rowIndex) {
|
|
@@ -15045,8 +15207,8 @@ function getVItemsOnParentSlctProp(_ref228) {
|
|
|
15045
15207
|
}
|
|
15046
15208
|
return tinyItems;
|
|
15047
15209
|
}
|
|
15048
|
-
function getParentStatusOnParentSlctProp(
|
|
15049
|
-
var indeterminatesItem =
|
|
15210
|
+
function getParentStatusOnParentSlctProp(_ref228) {
|
|
15211
|
+
var indeterminatesItem = _ref228.indeterminatesItem, matchObj = _ref228.matchObj, property = _ref228.property, vItems = _ref228.vItems, value = _ref228.value;
|
|
15050
15212
|
var parentStatus;
|
|
15051
15213
|
if (indeterminatesItem) {
|
|
15052
15214
|
parentStatus = -1;
|
|
@@ -15061,8 +15223,8 @@ function getParentStatusOnParentSlctProp(_ref229) {
|
|
|
15061
15223
|
}
|
|
15062
15224
|
return parentStatus;
|
|
15063
15225
|
}
|
|
15064
|
-
function onHalfSelection(
|
|
15065
|
-
var checkStrictly =
|
|
15226
|
+
function onHalfSelection(_ref229) {
|
|
15227
|
+
var checkStrictly = _ref229.checkStrictly, property = _ref229.property, row2 = _ref229.row, selection = _ref229.selection, treeConfig = _ref229.treeConfig, treeIndeterminates = _ref229.treeIndeterminates, value = _ref229.value;
|
|
15066
15228
|
if (!property && treeConfig && !checkStrictly && value === -1) {
|
|
15067
15229
|
treeIndeterminates.push(row2);
|
|
15068
15230
|
remove(selection, function(item) {
|
|
@@ -15073,8 +15235,8 @@ function onHalfSelection(_ref230) {
|
|
|
15073
15235
|
var addSelection = function addSelection2(selection, item) {
|
|
15074
15236
|
return !selection.includes(item) && selection.push(item);
|
|
15075
15237
|
};
|
|
15076
|
-
function onFullSelection(
|
|
15077
|
-
var checkMethod =
|
|
15238
|
+
function onFullSelection(_ref230) {
|
|
15239
|
+
var checkMethod = _ref230.checkMethod, checkStrictly = _ref230.checkStrictly, property = _ref230.property, row2 = _ref230.row, selection = _ref230.selection, treeConfig = _ref230.treeConfig, treeIndeterminates = _ref230.treeIndeterminates, value = _ref230.value;
|
|
15078
15240
|
if (!property && treeConfig && !checkStrictly && value !== -1) {
|
|
15079
15241
|
eachTree([row2], function(item, $rowIndex) {
|
|
15080
15242
|
if (row2 === item || !checkMethod || checkMethod({
|
|
@@ -15095,8 +15257,8 @@ function onFullSelection(_ref231) {
|
|
|
15095
15257
|
}, treeConfig);
|
|
15096
15258
|
}
|
|
15097
15259
|
}
|
|
15098
|
-
function getParentStatusOnParentSelection(
|
|
15099
|
-
var indeterminatesItem =
|
|
15260
|
+
function getParentStatusOnParentSelection(_ref231) {
|
|
15261
|
+
var indeterminatesItem = _ref231.indeterminatesItem, matchObj = _ref231.matchObj, selection = _ref231.selection, vItems = _ref231.vItems, value = _ref231.value;
|
|
15100
15262
|
var parentStatus;
|
|
15101
15263
|
if (indeterminatesItem) {
|
|
15102
15264
|
parentStatus = -1;
|
|
@@ -15109,8 +15271,8 @@ function getParentStatusOnParentSelection(_ref232) {
|
|
|
15109
15271
|
}
|
|
15110
15272
|
return parentStatus;
|
|
15111
15273
|
}
|
|
15112
|
-
function hasCheckField(
|
|
15113
|
-
var row2 =
|
|
15274
|
+
function hasCheckField(_ref232, value, _vm) {
|
|
15275
|
+
var row2 = _ref232.row;
|
|
15114
15276
|
var tableFullData = _vm.tableFullData, _vm$selectConfig = _vm.selectConfig, selectConfig = _vm$selectConfig === void 0 ? {} : _vm$selectConfig, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
|
|
15115
15277
|
var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
|
|
15116
15278
|
onHalfSelectionProperty({
|
|
@@ -15158,8 +15320,8 @@ function hasCheckField(_ref233, value, _vm) {
|
|
|
15158
15320
|
set(row2, property, value);
|
|
15159
15321
|
}
|
|
15160
15322
|
}
|
|
15161
|
-
function onSelectTreeCheckStrictly(
|
|
15162
|
-
var row2 =
|
|
15323
|
+
function onSelectTreeCheckStrictly(_ref233, value, _vm) {
|
|
15324
|
+
var row2 = _ref233.row;
|
|
15163
15325
|
var selection = _vm.selection, tableFullData = _vm.tableFullData, _vm$selectConfig2 = _vm.selectConfig, selectConfig = _vm$selectConfig2 === void 0 ? {} : _vm$selectConfig2, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
|
|
15164
15326
|
var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
|
|
15165
15327
|
onHalfSelection({
|
|
@@ -15203,8 +15365,8 @@ function onSelectTreeCheckStrictly(_ref234, value, _vm) {
|
|
|
15203
15365
|
}
|
|
15204
15366
|
}
|
|
15205
15367
|
}
|
|
15206
|
-
function onSelectOther(
|
|
15207
|
-
var row2 =
|
|
15368
|
+
function onSelectOther(_ref234, value, _vm) {
|
|
15369
|
+
var row2 = _ref234.row;
|
|
15208
15370
|
var selection = _vm.selection, _vm$selectConfig3 = _vm.selectConfig, selectConfig = _vm$selectConfig3 === void 0 ? {} : _vm$selectConfig3, treeConfig = _vm.treeConfig;
|
|
15209
15371
|
var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly;
|
|
15210
15372
|
if (!property && !(treeConfig && !checkStrictly)) {
|
|
@@ -15217,8 +15379,8 @@ function onSelectOther(_ref235, value, _vm) {
|
|
|
15217
15379
|
}
|
|
15218
15380
|
}
|
|
15219
15381
|
}
|
|
15220
|
-
function hasNoCheckField(
|
|
15221
|
-
var row2 =
|
|
15382
|
+
function hasNoCheckField(_ref235, value, _vm) {
|
|
15383
|
+
var row2 = _ref235.row;
|
|
15222
15384
|
onSelectTreeCheckStrictly({
|
|
15223
15385
|
row: row2
|
|
15224
15386
|
}, value, _vm);
|
|
@@ -15226,8 +15388,8 @@ function hasNoCheckField(_ref236, value, _vm) {
|
|
|
15226
15388
|
row: row2
|
|
15227
15389
|
}, value, _vm);
|
|
15228
15390
|
}
|
|
15229
|
-
function pushSelectRow(
|
|
15230
|
-
var afterFullData =
|
|
15391
|
+
function pushSelectRow(_ref236) {
|
|
15392
|
+
var afterFullData = _ref236.afterFullData, checkMethod = _ref236.checkMethod, checkStrictly = _ref236.checkStrictly; _ref236.property; var selectRows = _ref236.selectRows, selection = _ref236.selection, treeConfig = _ref236.treeConfig, value = _ref236.value;
|
|
15231
15393
|
if (!checkStrictly && value) {
|
|
15232
15394
|
eachTree(afterFullData, function(row2, $rowIndex) {
|
|
15233
15395
|
if (!checkMethod || checkMethod({
|
|
@@ -15249,8 +15411,8 @@ function pushSelectRow(_ref237) {
|
|
|
15249
15411
|
}, treeConfig);
|
|
15250
15412
|
}
|
|
15251
15413
|
}
|
|
15252
|
-
function hasCheckFieldNoStrictly(
|
|
15253
|
-
var afterFullData =
|
|
15414
|
+
function hasCheckFieldNoStrictly(_ref237) {
|
|
15415
|
+
var afterFullData = _ref237.afterFullData, checkMethod = _ref237.checkMethod, checkStrictly = _ref237.checkStrictly, property = _ref237.property, selection = _ref237.selection, treeConfig = _ref237.treeConfig, value = _ref237.value;
|
|
15254
15416
|
if (!checkStrictly && property) {
|
|
15255
15417
|
var indexKey = (treeConfig ? "$" : "") + "rowIndex";
|
|
15256
15418
|
var setValFn = function setValFn2(row2, rowIndex) {
|
|
@@ -15276,8 +15438,8 @@ function hasCheckFieldNoStrictly(_ref238) {
|
|
|
15276
15438
|
}
|
|
15277
15439
|
}
|
|
15278
15440
|
}
|
|
15279
|
-
function filterSelectRow(
|
|
15280
|
-
var afterFullData =
|
|
15441
|
+
function filterSelectRow(_ref238) {
|
|
15442
|
+
var afterFullData = _ref238.afterFullData, checkMethod = _ref238.checkMethod, checkStrictly = _ref238.checkStrictly, selectRows = _ref238.selectRows, selection = _ref238.selection, value = _ref238.value;
|
|
15281
15443
|
if (!checkStrictly && value && checkMethod) {
|
|
15282
15444
|
selectRows = afterFullData.filter(function(row2, rowIndex) {
|
|
15283
15445
|
return selection.includes(row2) || checkMethod({
|
|
@@ -15299,8 +15461,8 @@ function filterSelectRow(_ref239) {
|
|
|
15299
15461
|
}
|
|
15300
15462
|
return selectRows;
|
|
15301
15463
|
}
|
|
15302
|
-
function hasNoCheckFieldNoStrictly(
|
|
15303
|
-
var afterFullData =
|
|
15464
|
+
function hasNoCheckFieldNoStrictly(_ref239) {
|
|
15465
|
+
var afterFullData = _ref239.afterFullData, checkMethod = _ref239.checkMethod, checkStrictly = _ref239.checkStrictly, property = _ref239.property, selection = _ref239.selection, treeConfig = _ref239.treeConfig, value = _ref239.value;
|
|
15304
15466
|
var selectRows = [];
|
|
15305
15467
|
if (treeConfig) {
|
|
15306
15468
|
pushSelectRow({
|
|
@@ -15325,8 +15487,8 @@ function hasNoCheckFieldNoStrictly(_ref240) {
|
|
|
15325
15487
|
}
|
|
15326
15488
|
return selectRows;
|
|
15327
15489
|
}
|
|
15328
|
-
function setSelectionNoStrictly(
|
|
15329
|
-
var _vm =
|
|
15490
|
+
function setSelectionNoStrictly(_ref240) {
|
|
15491
|
+
var _vm = _ref240._vm, checkStrictly = _ref240.checkStrictly, reserve = _ref240.reserve, selectRows = _ref240.selectRows, selection = _ref240.selection, value = _ref240.value, afterFullData = _ref240.afterFullData;
|
|
15330
15492
|
if (!checkStrictly) {
|
|
15331
15493
|
if (reserve) {
|
|
15332
15494
|
var unCheckedRows = afterFullData.filter(function(row2) {
|
|
@@ -15346,7 +15508,7 @@ var Methods$1 = {
|
|
|
15346
15508
|
// 处理默认勾选
|
|
15347
15509
|
handleSelectionDefChecked: function handleSelectionDefChecked() {
|
|
15348
15510
|
var fullDataRowIdData = this.fullDataRowIdData;
|
|
15349
|
-
var
|
|
15511
|
+
var _ref241 = this.selectConfig || {}, checkAll = _ref241.checkAll, checkRowKeys = _ref241.checkRowKeys;
|
|
15350
15512
|
if (checkAll) {
|
|
15351
15513
|
this.setAllSelection(true);
|
|
15352
15514
|
return;
|
|
@@ -15380,8 +15542,8 @@ var Methods$1 = {
|
|
|
15380
15542
|
return this.$nextTick();
|
|
15381
15543
|
},
|
|
15382
15544
|
// 多选,行选中事件。value:选中true、不选false、不确定-1
|
|
15383
|
-
handleSelectRow: function handleSelectRow(
|
|
15384
|
-
var row2 =
|
|
15545
|
+
handleSelectRow: function handleSelectRow(_ref242, value) {
|
|
15546
|
+
var row2 = _ref242.row;
|
|
15385
15547
|
hasCheckField({
|
|
15386
15548
|
row: row2
|
|
15387
15549
|
}, value, this);
|
|
@@ -15392,7 +15554,7 @@ var Methods$1 = {
|
|
|
15392
15554
|
},
|
|
15393
15555
|
handleToggleCheckRowEvent: function handleToggleCheckRowEvent(params, event) {
|
|
15394
15556
|
var selection = this.selection;
|
|
15395
|
-
var
|
|
15557
|
+
var _ref243 = this.selectConfig || {}, checkField = _ref243.checkField;
|
|
15396
15558
|
var row2 = params.row;
|
|
15397
15559
|
var value = checkField ? !get(row2, checkField) : !~selection.indexOf(row2);
|
|
15398
15560
|
if (event) {
|
|
@@ -15460,8 +15622,8 @@ var Methods$1 = {
|
|
|
15460
15622
|
// 根据表格选中状态,给头部复现框赋值状态(全选,半选,未选)
|
|
15461
15623
|
checkSelectionStatus: function checkSelectionStatus() {
|
|
15462
15624
|
var afterFullData = this.afterFullData, selection = this.selection, treeIndeterminates = this.treeIndeterminates;
|
|
15463
|
-
var
|
|
15464
|
-
var
|
|
15625
|
+
var _ref244 = this.selectConfig || {}, checkField = _ref244.checkField, checkMethod = _ref244.checkMethod;
|
|
15626
|
+
var _ref245 = {}, everyHandler = _ref245.everyHandler, someHandler = _ref245.someHandler;
|
|
15465
15627
|
if (checkField) {
|
|
15466
15628
|
everyHandler = checkMethod ? function(row2, rowIndex) {
|
|
15467
15629
|
return !checkMethod({
|
|
@@ -15510,7 +15672,7 @@ var Methods$1 = {
|
|
|
15510
15672
|
// 保留选中状态
|
|
15511
15673
|
reserveCheckSelection: function reserveCheckSelection() {
|
|
15512
15674
|
var fullDataRowIdData = this.fullDataRowIdData, selection = this.selection;
|
|
15513
|
-
var
|
|
15675
|
+
var _ref246 = this.selectConfig || {}, reserve = _ref246.reserve;
|
|
15514
15676
|
var rowkey = getRowkey(this);
|
|
15515
15677
|
if (reserve && selection.length) {
|
|
15516
15678
|
this.selection = selection.map(function(row2) {
|
|
@@ -15538,7 +15700,7 @@ var Methods$1 = {
|
|
|
15538
15700
|
},
|
|
15539
15701
|
clearSelection: function clearSelection() {
|
|
15540
15702
|
var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
|
|
15541
|
-
var
|
|
15703
|
+
var _ref247 = this.selectConfig || {}, checkField = _ref247.checkField;
|
|
15542
15704
|
if (checkField) {
|
|
15543
15705
|
treeConfig ? eachTree(tableFullData, function(item) {
|
|
15544
15706
|
return set(item, checkField, false);
|
|
@@ -15664,9 +15826,9 @@ var Checkbox = {
|
|
|
15664
15826
|
};
|
|
15665
15827
|
var Methods = {
|
|
15666
15828
|
// 展开树节点事件
|
|
15667
|
-
triggerTreeExpandEvent: function triggerTreeExpandEvent(event,
|
|
15829
|
+
triggerTreeExpandEvent: function triggerTreeExpandEvent(event, _ref248) {
|
|
15668
15830
|
var _this83 = this;
|
|
15669
|
-
var row2 =
|
|
15831
|
+
var row2 = _ref248.row;
|
|
15670
15832
|
var currentColumn = this.currentColumn, currentRow = this.currentRow;
|
|
15671
15833
|
var rest = this.toggleTreeExpansion(row2);
|
|
15672
15834
|
var eventParams = {
|