@opentinyvue/vue-grid 3.22.0 → 3.22.1
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 +563 -535
- package/package.json +1 -1
- package/src/filter/src/panel.d.ts +1 -1
- package/src/mobile-first/empty.vue.d.ts +18 -0
- package/src/tree/src/methods.d.ts +1 -0
- package/src/dragger/src/rowDrop.d.ts +0 -9
package/lib/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { $prefix, defineComponent, h, hooks, $install, isVue2, isVnode, $props,
|
|
|
7
7
|
import { uniqueId, toNumber as toNumber$1, isBoolean, each, isObject as isObject$1, isFunction, isArray, findIndexOf, get, set, clear, destructuring, clone, mapTree, eachTree, findTree as findTree$1, has, isUndefined, find, isEqual, filterTree, arrayEach, isNumber, sum, template, assign, objectMap, sortBy, isString, remove, toStringJSON, toArray, arrayIndexOf } from '@opentinyvue/vue-renderless/grid/static/';
|
|
8
8
|
import { emitEvent, getFuncText, getDomNode, getRowid, getEventTargetNode, isScale, hasChildrenList, getListeners, setColumnFormat, updateCellTitle, getFilters, getColumnConfig, formatText, setCellValue, getColumnList, rowToVisible, colToVisible, getCell, assemColumn, getRowkey, GlobalEvent, getCellValue, getClass, isPx, getRowNodes, getCellNodeIndex } from '@opentinyvue/vue-renderless/grid/utils';
|
|
9
9
|
import Tooltip$1 from '@opentinyvue/vue-tooltip';
|
|
10
|
-
import { createVNode, isVNode, mergeProps, createTextVNode, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, normalizeStyle,
|
|
10
|
+
import { createVNode, isVNode, mergeProps, createTextVNode, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, normalizeStyle, Fragment, renderList } from 'vue';
|
|
11
11
|
import { toNumber, findTree, find as find$1, isEqual as isEqual$1, arrayEach as arrayEach$1 } from '@opentinyvue/vue-renderless/grid/static';
|
|
12
12
|
import { AutoTip } from '@opentinyvue/vue-directive';
|
|
13
13
|
import Button from '@opentinyvue/vue-button';
|
|
@@ -1340,7 +1340,29 @@ var documentOnmouseup = function documentOnmouseup2(_ref15) {
|
|
|
1340
1340
|
_lastResizeTime: Date.now()
|
|
1341
1341
|
});
|
|
1342
1342
|
$table.analyColumnWidth();
|
|
1343
|
-
$table.recalculate()
|
|
1343
|
+
$table.recalculate().then(function() {
|
|
1344
|
+
var _ref16 = $table.$refs || {}, tableBody = _ref16.tableBody, tableFooter = _ref16.tableFooter, tableHeader = _ref16.tableHeader;
|
|
1345
|
+
var headerElm = tableHeader == null ? void 0 : tableHeader.$el;
|
|
1346
|
+
var bodyElm = tableBody == null ? void 0 : tableBody.$el;
|
|
1347
|
+
var footerElm = tableFooter == null ? void 0 : tableFooter.$el;
|
|
1348
|
+
if (!headerElm) {
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
var elemStore = $table.elemStore;
|
|
1352
|
+
if (bodyElm) {
|
|
1353
|
+
bodyElm.scrollLeft = headerElm.scrollLeft;
|
|
1354
|
+
}
|
|
1355
|
+
if (footerElm) {
|
|
1356
|
+
footerElm.scrollLeft = headerElm.scrollLeft;
|
|
1357
|
+
}
|
|
1358
|
+
if (!elemStore["main-header-repair"]) {
|
|
1359
|
+
return;
|
|
1360
|
+
}
|
|
1361
|
+
elemStore["main-body-xSpace"].style.width = elemStore["main-header-repair"].style.width;
|
|
1362
|
+
if (elemStore["main-footer-xSpace"]) {
|
|
1363
|
+
elemStore["main-footer-xSpace"].style.width = elemStore["main-header-repair"].style.width;
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1344
1366
|
updateResizableToolbar($table);
|
|
1345
1367
|
emitEvent($table, "resizable-change", [params]);
|
|
1346
1368
|
};
|
|
@@ -1442,20 +1464,20 @@ var Header = defineComponent({
|
|
|
1442
1464
|
var $el = this.$el, $table = this.$parent, resizableConfig = this.resizableConfig;
|
|
1443
1465
|
var dragClientX = event.clientX, dragBtnElem = event.target;
|
|
1444
1466
|
var column = params.column;
|
|
1445
|
-
var
|
|
1467
|
+
var _ref17 = {}, _ref17$dragLeft = _ref17.dragLeft, dragLeft = _ref17$dragLeft === void 0 ? 0 : _ref17$dragLeft, _ref17$minInterval = _ref17.minInterval, minInterval = _ref17$minInterval === void 0 ? 36 : _ref17$minInterval, _ref17$fixedOffsetWid = _ref17.fixedOffsetWidth, fixedOffsetWidth = _ref17$fixedOffsetWid === void 0 ? 0 : _ref17$fixedOffsetWid;
|
|
1446
1468
|
var _$table$$refs = $table.$refs, resizeBarElem = _$table$$refs.resizeBar, tableBody = _$table$$refs.tableBody;
|
|
1447
|
-
var
|
|
1469
|
+
var _ref18 = {}, _ref18$cell = _ref18.cell, cell = _ref18$cell === void 0 ? dragBtnElem.parentNode : _ref18$cell, _ref18$dragBtnWidth = _ref18.dragBtnWidth, dragBtnWidth = _ref18$dragBtnWidth === void 0 ? dragBtnElem.clientWidth : _ref18$dragBtnWidth;
|
|
1448
1470
|
var startColumnLeft = cell.offsetLeft;
|
|
1449
1471
|
var dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
1450
1472
|
var tableBodyElem = tableBody.$el;
|
|
1451
1473
|
var btnLeft = (dragBtnElem == null ? void 0 : dragBtnElem.getBoundingClientRect().left) - ($el == null ? void 0 : $el.getBoundingClientRect().left);
|
|
1452
1474
|
var dragMinLeft = btnLeft - cell.clientWidth + dragBtnWidth + minInterval;
|
|
1453
1475
|
var dragPosLeft = btnLeft + dragBtnOffsetWidth;
|
|
1454
|
-
var
|
|
1476
|
+
var _ref19 = {}, _ref19$oldMousemove = _ref19.oldMousemove, oldMousemove = _ref19$oldMousemove === void 0 ? document.onmousemove : _ref19$oldMousemove, _ref19$oldMouseup = _ref19.oldMouseup, oldMouseup = _ref19$oldMouseup === void 0 ? document.onmouseup : _ref19$oldMouseup;
|
|
1455
1477
|
var handleMousemoveEvent = function handleMousemoveEvent2(event2) {
|
|
1456
1478
|
event2.stopPropagation();
|
|
1457
1479
|
event2.preventDefault();
|
|
1458
|
-
var
|
|
1480
|
+
var _ref20 = {}, _ref20$offsetX = _ref20.offsetX, offsetX = _ref20$offsetX === void 0 ? event2.clientX - dragClientX : _ref20$offsetX, _ref20$left = _ref20.left, left = _ref20$left === void 0 ? offsetX + dragPosLeft : _ref20$left;
|
|
1459
1481
|
var scrollLeft = tableBodyElem.scrollLeft;
|
|
1460
1482
|
var args = {
|
|
1461
1483
|
cell,
|
|
@@ -1512,12 +1534,12 @@ var classMap$1 = {
|
|
|
1512
1534
|
colRadio: "col__radio",
|
|
1513
1535
|
colSelection: "col__selection"
|
|
1514
1536
|
};
|
|
1515
|
-
function doFooterSpan(
|
|
1516
|
-
var attrs =
|
|
1537
|
+
function doFooterSpan(_ref21) {
|
|
1538
|
+
var attrs = _ref21.attrs, footerData = _ref21.footerData, footerSpanMethod = _ref21.footerSpanMethod, params = _ref21.params;
|
|
1517
1539
|
if (footerSpanMethod) {
|
|
1518
|
-
var
|
|
1540
|
+
var _ref22 = footerSpanMethod(_extends({
|
|
1519
1541
|
data: footerData
|
|
1520
|
-
}, params)) || {},
|
|
1542
|
+
}, params)) || {}, _ref22$rowspan = _ref22.rowspan, rowspan = _ref22$rowspan === void 0 ? 1 : _ref22$rowspan, _ref22$colspan = _ref22.colspan, colspan = _ref22$colspan === void 0 ? 1 : _ref22$colspan;
|
|
1521
1543
|
if (!rowspan || !colspan) {
|
|
1522
1544
|
return null;
|
|
1523
1545
|
}
|
|
@@ -1525,8 +1547,8 @@ function doFooterSpan(_ref20) {
|
|
|
1525
1547
|
attrs.colspan = colspan;
|
|
1526
1548
|
}
|
|
1527
1549
|
}
|
|
1528
|
-
function addListenerDblclick$1(
|
|
1529
|
-
var $table =
|
|
1550
|
+
function addListenerDblclick$1(_ref23) {
|
|
1551
|
+
var $table = _ref23.$table, params = _ref23.params, tableListeners = _ref23.tableListeners, tfOns = _ref23.tfOns;
|
|
1530
1552
|
if (tableListeners["footer-cell-dblclick"]) {
|
|
1531
1553
|
tfOns.dblclick = function(event) {
|
|
1532
1554
|
emitEvent($table, "footer-cell-dblclick", [_extends({
|
|
@@ -1535,8 +1557,8 @@ function addListenerDblclick$1(_ref22) {
|
|
|
1535
1557
|
};
|
|
1536
1558
|
}
|
|
1537
1559
|
}
|
|
1538
|
-
function addListenerClick$1(
|
|
1539
|
-
var $table =
|
|
1560
|
+
function addListenerClick$1(_ref24) {
|
|
1561
|
+
var $table = _ref24.$table, params = _ref24.params, tableListeners = _ref24.tableListeners, tfOns = _ref24.tfOns;
|
|
1540
1562
|
if (tableListeners["footer-cell-click"]) {
|
|
1541
1563
|
tfOns.click = function(event) {
|
|
1542
1564
|
emitEvent($table, "footer-cell-click", [_extends({
|
|
@@ -1545,16 +1567,16 @@ function addListenerClick$1(_ref23) {
|
|
|
1545
1567
|
};
|
|
1546
1568
|
}
|
|
1547
1569
|
}
|
|
1548
|
-
function addListenerMouseout(
|
|
1549
|
-
var $table =
|
|
1570
|
+
function addListenerMouseout(_ref25) {
|
|
1571
|
+
var $table = _ref25.$table, showTooltip2 = _ref25.showTooltip, tfOns = _ref25.tfOns;
|
|
1550
1572
|
if (showTooltip2) {
|
|
1551
1573
|
tfOns.mouseout = function() {
|
|
1552
1574
|
$table.clostTooltip();
|
|
1553
1575
|
};
|
|
1554
1576
|
}
|
|
1555
1577
|
}
|
|
1556
|
-
function addListenerMouseover(
|
|
1557
|
-
var $table =
|
|
1578
|
+
function addListenerMouseover(_ref26) {
|
|
1579
|
+
var $table = _ref26.$table, params = _ref26.params, showTitle = _ref26.showTitle, showTooltip2 = _ref26.showTooltip, tfOns = _ref26.tfOns;
|
|
1558
1580
|
if (showTitle || showTooltip2) {
|
|
1559
1581
|
tfOns.mouseover = function(event) {
|
|
1560
1582
|
if (showTitle) {
|
|
@@ -1592,7 +1614,7 @@ var renderfoots = function renderfoots2(opt) {
|
|
|
1592
1614
|
$rowIndex
|
|
1593
1615
|
}) : footerRowClassName : ""]
|
|
1594
1616
|
}, tableColumn3.map(function(column, $columnIndex) {
|
|
1595
|
-
var
|
|
1617
|
+
var _ref28, _ref29;
|
|
1596
1618
|
var arg1 = {
|
|
1597
1619
|
$columnIndex,
|
|
1598
1620
|
$rowIndex,
|
|
@@ -1610,10 +1632,10 @@ var renderfoots = function renderfoots2(opt) {
|
|
|
1610
1632
|
};
|
|
1611
1633
|
var _buildParamFunc = buildParamFunc2(Object.assign(arg1, arg2)), attrs = _buildParamFunc.attrs, columnIndex = _buildParamFunc.columnIndex, fixedHiddenColumn = _buildParamFunc.fixedHiddenColumn, footAlign = _buildParamFunc.footAlign, footerClassName = _buildParamFunc.footerClassName, hasEllipsis = _buildParamFunc.hasEllipsis, params = _buildParamFunc.params, tfOns = _buildParamFunc.tfOns, isShowEllipsis = _buildParamFunc.isShowEllipsis, isShowTitle = _buildParamFunc.isShowTitle, showTooltip2 = _buildParamFunc.showTooltip;
|
|
1612
1634
|
var leftList = columnStore.leftList, rightList = columnStore.rightList;
|
|
1613
|
-
var
|
|
1635
|
+
var _ref27 = column.style || {}, leftPosition = _ref27.left, right = _ref27.right;
|
|
1614
1636
|
var rightPosition = right >= 0 ? right + scrollbarWidth : "";
|
|
1615
1637
|
return h("td", {
|
|
1616
|
-
class: ["tiny-grid-footer__column", column.id, (
|
|
1638
|
+
class: ["tiny-grid-footer__column", column.id, (_ref28 = {}, _ref28["col__" + footAlign] = footAlign, _ref28[classMap$1.fixedHidden] = fixedHiddenColumn, _ref28[classMap$1.colEllipsis] = hasEllipsis, _ref28[classMap$1.filterActive] = column.filter && column.filter.hasFilter, _ref28[classMap$1.fixedLeftLast] = column.fixed === "left" && leftList[leftList.length - 1] === column, _ref28[classMap$1.fixedRightFirst] = column.fixed === "right" && rightList[0] === column, _ref28[classMap$1.colRadio] = column.type === "radio", _ref28[classMap$1.colSelection] = column.type === "selection", _ref28), getClass(footerClassName, params), getClass(footerCellClassName, params)],
|
|
1617
1639
|
style: fixedHiddenColumn ? {
|
|
1618
1640
|
left: leftPosition + "px",
|
|
1619
1641
|
right: rightPosition + "px"
|
|
@@ -1624,7 +1646,7 @@ var renderfoots = function renderfoots2(opt) {
|
|
|
1624
1646
|
}, [h(
|
|
1625
1647
|
"div",
|
|
1626
1648
|
{
|
|
1627
|
-
class: ["tiny-grid-cell", (
|
|
1649
|
+
class: ["tiny-grid-cell", (_ref29 = {}, _ref29[classMap$1.cellSummary] = $table.summaryConfig, _ref29["tiny-grid-cell__title"] = isShowTitle, _ref29["tiny-grid-cell__tooltip"] = showTooltip2 || column.showTip, _ref29["tiny-grid-cell__ellipsis"] = isShowEllipsis, _ref29)]
|
|
1628
1650
|
},
|
|
1629
1651
|
// 如果不是表格形态,就只保留表格结构(到tiny-grid-cell),不渲染具体的内容
|
|
1630
1652
|
$table.isShapeTable ? formatText(list[$table.tableColumn.indexOf(column)], 1) : null
|
|
@@ -2056,16 +2078,16 @@ var Formatter = {
|
|
|
2056
2078
|
};
|
|
2057
2079
|
}
|
|
2058
2080
|
};
|
|
2059
|
-
function getRenderType(
|
|
2060
|
-
var editor =
|
|
2081
|
+
function getRenderType(_ref30) {
|
|
2082
|
+
var editor = _ref30.editor, formatConfig = _ref30.formatConfig, formatText2 = _ref30.formatText;
|
|
2061
2083
|
var renderType = formatText2 || formatConfig.type;
|
|
2062
2084
|
if (!renderType && editor && editor.component === "select") {
|
|
2063
2085
|
renderType = "select";
|
|
2064
2086
|
}
|
|
2065
2087
|
return renderType;
|
|
2066
2088
|
}
|
|
2067
|
-
function getFormatData(
|
|
2068
|
-
var $table =
|
|
2089
|
+
function getFormatData(_ref31) {
|
|
2090
|
+
var $table = _ref31.$table, cacheFormat = _ref31.cacheFormat, row2 = _ref31.row;
|
|
2069
2091
|
var rest, formatData;
|
|
2070
2092
|
if (cacheFormat) {
|
|
2071
2093
|
rest = $table.fullAllDataRowMap.get(row2);
|
|
@@ -2079,12 +2101,12 @@ function getFormatData(_ref30) {
|
|
|
2079
2101
|
formatData
|
|
2080
2102
|
};
|
|
2081
2103
|
}
|
|
2082
|
-
function hasCacheValue(
|
|
2083
|
-
var async =
|
|
2104
|
+
function hasCacheValue(_ref32) {
|
|
2105
|
+
var async = _ref32.async, cellValue = _ref32.cellValue, colid = _ref32.colid, formatData = _ref32.formatData, rest = _ref32.rest;
|
|
2084
2106
|
return rest && formatData[colid] && formatData[colid].value === cellValue && (!async || formatData[colid].label);
|
|
2085
2107
|
}
|
|
2086
|
-
function notHasCacheVal(
|
|
2087
|
-
var cellLabel =
|
|
2108
|
+
function notHasCacheVal(_ref33) {
|
|
2109
|
+
var cellLabel = _ref33.cellLabel, cellValue = _ref33.cellValue, column = _ref33.column, formatText2 = _ref33.formatText, hasCacheVal = _ref33.hasCacheVal, params = _ref33.params, renderType = _ref33.renderType, row2 = _ref33.row;
|
|
2088
2110
|
if (!hasCacheVal) {
|
|
2089
2111
|
var cellText = row2[GlobalConfig$1.constant.insertedField + column.property];
|
|
2090
2112
|
var formatParams = {
|
|
@@ -2097,8 +2119,8 @@ function notHasCacheVal(_ref32) {
|
|
|
2097
2119
|
}
|
|
2098
2120
|
return cellLabel;
|
|
2099
2121
|
}
|
|
2100
|
-
function setFormatData(
|
|
2101
|
-
var cellLabel =
|
|
2122
|
+
function setFormatData(_ref34) {
|
|
2123
|
+
var cellLabel = _ref34.cellLabel, cellValue = _ref34.cellValue, colid = _ref34.colid, formatData = _ref34.formatData;
|
|
2102
2124
|
if (formatData) {
|
|
2103
2125
|
formatData[colid] = {
|
|
2104
2126
|
value: cellValue,
|
|
@@ -2306,8 +2328,8 @@ var getTotalRows = function getTotalRows2(_vm) {
|
|
|
2306
2328
|
}
|
|
2307
2329
|
return totalRows;
|
|
2308
2330
|
};
|
|
2309
|
-
var getTreeChildrenKey = function getTreeChildrenKey2(
|
|
2310
|
-
var scrollYLoad =
|
|
2331
|
+
var getTreeChildrenKey = function getTreeChildrenKey2(_ref35) {
|
|
2332
|
+
var scrollYLoad = _ref35.scrollYLoad, treeConfig = _ref35.treeConfig;
|
|
2311
2333
|
if (!treeConfig) {
|
|
2312
2334
|
return;
|
|
2313
2335
|
}
|
|
@@ -2317,8 +2339,8 @@ var getTreeChildrenKey = function getTreeChildrenKey2(_ref34) {
|
|
|
2317
2339
|
}
|
|
2318
2340
|
return childrenKey;
|
|
2319
2341
|
};
|
|
2320
|
-
var getTreeShowKey = function getTreeShowKey2(
|
|
2321
|
-
var scrollYLoad =
|
|
2342
|
+
var getTreeShowKey = function getTreeShowKey2(_ref36) {
|
|
2343
|
+
var scrollYLoad = _ref36.scrollYLoad, treeConfig = _ref36.treeConfig;
|
|
2322
2344
|
if (!treeConfig) {
|
|
2323
2345
|
return;
|
|
2324
2346
|
}
|
|
@@ -2402,8 +2424,8 @@ var sliceColumnTree = function sliceColumnTree2(_vm) {
|
|
|
2402
2424
|
var chartItem = [].concat(stack2, [column]);
|
|
2403
2425
|
columnChart2.push(chartItem);
|
|
2404
2426
|
if (chartItem.length > 1) {
|
|
2405
|
-
chartItem.slice(1).forEach(function(
|
|
2406
|
-
var fixed =
|
|
2427
|
+
chartItem.slice(1).forEach(function(_ref37) {
|
|
2428
|
+
var fixed = _ref37.fixed;
|
|
2407
2429
|
var rootColumn = chartItem[0];
|
|
2408
2430
|
var cachedFixed = fixedMap.get(rootColumn);
|
|
2409
2431
|
if (fixed) {
|
|
@@ -2528,7 +2550,7 @@ var orderingGroupBy = function orderingGroupBy2(arr, key, equals, active, rowKey
|
|
|
2528
2550
|
};
|
|
2529
2551
|
var buildRowGroupFullData = function buildRowGroupFullData2(fullData, _vm) {
|
|
2530
2552
|
var treeConfig = _vm.treeConfig, rowGroup = _vm.rowGroup;
|
|
2531
|
-
var
|
|
2553
|
+
var _ref38 = rowGroup || {}, field = _ref38.field, equals = _ref38.equals, activeMethod = _ref38.activeMethod;
|
|
2532
2554
|
_vm.hasVirtualRow = !treeConfig && rowGroup && field && fullData.length > 0;
|
|
2533
2555
|
if (_vm.hasVirtualRow) {
|
|
2534
2556
|
_vm.groupFullData = orderingGroupBy(fullData, field, equals || isEqual$1, activeMethod, getTableRowKey(_vm));
|
|
@@ -2551,8 +2573,8 @@ var handleRowGroupFold = function handleRowGroupFold2(row2, _vm) {
|
|
|
2551
2573
|
_vm.groupFullData = copy;
|
|
2552
2574
|
_vm.handleTableData().then(_vm.recalculate);
|
|
2553
2575
|
};
|
|
2554
|
-
var generateFixedClassName = function generateFixedClassName2(
|
|
2555
|
-
var $table =
|
|
2576
|
+
var generateFixedClassName = function generateFixedClassName2(_ref39) {
|
|
2577
|
+
var $table = _ref39.$table, bodyElem = _ref39.bodyElem, leftList = _ref39.leftList, rightList = _ref39.rightList;
|
|
2556
2578
|
if (!$table || !bodyElem) {
|
|
2557
2579
|
return;
|
|
2558
2580
|
}
|
|
@@ -2616,12 +2638,12 @@ var renderBorder = function renderBorder2(h2, type) {
|
|
|
2616
2638
|
}, [vnTop, vnRight, vnBottom, vnLeft]);
|
|
2617
2639
|
};
|
|
2618
2640
|
function buildColumnProps(args) {
|
|
2619
|
-
var
|
|
2641
|
+
var _ref40, _column$style3, _column$style4;
|
|
2620
2642
|
var attrs = args.attrs, cellAlign = args.cellAlign, cellClassName = args.cellClassName, className = args.className, column = args.column, columnActived = args.columnActived, columnIndex = args.columnIndex, columnKey = args.columnKey, editor = args.editor;
|
|
2621
2643
|
var fixedHiddenColumn = args.fixedHiddenColumn, hasEllipsis = args.hasEllipsis, isDirty = args.isDirty, params = args.params, tdOns = args.tdOns, validError = args.validError, validated = args.validated, columnStore = args.columnStore;
|
|
2622
2644
|
var leftList = columnStore.leftList, rightList = columnStore.rightList;
|
|
2623
2645
|
return {
|
|
2624
|
-
class: ["tiny-grid-body__column", column.id, (
|
|
2646
|
+
class: ["tiny-grid-body__column", column.id, (_ref40 = {}, _ref40["col__" + cellAlign] = cellAlign, _ref40[classMap.colEdit] = editor, _ref40[classMap.colIndex] = column.type === "index", _ref40[classMap.colRadio] = column.type === "radio", _ref40[classMap.colSelection] = column.type === "selection", _ref40[classMap.colEllipsis] = hasEllipsis, _ref40[classMap.editVisible] = editor && editor.type === "visible", _ref40[classMap.fixedColumn] = fixedHiddenColumn, _ref40[classMap.colDirty] = isDirty, _ref40[classMap.colActived] = columnActived, _ref40["col__valid-error"] = validError && validated, _ref40["col__valid-success"] = columnActived ? !validError && !validated : isDirty && !validated, _ref40["col__treenode"] = column.treeNode, _ref40["fixed-left-last__column"] = column.fixed === "left" && leftList[leftList.length - 1] === column, _ref40["fixed-right-first__column"] = column.fixed === "right" && rightList[0] === column, _ref40), getClass(className, params), getClass(cellClassName, params)],
|
|
2625
2647
|
style: fixedHiddenColumn ? {
|
|
2626
2648
|
left: ((_column$style3 = column.style) == null ? void 0 : _column$style3.left) + "px",
|
|
2627
2649
|
right: ((_column$style4 = column.style) == null ? void 0 : _column$style4.right) + "px"
|
|
@@ -2676,22 +2698,22 @@ function buildColumnChildren(args) {
|
|
|
2676
2698
|
), validNode];
|
|
2677
2699
|
return cellNode;
|
|
2678
2700
|
}
|
|
2679
|
-
function modifyCellAlign(
|
|
2680
|
-
var cellAlign =
|
|
2701
|
+
function modifyCellAlign(_ref41) {
|
|
2702
|
+
var cellAlign = _ref41.cellAlign, column = _ref41.column;
|
|
2681
2703
|
if (~["radio", "selection", "index"].indexOf(column.type)) {
|
|
2682
2704
|
cellAlign = cellAlign || "center";
|
|
2683
2705
|
}
|
|
2684
2706
|
return cellAlign;
|
|
2685
2707
|
}
|
|
2686
|
-
function modifyShowEllipsis(
|
|
2687
|
-
var hasEllipsis =
|
|
2708
|
+
function modifyShowEllipsis(_ref42) {
|
|
2709
|
+
var hasEllipsis = _ref42.hasEllipsis, scrollXLoad = _ref42.scrollXLoad, scrollYLoad = _ref42.scrollYLoad, showEllipsis = _ref42.showEllipsis;
|
|
2688
2710
|
if ((scrollXLoad || scrollYLoad) && !hasEllipsis) {
|
|
2689
2711
|
showEllipsis = true;
|
|
2690
2712
|
}
|
|
2691
2713
|
return showEllipsis;
|
|
2692
2714
|
}
|
|
2693
|
-
function addListenerMouseenter(
|
|
2694
|
-
var $table =
|
|
2715
|
+
function addListenerMouseenter(_ref43) {
|
|
2716
|
+
var $table = _ref43.$table, evntParams = _ref43.evntParams, showTip = _ref43.showTip, showTitle = _ref43.showTitle, showTooltip2 = _ref43.showTooltip, tableListeners = _ref43.tableListeners, tdOns = _ref43.tdOns;
|
|
2695
2717
|
if (showTip || showTitle || showTooltip2 || tableListeners["cell-mouseenter"]) {
|
|
2696
2718
|
tdOns.mouseenter = function(event) {
|
|
2697
2719
|
if (isOperateMouse($table)) {
|
|
@@ -2707,8 +2729,8 @@ function addListenerMouseenter(_ref42) {
|
|
|
2707
2729
|
};
|
|
2708
2730
|
}
|
|
2709
2731
|
}
|
|
2710
|
-
function addListenerMouseleave(
|
|
2711
|
-
var $table =
|
|
2732
|
+
function addListenerMouseleave(_ref44) {
|
|
2733
|
+
var $table = _ref44.$table, evntParams = _ref44.evntParams, showTip = _ref44.showTip, showTooltip2 = _ref44.showTooltip, tableListeners = _ref44.tableListeners, tdOns = _ref44.tdOns;
|
|
2712
2734
|
if (showTip || showTooltip2 || tableListeners["cell-mouseleave"]) {
|
|
2713
2735
|
tdOns.mouseleave = function(event) {
|
|
2714
2736
|
if (isOperateMouse($table)) {
|
|
@@ -2722,8 +2744,8 @@ function addListenerMouseleave(_ref43) {
|
|
|
2722
2744
|
};
|
|
2723
2745
|
}
|
|
2724
2746
|
}
|
|
2725
|
-
function addListenerMousedown(
|
|
2726
|
-
var $table =
|
|
2747
|
+
function addListenerMousedown(_ref45) {
|
|
2748
|
+
var $table = _ref45.$table, evntParams = _ref45.evntParams, mouseConfig = _ref45.mouseConfig, tdOns = _ref45.tdOns;
|
|
2727
2749
|
if (mouseConfig.checked || mouseConfig.selected) {
|
|
2728
2750
|
tdOns.mousedown = function(event) {
|
|
2729
2751
|
evntParams.cell = event.currentTarget;
|
|
@@ -2739,14 +2761,14 @@ function addListenerClick(args) {
|
|
|
2739
2761
|
};
|
|
2740
2762
|
if (highlightCurrentRow || tableListeners["cell-click"] || mouseConfig.checked || editor && editConfig || satisfy(function() {
|
|
2741
2763
|
return true;
|
|
2742
|
-
}, expandConfig.trigger) || satisfy(function(
|
|
2743
|
-
var type = _ref45.type;
|
|
2744
|
-
return type === "radio";
|
|
2745
|
-
}, radioConfig.trigger) || satisfy(function(_ref46) {
|
|
2764
|
+
}, expandConfig.trigger) || satisfy(function(_ref46) {
|
|
2746
2765
|
var type = _ref46.type;
|
|
2766
|
+
return type === "radio";
|
|
2767
|
+
}, radioConfig.trigger) || satisfy(function(_ref47) {
|
|
2768
|
+
var type = _ref47.type;
|
|
2747
2769
|
return type === "selection";
|
|
2748
|
-
}, selectConfig.trigger) || satisfy(function(
|
|
2749
|
-
var treeNode =
|
|
2770
|
+
}, selectConfig.trigger) || satisfy(function(_ref48) {
|
|
2771
|
+
var treeNode = _ref48.treeNode;
|
|
2750
2772
|
return treeNode;
|
|
2751
2773
|
}, treeConfig.trigger)) {
|
|
2752
2774
|
tdOns.click = function(event) {
|
|
@@ -2756,8 +2778,8 @@ function addListenerClick(args) {
|
|
|
2756
2778
|
}
|
|
2757
2779
|
}
|
|
2758
2780
|
function getRowSpanMethod(rowSpan) {
|
|
2759
|
-
return function(
|
|
2760
|
-
var row2 =
|
|
2781
|
+
return function(_ref49) {
|
|
2782
|
+
var row2 = _ref49.row, $rowIndex = _ref49.$rowIndex, column = _ref49.column, data8 = _ref49.data;
|
|
2761
2783
|
var fields = [];
|
|
2762
2784
|
if (rowSpan) {
|
|
2763
2785
|
rowSpan.forEach(function(item) {
|
|
@@ -2788,8 +2810,8 @@ function getRowSpanMethod(rowSpan) {
|
|
|
2788
2810
|
}
|
|
2789
2811
|
};
|
|
2790
2812
|
}
|
|
2791
|
-
function addListenerDblclick(
|
|
2792
|
-
var $table =
|
|
2813
|
+
function addListenerDblclick(_ref50) {
|
|
2814
|
+
var $table = _ref50.$table, evntParams = _ref50.evntParams, tableListeners = _ref50.tableListeners, tdOns = _ref50.tdOns, triggerDblclick = _ref50.triggerDblclick;
|
|
2793
2815
|
if (triggerDblclick || tableListeners["cell-dblclick"]) {
|
|
2794
2816
|
tdOns.dblclick = function(event) {
|
|
2795
2817
|
evntParams.cell = event.currentTarget;
|
|
@@ -2797,11 +2819,11 @@ function addListenerDblclick(_ref49) {
|
|
|
2797
2819
|
};
|
|
2798
2820
|
}
|
|
2799
2821
|
}
|
|
2800
|
-
function doSpan(
|
|
2801
|
-
var attrs =
|
|
2822
|
+
function doSpan(_ref51) {
|
|
2823
|
+
var attrs = _ref51.attrs, params = _ref51.params, rowSpan = _ref51.rowSpan, spanMethod = _ref51.spanMethod;
|
|
2802
2824
|
var rowSpanMethod = getRowSpanMethod(rowSpan);
|
|
2803
2825
|
if (spanMethod || rowSpan) {
|
|
2804
|
-
var
|
|
2826
|
+
var _ref52 = (spanMethod ? spanMethod(params) : rowSpanMethod(params)) || {}, _ref52$rowspan = _ref52.rowspan, rowspan = _ref52$rowspan === void 0 ? 1 : _ref52$rowspan, _ref52$colspan = _ref52.colspan, colspan = _ref52$colspan === void 0 ? 1 : _ref52$colspan;
|
|
2805
2827
|
if (!rowspan || !colspan) {
|
|
2806
2828
|
return false;
|
|
2807
2829
|
}
|
|
@@ -2810,9 +2832,9 @@ function doSpan(_ref50) {
|
|
|
2810
2832
|
}
|
|
2811
2833
|
return true;
|
|
2812
2834
|
}
|
|
2813
|
-
function isCellDirty(
|
|
2814
|
-
var $table =
|
|
2815
|
-
var
|
|
2835
|
+
function isCellDirty(_ref53) {
|
|
2836
|
+
var $table = _ref53.$table, column = _ref53.column, editConfig = _ref53.editConfig, isDirty = _ref53.isDirty, row2 = _ref53.row;
|
|
2837
|
+
var _ref54 = editConfig || {}, _ref54$showStatus = _ref54.showStatus, showStatus = _ref54$showStatus === void 0 ? false : _ref54$showStatus, _ref54$relationFields = _ref54.relationFields, relationFields = _ref54$relationFields === void 0 ? true : _ref54$relationFields;
|
|
2816
2838
|
var canChange = relationFields === true || Array.isArray(relationFields) && relationFields.includes(column.property);
|
|
2817
2839
|
if (editConfig && showStatus && column.property && (column.editor || relationFields && canChange)) {
|
|
2818
2840
|
isDirty = $table.hasRowChange(row2, column.property);
|
|
@@ -2925,9 +2947,9 @@ function renderColumn(args1) {
|
|
|
2925
2947
|
var allAlign = $table.align, cellClassName = $table.cellClassName, columnKey = $table.columnKey, editConfig = $table.editConfig;
|
|
2926
2948
|
var editRules = $table.editRules, editStore = $table.editStore, rowId = $table.rowId, rowSpan = $table.rowSpan, height2 = $table.height;
|
|
2927
2949
|
var tableData = $table.tableData, validOpts2 = $table.validOpts, validStore = $table.validStore, validatedMap = $table.validatedMap, spanMethod = $table.spanMethod, columnStore = $table.columnStore, _$table$dropConfig = $table.dropConfig, dropConfig = _$table$dropConfig === void 0 ? {} : _$table$dropConfig;
|
|
2928
|
-
var
|
|
2950
|
+
var _ref55 = {}, isDirty = _ref55.isDirty, _ref55$attrs = _ref55.attrs, attrs = _ref55$attrs === void 0 ? {
|
|
2929
2951
|
"data-colid": column.id
|
|
2930
|
-
} :
|
|
2952
|
+
} : _ref55$attrs;
|
|
2931
2953
|
var isMessageDefault = validOpts2.isMessageDefault, isMessageInline = validOpts2.isMessageInline;
|
|
2932
2954
|
var actived = editStore.actived;
|
|
2933
2955
|
var validated = validatedMap[column.id + "-" + row2[rowId]];
|
|
@@ -3004,7 +3026,7 @@ function renderColumn(args1) {
|
|
|
3004
3026
|
return h2("td", colProps, colChildren);
|
|
3005
3027
|
}
|
|
3006
3028
|
function renderRowGroupTds(args) {
|
|
3007
|
-
var $table = args.$table, closeable = args.closeable, currentIcon = args.currentIcon,
|
|
3029
|
+
var $table = args.$table, closeable = args.closeable, currentIcon = args.currentIcon, render19 = args.render, renderGroupCell = args.renderGroupCell;
|
|
3008
3030
|
var row2 = args.row, tableColumn3 = args.tableColumn, tds = args.tds, title = args.title;
|
|
3009
3031
|
var targetColumn = $table._rowGroupTargetColumn;
|
|
3010
3032
|
var value = row2.value || "";
|
|
@@ -3027,8 +3049,8 @@ function renderRowGroupTds(args) {
|
|
|
3027
3049
|
}
|
|
3028
3050
|
if (column === targetColumn) {
|
|
3029
3051
|
var groupTitleVNode = void 0;
|
|
3030
|
-
if (
|
|
3031
|
-
groupTitleVNode =
|
|
3052
|
+
if (render19) {
|
|
3053
|
+
groupTitleVNode = render19(h, params);
|
|
3032
3054
|
} else {
|
|
3033
3055
|
groupTitleVNode = [createVNode("span", {
|
|
3034
3056
|
"class": "row-group-title"
|
|
@@ -3053,13 +3075,13 @@ function renderRowGroupTds(args) {
|
|
|
3053
3075
|
}
|
|
3054
3076
|
}
|
|
3055
3077
|
}
|
|
3056
|
-
function renderRowGroupData(
|
|
3057
|
-
var $table =
|
|
3078
|
+
function renderRowGroupData(_ref56) {
|
|
3079
|
+
var $table = _ref56.$table, virtualRow = _ref56.virtualRow, row2 = _ref56.row, rowGroup = _ref56.rowGroup, rowid2 = _ref56.rowid, rows = _ref56.rows, tableColumn3 = _ref56.tableColumn;
|
|
3058
3080
|
if (!virtualRow) {
|
|
3059
3081
|
return;
|
|
3060
3082
|
}
|
|
3061
|
-
var title = rowGroup.title, _rowGroup$closeable2 = rowGroup.closeable, closeable = _rowGroup$closeable2 === void 0 ? true : _rowGroup$closeable2,
|
|
3062
|
-
var
|
|
3083
|
+
var title = rowGroup.title, _rowGroup$closeable2 = rowGroup.closeable, closeable = _rowGroup$closeable2 === void 0 ? true : _rowGroup$closeable2, render19 = rowGroup.render, renderGroupCell = rowGroup.renderGroupCell, className = rowGroup.className;
|
|
3084
|
+
var _ref57 = {}, _ref57$tds = _ref57.tds, tds = _ref57$tds === void 0 ? [] : _ref57$tds, _ref57$ChevronRight = _ref57.ChevronRight, ChevronRight = _ref57$ChevronRight === void 0 ? iconChevronRight() : _ref57$ChevronRight, _ref57$ChevronDown = _ref57.ChevronDown, ChevronDown = _ref57$ChevronDown === void 0 ? iconChevronDown() : _ref57$ChevronDown;
|
|
3063
3085
|
var currentIcon = row2.fold ? createVNode(ChevronRight, {
|
|
3064
3086
|
"class": "tiny-svg-size"
|
|
3065
3087
|
}, null) : createVNode(ChevronDown, {
|
|
@@ -3069,7 +3091,7 @@ function renderRowGroupData(_ref55) {
|
|
|
3069
3091
|
$table,
|
|
3070
3092
|
closeable,
|
|
3071
3093
|
currentIcon,
|
|
3072
|
-
render:
|
|
3094
|
+
render: render19,
|
|
3073
3095
|
renderGroupCell
|
|
3074
3096
|
};
|
|
3075
3097
|
Object.assign(args, {
|
|
@@ -3103,7 +3125,7 @@ function renderRowGroupData(_ref55) {
|
|
|
3103
3125
|
}, [tds]));
|
|
3104
3126
|
}
|
|
3105
3127
|
function renderRow(args) {
|
|
3106
|
-
var
|
|
3128
|
+
var _ref58;
|
|
3107
3129
|
var $rowIndex = args.$rowIndex, $seq = args.$seq, $table = args.$table, _vm = args._vm, editStore = args.editStore;
|
|
3108
3130
|
var h2 = args.h, row2 = args.row, rowActived = args.rowActived;
|
|
3109
3131
|
var rowClassName = args.rowClassName, rowIndex = args.rowIndex, rowKey = args.rowKey, rowLevel = args.rowLevel, rowid2 = args.rowid, rows = args.rows;
|
|
@@ -3122,7 +3144,7 @@ function renderRow(args) {
|
|
|
3122
3144
|
}
|
|
3123
3145
|
}
|
|
3124
3146
|
rows.push(h2("tr", {
|
|
3125
|
-
class: ["tiny-grid-body__row", (
|
|
3147
|
+
class: ["tiny-grid-body__row", (_ref58 = {}, _ref58["row__level-" + rowLevel] = treeConfig, _ref58[classMap.rowNew] = editStore.insertList.includes(row2), _ref58[classMap.rowSelected] = selection.includes(row2), _ref58[classMap.rowRadio] = selectRow === row2, _ref58[classMap.rowActived] = rowActived, _ref58), rowClassName ? isFunction(rowClassName) ? rowClassName({
|
|
3126
3148
|
$table,
|
|
3127
3149
|
$seq,
|
|
3128
3150
|
seq,
|
|
@@ -3157,8 +3179,8 @@ function renderRow(args) {
|
|
|
3157
3179
|
return renderColumn(args1);
|
|
3158
3180
|
})));
|
|
3159
3181
|
}
|
|
3160
|
-
function renderRowAfter(
|
|
3161
|
-
var $table =
|
|
3182
|
+
function renderRowAfter(_ref59) {
|
|
3183
|
+
var $table = _ref59.$table, h2 = _ref59.h, row2 = _ref59.row, rowIndex = _ref59.rowIndex, rows = _ref59.rows, tableData = _ref59.tableData;
|
|
3162
3184
|
typeof $table.renderRowAfter === "function" && $table.renderRowAfter({
|
|
3163
3185
|
rows,
|
|
3164
3186
|
row: row2,
|
|
@@ -3235,8 +3257,8 @@ function renderRowTree(args, renderRows2) {
|
|
|
3235
3257
|
};
|
|
3236
3258
|
rows.push.apply(rows, renderRows2(args1));
|
|
3237
3259
|
}
|
|
3238
|
-
function renderRows(
|
|
3239
|
-
var h2 =
|
|
3260
|
+
function renderRows(_ref60) {
|
|
3261
|
+
var h2 = _ref60.h, _vm = _ref60._vm, $table = _ref60.$table, $seq = _ref60.$seq, rowLevel = _ref60.rowLevel, tableData = _ref60.tableData, tableColumn3 = _ref60.tableColumn, seqCount = _ref60.seqCount;
|
|
3240
3262
|
var rowKey = $table.rowKey, rowClassName = $table.rowClassName, treeConfig = $table.treeConfig, treeExpandeds = $table.treeExpandeds;
|
|
3241
3263
|
$table.groupData; var scrollYLoad = $table.scrollYLoad, scrollYStore = $table.scrollYStore, editConfig = $table.editConfig, editStore = $table.editStore, _$table$expandConfig2 = $table.expandConfig, expandConfig = _$table$expandConfig2 === void 0 ? {} : _$table$expandConfig2;
|
|
3242
3264
|
var expandeds = $table.expandeds, selection = $table.selection, rowGroup = $table.rowGroup, hasVirtualRow = $table.hasVirtualRow, afterFullData = $table.afterFullData, treeOrdered = $table.treeOrdered;
|
|
@@ -3251,7 +3273,7 @@ function renderRows(_ref59) {
|
|
|
3251
3273
|
scrollYLoad,
|
|
3252
3274
|
treeConfig
|
|
3253
3275
|
});
|
|
3254
|
-
var
|
|
3276
|
+
var _ref61 = treeConfig || {}, hideMethod = _ref61.hideMethod;
|
|
3255
3277
|
tableData.forEach(function(row2, $rowIndex) {
|
|
3256
3278
|
var trOn = {};
|
|
3257
3279
|
var rowIndex = $rowIndex;
|
|
@@ -3361,8 +3383,8 @@ function renderDefEmpty(h2) {
|
|
|
3361
3383
|
class: "tiny-grid__empty-text"
|
|
3362
3384
|
}, GlobalConfig$1.i18n("ui.grid.emptyText"))];
|
|
3363
3385
|
}
|
|
3364
|
-
var syncHeaderAndFooterScroll = function syncHeaderAndFooterScroll2(
|
|
3365
|
-
var bodyElem =
|
|
3386
|
+
var syncHeaderAndFooterScroll = function syncHeaderAndFooterScroll2(_ref62) {
|
|
3387
|
+
var bodyElem = _ref62.bodyElem, footerElem = _ref62.footerElem, headerElem = _ref62.headerElem, isX = _ref62.isX;
|
|
3366
3388
|
var scrollLeft = bodyElem.scrollLeft;
|
|
3367
3389
|
if (isX && headerElem) {
|
|
3368
3390
|
headerElem.scrollLeft = scrollLeft;
|
|
@@ -3371,8 +3393,8 @@ var syncHeaderAndFooterScroll = function syncHeaderAndFooterScroll2(_ref61) {
|
|
|
3371
3393
|
footerElem.scrollLeft = scrollLeft;
|
|
3372
3394
|
}
|
|
3373
3395
|
};
|
|
3374
|
-
function doScrollLoad(
|
|
3375
|
-
var $table =
|
|
3396
|
+
function doScrollLoad(_ref63) {
|
|
3397
|
+
var $table = _ref63.$table, _vm = _ref63._vm, bodyElem = _ref63.bodyElem, event = _ref63.event, headerElem = _ref63.headerElem, isX = _ref63.isX, isY = _ref63.isY, scrollLeft = _ref63.scrollLeft, scrollXLoad = _ref63.scrollXLoad, scrollYLoad = _ref63.scrollYLoad;
|
|
3376
3398
|
var isScrollX = scrollXLoad && isX;
|
|
3377
3399
|
if (isScrollX) {
|
|
3378
3400
|
$table.triggerScrollXEvent(event);
|
|
@@ -3388,8 +3410,8 @@ function doScrollLoad(_ref62) {
|
|
|
3388
3410
|
$table.triggerScrollYEvent(event);
|
|
3389
3411
|
}
|
|
3390
3412
|
}
|
|
3391
|
-
function renderEmptyBlock(
|
|
3392
|
-
var $slots =
|
|
3413
|
+
function renderEmptyBlock(_ref64) {
|
|
3414
|
+
var $slots = _ref64.$slots, $table = _ref64.$table, _vm = _ref64._vm, isCenterCls = _ref64.isCenterCls, renderEmpty = _ref64.renderEmpty, tableData = _ref64.tableData;
|
|
3393
3415
|
return h("div", {
|
|
3394
3416
|
class: "tiny-grid__empty-block" + (tableData.length ? "" : " is__visible") + " " + isCenterCls,
|
|
3395
3417
|
ref: "emptyBlock"
|
|
@@ -3397,8 +3419,8 @@ function renderEmptyBlock(_ref63) {
|
|
|
3397
3419
|
$table
|
|
3398
3420
|
}, h) : renderEmpty ? [renderEmpty(h, $table)] : renderDefEmpty(h));
|
|
3399
3421
|
}
|
|
3400
|
-
function renderBorders(
|
|
3401
|
-
var keyboardConfig =
|
|
3422
|
+
function renderBorders(_ref65) {
|
|
3423
|
+
var keyboardConfig = _ref65.keyboardConfig, mouseConfig = _ref65.mouseConfig;
|
|
3402
3424
|
var res = null;
|
|
3403
3425
|
if (mouseConfig.checked || keyboardConfig.isCut) {
|
|
3404
3426
|
res = h("div", {
|
|
@@ -3407,8 +3429,8 @@ function renderBorders(_ref64) {
|
|
|
3407
3429
|
}
|
|
3408
3430
|
return res;
|
|
3409
3431
|
}
|
|
3410
|
-
function renderTable(
|
|
3411
|
-
var $table =
|
|
3432
|
+
function renderTable(_ref66) {
|
|
3433
|
+
var $table = _ref66.$table, _vm = _ref66._vm, tableColumn3 = _ref66.tableColumn, tableData = _ref66.tableData, tableLayout = _ref66.tableLayout;
|
|
3412
3434
|
return h("table", {
|
|
3413
3435
|
class: "tiny-grid__body",
|
|
3414
3436
|
style: {
|
|
@@ -3446,8 +3468,8 @@ function renderTable(_ref65) {
|
|
|
3446
3468
|
}))
|
|
3447
3469
|
]);
|
|
3448
3470
|
}
|
|
3449
|
-
function renderYSpace(
|
|
3450
|
-
var scrollLoad =
|
|
3471
|
+
function renderYSpace(_ref67) {
|
|
3472
|
+
var scrollLoad = _ref67.scrollLoad;
|
|
3451
3473
|
return h("div", {
|
|
3452
3474
|
class: "tiny-grid-body__y-space visual",
|
|
3453
3475
|
ref: "ySpace"
|
|
@@ -3489,8 +3511,8 @@ var Body = /* @__PURE__ */ defineComponent({
|
|
|
3489
3511
|
var $table = this.$parent, fixedType = this.fixedType;
|
|
3490
3512
|
!fixedType && $table.updateTableBodyHeight();
|
|
3491
3513
|
},
|
|
3492
|
-
setup: function setup3(props,
|
|
3493
|
-
var slots =
|
|
3514
|
+
setup: function setup3(props, _ref68) {
|
|
3515
|
+
var slots = _ref68.slots;
|
|
3494
3516
|
hooks.onBeforeUnmount(function() {
|
|
3495
3517
|
var table = hooks.getCurrentInstance().proxy;
|
|
3496
3518
|
table.$el._onscroll = null;
|
|
@@ -3501,7 +3523,7 @@ var Body = /* @__PURE__ */ defineComponent({
|
|
|
3501
3523
|
};
|
|
3502
3524
|
},
|
|
3503
3525
|
render: function render3() {
|
|
3504
|
-
var
|
|
3526
|
+
var _ref69;
|
|
3505
3527
|
var $table = this.$parent;
|
|
3506
3528
|
var $grid = $table.$grid, isCenterEmpty = $table.isCenterEmpty, _$table$keyboardConfi = $table.keyboardConfig, keyboardConfig = _$table$keyboardConfi === void 0 ? {} : _$table$keyboardConfi, _$table$mouseConfig3 = $table.mouseConfig, mouseConfig = _$table$mouseConfig3 === void 0 ? {} : _$table$mouseConfig3, renderEmpty = $table.renderEmpty;
|
|
3507
3529
|
var scrollLoad = $table.scrollLoad, tableColumn3 = $table.tableColumn, tableData = $table.tableData, tableLayout = $table.tableLayout;
|
|
@@ -3509,7 +3531,7 @@ var Body = /* @__PURE__ */ defineComponent({
|
|
|
3509
3531
|
var isCenterCls = isCenterEmpty ? "is__center" : "";
|
|
3510
3532
|
return h("div", {
|
|
3511
3533
|
ref: "body",
|
|
3512
|
-
class: ["tiny-grid__body-wrapper", "body__wrapper", (
|
|
3534
|
+
class: ["tiny-grid__body-wrapper", "body__wrapper", (_ref69 = {}, _ref69[classMap.isScrollload] = scrollLoad, _ref69)],
|
|
3513
3535
|
on: {
|
|
3514
3536
|
scroll: this.scrollEvent
|
|
3515
3537
|
}
|
|
@@ -3621,14 +3643,14 @@ var Radio = defineComponent({
|
|
|
3621
3643
|
return this.size || this.$parent.size || this.$parent.vSize;
|
|
3622
3644
|
}
|
|
3623
3645
|
},
|
|
3624
|
-
setup: function setup4(props,
|
|
3625
|
-
var slots =
|
|
3646
|
+
setup: function setup4(props, _ref70) {
|
|
3647
|
+
var slots = _ref70.slots;
|
|
3626
3648
|
return {
|
|
3627
3649
|
slots
|
|
3628
3650
|
};
|
|
3629
3651
|
},
|
|
3630
3652
|
render: function render4() {
|
|
3631
|
-
var
|
|
3653
|
+
var _ref71, _this2 = this;
|
|
3632
3654
|
var disabled = this.disabled, vSize4 = this.vSize, modelValue = this.modelValue, label = this.label, name = this.name;
|
|
3633
3655
|
var $slots = this.slots;
|
|
3634
3656
|
var disableClass = "disabled";
|
|
@@ -3645,7 +3667,7 @@ var Radio = defineComponent({
|
|
|
3645
3667
|
return content;
|
|
3646
3668
|
};
|
|
3647
3669
|
return h("label", {
|
|
3648
|
-
class: ["tiny-grid-radio", (
|
|
3670
|
+
class: ["tiny-grid-radio", (_ref71 = {}, _ref71["size__" + vSize4] = vSize4, _ref71["is__" + disableClass] = disabled, _ref71)]
|
|
3649
3671
|
}, [h("input", {
|
|
3650
3672
|
attrs: {
|
|
3651
3673
|
type: "radio",
|
|
@@ -3680,8 +3702,8 @@ $install(Radio);
|
|
|
3680
3702
|
function _isSlot(s) {
|
|
3681
3703
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
3682
3704
|
}
|
|
3683
|
-
var renderInputArgs = function renderInputArgs2(
|
|
3684
|
-
var _vm =
|
|
3705
|
+
var renderInputArgs = function renderInputArgs2(_ref72) {
|
|
3706
|
+
var _vm = _ref72._vm, inputFilter = _ref72.inputFilter;
|
|
3685
3707
|
var isAddbyProgram = false;
|
|
3686
3708
|
if (typeof inputFilter.relations_addby !== "undefined") {
|
|
3687
3709
|
isAddbyProgram = inputFilter.relations_addby === "program";
|
|
@@ -3709,9 +3731,9 @@ var renderInputArgs = function renderInputArgs2(_ref71) {
|
|
|
3709
3731
|
inputRelations
|
|
3710
3732
|
};
|
|
3711
3733
|
};
|
|
3712
|
-
var renderInputProps = function renderInputProps2(
|
|
3734
|
+
var renderInputProps = function renderInputProps2(_ref73) {
|
|
3713
3735
|
var _on3;
|
|
3714
|
-
var InputComponent =
|
|
3736
|
+
var InputComponent = _ref73.InputComponent, condition2 = _ref73.condition, event = _ref73.event, inputFilter = _ref73.inputFilter, isNativeInput = _ref73.isNativeInput, prop = _ref73.prop;
|
|
3715
3737
|
var inputProps = {
|
|
3716
3738
|
style: "width:100%",
|
|
3717
3739
|
on: (_on3 = {}, _on3[event] = function(value) {
|
|
@@ -3757,8 +3779,8 @@ var iconRender = function iconRender2(checked, index2, halfChecked) {
|
|
|
3757
3779
|
}), null) : createVNode(Check, props, null);
|
|
3758
3780
|
}
|
|
3759
3781
|
};
|
|
3760
|
-
var renderEnumableOptions = function renderEnumableOptions2(
|
|
3761
|
-
var iconRender3 =
|
|
3782
|
+
var renderEnumableOptions = function renderEnumableOptions2(_ref74) {
|
|
3783
|
+
var iconRender3 = _ref74.iconRender, _vm = _ref74._vm, filterStore = _ref74.filterStore, selectAll = _ref74.selectAll, searchable = _ref74.searchable;
|
|
3762
3784
|
var resultList = filterStore.options.filter(function(value) {
|
|
3763
3785
|
var _value$label;
|
|
3764
3786
|
return (_value$label = value.label) == null ? void 0 : _value$label.toString().includes(filterStore.searchValue);
|
|
@@ -3839,7 +3861,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
|
|
|
3839
3861
|
};
|
|
3840
3862
|
},
|
|
3841
3863
|
render: function render5() {
|
|
3842
|
-
var _this3 = this,
|
|
3864
|
+
var _this3 = this, _ref75;
|
|
3843
3865
|
var filterStore = this.filterStore, $grid = this.$grid, $table = this.$parent, optimizeOpts2 = this.optimizeOpts, renderInput2 = this.renderInput, renderEnumable2 = this.renderEnumable, renderDefault2 = this.renderDefault, renderExtends2 = this.renderExtends, renderBase2 = this.renderBase, renderSimple2 = this.renderSimple;
|
|
3844
3866
|
var args = filterStore.args, column = filterStore.column, options = filterStore.options, _filterStore$layout = filterStore.layout, layout = _filterStore$layout === void 0 ? "input,enum,default,extends,base" : _filterStore$layout;
|
|
3845
3867
|
var layoutMap = {
|
|
@@ -3857,9 +3879,9 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
|
|
|
3857
3879
|
filterActive: "filter__active"
|
|
3858
3880
|
};
|
|
3859
3881
|
return createVNode("div", {
|
|
3860
|
-
"class": ["tiny-grid__wrapper", "tiny-grid__filter-wrapper", "filter__prevent-default", (
|
|
3882
|
+
"class": ["tiny-grid__wrapper", "tiny-grid__filter-wrapper", "filter__prevent-default", (_ref75 = {
|
|
3861
3883
|
"tiny-grid__animat": optimizeOpts2.animat
|
|
3862
|
-
},
|
|
3884
|
+
}, _ref75[map.filterActive] = filterStore.visible, _ref75["tiny-grid__filter-simple"] = layout.includes("simple"), _ref75["filter-wrapper-saas"] = $table.isThemeSaas, _ref75)],
|
|
3863
3885
|
"style": filterStore.style
|
|
3864
3886
|
}, [filterStore.visible ? createVNode("div", {
|
|
3865
3887
|
"class": ["tiny-grid__filter-body", {
|
|
@@ -4012,8 +4034,8 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
|
|
|
4012
4034
|
"class": "tiny-grid__filter-panel"
|
|
4013
4035
|
}, [isAddbyProgram ? null : createVNode("li", {
|
|
4014
4036
|
"class": "tiny-grid__filter-option filter-option__radios"
|
|
4015
|
-
}, [inputRelations.map(function(
|
|
4016
|
-
var label =
|
|
4037
|
+
}, [inputRelations.map(function(_ref76) {
|
|
4038
|
+
var label = _ref76.label, value = _ref76.value, method = _ref76.method;
|
|
4017
4039
|
return createVNode(Radio, {
|
|
4018
4040
|
"modelValue": condition2.relation,
|
|
4019
4041
|
"label": value,
|
|
@@ -4361,8 +4383,8 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
|
|
|
4361
4383
|
});
|
|
4362
4384
|
}
|
|
4363
4385
|
});
|
|
4364
|
-
function handleFilterConditionCustom(
|
|
4365
|
-
var column =
|
|
4386
|
+
function handleFilterConditionCustom(_ref77) {
|
|
4387
|
+
var column = _ref77.column, condition2 = _ref77.condition, method = _ref77.method, property = _ref77.property, row2 = _ref77.row;
|
|
4366
4388
|
var ret = {
|
|
4367
4389
|
flag: false,
|
|
4368
4390
|
result: null
|
|
@@ -4377,8 +4399,8 @@ function handleFilterConditionCustom(_ref76) {
|
|
|
4377
4399
|
}
|
|
4378
4400
|
return ret;
|
|
4379
4401
|
}
|
|
4380
|
-
function handleFilterConditionExtend(
|
|
4381
|
-
var column =
|
|
4402
|
+
function handleFilterConditionExtend(_ref78) {
|
|
4403
|
+
var column = _ref78.column, condition2 = _ref78.condition, property = _ref78.property, row2 = _ref78.row;
|
|
4382
4404
|
var ret = {
|
|
4383
4405
|
flag: false,
|
|
4384
4406
|
result: null
|
|
@@ -4411,8 +4433,8 @@ function findRelationMethod(relation, relations) {
|
|
|
4411
4433
|
return method;
|
|
4412
4434
|
}
|
|
4413
4435
|
}
|
|
4414
|
-
function handleFilterRelations(
|
|
4415
|
-
var inputFilter =
|
|
4436
|
+
function handleFilterRelations(_ref79) {
|
|
4437
|
+
var inputFilter = _ref79.inputFilter;
|
|
4416
4438
|
var relations = [];
|
|
4417
4439
|
if (typeof inputFilter === "object" && Array.isArray(inputFilter.relations)) {
|
|
4418
4440
|
relations = inputFilter.relations;
|
|
@@ -4425,8 +4447,8 @@ function modifyValueCheckStr(value) {
|
|
|
4425
4447
|
}
|
|
4426
4448
|
return value;
|
|
4427
4449
|
}
|
|
4428
|
-
function handleDefaultCheckStr(
|
|
4429
|
-
var column =
|
|
4450
|
+
function handleDefaultCheckStr(_ref80) {
|
|
4451
|
+
var column = _ref80.column, input = _ref80.input, relation = _ref80.relation, relationMethod = _ref80.relationMethod, relations = _ref80.relations, result = _ref80.result, row2 = _ref80.row, value = _ref80.value;
|
|
4430
4452
|
if (typeof relationMethod !== "function") {
|
|
4431
4453
|
relationMethod = findRelationMethod(relation, relations);
|
|
4432
4454
|
}
|
|
@@ -4443,8 +4465,8 @@ function handleDefaultCheckStr(_ref79) {
|
|
|
4443
4465
|
result
|
|
4444
4466
|
};
|
|
4445
4467
|
}
|
|
4446
|
-
function handleFilterCheckStr(
|
|
4447
|
-
var column =
|
|
4468
|
+
function handleFilterCheckStr(_ref81) {
|
|
4469
|
+
var column = _ref81.column, relationMethod = _ref81.relationMethod, relations = _ref81.relations, row2 = _ref81.row;
|
|
4448
4470
|
return function(value, input, relation, dateList) {
|
|
4449
4471
|
var result = false;
|
|
4450
4472
|
value = modifyValueCheckStr(value);
|
|
@@ -4497,8 +4519,8 @@ function handleFilterCheckStr(_ref80) {
|
|
|
4497
4519
|
return result;
|
|
4498
4520
|
};
|
|
4499
4521
|
}
|
|
4500
|
-
function handleFilterCheck(
|
|
4501
|
-
var checkStr =
|
|
4522
|
+
function handleFilterCheck(_ref82) {
|
|
4523
|
+
var checkStr = _ref82.checkStr, empty = _ref82.empty, input = _ref82.input, property = _ref82.property, relation = _ref82.relation, row2 = _ref82.row, valueList = _ref82.valueList, dateList = _ref82.dateList;
|
|
4502
4524
|
return function() {
|
|
4503
4525
|
var value = get(row2, property);
|
|
4504
4526
|
if (empty === true) {
|
|
@@ -4670,8 +4692,8 @@ var Methods$f = {
|
|
|
4670
4692
|
});
|
|
4671
4693
|
return check();
|
|
4672
4694
|
},
|
|
4673
|
-
getOptions: function getOptions(
|
|
4674
|
-
var property =
|
|
4695
|
+
getOptions: function getOptions(_ref83) {
|
|
4696
|
+
var property = _ref83.property, filter2 = _ref83.filter;
|
|
4675
4697
|
var values = filter2.values, _filter$value = filter2.value, value = _filter$value === void 0 ? "value" : _filter$value, _filter$label = filter2.label, label = _filter$label === void 0 ? "label" : _filter$label, dataset = filter2.dataset;
|
|
4676
4698
|
if (typeof values === "function") {
|
|
4677
4699
|
return values({
|
|
@@ -4743,8 +4765,8 @@ var Methods$f = {
|
|
|
4743
4765
|
onResetInputFilter: filter2.onResetInputFilter,
|
|
4744
4766
|
extends: filter2.extends,
|
|
4745
4767
|
defaultFilter: isBoolean(filter2.defaultFilter) ? filter2.defaultFilter : true,
|
|
4746
|
-
options: options.map(function(
|
|
4747
|
-
var value =
|
|
4768
|
+
options: options.map(function(_ref84) {
|
|
4769
|
+
var value = _ref84.value, label = _ref84.label;
|
|
4748
4770
|
return {
|
|
4749
4771
|
value,
|
|
4750
4772
|
label,
|
|
@@ -4922,8 +4944,8 @@ var Children = defineComponent({
|
|
|
4922
4944
|
}
|
|
4923
4945
|
}
|
|
4924
4946
|
});
|
|
4925
|
-
var onMenuItem = function onMenuItem2(
|
|
4926
|
-
var tableInstance =
|
|
4947
|
+
var onMenuItem = function onMenuItem2(_ref85) {
|
|
4948
|
+
var tableInstance = _ref85.tableInstance, item = _ref85.item, getEventTargetNode2 = _ref85.getEventTargetNode, toKebab2 = _ref85.toKebab;
|
|
4927
4949
|
return {
|
|
4928
4950
|
click: function click(event) {
|
|
4929
4951
|
tableInstance.ctxMenuLinkEvent(event, item);
|
|
@@ -4978,8 +5000,8 @@ function createMenuItem(args) {
|
|
|
4978
5000
|
}
|
|
4979
5001
|
return res;
|
|
4980
5002
|
}
|
|
4981
|
-
function getMenuItemCreator(
|
|
4982
|
-
var ctxMenuStore =
|
|
5003
|
+
function getMenuItemCreator(_ref86) {
|
|
5004
|
+
var ctxMenuStore = _ref86.ctxMenuStore, getEventTargetNode2 = _ref86.getEventTargetNode, tableInstance = _ref86.tableInstance, toKebab2 = _ref86.toKebab;
|
|
4983
5005
|
return function(options, gIndex) {
|
|
4984
5006
|
return h("ul", {
|
|
4985
5007
|
class: "tiny-grid-menu__option-wrapper",
|
|
@@ -5048,9 +5070,9 @@ var Methods$e = {
|
|
|
5048
5070
|
return this.$nextTick();
|
|
5049
5071
|
},
|
|
5050
5072
|
// 处理菜单的移动
|
|
5051
|
-
moveCtxMenu: function moveCtxMenu(
|
|
5073
|
+
moveCtxMenu: function moveCtxMenu(_ref87) {
|
|
5052
5074
|
var _this9 = this;
|
|
5053
|
-
var event =
|
|
5075
|
+
var event = _ref87.event, keyCode = _ref87.keyCode, ctxMenuStore = _ref87.ctxMenuStore, property = _ref87.property, operKey = _ref87.operKey, operRest = _ref87.operRest, menuList = _ref87.menuList;
|
|
5054
5076
|
var selectIndex = findIndexOf(menuList, function(item) {
|
|
5055
5077
|
return ctxMenuStore[property] === item;
|
|
5056
5078
|
});
|
|
@@ -5294,16 +5316,16 @@ var Loading = defineComponent({
|
|
|
5294
5316
|
}
|
|
5295
5317
|
});
|
|
5296
5318
|
$install(Loading);
|
|
5297
|
-
function handleActivedCheckCell(
|
|
5298
|
-
var actived =
|
|
5319
|
+
function handleActivedCheckCell(_ref88) {
|
|
5320
|
+
var actived = _ref88.actived, column = _ref88.column, editConfig = _ref88.editConfig, row2 = _ref88.row;
|
|
5299
5321
|
return actived.row !== row2 || (editConfig.mode === "cell" ? actived.column !== column : false);
|
|
5300
5322
|
}
|
|
5301
|
-
function handleActivedCanActive(
|
|
5302
|
-
var editConfig =
|
|
5323
|
+
function handleActivedCanActive(_ref89) {
|
|
5324
|
+
var editConfig = _ref89.editConfig, params = _ref89.params;
|
|
5303
5325
|
return !(editConfig != null && editConfig.activeMethod) || editConfig.activeMethod(params);
|
|
5304
5326
|
}
|
|
5305
|
-
function handleActivedDoActive(
|
|
5306
|
-
var _vm =
|
|
5327
|
+
function handleActivedDoActive(_ref90) {
|
|
5328
|
+
var _vm = _ref90._vm, actived = _ref90.actived, canActive = _ref90.canActive, cell = _ref90.cell, column = _ref90.column, editConfig = _ref90.editConfig, event = _ref90.event, params = _ref90.params, row2 = _ref90.row, tableColumn3 = _ref90.tableColumn, type = _ref90.type;
|
|
5307
5329
|
if (canActive) {
|
|
5308
5330
|
if (_vm.keyboardConfig || _vm.mouseConfig) {
|
|
5309
5331
|
_vm.clearCopyed(event);
|
|
@@ -5330,14 +5352,14 @@ function handleActivedDoActive(_ref89) {
|
|
|
5330
5352
|
}
|
|
5331
5353
|
return type;
|
|
5332
5354
|
}
|
|
5333
|
-
function handleActivedClearActive(
|
|
5334
|
-
var _vm =
|
|
5355
|
+
function handleActivedClearActive(_ref91) {
|
|
5356
|
+
var _vm = _ref91._vm, canActive = _ref91.canActive, event = _ref91.event;
|
|
5335
5357
|
if (!canActive) {
|
|
5336
5358
|
_vm.clearActived(event);
|
|
5337
5359
|
}
|
|
5338
5360
|
}
|
|
5339
|
-
function handleActivedTryActive(
|
|
5340
|
-
var _vm =
|
|
5361
|
+
function handleActivedTryActive(_ref92) {
|
|
5362
|
+
var _vm = _ref92._vm, actived = _ref92.actived, cell = _ref92.cell, column = _ref92.column, editor = _ref92.editor, event = _ref92.event, isActiveCell = _ref92.isActiveCell, params = _ref92.params, row2 = _ref92.row;
|
|
5341
5363
|
if (editor && cell && !isActiveCell) {
|
|
5342
5364
|
var oldColumn = actived.column;
|
|
5343
5365
|
if (oldColumn !== column) {
|
|
@@ -5359,8 +5381,8 @@ var insertedField = GlobalConfig$1.constant.insertedField;
|
|
|
5359
5381
|
var getCellRender = function getCellRender2(isTreeNode, treeCellRender, treeRender, context) {
|
|
5360
5382
|
return context[isTreeNode ? treeCellRender : treeRender];
|
|
5361
5383
|
};
|
|
5362
|
-
function processRenderer(
|
|
5363
|
-
var h2 =
|
|
5384
|
+
function processRenderer(_ref93) {
|
|
5385
|
+
var h2 = _ref93.h, params = _ref93.params, renderer = _ref93.renderer, value = _ref93.value;
|
|
5364
5386
|
var result = {
|
|
5365
5387
|
flag: false,
|
|
5366
5388
|
vnodes: null
|
|
@@ -5384,13 +5406,13 @@ function processRenderer(_ref92) {
|
|
|
5384
5406
|
}
|
|
5385
5407
|
return result;
|
|
5386
5408
|
}
|
|
5387
|
-
function processAsyncColumn(
|
|
5388
|
-
var $table =
|
|
5409
|
+
function processAsyncColumn(_ref94) {
|
|
5410
|
+
var $table = _ref94.$table, column = _ref94.column, format = _ref94.format, h2 = _ref94.h, params = _ref94.params, row2 = _ref94.row;
|
|
5389
5411
|
var result = {
|
|
5390
5412
|
flag: false,
|
|
5391
5413
|
vnodes: null
|
|
5392
5414
|
};
|
|
5393
|
-
var
|
|
5415
|
+
var _ref95 = format.async || {}, fetch = _ref95.fetch, loadingText = _ref95.loadingText;
|
|
5394
5416
|
if ($table.isAsyncColumn && row2[insertedField] !== true && typeof fetch === "function") {
|
|
5395
5417
|
var cellText = row2[$table.getAsyncColumnName(column.property)];
|
|
5396
5418
|
var loadingRender = loadingText || "loading ...";
|
|
@@ -5404,8 +5426,8 @@ function processAsyncColumn(_ref93) {
|
|
|
5404
5426
|
}
|
|
5405
5427
|
return result;
|
|
5406
5428
|
}
|
|
5407
|
-
function getColumnRuleTypeIndex(
|
|
5408
|
-
var _vm =
|
|
5429
|
+
function getColumnRuleTypeIndex(_ref96) {
|
|
5430
|
+
var _vm = _ref96._vm, isTreeNode = _ref96.isTreeNode, renMaps = _ref96.renMaps, type = _ref96.type;
|
|
5409
5431
|
return {
|
|
5410
5432
|
match: function match() {
|
|
5411
5433
|
return type === "index";
|
|
@@ -5416,8 +5438,8 @@ function getColumnRuleTypeIndex(_ref95) {
|
|
|
5416
5438
|
}
|
|
5417
5439
|
};
|
|
5418
5440
|
}
|
|
5419
|
-
function getColumnRuleTypeRadio(
|
|
5420
|
-
var _vm =
|
|
5441
|
+
function getColumnRuleTypeRadio(_ref97) {
|
|
5442
|
+
var _vm = _ref97._vm, isTreeNode = _ref97.isTreeNode, renMaps = _ref97.renMaps, type = _ref97.type;
|
|
5421
5443
|
return {
|
|
5422
5444
|
match: function match() {
|
|
5423
5445
|
return type === "radio";
|
|
@@ -5428,8 +5450,8 @@ function getColumnRuleTypeRadio(_ref96) {
|
|
|
5428
5450
|
}
|
|
5429
5451
|
};
|
|
5430
5452
|
}
|
|
5431
|
-
function getColumnRuleTypeSelection(
|
|
5432
|
-
var _vm =
|
|
5453
|
+
function getColumnRuleTypeSelection(_ref98) {
|
|
5454
|
+
var _vm = _ref98._vm, isTreeNode = _ref98.isTreeNode, renMaps = _ref98.renMaps, selectConfig = _ref98.selectConfig, type = _ref98.type;
|
|
5433
5455
|
return {
|
|
5434
5456
|
match: function match() {
|
|
5435
5457
|
return type === "selection";
|
|
@@ -5443,8 +5465,8 @@ function getColumnRuleTypeSelection(_ref97) {
|
|
|
5443
5465
|
}
|
|
5444
5466
|
};
|
|
5445
5467
|
}
|
|
5446
|
-
function getColumnRuleTypeExpand(
|
|
5447
|
-
var _vm =
|
|
5468
|
+
function getColumnRuleTypeExpand(_ref99) {
|
|
5469
|
+
var _vm = _ref99._vm, renMaps = _ref99.renMaps, type = _ref99.type;
|
|
5448
5470
|
return {
|
|
5449
5471
|
match: function match() {
|
|
5450
5472
|
return type === "expand";
|
|
@@ -5455,8 +5477,8 @@ function getColumnRuleTypeExpand(_ref98) {
|
|
|
5455
5477
|
}
|
|
5456
5478
|
};
|
|
5457
5479
|
}
|
|
5458
|
-
function getColumnRuleTypeOperation(
|
|
5459
|
-
var _vm =
|
|
5480
|
+
function getColumnRuleTypeOperation(_ref100) {
|
|
5481
|
+
var _vm = _ref100._vm, renMaps = _ref100.renMaps, type = _ref100.type;
|
|
5460
5482
|
return {
|
|
5461
5483
|
match: function match() {
|
|
5462
5484
|
return type === "operation";
|
|
@@ -5466,8 +5488,8 @@ function getColumnRuleTypeOperation(_ref99) {
|
|
|
5466
5488
|
}
|
|
5467
5489
|
};
|
|
5468
5490
|
}
|
|
5469
|
-
function getColumnRuleTypeOther(
|
|
5470
|
-
var $table =
|
|
5491
|
+
function getColumnRuleTypeOther(_ref101) {
|
|
5492
|
+
var $table = _ref101.$table, _vm = _ref101._vm, colProps = _ref101.colProps, editor = _ref101.editor, filter2 = _ref101.filter, isTreeNode = _ref101.isTreeNode, renMaps = _ref101.renMaps, type = _ref101.type;
|
|
5471
5493
|
return {
|
|
5472
5494
|
match: function match() {
|
|
5473
5495
|
return !~["index", "radio", "selection", "expand", "operation"].indexOf(type);
|
|
@@ -5499,19 +5521,19 @@ function getColumnRuleTypeOther(_ref100) {
|
|
|
5499
5521
|
var isCheckStrictly = function isCheckStrictly2(selectConfig) {
|
|
5500
5522
|
return selectConfig && selectConfig.checkStrictly && !selectConfig.showHeader || selectConfig && !selectConfig.checkStrictly && selectConfig.showHeader === false;
|
|
5501
5523
|
};
|
|
5502
|
-
var runRender = function runRender2(
|
|
5524
|
+
var runRender = function runRender2(render19) {
|
|
5503
5525
|
var vnode;
|
|
5504
5526
|
try {
|
|
5505
5527
|
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
5506
5528
|
params[_key - 1] = arguments[_key];
|
|
5507
5529
|
}
|
|
5508
|
-
vnode =
|
|
5530
|
+
vnode = render19.apply(void 0, params);
|
|
5509
5531
|
} catch (e) {
|
|
5510
5532
|
warn("ui.grid.error.renderParamError");
|
|
5511
5533
|
} finally {
|
|
5512
5534
|
if (!vnode || !isVnode(vnode)) {
|
|
5513
5535
|
try {
|
|
5514
|
-
vnode = hooks.h(
|
|
5536
|
+
vnode = hooks.h(render19);
|
|
5515
5537
|
} catch (e) {
|
|
5516
5538
|
vnode = null;
|
|
5517
5539
|
warn("ui.grid.error.classComponentError");
|
|
@@ -5634,7 +5656,7 @@ var Cell = {
|
|
|
5634
5656
|
},
|
|
5635
5657
|
// 树节点
|
|
5636
5658
|
renderTreeIcon: function renderTreeIcon(h2, params) {
|
|
5637
|
-
var
|
|
5659
|
+
var _ref103, _$table$$grid, _$table$$grid$designC, _$table$$grid$designC2, _ref104;
|
|
5638
5660
|
var $table = params.$table, level = params.level, row2 = params.row;
|
|
5639
5661
|
var treeConfig = $table.treeConfig, treeExpandeds = $table.treeExpandeds;
|
|
5640
5662
|
var children = treeConfig.children, indent = treeConfig.indent, renderIcon = treeConfig.renderIcon, trigger = treeConfig.trigger;
|
|
@@ -5647,13 +5669,13 @@ var Cell = {
|
|
|
5647
5669
|
}
|
|
5648
5670
|
};
|
|
5649
5671
|
var icon = GlobalConfig$1.icon;
|
|
5650
|
-
var defaultIcon = function defaultIcon2(h22,
|
|
5651
|
-
var active =
|
|
5672
|
+
var defaultIcon = function defaultIcon2(h22, _ref102) {
|
|
5673
|
+
var active = _ref102.active;
|
|
5652
5674
|
var IconExpand = iconExpand();
|
|
5653
5675
|
var IconPutAway = iconPutAway();
|
|
5654
5676
|
return active ? h22(IconExpand) : h22(IconPutAway);
|
|
5655
5677
|
};
|
|
5656
|
-
var customExpandIcon = (
|
|
5678
|
+
var customExpandIcon = (_ref103 = renderIcon || ((_$table$$grid = $table.$grid) == null ? void 0 : (_$table$$grid$designC = _$table$$grid.designConfig) == null ? void 0 : (_$table$$grid$designC2 = _$table$$grid$designC.treeConfig) == null ? void 0 : _$table$$grid$designC2.renderIcon)) != null ? _ref103 : defaultIcon;
|
|
5657
5679
|
if (trigger && trigger !== "default") {
|
|
5658
5680
|
listeners = {};
|
|
5659
5681
|
}
|
|
@@ -5676,7 +5698,7 @@ var Cell = {
|
|
|
5676
5698
|
width: level * (indent || 16) + "px"
|
|
5677
5699
|
}
|
|
5678
5700
|
}), h2("span", {
|
|
5679
|
-
class: ["tiny-grid-tree-wrapper", (
|
|
5701
|
+
class: ["tiny-grid-tree-wrapper", (_ref104 = {}, _ref104[map.isActive] = isActive, _ref104)],
|
|
5680
5702
|
on: listeners
|
|
5681
5703
|
}, iconVNode)];
|
|
5682
5704
|
},
|
|
@@ -5698,7 +5720,7 @@ var Cell = {
|
|
|
5698
5720
|
var $table = params.$table, column = params.column, row2 = params.row, seq = params.seq, $seq = params.$seq, level = params.level;
|
|
5699
5721
|
var startIndex = $table.startIndex, treeConfig = $table.treeConfig, scrollYLoad = $table.scrollYLoad, treeOrdered = $table.treeOrdered;
|
|
5700
5722
|
var indexMethod = column.indexMethod, slots = column.slots;
|
|
5701
|
-
var
|
|
5723
|
+
var _ref105 = treeConfig || {}, _ref105$temporaryInde = _ref105.temporaryIndex, temporaryIndex = _ref105$temporaryInde === void 0 ? "_$index_" : _ref105$temporaryInde;
|
|
5702
5724
|
var isTreeOrderedFalse = treeConfig && !treeOrdered;
|
|
5703
5725
|
var indexValue = startIndex + seq;
|
|
5704
5726
|
if (isTreeOrderedFalse && level) {
|
|
@@ -5719,7 +5741,7 @@ var Cell = {
|
|
|
5719
5741
|
return [formatText(value, 1)];
|
|
5720
5742
|
},
|
|
5721
5743
|
renderRadioCell: function renderRadioCell(h2, params) {
|
|
5722
|
-
var
|
|
5744
|
+
var _ref106;
|
|
5723
5745
|
var $table = params.$table, slots = params.column.slots, row2 = params.row;
|
|
5724
5746
|
var _$table$radioConfig2 = $table.radioConfig, radioConfig = _$table$radioConfig2 === void 0 ? {} : _$table$radioConfig2, selectRow = $table.selectRow, vSize4 = $table.vSize;
|
|
5725
5747
|
var labelField = radioConfig.labelField, checkMethod = radioConfig.checkMethod;
|
|
@@ -5744,7 +5766,7 @@ var Cell = {
|
|
|
5744
5766
|
}
|
|
5745
5767
|
};
|
|
5746
5768
|
return [h2("label", {
|
|
5747
|
-
class: ["tiny-grid-radio", (
|
|
5769
|
+
class: ["tiny-grid-radio", (_ref106 = {}, _ref106["size__" + vSize4] = vSize4, _ref106["is__disabled"] = disabled, _ref106)]
|
|
5748
5770
|
}, [h2("input", options), h2("span", {
|
|
5749
5771
|
class: "tiny-grid-radio__icon"
|
|
5750
5772
|
}, [h2(iconRadio(), {
|
|
@@ -5759,7 +5781,7 @@ var Cell = {
|
|
|
5759
5781
|
return Cell.renderTreeIcon(h2, params).concat(Cell.renderRadioCell(h2, params));
|
|
5760
5782
|
},
|
|
5761
5783
|
renderSelectionHeader: function renderSelectionHeader(h2, params) {
|
|
5762
|
-
var
|
|
5784
|
+
var _ref107;
|
|
5763
5785
|
var $table = params.$table, column = params.column;
|
|
5764
5786
|
var slots = column.slots, own = column.own;
|
|
5765
5787
|
var headerCheckDisabled = $table.headerCheckDisabled, isAllSelected = $table.isAllSelected, isIndeterminate = $table.isIndeterminate, selectConfig = $table.selectConfig, vSize4 = $table.vSize;
|
|
@@ -5786,7 +5808,7 @@ var Cell = {
|
|
|
5786
5808
|
}
|
|
5787
5809
|
};
|
|
5788
5810
|
var vnode = h2("label", {
|
|
5789
|
-
class: ["tiny-grid-checkbox tiny-select-header", (
|
|
5811
|
+
class: ["tiny-grid-checkbox tiny-select-header", (_ref107 = {}, _ref107["size__" + vSize4] = vSize4, _ref107["is__disabled"] = headerCheckDisabled, _ref107["is__indeterminate"] = isIndeterminate, _ref107)],
|
|
5790
5812
|
key: random()
|
|
5791
5813
|
}, [h2("input", options), h2("span", {
|
|
5792
5814
|
class: "tiny-grid-checkbox__icon"
|
|
@@ -5808,12 +5830,12 @@ var Cell = {
|
|
|
5808
5830
|
return [vnode, dropdownVnode];
|
|
5809
5831
|
},
|
|
5810
5832
|
renderSelectionCell: function renderSelectionCell(h2, params) {
|
|
5811
|
-
var
|
|
5833
|
+
var _ref109;
|
|
5812
5834
|
var $table = params.$table, column = params.column, row2 = params.row;
|
|
5813
5835
|
var slots = column.slots;
|
|
5814
5836
|
var _$table$selectConfig2 = $table.selectConfig, selectConfig = _$table$selectConfig2 === void 0 ? {} : _$table$selectConfig2, treeConfig = $table.treeConfig, treeIndeterminates = $table.treeIndeterminates, vSize4 = $table.vSize;
|
|
5815
5837
|
var labelField = selectConfig.labelField, checkMethod = selectConfig.checkMethod;
|
|
5816
|
-
var
|
|
5838
|
+
var _ref108 = {}, _ref108$indeterminate = _ref108.indeterminate, indeterminate = _ref108$indeterminate === void 0 ? false : _ref108$indeterminate, _ref108$isDisabled = _ref108.isDisabled, isDisabled = _ref108$isDisabled === void 0 ? !!checkMethod : _ref108$isDisabled;
|
|
5817
5839
|
var options = {
|
|
5818
5840
|
attrs: {
|
|
5819
5841
|
type: "checkbox"
|
|
@@ -5828,7 +5850,7 @@ var Cell = {
|
|
|
5828
5850
|
checked: ~$table.selection.indexOf(row2)
|
|
5829
5851
|
};
|
|
5830
5852
|
var twcls = params.twcls;
|
|
5831
|
-
var labelCls = ["tiny-grid-checkbox tiny-select-cell", (
|
|
5853
|
+
var labelCls = ["tiny-grid-checkbox tiny-select-cell", (_ref109 = {}, _ref109["size__" + vSize4] = vSize4, _ref109["is__indeterminate"] = indeterminate, _ref109["is__disabled"] = isDisabled, _ref109)];
|
|
5832
5854
|
var inputCls = null;
|
|
5833
5855
|
var spanCls = "tiny-grid-checkbox__icon";
|
|
5834
5856
|
var svgCls = "tiny-svg-size icon-checked-sur";
|
|
@@ -5874,12 +5896,12 @@ var Cell = {
|
|
|
5874
5896
|
},
|
|
5875
5897
|
// TODO: 与renderSelectionCell代码方法高度相似,待提取公共逻辑。
|
|
5876
5898
|
renderSelectionCellByProp: function renderSelectionCellByProp(h2, params) {
|
|
5877
|
-
var
|
|
5899
|
+
var _ref111;
|
|
5878
5900
|
var $table = params.$table, column = params.column, row2 = params.row;
|
|
5879
5901
|
var slots = column.slots;
|
|
5880
5902
|
var _$table$selectConfig3 = $table.selectConfig, selectConfig = _$table$selectConfig3 === void 0 ? {} : _$table$selectConfig3, treeConfig = $table.treeConfig, treeIndeterminates = $table.treeIndeterminates, vSize4 = $table.vSize;
|
|
5881
5903
|
var property = selectConfig.checkField, checkMethod = selectConfig.checkMethod, labelField = selectConfig.labelField;
|
|
5882
|
-
var
|
|
5904
|
+
var _ref110 = {}, _ref110$indeterminate = _ref110.indeterminate, indeterminate = _ref110$indeterminate === void 0 ? false : _ref110$indeterminate, _ref110$isDisabled = _ref110.isDisabled, isDisabled = _ref110$isDisabled === void 0 ? !!checkMethod : _ref110$isDisabled;
|
|
5883
5905
|
var options = {
|
|
5884
5906
|
attrs: {
|
|
5885
5907
|
type: "checkbox"
|
|
@@ -5900,7 +5922,7 @@ var Cell = {
|
|
|
5900
5922
|
};
|
|
5901
5923
|
var vnode = h2("label", {
|
|
5902
5924
|
key: random(),
|
|
5903
|
-
class: ["tiny-grid-checkbox", (
|
|
5925
|
+
class: ["tiny-grid-checkbox", (_ref111 = {}, _ref111["size__" + vSize4] = vSize4, _ref111["is__indeterminate"] = indeterminate, _ref111["is__disabled"] = isDisabled, _ref111)]
|
|
5904
5926
|
}, [h2("input", options), h2("span", {
|
|
5905
5927
|
class: "tiny-grid-checkbox__icon"
|
|
5906
5928
|
}, [h2(iconCheck(), {
|
|
@@ -5919,7 +5941,7 @@ var Cell = {
|
|
|
5919
5941
|
},
|
|
5920
5942
|
// 展开行
|
|
5921
5943
|
renderExpandCell: function renderExpandCell(h2, params) {
|
|
5922
|
-
var
|
|
5944
|
+
var _ref112;
|
|
5923
5945
|
var $table = params.$table, row2 = params.row;
|
|
5924
5946
|
var _$table$expandConfig3 = $table.expandConfig, expandConfig = _$table$expandConfig3 === void 0 ? {} : _$table$expandConfig3;
|
|
5925
5947
|
var _expandConfig$showIco = expandConfig.showIcon, showIcon = _expandConfig$showIco === void 0 ? true : _expandConfig$showIco, expandMethod = expandConfig.activeMethod;
|
|
@@ -5930,7 +5952,7 @@ var Cell = {
|
|
|
5930
5952
|
expandActive: "expand__active"
|
|
5931
5953
|
};
|
|
5932
5954
|
return [h2("span", {
|
|
5933
|
-
class: ["tiny-grid__expanded", (
|
|
5955
|
+
class: ["tiny-grid__expanded", (_ref112 = {}, _ref112[map.expandActive] = expandActive, _ref112)],
|
|
5934
5956
|
on: {
|
|
5935
5957
|
click: function click(event) {
|
|
5936
5958
|
if (!hideExpand) {
|
|
@@ -6002,7 +6024,7 @@ var Cell = {
|
|
|
6002
6024
|
return Cell.renderHeader(h2, params).concat(Cell.renderFilterIcon(h2, params, suffixCls[1]));
|
|
6003
6025
|
},
|
|
6004
6026
|
renderFilterIcon: function renderFilterIcon(h2, params, cls) {
|
|
6005
|
-
var
|
|
6027
|
+
var _ref113, _ref114;
|
|
6006
6028
|
if (cls === void 0) {
|
|
6007
6029
|
cls = "";
|
|
6008
6030
|
}
|
|
@@ -6014,9 +6036,9 @@ var Cell = {
|
|
|
6014
6036
|
hasFilter: "has__Filter"
|
|
6015
6037
|
};
|
|
6016
6038
|
return [h2("span", {
|
|
6017
|
-
class: ["tiny-grid-filter-wrapper " + cls, (
|
|
6039
|
+
class: ["tiny-grid-filter-wrapper " + cls, (_ref113 = {}, _ref113[map.isActive] = filterStore.visible && filterStore.column === column, _ref113)]
|
|
6018
6040
|
}, [h2(icon.filter, {
|
|
6019
|
-
class: ["tiny-svg-size tiny-grid-filter__btn " + column.id, (
|
|
6041
|
+
class: ["tiny-svg-size tiny-grid-filter__btn " + column.id, (_ref114 = {}, _ref114[map.hasFilter] = column.filter && column.filter.hasFilter, _ref114)],
|
|
6020
6042
|
on: {
|
|
6021
6043
|
click: function click(event) {
|
|
6022
6044
|
$table.triggerFilterEvent(event, params.column, params);
|
|
@@ -6124,10 +6146,10 @@ var Cell = {
|
|
|
6124
6146
|
if (slots && slots.default) {
|
|
6125
6147
|
return slots.default(params, h2);
|
|
6126
6148
|
}
|
|
6127
|
-
var _operationConfig$butt = operationConfig.buttons, buttons = _operationConfig$butt === void 0 ? [] : _operationConfig$butt,
|
|
6149
|
+
var _operationConfig$butt = operationConfig.buttons, buttons = _operationConfig$butt === void 0 ? [] : _operationConfig$butt, render19 = operationConfig.render, _operationConfig$max = operationConfig.max, max = _operationConfig$max === void 0 ? 3 : _operationConfig$max, _operationConfig$disa = operationConfig.disabledClass, disabledClass = _operationConfig$disa === void 0 ? "" : _operationConfig$disa;
|
|
6128
6150
|
var viewClass = $table.viewCls("operButton");
|
|
6129
|
-
if (
|
|
6130
|
-
return
|
|
6151
|
+
if (render19) {
|
|
6152
|
+
return render19({
|
|
6131
6153
|
h: h2,
|
|
6132
6154
|
buttons,
|
|
6133
6155
|
params
|
|
@@ -6173,8 +6195,8 @@ var Cell = {
|
|
|
6173
6195
|
};
|
|
6174
6196
|
var handleItemClick = function handleItemClick2(itemData) {
|
|
6175
6197
|
var realName = (itemData == null ? void 0 : itemData.name) || itemData;
|
|
6176
|
-
var buttonConfig = visibleButtons.find(function(
|
|
6177
|
-
var buttonName =
|
|
6198
|
+
var buttonConfig = visibleButtons.find(function(_ref115) {
|
|
6199
|
+
var buttonName = _ref115.name;
|
|
6178
6200
|
return buttonName === realName;
|
|
6179
6201
|
});
|
|
6180
6202
|
buttonConfig.click(window.event || {}, _extends({
|
|
@@ -6236,8 +6258,8 @@ var Cell = {
|
|
|
6236
6258
|
}, groupBig)];
|
|
6237
6259
|
}
|
|
6238
6260
|
};
|
|
6239
|
-
function setTableElemWidth(
|
|
6240
|
-
var scrollbarWidth =
|
|
6261
|
+
function setTableElemWidth(_ref116) {
|
|
6262
|
+
var scrollbarWidth = _ref116.scrollbarWidth, tWidth = _ref116.tWidth, tableElem = _ref116.tableElem;
|
|
6241
6263
|
if (tableElem && tWidth === null) {
|
|
6242
6264
|
tableElem.style.width = tWidth;
|
|
6243
6265
|
}
|
|
@@ -6245,8 +6267,8 @@ function setTableElemWidth(_ref115) {
|
|
|
6245
6267
|
tableElem.style.width = tWidth + scrollbarWidth + "px";
|
|
6246
6268
|
}
|
|
6247
6269
|
}
|
|
6248
|
-
function getTableWidth(
|
|
6249
|
-
var scrollXLoad =
|
|
6270
|
+
function getTableWidth(_ref117) {
|
|
6271
|
+
var scrollXLoad = _ref117.scrollXLoad, tWidth = _ref117.tWidth, tableColumn3 = _ref117.tableColumn;
|
|
6250
6272
|
if (scrollXLoad) {
|
|
6251
6273
|
tWidth = tableColumn3.reduce(function(previous, column) {
|
|
6252
6274
|
return previous + column.renderWidth;
|
|
@@ -6257,8 +6279,8 @@ function getTableWidth(_ref116) {
|
|
|
6257
6279
|
tWidth
|
|
6258
6280
|
};
|
|
6259
6281
|
}
|
|
6260
|
-
function layoutFooter(
|
|
6261
|
-
var elemStore =
|
|
6282
|
+
function layoutFooter(_ref118) {
|
|
6283
|
+
var elemStore = _ref118.elemStore, customHeight = _ref118.customHeight, footerHeight = _ref118.footerHeight, headerHeight = _ref118.headerHeight, scrollXLoad = _ref118.scrollXLoad, scrollbarWidth = _ref118.scrollbarWidth, tableElem = _ref118.tableElem, scrollbarHeight = _ref118.scrollbarHeight, tableColumn3 = _ref118.tableColumn, tableHeight = _ref118.tableHeight, tableWidth = _ref118.tableWidth, wrapperElem = _ref118.wrapperElem, fixedWrapperElem = _ref118.fixedWrapperElem;
|
|
6262
6284
|
var tWidth = tableWidth;
|
|
6263
6285
|
var ret = getTableWidth({
|
|
6264
6286
|
scrollXLoad,
|
|
@@ -6284,8 +6306,8 @@ function layoutFooter(_ref117) {
|
|
|
6284
6306
|
});
|
|
6285
6307
|
return tableColumn3;
|
|
6286
6308
|
}
|
|
6287
|
-
function layoutColgroup(
|
|
6288
|
-
var elemStore =
|
|
6309
|
+
function layoutColgroup(_ref119) {
|
|
6310
|
+
var elemStore = _ref119.elemStore, fullColumnIdData = _ref119.fullColumnIdData, layout = _ref119.layout, scrollbarWidth = _ref119.scrollbarWidth;
|
|
6289
6311
|
var colgroupElem = elemStore["main-" + layout + "-colgroup"];
|
|
6290
6312
|
var colElemHandler = function colElemHandler2(colElem) {
|
|
6291
6313
|
var colid = colElem.getAttribute("name");
|
|
@@ -6301,8 +6323,8 @@ function layoutColgroup(_ref118) {
|
|
|
6301
6323
|
arrayEach(colgroupElem.children, colElemHandler);
|
|
6302
6324
|
}
|
|
6303
6325
|
}
|
|
6304
|
-
function layoutHeader(
|
|
6305
|
-
var elemStore =
|
|
6326
|
+
function layoutHeader(_ref120) {
|
|
6327
|
+
var elemStore = _ref120.elemStore, layout = _ref120.layout, scrollXLoad = _ref120.scrollXLoad, scrollbarWidth = _ref120.scrollbarWidth, tableColumn3 = _ref120.tableColumn, tableElem = _ref120.tableElem, tableWidth = _ref120.tableWidth;
|
|
6306
6328
|
var tWidth = tableWidth;
|
|
6307
6329
|
var repairElem = elemStore["main-" + layout + "-repair"];
|
|
6308
6330
|
if (scrollXLoad) {
|
|
@@ -6320,14 +6342,14 @@ function layoutHeader(_ref119) {
|
|
|
6320
6342
|
}
|
|
6321
6343
|
return tableColumn3;
|
|
6322
6344
|
}
|
|
6323
|
-
function layoutTable(
|
|
6324
|
-
var tWidth =
|
|
6345
|
+
function layoutTable(_ref121) {
|
|
6346
|
+
var tWidth = _ref121.tWidth, tableElem = _ref121.tableElem;
|
|
6325
6347
|
if (tableElem) {
|
|
6326
6348
|
tableElem.style.width = tWidth ? tWidth + "px" : tWidth;
|
|
6327
6349
|
}
|
|
6328
6350
|
}
|
|
6329
|
-
function layoutBodyWrapper(
|
|
6330
|
-
var footerHeight =
|
|
6351
|
+
function layoutBodyWrapper(_ref122) {
|
|
6352
|
+
var footerHeight = _ref122.footerHeight, customHeight = _ref122.customHeight, headerHeight = _ref122.headerHeight, maxHeight = _ref122.maxHeight, minHeight = _ref122.minHeight, parentHeight2 = _ref122.parentHeight, wrapperElem = _ref122.wrapperElem; _ref122.scrollbarWidth;
|
|
6331
6353
|
if (wrapperElem) {
|
|
6332
6354
|
if (customHeight > 0) {
|
|
6333
6355
|
var contentHeight = customHeight - headerHeight - footerHeight;
|
|
@@ -6348,8 +6370,8 @@ function layoutBodyWrapper(_ref121) {
|
|
|
6348
6370
|
minHeight
|
|
6349
6371
|
};
|
|
6350
6372
|
}
|
|
6351
|
-
function layoutEmptyBlock(
|
|
6352
|
-
var emptyBlockElem =
|
|
6373
|
+
function layoutEmptyBlock(_ref123) {
|
|
6374
|
+
var emptyBlockElem = _ref123.emptyBlockElem, tWidth = _ref123.tWidth;
|
|
6353
6375
|
if (emptyBlockElem) {
|
|
6354
6376
|
emptyBlockElem.style.width = tWidth ? tWidth + "px" : tWidth || "";
|
|
6355
6377
|
}
|
|
@@ -6474,40 +6496,40 @@ function isTargetRadioOrCheckbox(event, column, colType, targetType) {
|
|
|
6474
6496
|
var target = event.target;
|
|
6475
6497
|
return target && column.type === colType && target.tagName.toLowerCase() === "input" && target.type === (targetType || colType);
|
|
6476
6498
|
}
|
|
6477
|
-
function onClickExpandColumn(
|
|
6478
|
-
var $el =
|
|
6499
|
+
function onClickExpandColumn(_ref124) {
|
|
6500
|
+
var $el = _ref124.$el, _vm = _ref124._vm, column = _ref124.column, event = _ref124.event, expandConfig = _ref124.expandConfig, params = _ref124.params;
|
|
6479
6501
|
if ((expandConfig.trigger === "row" || column.type === "expand" && expandConfig.trigger === "cell") && !_vm.getEventTargetNode(event, $el, "tiny-grid__expanded").flag) {
|
|
6480
6502
|
_vm.triggerRowExpandEvent(event, params);
|
|
6481
6503
|
}
|
|
6482
6504
|
}
|
|
6483
|
-
function onClickTreeNodeColumn(
|
|
6484
|
-
var _vm =
|
|
6505
|
+
function onClickTreeNodeColumn(_ref125) {
|
|
6506
|
+
var _vm = _ref125._vm, column = _ref125.column, event = _ref125.event, params = _ref125.params, treeConfig = _ref125.treeConfig;
|
|
6485
6507
|
if (treeConfig.trigger === "row" || column.treeNode && treeConfig.trigger === "cell") {
|
|
6486
6508
|
_vm.triggerTreeExpandEvent(event, params);
|
|
6487
6509
|
}
|
|
6488
6510
|
}
|
|
6489
|
-
function onHighlightCurrentRow(
|
|
6490
|
-
var $el =
|
|
6511
|
+
function onHighlightCurrentRow(_ref126) {
|
|
6512
|
+
var $el = _ref126.$el, _vm = _ref126._vm, event = _ref126.event, highlightCurrentRow = _ref126.highlightCurrentRow, params = _ref126.params, radioConfig = _ref126.radioConfig;
|
|
6491
6513
|
if (highlightCurrentRow) {
|
|
6492
6514
|
if (radioConfig.trigger === "row" || !_vm.getEventTargetNode(event, $el, "tiny-grid-checkbox").flag && !_vm.getEventTargetNode(event, $el, "tiny-grid-radio").flag) {
|
|
6493
6515
|
_vm.triggerCurrentRowEvent(event, params);
|
|
6494
6516
|
}
|
|
6495
6517
|
}
|
|
6496
6518
|
}
|
|
6497
|
-
function onClickRadioColumn(
|
|
6498
|
-
var $el =
|
|
6519
|
+
function onClickRadioColumn(_ref127) {
|
|
6520
|
+
var $el = _ref127.$el, _vm = _ref127._vm, column = _ref127.column, event = _ref127.event, params = _ref127.params, radioConfig = _ref127.radioConfig;
|
|
6499
6521
|
if ((radioConfig.trigger === "row" || column.type === "radio" && radioConfig.trigger === "cell") && !_vm.getEventTargetNode(event, $el, "tiny-grid-radio").flag) {
|
|
6500
6522
|
_vm.triggerRadioRowEvent(event, params);
|
|
6501
6523
|
}
|
|
6502
6524
|
}
|
|
6503
|
-
function onClickSelectColumn(
|
|
6504
|
-
var _vm =
|
|
6525
|
+
function onClickSelectColumn(_ref128) {
|
|
6526
|
+
var _vm = _ref128._vm, column = _ref128.column, event = _ref128.event, params = _ref128.params, selectConfig = _ref128.selectConfig;
|
|
6505
6527
|
if ((selectConfig.trigger === "row" || column.type === "selection" && selectConfig.trigger === "cell") && !_vm.getEventTargetNode(event, params.cell, "tiny-grid-checkbox").flag) {
|
|
6506
6528
|
_vm.handleToggleCheckRowEvent(params, event);
|
|
6507
6529
|
}
|
|
6508
6530
|
}
|
|
6509
|
-
function onClickCellSelect(
|
|
6510
|
-
var _vm =
|
|
6531
|
+
function onClickCellSelect(_ref129) {
|
|
6532
|
+
var _vm = _ref129._vm, actived = _ref129.actived, cell = _ref129.cell, column = _ref129.column, editConfig = _ref129.editConfig, event = _ref129.event, mouseConfig = _ref129.mouseConfig, params = _ref129.params, row2 = _ref129.row;
|
|
6511
6533
|
if (!mouseConfig.checked && editConfig) {
|
|
6512
6534
|
if (editConfig.trigger === "manual") {
|
|
6513
6535
|
if (actived.args && actived.row === row2 && column !== actived.column) {
|
|
@@ -6526,8 +6548,8 @@ function onClickCellSelect(_ref128) {
|
|
|
6526
6548
|
}
|
|
6527
6549
|
}
|
|
6528
6550
|
}
|
|
6529
|
-
function onGroupHeader(
|
|
6530
|
-
var _vm =
|
|
6551
|
+
function onGroupHeader(_ref130) {
|
|
6552
|
+
var _vm = _ref130._vm, isGroup2 = _ref130.isGroup, headerProps2 = _ref130.headerProps;
|
|
6531
6553
|
if (isGroup2) {
|
|
6532
6554
|
eachTree(_vm.collectColumn, function(column) {
|
|
6533
6555
|
if (column.children && column.children.length) {
|
|
@@ -6538,14 +6560,14 @@ function onGroupHeader(_ref129) {
|
|
|
6538
6560
|
}, headerProps2);
|
|
6539
6561
|
}
|
|
6540
6562
|
}
|
|
6541
|
-
function reassignNotFixed(
|
|
6542
|
-
var centerList =
|
|
6563
|
+
function reassignNotFixed(_ref131) {
|
|
6564
|
+
var centerList = _ref131.centerList, column = _ref131.column;
|
|
6543
6565
|
if (!column.fixed) {
|
|
6544
6566
|
centerList.push(column);
|
|
6545
6567
|
}
|
|
6546
6568
|
}
|
|
6547
|
-
function reassignFixedRight(
|
|
6548
|
-
var column =
|
|
6569
|
+
function reassignFixedRight(_ref132) {
|
|
6570
|
+
var column = _ref132.column, columnIndex = _ref132.columnIndex, isColspan = _ref132.isColspan, rightEndIndex = _ref132.rightEndIndex, rightList = _ref132.rightList;
|
|
6549
6571
|
if (column.fixed === "right") {
|
|
6550
6572
|
if (!isColspan) {
|
|
6551
6573
|
if (rightEndIndex === null) {
|
|
@@ -6564,8 +6586,8 @@ function reassignFixedRight(_ref131) {
|
|
|
6564
6586
|
rightEndIndex
|
|
6565
6587
|
};
|
|
6566
6588
|
}
|
|
6567
|
-
function reassignFixedLeft(
|
|
6568
|
-
var column =
|
|
6589
|
+
function reassignFixedLeft(_ref133) {
|
|
6590
|
+
var column = _ref133.column, columnIndex = _ref133.columnIndex, isColspan = _ref133.isColspan, leftList = _ref133.leftList, leftStartIndex = _ref133.leftStartIndex, letIndex = _ref133.letIndex;
|
|
6569
6591
|
if (column.fixed === "left") {
|
|
6570
6592
|
if (leftStartIndex === null) {
|
|
6571
6593
|
leftStartIndex = letIndex;
|
|
@@ -6585,14 +6607,14 @@ function reassignFixedLeft(_ref132) {
|
|
|
6585
6607
|
isColspan
|
|
6586
6608
|
};
|
|
6587
6609
|
}
|
|
6588
|
-
function showGroupFixedError(
|
|
6589
|
-
var isColspan =
|
|
6610
|
+
function showGroupFixedError(_ref134) {
|
|
6611
|
+
var isColspan = _ref134.isColspan, isGroup2 = _ref134.isGroup, leftStartIndex = _ref134.leftStartIndex, rightEndIndex = _ref134.rightEndIndex, visibleColumn = _ref134.visibleColumn;
|
|
6590
6612
|
if (isGroup2 && (isColspan || leftStartIndex || rightEndIndex !== null && rightEndIndex !== visibleColumn.length)) {
|
|
6591
6613
|
error("ui.grid.error.groupFixed");
|
|
6592
6614
|
}
|
|
6593
6615
|
}
|
|
6594
|
-
function onScrollXLoad(
|
|
6595
|
-
var _vm =
|
|
6616
|
+
function onScrollXLoad(_ref135) {
|
|
6617
|
+
var _vm = _ref135._vm, scrollX = _ref135.scrollX, scrollXLoad = _ref135.scrollXLoad, scrollXStore = _ref135.scrollXStore, tableColumn3 = _ref135.tableColumn, visibleColumn = _ref135.visibleColumn;
|
|
6596
6618
|
if (scrollXLoad) {
|
|
6597
6619
|
if (_vm.resizable || visibleColumn.some(function(column) {
|
|
6598
6620
|
return column.resizable;
|
|
@@ -6609,10 +6631,10 @@ function onScrollXLoad(_ref134) {
|
|
|
6609
6631
|
}
|
|
6610
6632
|
return tableColumn3;
|
|
6611
6633
|
}
|
|
6612
|
-
function mapFetchColumnPromise(
|
|
6613
|
-
var _vm =
|
|
6614
|
-
return fetchColumns.map(function(
|
|
6615
|
-
var format =
|
|
6634
|
+
function mapFetchColumnPromise(_ref136) {
|
|
6635
|
+
var _vm = _ref136._vm, fetchColumns = _ref136.fetchColumns, tableColumn3 = _ref136.tableColumn;
|
|
6636
|
+
return fetchColumns.map(function(_ref137) {
|
|
6637
|
+
var format = _ref137.format, columnValues = _ref137.columnValues;
|
|
6616
6638
|
return format.async.fetch({
|
|
6617
6639
|
columns: tableColumn3,
|
|
6618
6640
|
columnValues,
|
|
@@ -6620,8 +6642,8 @@ function mapFetchColumnPromise(_ref135) {
|
|
|
6620
6642
|
});
|
|
6621
6643
|
});
|
|
6622
6644
|
}
|
|
6623
|
-
function preprocessDataObjectFormat(
|
|
6624
|
-
var columnCount =
|
|
6645
|
+
function preprocessDataObjectFormat(_ref138) {
|
|
6646
|
+
var columnCount = _ref138.columnCount, columnValues = _ref138.columnValues, columnValuesMap = _ref138.columnValuesMap, fields = _ref138.fields;
|
|
6625
6647
|
if (columnCount) {
|
|
6626
6648
|
columnValues.forEach(function(col) {
|
|
6627
6649
|
if (typeof col === "object") {
|
|
@@ -6633,8 +6655,8 @@ function preprocessDataObjectFormat(_ref137) {
|
|
|
6633
6655
|
});
|
|
6634
6656
|
}
|
|
6635
6657
|
}
|
|
6636
|
-
function preventDupRender(
|
|
6637
|
-
var asyncColumnName =
|
|
6658
|
+
function preventDupRender(_ref139) {
|
|
6659
|
+
var asyncColumnName = _ref139.asyncColumnName, cellTexts = _ref139.cellTexts, cellValuesCount = _ref139.cellValuesCount, columnData = _ref139.columnData, columnValuesMap = _ref139.columnValuesMap, isRender = _ref139.isRender, property = _ref139.property, renderCount = _ref139.renderCount, row2 = _ref139.row, splitConfig = _ref139.splitConfig;
|
|
6638
6660
|
var cellEachIndex = 0;
|
|
6639
6661
|
if (!isRender && cellValuesCount) {
|
|
6640
6662
|
var cellLabel;
|
|
@@ -6659,8 +6681,8 @@ function preventDupRender(_ref138) {
|
|
|
6659
6681
|
}
|
|
6660
6682
|
return renderCount;
|
|
6661
6683
|
}
|
|
6662
|
-
function handleResolveColumnComplete(
|
|
6663
|
-
var _vm =
|
|
6684
|
+
function handleResolveColumnComplete(_ref140) {
|
|
6685
|
+
var _vm = _ref140._vm, columnData = _ref140.columnData, complete = _ref140.complete;
|
|
6664
6686
|
if (typeof complete === "function") {
|
|
6665
6687
|
complete({
|
|
6666
6688
|
columnData,
|
|
@@ -6669,8 +6691,8 @@ function handleResolveColumnComplete(_ref139) {
|
|
|
6669
6691
|
}
|
|
6670
6692
|
}
|
|
6671
6693
|
var isWebkit = browserInfo["-webkit"];
|
|
6672
|
-
function computeScrollYLoad(
|
|
6673
|
-
var _vm =
|
|
6694
|
+
function computeScrollYLoad(_ref141) {
|
|
6695
|
+
var _vm = _ref141._vm, scrollLoad = _ref141.scrollLoad, scrollY = _ref141.scrollY, scrollYLoad = _ref141.scrollYLoad, scrollYStore = _ref141.scrollYStore, tableBodyElem = _ref141.tableBodyElem;
|
|
6674
6696
|
if (scrollYLoad || scrollLoad) {
|
|
6675
6697
|
scrollYStore.rowHeight = _vm.getRowHeight();
|
|
6676
6698
|
}
|
|
@@ -6690,8 +6712,8 @@ function computeScrollYLoad(_ref140) {
|
|
|
6690
6712
|
_vm.updateScrollYSpace();
|
|
6691
6713
|
}
|
|
6692
6714
|
}
|
|
6693
|
-
function computeScrollXLoad(
|
|
6694
|
-
var _vm =
|
|
6715
|
+
function computeScrollXLoad(_ref142) {
|
|
6716
|
+
var _vm = _ref142._vm, scrollX = _ref142.scrollX, scrollXLoad = _ref142.scrollXLoad, scrollXStore = _ref142.scrollXStore, tableBodyElem = _ref142.tableBodyElem, visibleColumn = _ref142.visibleColumn;
|
|
6695
6717
|
if (scrollXLoad) {
|
|
6696
6718
|
var clientWidth = tableBodyElem.clientWidth;
|
|
6697
6719
|
var width = 0;
|
|
@@ -6722,8 +6744,8 @@ function computeScrollXLoad(_ref141) {
|
|
|
6722
6744
|
_vm.updateScrollXSpace();
|
|
6723
6745
|
}
|
|
6724
6746
|
}
|
|
6725
|
-
var adaptive = function adaptive2(
|
|
6726
|
-
var autoArr =
|
|
6747
|
+
var adaptive = function adaptive2(_ref143) {
|
|
6748
|
+
var autoArr = _ref143.autoArr, meanWidth = _ref143.meanWidth, minCellWidth = _ref143.minCellWidth, tableWidth = _ref143.tableWidth, fit = _ref143.fit, bodyWidth = _ref143.bodyWidth;
|
|
6727
6749
|
autoArr.forEach(function(column, index2) {
|
|
6728
6750
|
var width = Math.max(meanWidth, minCellWidth);
|
|
6729
6751
|
column.renderWidth = width;
|
|
@@ -6738,8 +6760,8 @@ var adaptive = function adaptive2(_ref142) {
|
|
|
6738
6760
|
});
|
|
6739
6761
|
return tableWidth;
|
|
6740
6762
|
};
|
|
6741
|
-
var initTableWidth = function initTableWidth2(
|
|
6742
|
-
var remainWidth =
|
|
6763
|
+
var initTableWidth = function initTableWidth2(_ref144) {
|
|
6764
|
+
var remainWidth = _ref144.remainWidth, columnStore = _ref144.columnStore;
|
|
6743
6765
|
var tableWidth = 0;
|
|
6744
6766
|
var resizeArr = columnStore.resizeList, pxMinArr = columnStore.pxMinList, pxArr = columnStore.pxList;
|
|
6745
6767
|
var scaleArr = columnStore.scaleList, scaleMinArr = columnStore.scaleMinList;
|
|
@@ -6774,8 +6796,8 @@ var initTableWidth = function initTableWidth2(_ref143) {
|
|
|
6774
6796
|
meanWidth
|
|
6775
6797
|
};
|
|
6776
6798
|
};
|
|
6777
|
-
var calcTableWidth = function calcTableWidth2(
|
|
6778
|
-
var bodyWidth =
|
|
6799
|
+
var calcTableWidth = function calcTableWidth2(_ref145) {
|
|
6800
|
+
var bodyWidth = _ref145.bodyWidth, columnStore = _ref145.columnStore, fit = _ref145.fit, minCellWidth = _ref145.minCellWidth, remainWidth = _ref145.remainWidth;
|
|
6779
6801
|
var _initTableWidth = initTableWidth({
|
|
6780
6802
|
remainWidth,
|
|
6781
6803
|
columnStore
|
|
@@ -6810,8 +6832,8 @@ var calcTableWidth = function calcTableWidth2(_ref144) {
|
|
|
6810
6832
|
}
|
|
6811
6833
|
return tableWidth;
|
|
6812
6834
|
};
|
|
6813
|
-
var setLeftOrRightPosition = function setLeftOrRightPosition2(
|
|
6814
|
-
var columnList =
|
|
6835
|
+
var setLeftOrRightPosition = function setLeftOrRightPosition2(_ref146) {
|
|
6836
|
+
var columnList = _ref146.columnList, direction = _ref146.direction, headerEl = _ref146.headerEl, bodyEl = _ref146.bodyEl, scrollbarWidth = _ref146.scrollbarWidth;
|
|
6815
6837
|
var colList = columnList.slice();
|
|
6816
6838
|
if (direction === "right") {
|
|
6817
6839
|
colList.reverse();
|
|
@@ -6833,8 +6855,8 @@ var setLeftOrRightPosition = function setLeftOrRightPosition2(_ref145) {
|
|
|
6833
6855
|
return pos;
|
|
6834
6856
|
}, 0);
|
|
6835
6857
|
};
|
|
6836
|
-
var setGroupHeaderPosition = function setGroupHeaderPosition2(
|
|
6837
|
-
var columnChart =
|
|
6858
|
+
var setGroupHeaderPosition = function setGroupHeaderPosition2(_ref147) {
|
|
6859
|
+
var columnChart = _ref147.columnChart, direction = _ref147.direction;
|
|
6838
6860
|
var colChart = columnChart.slice();
|
|
6839
6861
|
var finishColumns = /* @__PURE__ */ new Set();
|
|
6840
6862
|
if (direction === "right") {
|
|
@@ -6862,8 +6884,8 @@ var setGroupHeaderPosition = function setGroupHeaderPosition2(_ref146) {
|
|
|
6862
6884
|
}
|
|
6863
6885
|
});
|
|
6864
6886
|
};
|
|
6865
|
-
var setGroupHeaderLastOrFirst = function setGroupHeaderLastOrFirst2(
|
|
6866
|
-
var columnChart =
|
|
6887
|
+
var setGroupHeaderLastOrFirst = function setGroupHeaderLastOrFirst2(_ref148) {
|
|
6888
|
+
var columnChart = _ref148.columnChart, leftList = _ref148.leftList, rightList = _ref148.rightList;
|
|
6867
6889
|
columnChart.forEach(function(columns2) {
|
|
6868
6890
|
var len = columns2.length;
|
|
6869
6891
|
var leafColumn = columns2[len - 1];
|
|
@@ -6875,8 +6897,8 @@ var setGroupHeaderLastOrFirst = function setGroupHeaderLastOrFirst2(_ref147) {
|
|
|
6875
6897
|
});
|
|
6876
6898
|
});
|
|
6877
6899
|
};
|
|
6878
|
-
var calcFixedStickyPosition = function calcFixedStickyPosition2(
|
|
6879
|
-
var headerEl =
|
|
6900
|
+
var calcFixedStickyPosition = function calcFixedStickyPosition2(_ref149) {
|
|
6901
|
+
var headerEl = _ref149.headerEl, bodyEl = _ref149.bodyEl, columnStore = _ref149.columnStore, scrollbarWidth = _ref149.scrollbarWidth, columnChart = _ref149.columnChart, isGroup2 = _ref149.isGroup;
|
|
6880
6902
|
var leftList = columnStore.leftList, rightList = columnStore.rightList;
|
|
6881
6903
|
setLeftOrRightPosition({
|
|
6882
6904
|
columnList: leftList,
|
|
@@ -6925,7 +6947,7 @@ var handleAllColumnPromises = function handleAllColumnPromises2(opt, ctx) {
|
|
|
6925
6947
|
var columnCount = 0;
|
|
6926
6948
|
var columnData = [];
|
|
6927
6949
|
var _fetchColumns$i = fetchColumns[i], _fetchColumns$i$forma = _fetchColumns$i.format, format = _fetchColumns$i$forma === void 0 ? {} : _fetchColumns$i$forma, property = _fetchColumns$i.property;
|
|
6928
|
-
var
|
|
6950
|
+
var _ref150 = format.async || {}, _ref150$splitConfig = _ref150.splitConfig, splitConfig = _ref150$splitConfig === void 0 ? {} : _ref150$splitConfig, _ref150$fields = _ref150.fields, fields = _ref150$fields === void 0 ? {} : _ref150$fields, complete = _ref150.complete;
|
|
6929
6951
|
columnValues = isArray(item) ? item : get(item, fields.data || "values");
|
|
6930
6952
|
columnCount = columnValues.length;
|
|
6931
6953
|
preprocessDataObjectFormat({
|
|
@@ -6976,8 +6998,8 @@ var handleAllColumnPromises = function handleAllColumnPromises2(opt, ctx) {
|
|
|
6976
6998
|
}
|
|
6977
6999
|
};
|
|
6978
7000
|
};
|
|
6979
|
-
function handleGlobalMousedownOnFilterWrapper(
|
|
6980
|
-
var $el =
|
|
7001
|
+
function handleGlobalMousedownOnFilterWrapper(_ref151) {
|
|
7002
|
+
var $el = _ref151.$el, _vm = _ref151._vm, event = _ref151.event, filterStore = _ref151.filterStore, filterWrapper = _ref151.filterWrapper;
|
|
6981
7003
|
if (filterWrapper) {
|
|
6982
7004
|
if (_vm.getEventTargetNode(event, $el, "tiny-grid-filter-wrapper").flag) ;
|
|
6983
7005
|
else if (_vm.getEventTargetNode(event, filterWrapper.$el).flag) ;
|
|
@@ -6988,14 +7010,14 @@ function handleGlobalMousedownOnFilterWrapper(_ref150) {
|
|
|
6988
7010
|
}
|
|
6989
7011
|
}
|
|
6990
7012
|
}
|
|
6991
|
-
function handleGlobalMousedownOnCtxMenu(
|
|
6992
|
-
var _vm =
|
|
7013
|
+
function handleGlobalMousedownOnCtxMenu(_ref152) {
|
|
7014
|
+
var _vm = _ref152._vm, ctxMenuStore = _ref152.ctxMenuStore, event = _ref152.event;
|
|
6993
7015
|
if (ctxMenuStore.visible && _vm.$refs.ctxWrapper && !_vm.getEventTargetNode(event, _vm.$refs.ctxWrapper.$el).flag) {
|
|
6994
7016
|
_vm.closeMenu();
|
|
6995
7017
|
}
|
|
6996
7018
|
}
|
|
6997
|
-
function handleGlobalBlurOutside(
|
|
6998
|
-
var _vm =
|
|
7019
|
+
function handleGlobalBlurOutside(_ref153) {
|
|
7020
|
+
var _vm = _ref153._vm, actived = _ref153.actived, event = _ref153.event;
|
|
6999
7021
|
var custblur = _vm.blurOutside(actived, event);
|
|
7000
7022
|
if (typeof custblur === "boolean") {
|
|
7001
7023
|
custblur || setTimeout(function() {
|
|
@@ -7005,8 +7027,8 @@ function handleGlobalBlurOutside(_ref152) {
|
|
|
7005
7027
|
}
|
|
7006
7028
|
return false;
|
|
7007
7029
|
}
|
|
7008
|
-
function handleGlobalIsClear(
|
|
7009
|
-
var $el =
|
|
7030
|
+
function handleGlobalIsClear(_ref154) {
|
|
7031
|
+
var $el = _ref154.$el, _vm = _ref154._vm, actived = _ref154.actived, editConfig = _ref154.editConfig, event = _ref154.event, isClear = _ref154.isClear, isReadonlyCol = _ref154.isReadonlyCol;
|
|
7010
7032
|
if (editConfig.mode === "row") {
|
|
7011
7033
|
var rowNode = _vm.getEventTargetNode(event, $el, "tiny-grid-body__row");
|
|
7012
7034
|
var isOtherRow = rowNode.flag ? rowNode.targetElem !== actived.args.cell.parentNode : 0;
|
|
@@ -7020,9 +7042,9 @@ function handleGlobalIsClear(_ref153) {
|
|
|
7020
7042
|
}
|
|
7021
7043
|
return isClear;
|
|
7022
7044
|
}
|
|
7023
|
-
function handleGlobalClearActived(
|
|
7045
|
+
function handleGlobalClearActived(_ref155) {
|
|
7024
7046
|
var _vm$$refs$tableBody;
|
|
7025
|
-
var $el =
|
|
7047
|
+
var $el = _ref155.$el, _vm = _ref155._vm, event = _ref155.event, isClear = _ref155.isClear;
|
|
7026
7048
|
var tableContent = (_vm$$refs$tableBody = _vm.$refs.tableBody) == null ? void 0 : _vm$$refs$tableBody.$refs.table;
|
|
7027
7049
|
if (isClear || !_vm.getEventTargetNode(event, $el).flag || _vm.$refs.tableHeader && _vm.$refs.tableHeader.$el.contains(event.target) || tableContent && !tableContent.contains(event.target)) {
|
|
7028
7050
|
setTimeout(function() {
|
|
@@ -7033,8 +7055,8 @@ function handleGlobalClearActived(_ref154) {
|
|
|
7033
7055
|
function checkOtherKey(keyCode) {
|
|
7034
7056
|
return keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90 || keyCode >= 96 && keyCode <= 111 || keyCode >= 186 && keyCode <= 192 || keyCode >= 219 && keyCode <= 222 || keyCode === 32;
|
|
7035
7057
|
}
|
|
7036
|
-
function rule1(
|
|
7037
|
-
var isKeyEsc =
|
|
7058
|
+
function rule1(_ref156) {
|
|
7059
|
+
var isKeyEsc = _ref156.isKeyEsc, _vm = _ref156._vm, event = _ref156.event, actived = _ref156.actived, mouseConfig = _ref156.mouseConfig;
|
|
7038
7060
|
return {
|
|
7039
7061
|
match: function match() {
|
|
7040
7062
|
return isKeyEsc;
|
|
@@ -7048,8 +7070,8 @@ function rule1(_ref155) {
|
|
|
7048
7070
|
}
|
|
7049
7071
|
};
|
|
7050
7072
|
}
|
|
7051
|
-
function rule2(
|
|
7052
|
-
var isKeySpacebar =
|
|
7073
|
+
function rule2(_ref157) {
|
|
7074
|
+
var isKeySpacebar = _ref157.isKeySpacebar, keyboardConfig = _ref157.keyboardConfig, selected = _ref157.selected, _vm = _ref157._vm, event = _ref157.event;
|
|
7053
7075
|
return {
|
|
7054
7076
|
match: function match() {
|
|
7055
7077
|
return isKeySpacebar && (keyboardConfig.isArrow || keyboardConfig.isTab) && selected.row && selected.column && (selected.column.type === "selection" || selected.column.type === "radio");
|
|
@@ -7079,8 +7101,8 @@ function rule3(args) {
|
|
|
7079
7101
|
}
|
|
7080
7102
|
};
|
|
7081
7103
|
}
|
|
7082
|
-
function rule4(
|
|
7083
|
-
var isOperCtxMenu =
|
|
7104
|
+
function rule4(_ref158) {
|
|
7105
|
+
var isOperCtxMenu = _ref158.isOperCtxMenu, _vm = _ref158._vm, event = _ref158.event;
|
|
7084
7106
|
return {
|
|
7085
7107
|
match: function match() {
|
|
7086
7108
|
return isOperCtxMenu;
|
|
@@ -7092,8 +7114,8 @@ function rule4(_ref157) {
|
|
|
7092
7114
|
}
|
|
7093
7115
|
};
|
|
7094
7116
|
}
|
|
7095
|
-
function rule5(
|
|
7096
|
-
var isKeyF2 =
|
|
7117
|
+
function rule5(_ref159) {
|
|
7118
|
+
var isKeyF2 = _ref159.isKeyF2, _vm = _ref159._vm, event = _ref159.event, selected = _ref159.selected;
|
|
7097
7119
|
return {
|
|
7098
7120
|
match: function match() {
|
|
7099
7121
|
return isKeyF2;
|
|
@@ -7106,8 +7128,8 @@ function rule5(_ref158) {
|
|
|
7106
7128
|
}
|
|
7107
7129
|
};
|
|
7108
7130
|
}
|
|
7109
|
-
function rule6(
|
|
7110
|
-
var isOperArrowKeys =
|
|
7131
|
+
function rule6(_ref160) {
|
|
7132
|
+
var isOperArrowKeys = _ref160.isOperArrowKeys, keyboardConfig = _ref160.keyboardConfig, _vm = _ref160._vm, event = _ref160.event, selected = _ref160.selected;
|
|
7111
7133
|
return {
|
|
7112
7134
|
match: function match() {
|
|
7113
7135
|
return isOperArrowKeys && keyboardConfig.isArrow;
|
|
@@ -7120,8 +7142,8 @@ function rule6(_ref159) {
|
|
|
7120
7142
|
}
|
|
7121
7143
|
};
|
|
7122
7144
|
}
|
|
7123
|
-
function rule7(
|
|
7124
|
-
var isKeyTab =
|
|
7145
|
+
function rule7(_ref161) {
|
|
7146
|
+
var isKeyTab = _ref161.isKeyTab, keyboardConfig = _ref161.keyboardConfig, _vm = _ref161._vm, event = _ref161.event, selected = _ref161.selected, actived = _ref161.actived;
|
|
7125
7147
|
return {
|
|
7126
7148
|
match: function match() {
|
|
7127
7149
|
return isKeyTab && keyboardConfig.isTab;
|
|
@@ -7150,8 +7172,8 @@ function rule8(args) {
|
|
|
7150
7172
|
}
|
|
7151
7173
|
};
|
|
7152
7174
|
}
|
|
7153
|
-
function rule9(
|
|
7154
|
-
var keyboardConfig =
|
|
7175
|
+
function rule9(_ref162) {
|
|
7176
|
+
var keyboardConfig = _ref162.keyboardConfig, isKeyWithCtrl = _ref162.isKeyWithCtrl, isKeyA = _ref162.isKeyA, isKeyX = _ref162.isKeyX, isKeyC = _ref162.isKeyC, isKeyV = _ref162.isKeyV, _vm = _ref162._vm, event = _ref162.event;
|
|
7155
7177
|
return {
|
|
7156
7178
|
match: function match() {
|
|
7157
7179
|
return keyboardConfig.isCut && isKeyWithCtrl && (isKeyA || isKeyX || isKeyC || isKeyV);
|
|
@@ -7163,8 +7185,8 @@ function rule9(_ref161) {
|
|
|
7163
7185
|
}
|
|
7164
7186
|
};
|
|
7165
7187
|
}
|
|
7166
|
-
function rule10(
|
|
7167
|
-
var keyboardConfig =
|
|
7188
|
+
function rule10(_ref163) {
|
|
7189
|
+
var keyboardConfig = _ref163.keyboardConfig, isKeyWithCtrl = _ref163.isKeyWithCtrl, _vm = _ref163._vm, event = _ref163.event, selected = _ref163.selected, actived = _ref163.actived;
|
|
7168
7190
|
return {
|
|
7169
7191
|
match: function match() {
|
|
7170
7192
|
return keyboardConfig.isEdit && !isKeyWithCtrl && !(selected.row === actived.row && selected.column === actived.column);
|
|
@@ -7357,9 +7379,9 @@ function handleGlobalMousewheelEvent(event) {
|
|
|
7357
7379
|
this.clostTooltip();
|
|
7358
7380
|
this.closeMenu();
|
|
7359
7381
|
}
|
|
7360
|
-
function handleEscKeyDown(
|
|
7382
|
+
function handleEscKeyDown(_ref164) {
|
|
7361
7383
|
var _this12 = this;
|
|
7362
|
-
var event =
|
|
7384
|
+
var event = _ref164.event, actived = _ref164.actived, mouseConfig = _ref164.mouseConfig;
|
|
7363
7385
|
this.closeMenu();
|
|
7364
7386
|
this.closeFilter();
|
|
7365
7387
|
if (actived.row) {
|
|
@@ -7371,9 +7393,9 @@ function handleEscKeyDown(_ref163) {
|
|
|
7371
7393
|
}
|
|
7372
7394
|
}
|
|
7373
7395
|
}
|
|
7374
|
-
function handleEnterKeyDown(
|
|
7396
|
+
function handleEnterKeyDown(_ref165) {
|
|
7375
7397
|
var _this13 = this;
|
|
7376
|
-
var event =
|
|
7398
|
+
var event = _ref165.event, selected = _ref165.selected, actived = _ref165.actived;
|
|
7377
7399
|
var highlightCurrentRow = this.highlightCurrentRow, currentRow = this.currentRow, treeConfig = this.treeConfig;
|
|
7378
7400
|
var isLeftArrow = event.keyCode === 37;
|
|
7379
7401
|
var isUpArrow = event.keyCode === 38;
|
|
@@ -7403,8 +7425,8 @@ function handleEnterKeyDown(_ref164) {
|
|
|
7403
7425
|
}
|
|
7404
7426
|
}
|
|
7405
7427
|
}
|
|
7406
|
-
function handleCtxMenu(
|
|
7407
|
-
var event =
|
|
7428
|
+
function handleCtxMenu(_ref166) {
|
|
7429
|
+
var event = _ref166.event;
|
|
7408
7430
|
var ctxMenuStore = this.ctxMenuStore;
|
|
7409
7431
|
event.preventDefault();
|
|
7410
7432
|
if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
|
|
@@ -7429,8 +7451,8 @@ function handleCtxMenu(_ref165) {
|
|
|
7429
7451
|
});
|
|
7430
7452
|
}
|
|
7431
7453
|
}
|
|
7432
|
-
function handleArrowKeyDown(
|
|
7433
|
-
var event =
|
|
7454
|
+
function handleArrowKeyDown(_ref167) {
|
|
7455
|
+
var event = _ref167.event, selected = _ref167.selected;
|
|
7434
7456
|
var highlightCurrentRow = this.highlightCurrentRow, currentRow = this.currentRow;
|
|
7435
7457
|
var isLeftArrow = event.keyCode === 37;
|
|
7436
7458
|
var isUpArrow = event.keyCode === 38;
|
|
@@ -7449,9 +7471,9 @@ function handleArrowKeyDown(_ref166) {
|
|
|
7449
7471
|
this.moveCurrentRow(isUpArrow, isDownArrow, event);
|
|
7450
7472
|
}
|
|
7451
7473
|
}
|
|
7452
|
-
function handleDelKeyDown(
|
|
7474
|
+
function handleDelKeyDown(_ref168) {
|
|
7453
7475
|
var _this14 = this;
|
|
7454
|
-
var event =
|
|
7476
|
+
var event = _ref168.event, selected = _ref168.selected;
|
|
7455
7477
|
var _this$keyboardConfig = this.keyboardConfig, keyboardConfig = _this$keyboardConfig === void 0 ? {} : _this$keyboardConfig, treeConfig = this.treeConfig, highlightCurrentRow = this.highlightCurrentRow, currentRow = this.currentRow;
|
|
7456
7478
|
var isBack = event.keyCode === 8;
|
|
7457
7479
|
if (keyboardConfig.isDel && (selected.row || selected.column)) {
|
|
@@ -7476,8 +7498,8 @@ function handleDelKeyDown(_ref167) {
|
|
|
7476
7498
|
}
|
|
7477
7499
|
}
|
|
7478
7500
|
}
|
|
7479
|
-
function handleSpaceKeyDown(
|
|
7480
|
-
var event =
|
|
7501
|
+
function handleSpaceKeyDown(_ref169) {
|
|
7502
|
+
var event = _ref169.event, selected = _ref169.selected;
|
|
7481
7503
|
event.preventDefault();
|
|
7482
7504
|
if (selected.column.type === "selection") {
|
|
7483
7505
|
this.handleToggleCheckRowEvent(selected.args, event);
|
|
@@ -7485,8 +7507,8 @@ function handleSpaceKeyDown(_ref168) {
|
|
|
7485
7507
|
this.triggerRadioRowEvent(event, selected.args);
|
|
7486
7508
|
}
|
|
7487
7509
|
}
|
|
7488
|
-
function handleTabKeyDown(
|
|
7489
|
-
var event =
|
|
7510
|
+
function handleTabKeyDown(_ref170) {
|
|
7511
|
+
var event = _ref170.event, selected = _ref170.selected, actived = _ref170.actived;
|
|
7490
7512
|
var isShiftKey = event.shiftKey;
|
|
7491
7513
|
var useTab = this.editConfig.useTab;
|
|
7492
7514
|
if (selected.row || selected.column) {
|
|
@@ -7495,8 +7517,8 @@ function handleTabKeyDown(_ref169) {
|
|
|
7495
7517
|
this.moveTabSelected(actived.args, isShiftKey, event, useTab);
|
|
7496
7518
|
}
|
|
7497
7519
|
}
|
|
7498
|
-
function handleCopyKeyDown(
|
|
7499
|
-
var event =
|
|
7520
|
+
function handleCopyKeyDown(_ref171) {
|
|
7521
|
+
var event = _ref171.event;
|
|
7500
7522
|
if (event.keyCode === 65) {
|
|
7501
7523
|
this.handleAllChecked(event);
|
|
7502
7524
|
} else if (event.keyCode === 88 || event.keyCode === 67) {
|
|
@@ -7505,15 +7527,15 @@ function handleCopyKeyDown(_ref170) {
|
|
|
7505
7527
|
this.handlePaste(event);
|
|
7506
7528
|
}
|
|
7507
7529
|
}
|
|
7508
|
-
function handleF2KeyDown(
|
|
7509
|
-
var event =
|
|
7530
|
+
function handleF2KeyDown(_ref172) {
|
|
7531
|
+
var event = _ref172.event, selected = _ref172.selected;
|
|
7510
7532
|
if (selected.row && selected.column) {
|
|
7511
7533
|
event.preventDefault();
|
|
7512
7534
|
this.handleActived(selected.args, event);
|
|
7513
7535
|
}
|
|
7514
7536
|
}
|
|
7515
|
-
function handleOtherKeyDown(
|
|
7516
|
-
var event =
|
|
7537
|
+
function handleOtherKeyDown(_ref173) {
|
|
7538
|
+
var event = _ref173.event, selected = _ref173.selected;
|
|
7517
7539
|
var _this$keyboardConfig2 = this.keyboardConfig, keyboardConfig = _this$keyboardConfig2 === void 0 ? {} : _this$keyboardConfig2;
|
|
7518
7540
|
var keyCode = event.keyCode;
|
|
7519
7541
|
var isOtherKey = checkOtherKey(keyCode);
|
|
@@ -7573,10 +7595,10 @@ var sortMultiple = function sortMultiple2(rows, columns2, _vm) {
|
|
|
7573
7595
|
}
|
|
7574
7596
|
return rows;
|
|
7575
7597
|
};
|
|
7576
|
-
var buildCache = function buildCache2(tableData,
|
|
7577
|
-
var treeConfig =
|
|
7598
|
+
var buildCache = function buildCache2(tableData, _ref174) {
|
|
7599
|
+
var treeConfig = _ref174.treeConfig, treeOrdered = _ref174.treeOrdered;
|
|
7578
7600
|
var backupMap = /* @__PURE__ */ new WeakMap();
|
|
7579
|
-
var
|
|
7601
|
+
var _ref175 = treeConfig || {}, children = _ref175.children, _ref175$temporaryInde = _ref175.temporaryIndex, temporaryIndex = _ref175$temporaryInde === void 0 ? "_$index_" : _ref175$temporaryInde;
|
|
7580
7602
|
var isTreeOrderedFalse = treeConfig && !treeOrdered;
|
|
7581
7603
|
var _traverse = function traverse(arr, rowLevel, parentIndex) {
|
|
7582
7604
|
var backup = [];
|
|
@@ -7900,8 +7922,8 @@ var Methods$d = {
|
|
|
7900
7922
|
}
|
|
7901
7923
|
var visibleColumn = this.visibleColumn;
|
|
7902
7924
|
var rowKey = getTableRowKey(this);
|
|
7903
|
-
visibleColumn.forEach(function(
|
|
7904
|
-
var property =
|
|
7925
|
+
visibleColumn.forEach(function(_ref176) {
|
|
7926
|
+
var property = _ref176.property, editor = _ref176.editor;
|
|
7905
7927
|
var propNotExist = property && !has(row2, property);
|
|
7906
7928
|
var propDefaultValue = editor && !isUndefined(editor.defaultValue) ? editor.defaultValue : null;
|
|
7907
7929
|
if (propNotExist) {
|
|
@@ -8066,7 +8088,7 @@ var Methods$d = {
|
|
|
8066
8088
|
var _this$selectConfig = this.selectConfig, selectConfig = _this$selectConfig === void 0 ? {} : _this$selectConfig, selection = this.selection;
|
|
8067
8089
|
var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
|
|
8068
8090
|
var checkField = selectConfig.checkField;
|
|
8069
|
-
var
|
|
8091
|
+
var _ref177 = {}, _ref177$rowList = _ref177.rowList, rowList = _ref177$rowList === void 0 ? [] : _ref177$rowList;
|
|
8070
8092
|
if (checkField && treeConfig) {
|
|
8071
8093
|
rowList = filterTree(tableFullData, function(row2) {
|
|
8072
8094
|
return get(row2, checkField);
|
|
@@ -8097,8 +8119,8 @@ var Methods$d = {
|
|
|
8097
8119
|
var sortColumn = find(visibleColumn, function(column) {
|
|
8098
8120
|
return column.order;
|
|
8099
8121
|
});
|
|
8100
|
-
var filterColumn = visibleColumn.filter(function(
|
|
8101
|
-
var filter2 =
|
|
8122
|
+
var filterColumn = visibleColumn.filter(function(_ref178) {
|
|
8123
|
+
var filter2 = _ref178.filter;
|
|
8102
8124
|
return !!filter2;
|
|
8103
8125
|
});
|
|
8104
8126
|
var doTableSort = function doTableSort2() {
|
|
@@ -8115,8 +8137,8 @@ var Methods$d = {
|
|
|
8115
8137
|
var doColumnSort = function doColumnSort2() {
|
|
8116
8138
|
var sortedFlag = false;
|
|
8117
8139
|
if (sortOpts2.multipleColumnSort) {
|
|
8118
|
-
var sortColumns = visibleColumn.filter(function(
|
|
8119
|
-
var order =
|
|
8140
|
+
var sortColumns = visibleColumn.filter(function(_ref179) {
|
|
8141
|
+
var order = _ref179.order;
|
|
8120
8142
|
return !!order;
|
|
8121
8143
|
});
|
|
8122
8144
|
if (sortColumns.length > 1) {
|
|
@@ -8195,7 +8217,7 @@ var Methods$d = {
|
|
|
8195
8217
|
});
|
|
8196
8218
|
}
|
|
8197
8219
|
if (hasCustomsOrColWidth && !isGroupOrNonSort) {
|
|
8198
|
-
var
|
|
8220
|
+
var _ref180 = {}, _ref180$collectColumn = _ref180.collectColumn, collectColumn2 = _ref180$collectColumn === void 0 ? [] : _ref180$collectColumn, _ref180$customMap = _ref180.customMap, customMap = _ref180$customMap === void 0 ? {} : _ref180$customMap, _ref180$orderColumn = _ref180.orderColumn, orderColumn = _ref180$orderColumn === void 0 ? [] : _ref180$orderColumn;
|
|
8199
8221
|
mapTree(customColumns, function(customCol) {
|
|
8200
8222
|
var targetCol = find(fullColumn, function(item) {
|
|
8201
8223
|
return customCol.property && item.property === customCol.property;
|
|
@@ -8552,7 +8574,7 @@ var Methods$d = {
|
|
|
8552
8574
|
var columnStore = this.columnStore, currentRow = this.currentRow, height2 = this.height, maxHeight = this.maxHeight, minHeight = this.minHeight, parentHeight2 = this.parentHeight, tableColumn3 = this.tableColumn, scrollbarWidth = this.scrollbarWidth;
|
|
8553
8575
|
var scrollYLoad = this.scrollYLoad, scrollXLoad = this.scrollXLoad, scrollLoad = this.scrollLoad;
|
|
8554
8576
|
var layoutList = ["header", "body", "footer"];
|
|
8555
|
-
var
|
|
8577
|
+
var _ref181 = {}, customHeight = _ref181.customHeight, scaleToPx = _ref181.scaleToPx;
|
|
8556
8578
|
var _this$$refs3 = this.$refs, tableBody = _this$$refs3.tableBody, tableHeader = _this$$refs3.tableHeader;
|
|
8557
8579
|
var getElem = function getElem2(ref) {
|
|
8558
8580
|
return ref ? ref.$el : null;
|
|
@@ -8608,8 +8630,8 @@ var Methods$d = {
|
|
|
8608
8630
|
}
|
|
8609
8631
|
end && end();
|
|
8610
8632
|
},
|
|
8611
|
-
blurOutside: function blurOutside(
|
|
8612
|
-
var row2 =
|
|
8633
|
+
blurOutside: function blurOutside(_ref182, event) {
|
|
8634
|
+
var row2 = _ref182.row, args = _ref182.args, column = _ref182.column;
|
|
8613
8635
|
var editConfig = this.editConfig, getEventTargetNode2 = this.getEventTargetNode, $el = this.$el;
|
|
8614
8636
|
if (column && row2) {
|
|
8615
8637
|
var editor = column.editor;
|
|
@@ -8658,7 +8680,7 @@ var Methods$d = {
|
|
|
8658
8680
|
// 处理单选框默认勾选
|
|
8659
8681
|
handleRadioDefChecked: function handleRadioDefChecked() {
|
|
8660
8682
|
var fullDataRowIdData = this.fullDataRowIdData;
|
|
8661
|
-
var
|
|
8683
|
+
var _ref183 = this.radioConfig || {}, checkRowKey = _ref183.checkRowKey;
|
|
8662
8684
|
var rowid2 = checkRowKey && encodeURIComponent(checkRowKey);
|
|
8663
8685
|
var rowCache = fullDataRowIdData[rowid2];
|
|
8664
8686
|
if (rowid2 && rowCache) {
|
|
@@ -8668,7 +8690,7 @@ var Methods$d = {
|
|
|
8668
8690
|
// 单选,行选中事件
|
|
8669
8691
|
triggerRadioRowEvent: function triggerRadioRowEvent(event, params) {
|
|
8670
8692
|
var selectRow = this.selectRow;
|
|
8671
|
-
var
|
|
8693
|
+
var _ref184 = this.radioConfig || {}, checkMethod = _ref184.checkMethod;
|
|
8672
8694
|
if (checkMethod && !checkMethod(params)) {
|
|
8673
8695
|
return;
|
|
8674
8696
|
}
|
|
@@ -8920,8 +8942,8 @@ var Methods$d = {
|
|
|
8920
8942
|
this.groupExpandeds.push(row2);
|
|
8921
8943
|
},
|
|
8922
8944
|
// 展开行事件
|
|
8923
|
-
triggerRowExpandEvent: function triggerRowExpandEvent(event,
|
|
8924
|
-
var row2 =
|
|
8945
|
+
triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref185) {
|
|
8946
|
+
var row2 = _ref185.row;
|
|
8925
8947
|
var rest = this.toggleRowExpansion(row2);
|
|
8926
8948
|
var eventParams = {
|
|
8927
8949
|
$table: this,
|
|
@@ -8938,7 +8960,7 @@ var Methods$d = {
|
|
|
8938
8960
|
// 处理默认展开行
|
|
8939
8961
|
handleDefaultRowExpand: function handleDefaultRowExpand() {
|
|
8940
8962
|
var fullDataRowIdData = this.fullDataRowIdData, tableFullData = this.tableFullData;
|
|
8941
|
-
var
|
|
8963
|
+
var _ref186 = this.expandConfig || {}, expandAll = _ref186.expandAll, expandRowKeys = _ref186.expandRowKeys;
|
|
8942
8964
|
if (expandAll) {
|
|
8943
8965
|
this.expandeds = tableFullData.slice(0);
|
|
8944
8966
|
return;
|
|
@@ -8959,7 +8981,7 @@ var Methods$d = {
|
|
|
8959
8981
|
// 设置展开行,二个参数设置这一行展开与否;支持单行;支持多行
|
|
8960
8982
|
setRowExpansion: function setRowExpansion(rows, expanded) {
|
|
8961
8983
|
var expandeds = this.expandeds;
|
|
8962
|
-
var
|
|
8984
|
+
var _ref187 = this.expandConfig || {}, accordion = _ref187.accordion;
|
|
8963
8985
|
var isToggle = arguments.length === 1;
|
|
8964
8986
|
var isAccordionCloseAll = false;
|
|
8965
8987
|
if (!rows) {
|
|
@@ -9035,7 +9057,7 @@ var Methods$d = {
|
|
|
9035
9057
|
var scrollXStore = this.scrollXStore, visibleColumn = this.visibleColumn;
|
|
9036
9058
|
var offsetSize = scrollXStore.offsetSize, renderSize = scrollXStore.renderSize, startIndex = scrollXStore.startIndex, visibleIndex = scrollXStore.visibleIndex, visibleSize = scrollXStore.visibleSize;
|
|
9037
9059
|
var scrollLeft = this.$refs.tableBody.$el.scrollLeft;
|
|
9038
|
-
var
|
|
9060
|
+
var _ref188 = {}, _ref188$preload = _ref188.preload, preload = _ref188$preload === void 0 ? false : _ref188$preload, _ref188$toVisibleInde = _ref188.toVisibleIndex, toVisibleIndex = _ref188$toVisibleInde === void 0 ? 0 : _ref188$toVisibleInde, _ref188$width = _ref188.width, width = _ref188$width === void 0 ? 0 : _ref188$width;
|
|
9039
9061
|
for (var i = 0; i < visibleColumn.length; i++) {
|
|
9040
9062
|
width += visibleColumn[i].renderWidth;
|
|
9041
9063
|
if (scrollLeft < width) {
|
|
@@ -9194,7 +9216,7 @@ var Methods$d = {
|
|
|
9194
9216
|
updateScrollXSpace: function updateScrollXSpace() {
|
|
9195
9217
|
var elemStore = this.elemStore, scrollXLoad = this.scrollXLoad, scrollXStore = this.scrollXStore, scrollbarWidth = this.scrollbarWidth, tableWidth = this.tableWidth, visibleColumn = this.visibleColumn;
|
|
9196
9218
|
var startIndex = scrollXStore.startIndex;
|
|
9197
|
-
var
|
|
9219
|
+
var _ref189 = {}, bodyElem = _ref189.bodyElem, footerElem = _ref189.footerElem, headerElem = _ref189.headerElem, leftSpaceWidth = _ref189.leftSpaceWidth, marginLeft = _ref189.marginLeft;
|
|
9198
9220
|
headerElem = elemStore["main-header-table"];
|
|
9199
9221
|
bodyElem = elemStore["main-body-table"];
|
|
9200
9222
|
footerElem = elemStore["main-footer-table"];
|
|
@@ -9244,7 +9266,7 @@ var Methods$d = {
|
|
|
9244
9266
|
var bodyHeight = totalRows * rowHeight;
|
|
9245
9267
|
var scrollHeight = $grid.pagerConfig ? $grid.pagerConfig.total * rowHeight : 0;
|
|
9246
9268
|
var isVScrollOrLoad = scrollYLoad || scrollLoad;
|
|
9247
|
-
var
|
|
9269
|
+
var _ref190 = {}, marginTop = _ref190.marginTop, ySpaceHeight = _ref190.ySpaceHeight;
|
|
9248
9270
|
marginTop = isVScrollOrLoad && scrollYLoad ? Math.max(startIndex * rowHeight, 0) + "px" : "";
|
|
9249
9271
|
ySpaceHeight = isVScrollOrLoad ? bodyHeight + "px" : "";
|
|
9250
9272
|
scrollLoadStore.bodyHeight = bodyHeight;
|
|
@@ -9427,8 +9449,8 @@ var Methods$d = {
|
|
|
9427
9449
|
return _this50.validCellRules(type, row2, column, cellValue).then(function() {
|
|
9428
9450
|
customValue && validStore.visible && setCellValue(row2, column, cellValue);
|
|
9429
9451
|
_this50.clearValidate();
|
|
9430
|
-
}).catch(function(
|
|
9431
|
-
var rule =
|
|
9452
|
+
}).catch(function(_ref191) {
|
|
9453
|
+
var rule = _ref191.rule;
|
|
9432
9454
|
customValue && setCellValue(row2, column, cellValue);
|
|
9433
9455
|
_this50.showValidTooltip({
|
|
9434
9456
|
rule,
|
|
@@ -9475,8 +9497,8 @@ var Methods$d = {
|
|
|
9475
9497
|
return fetchColumns;
|
|
9476
9498
|
}
|
|
9477
9499
|
tableColumn3.forEach(function(col) {
|
|
9478
|
-
var
|
|
9479
|
-
var
|
|
9500
|
+
var _ref192 = col.format || {}, async = _ref192.async;
|
|
9501
|
+
var _ref193 = async || {}, fetch = _ref193.fetch, _ref193$splitConfig = _ref193.splitConfig, splitConfig = _ref193$splitConfig === void 0 ? {} : _ref193$splitConfig;
|
|
9480
9502
|
if (typeof fetch === "function") {
|
|
9481
9503
|
var columnValues = [];
|
|
9482
9504
|
tableData.forEach(function(row2) {
|
|
@@ -9536,8 +9558,8 @@ var Methods$d = {
|
|
|
9536
9558
|
}, this));
|
|
9537
9559
|
},
|
|
9538
9560
|
// Publish methods 与工具栏对接
|
|
9539
|
-
connect: function connect(
|
|
9540
|
-
var toolbar =
|
|
9561
|
+
connect: function connect(_ref194) {
|
|
9562
|
+
var toolbar = _ref194.toolbar;
|
|
9541
9563
|
this.$toolbar = toolbar;
|
|
9542
9564
|
},
|
|
9543
9565
|
// 检查触发源是否属于目标节点
|
|
@@ -9579,9 +9601,9 @@ var Methods$d = {
|
|
|
9579
9601
|
return _this54.data;
|
|
9580
9602
|
}, function() {
|
|
9581
9603
|
return _this54.data && _this54.data.length;
|
|
9582
|
-
}], function(
|
|
9583
|
-
var newData =
|
|
9584
|
-
var oldData =
|
|
9604
|
+
}], function(_ref195, _ref196) {
|
|
9605
|
+
var newData = _ref195[0], newLength = _ref195[1];
|
|
9606
|
+
var oldData = _ref196[0], oldLength = _ref196[1];
|
|
9585
9607
|
if (Array.isArray(_this54.data) && newData === oldData && newLength !== oldLength) {
|
|
9586
9608
|
_this54.handleDataChange();
|
|
9587
9609
|
}
|
|
@@ -9620,7 +9642,7 @@ var Methods$d = {
|
|
|
9620
9642
|
// 尝试恢复滚动位置,规范了最大滚动位置的取值
|
|
9621
9643
|
attemptRestoreScoll: function attemptRestoreScoll(options) {
|
|
9622
9644
|
var _this55 = this;
|
|
9623
|
-
var
|
|
9645
|
+
var _ref197 = options || this, lastScrollTop = _ref197.lastScrollTop, lastScrollLeft = _ref197.lastScrollLeft;
|
|
9624
9646
|
var scrollXLoad = this.scrollXLoad, scrollYLoad = this.scrollYLoad, elemStore = this.elemStore;
|
|
9625
9647
|
var tableBodyElem = elemStore["main-body-wrapper"];
|
|
9626
9648
|
if ((lastScrollTop || lastScrollLeft) && tableBodyElem) {
|
|
@@ -9658,7 +9680,7 @@ var fnFields = function fnFields2(fields) {
|
|
|
9658
9680
|
var fnFieldConfig = function fnFieldConfig2(field) {
|
|
9659
9681
|
return Array.isArray(field) && field.length > 1 ? field[1] : {};
|
|
9660
9682
|
};
|
|
9661
|
-
var _sfc_main$
|
|
9683
|
+
var _sfc_main$9 = defineComponent({
|
|
9662
9684
|
props: _extends({}, $props, {
|
|
9663
9685
|
datas: Object,
|
|
9664
9686
|
row: Object
|
|
@@ -9680,7 +9702,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
9680
9702
|
}, selectionColumn.renderCell(h, params));
|
|
9681
9703
|
}
|
|
9682
9704
|
});
|
|
9683
|
-
var _sfc_main$
|
|
9705
|
+
var _sfc_main$8 = defineComponent({
|
|
9684
9706
|
inject: ["$mftable"],
|
|
9685
9707
|
props: _extends({}, $props, {
|
|
9686
9708
|
datas: Object,
|
|
@@ -9837,7 +9859,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
9837
9859
|
}
|
|
9838
9860
|
}
|
|
9839
9861
|
});
|
|
9840
|
-
var _sfc_main$
|
|
9862
|
+
var _sfc_main$7 = defineComponent({
|
|
9841
9863
|
props: _extends({}, $props, {
|
|
9842
9864
|
datas: Object,
|
|
9843
9865
|
row: Object
|
|
@@ -9860,8 +9882,8 @@ var _sfc_main$6 = defineComponent({
|
|
|
9860
9882
|
return typeof hidden === "boolean" && hidden || typeof hidden === "function" && hidden(row2);
|
|
9861
9883
|
};
|
|
9862
9884
|
var handleItemClick = function handleItemClick2(name) {
|
|
9863
|
-
var buttonConfig = visibleButtons.find(function(
|
|
9864
|
-
var buttonName =
|
|
9885
|
+
var buttonConfig = visibleButtons.find(function(_ref198) {
|
|
9886
|
+
var buttonName = _ref198.name;
|
|
9865
9887
|
return buttonName === name;
|
|
9866
9888
|
});
|
|
9867
9889
|
buttonConfig.click(window.event || {}, _extends({
|
|
@@ -9938,15 +9960,15 @@ var _sfc_main$6 = defineComponent({
|
|
|
9938
9960
|
}, [vnode]);
|
|
9939
9961
|
}
|
|
9940
9962
|
});
|
|
9941
|
-
var _sfc_main$
|
|
9963
|
+
var _sfc_main$6 = defineComponent({
|
|
9942
9964
|
props: _extends({}, $props, {
|
|
9943
9965
|
datas: Object,
|
|
9944
9966
|
row: Object
|
|
9945
9967
|
}),
|
|
9946
9968
|
components: {
|
|
9947
|
-
ColumnType: _sfc_main$
|
|
9948
|
-
ColumnContent: _sfc_main$
|
|
9949
|
-
ColumnLink: _sfc_main$
|
|
9969
|
+
ColumnType: _sfc_main$9,
|
|
9970
|
+
ColumnContent: _sfc_main$8,
|
|
9971
|
+
ColumnLink: _sfc_main$7
|
|
9950
9972
|
},
|
|
9951
9973
|
computed: {
|
|
9952
9974
|
showLink: function showLink() {
|
|
@@ -9984,8 +10006,8 @@ function _sfc_render$2(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
|
9984
10006
|
/* CLASS */
|
|
9985
10007
|
);
|
|
9986
10008
|
}
|
|
9987
|
-
var ColumnLayout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
9988
|
-
var _sfc_main$
|
|
10009
|
+
var ColumnLayout = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$2]]);
|
|
10010
|
+
var _sfc_main$5 = defineComponent({
|
|
9989
10011
|
components: {
|
|
9990
10012
|
ColumnLayout
|
|
9991
10013
|
},
|
|
@@ -10041,8 +10063,8 @@ function _sfc_render$1(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
|
10041
10063
|
row: _ctx.row
|
|
10042
10064
|
}, null, 8, ["datas", "row"])], 10, _hoisted_1);
|
|
10043
10065
|
}
|
|
10044
|
-
var TableRow = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10045
|
-
var _sfc_main$
|
|
10066
|
+
var TableRow = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$1]]);
|
|
10067
|
+
var _sfc_main$4 = defineComponent({
|
|
10046
10068
|
inject: ["$mftable"],
|
|
10047
10069
|
props: _extends({}, $props),
|
|
10048
10070
|
render: function render12() {
|
|
@@ -10058,7 +10080,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
10058
10080
|
return typeof $mftable.slotList === "function" ? $mftable.slotList(params) : null;
|
|
10059
10081
|
}
|
|
10060
10082
|
});
|
|
10061
|
-
var _sfc_main$
|
|
10083
|
+
var _sfc_main$3 = defineComponent({
|
|
10062
10084
|
inject: ["$mftable"],
|
|
10063
10085
|
props: _extends({}, $props),
|
|
10064
10086
|
render: function render13() {
|
|
@@ -10074,7 +10096,7 @@ var _sfc_main$2 = defineComponent({
|
|
|
10074
10096
|
return typeof $mftable.slotGantt === "function" ? $mftable.slotGantt(params) : null;
|
|
10075
10097
|
}
|
|
10076
10098
|
});
|
|
10077
|
-
var _sfc_main$
|
|
10099
|
+
var _sfc_main$2 = defineComponent({
|
|
10078
10100
|
inject: ["$mftable"],
|
|
10079
10101
|
props: _extends({}, $props),
|
|
10080
10102
|
render: function render14() {
|
|
@@ -10090,14 +10112,39 @@ var _sfc_main$1 = defineComponent({
|
|
|
10090
10112
|
return typeof $mftable.slotCustom === "function" ? $mftable.slotCustom(params) : null;
|
|
10091
10113
|
}
|
|
10092
10114
|
});
|
|
10115
|
+
var _sfc_main$1 = defineComponent({
|
|
10116
|
+
inject: ["$mftable"],
|
|
10117
|
+
props: _extends({}, $props),
|
|
10118
|
+
render: function render15() {
|
|
10119
|
+
var $mftable = this.$mftable;
|
|
10120
|
+
var slotEmpty = $mftable.slotEmpty;
|
|
10121
|
+
var renderEmpty = $mftable.renderEmpty;
|
|
10122
|
+
var $table = $mftable.config.tableVm;
|
|
10123
|
+
var content = null;
|
|
10124
|
+
if (typeof slotEmpty === "function") {
|
|
10125
|
+
content = slotEmpty({
|
|
10126
|
+
$table
|
|
10127
|
+
});
|
|
10128
|
+
} else if (typeof renderEmpty === "function") {
|
|
10129
|
+
content = renderEmpty(h, $table);
|
|
10130
|
+
}
|
|
10131
|
+
return h("div", {
|
|
10132
|
+
attrs: {
|
|
10133
|
+
"data-tag": "tiny-grid-empty-wrapper"
|
|
10134
|
+
},
|
|
10135
|
+
class: "flex t-0 justify-center items-center w-full h-full bg-transparent sm:bg-color-bg-1 text-center"
|
|
10136
|
+
}, [content]);
|
|
10137
|
+
}
|
|
10138
|
+
});
|
|
10093
10139
|
var _sfc_main = defineComponent({
|
|
10094
10140
|
components: {
|
|
10095
10141
|
TableRow,
|
|
10096
10142
|
Tooltip: Tooltip$1,
|
|
10097
10143
|
Exception,
|
|
10098
|
-
ListView: _sfc_main$
|
|
10099
|
-
GanttView: _sfc_main$
|
|
10100
|
-
CustomView: _sfc_main$
|
|
10144
|
+
ListView: _sfc_main$4,
|
|
10145
|
+
GanttView: _sfc_main$3,
|
|
10146
|
+
CustomView: _sfc_main$2,
|
|
10147
|
+
CustomEmpty: _sfc_main$1
|
|
10101
10148
|
},
|
|
10102
10149
|
provide: function provide() {
|
|
10103
10150
|
return {
|
|
@@ -10206,12 +10253,9 @@ var _sfc_main = defineComponent({
|
|
|
10206
10253
|
return "" + displayStyle + heightStyle + maxHeightStyle;
|
|
10207
10254
|
},
|
|
10208
10255
|
exceptionVisible: function exceptionVisible() {
|
|
10209
|
-
var
|
|
10210
|
-
var config2 = this.config, tableData = this.tableData;
|
|
10211
|
-
var _config$tableVm$$grid6 = config2 == null ? void 0 : (_config$tableVm9 = config2.tableVm) == null ? void 0 : _config$tableVm9.$grid, viewType2 = _config$tableVm$$grid6.viewType;
|
|
10212
|
-
var _GlobalConfig$1$viewC2 = GlobalConfig$1.viewConfig, CARD = _GlobalConfig$1$viewC2.CARD, LIST = _GlobalConfig$1$viewC2.LIST, MF = _GlobalConfig$1$viewC2.MF;
|
|
10256
|
+
var tableData = this.tableData;
|
|
10213
10257
|
var isException = tableData.length === 0;
|
|
10214
|
-
return isException
|
|
10258
|
+
return isException;
|
|
10215
10259
|
}
|
|
10216
10260
|
},
|
|
10217
10261
|
watch: {
|
|
@@ -10252,10 +10296,10 @@ var _sfc_main = defineComponent({
|
|
|
10252
10296
|
},
|
|
10253
10297
|
methods: {
|
|
10254
10298
|
mapColumns: function mapColumns() {
|
|
10255
|
-
var _config$tableVm10, _config$tableVm11, _config$tableVm11$$gr, _config$tableVm11$$gr2, _config$tableVm12, _config$tableVm12$$gr, _config$tableVm12$$gr2, _config$tableVm13, _config$tableVm13$$gr, _config$tableVm13$$gr2, _config$tableVm14, _config$tableVm14$$gr, _config$tableVm14$$gr2;
|
|
10299
|
+
var _config$tableVm9, _config$tableVm10, _config$tableVm10$$gr, _config$tableVm10$$gr2, _config$tableVm11, _config$tableVm11$$gr, _config$tableVm11$$gr2, _config$tableVm12, _config$tableVm12$$gr, _config$tableVm12$$gr2, _config$tableVm13, _config$tableVm13$$gr, _config$tableVm13$$gr2, _config$tableVm14, _config$tableVm14$$gr, _config$tableVm14$$gr2, _config$tableVm15, _config$tableVm15$$gr;
|
|
10256
10300
|
var config2 = this.config, typeColumns2 = this.typeColumns, firstFewPropertyColumn2 = this.firstFewPropertyColumn;
|
|
10257
10301
|
var _this$cardConfig = this.cardConfig, cardConfig = _this$cardConfig === void 0 ? {} : _this$cardConfig, _this$listConfig = this.listConfig, listConfig = _this$listConfig === void 0 ? {} : _this$listConfig, _this$ganttConfig = this.ganttConfig, ganttConfig = _this$ganttConfig === void 0 ? {} : _this$ganttConfig, _this$customConfig = this.customConfig, customConfig = _this$customConfig === void 0 ? {} : _this$customConfig;
|
|
10258
|
-
var tableColumn3 = config2 == null ? void 0 : (_config$
|
|
10302
|
+
var tableColumn3 = config2 == null ? void 0 : (_config$tableVm9 = config2.tableVm) == null ? void 0 : _config$tableVm9.tableColumn;
|
|
10259
10303
|
var primaryField = cardConfig.primaryField, contentFields = cardConfig.contentFields, selectable = cardConfig.selectable, renderLink = cardConfig.renderLink, operable = cardConfig.operable, _cardConfig$few = cardConfig.few, few = _cardConfig$few === void 0 ? 4 : _cardConfig$few;
|
|
10260
10304
|
var renderList2 = listConfig.renderList;
|
|
10261
10305
|
var renderGantt = ganttConfig.renderGantt;
|
|
@@ -10271,6 +10315,7 @@ var _sfc_main = defineComponent({
|
|
|
10271
10315
|
var slotList;
|
|
10272
10316
|
var slotGantt;
|
|
10273
10317
|
var slotCustom;
|
|
10318
|
+
var slotEmpty;
|
|
10274
10319
|
if (primaryField) {
|
|
10275
10320
|
fieldName = fnField(primaryField);
|
|
10276
10321
|
primaryColumn = typeColumns2(tableColumn3, [fieldName]).find(function(column) {
|
|
@@ -10295,10 +10340,12 @@ var _sfc_main = defineComponent({
|
|
|
10295
10340
|
return column.type === "selection";
|
|
10296
10341
|
});
|
|
10297
10342
|
}
|
|
10298
|
-
slotLink = (config2 == null ? void 0 : (_config$
|
|
10299
|
-
slotList = (config2 == null ? void 0 : (_config$
|
|
10300
|
-
slotGantt = (config2 == null ? void 0 : (_config$
|
|
10301
|
-
slotCustom = (config2 == null ? void 0 : (_config$
|
|
10343
|
+
slotLink = (config2 == null ? void 0 : (_config$tableVm10 = config2.tableVm) == null ? void 0 : (_config$tableVm10$$gr = _config$tableVm10.$grid) == null ? void 0 : (_config$tableVm10$$gr2 = _config$tableVm10$$gr.slots) == null ? void 0 : _config$tableVm10$$gr2.link) || renderLink;
|
|
10344
|
+
slotList = (config2 == null ? void 0 : (_config$tableVm11 = config2.tableVm) == null ? void 0 : (_config$tableVm11$$gr = _config$tableVm11.$grid) == null ? void 0 : (_config$tableVm11$$gr2 = _config$tableVm11$$gr.slots) == null ? void 0 : _config$tableVm11$$gr2.list) || renderList2;
|
|
10345
|
+
slotGantt = (config2 == null ? void 0 : (_config$tableVm12 = config2.tableVm) == null ? void 0 : (_config$tableVm12$$gr = _config$tableVm12.$grid) == null ? void 0 : (_config$tableVm12$$gr2 = _config$tableVm12$$gr.slots) == null ? void 0 : _config$tableVm12$$gr2.gantt) || renderGantt;
|
|
10346
|
+
slotCustom = (config2 == null ? void 0 : (_config$tableVm13 = config2.tableVm) == null ? void 0 : (_config$tableVm13$$gr = _config$tableVm13.$grid) == null ? void 0 : (_config$tableVm13$$gr2 = _config$tableVm13$$gr.slots) == null ? void 0 : _config$tableVm13$$gr2.custom) || renderCustom;
|
|
10347
|
+
slotEmpty = config2 == null ? void 0 : (_config$tableVm14 = config2.tableVm) == null ? void 0 : (_config$tableVm14$$gr = _config$tableVm14.$grid) == null ? void 0 : (_config$tableVm14$$gr2 = _config$tableVm14$$gr.slots) == null ? void 0 : _config$tableVm14$$gr2.empty;
|
|
10348
|
+
var renderEmpty = config2 == null ? void 0 : (_config$tableVm15 = config2.tableVm) == null ? void 0 : (_config$tableVm15$$gr = _config$tableVm15.$grid) == null ? void 0 : _config$tableVm15$$gr.renderEmpty;
|
|
10302
10349
|
Object.assign(this, {
|
|
10303
10350
|
primaryColumn,
|
|
10304
10351
|
contentColumns,
|
|
@@ -10309,7 +10356,9 @@ var _sfc_main = defineComponent({
|
|
|
10309
10356
|
slotLink,
|
|
10310
10357
|
slotList,
|
|
10311
10358
|
slotGantt,
|
|
10312
|
-
slotCustom
|
|
10359
|
+
slotCustom,
|
|
10360
|
+
slotEmpty,
|
|
10361
|
+
renderEmpty
|
|
10313
10362
|
});
|
|
10314
10363
|
},
|
|
10315
10364
|
typeColumns: function typeColumns(columns2, types, field) {
|
|
@@ -10362,12 +10411,12 @@ var _sfc_main = defineComponent({
|
|
|
10362
10411
|
},
|
|
10363
10412
|
handleCardClick: function handleCardClick(row2, e) {
|
|
10364
10413
|
var config2 = this.config, emitEvent2 = this.emitEvent;
|
|
10365
|
-
var _config$
|
|
10414
|
+
var _config$tableVm16 = config2 == null ? void 0 : config2.tableVm, highlightCurrentRow = _config$tableVm16.highlightCurrentRow;
|
|
10366
10415
|
if (highlightCurrentRow) {
|
|
10367
|
-
var _config$
|
|
10416
|
+
var _config$tableVm17;
|
|
10368
10417
|
this.currentRow = row2;
|
|
10369
10418
|
this.setCurrentRowId();
|
|
10370
|
-
config2 == null ? void 0 : (_config$
|
|
10419
|
+
config2 == null ? void 0 : (_config$tableVm17 = config2.tableVm) == null ? void 0 : _config$tableVm17.triggerCurrentRowEvent(e, {
|
|
10371
10420
|
$table: config2 == null ? void 0 : config2.tableVm,
|
|
10372
10421
|
row: row2
|
|
10373
10422
|
});
|
|
@@ -10408,11 +10457,11 @@ var _sfc_main = defineComponent({
|
|
|
10408
10457
|
return res;
|
|
10409
10458
|
},
|
|
10410
10459
|
getWrapperHeight: function getWrapperHeight() {
|
|
10411
|
-
var _config$
|
|
10460
|
+
var _config$tableVm18, _config$tableVm19;
|
|
10412
10461
|
var config2 = this.config;
|
|
10413
|
-
var $grid = config2 == null ? void 0 : (_config$
|
|
10462
|
+
var $grid = config2 == null ? void 0 : (_config$tableVm18 = config2.tableVm) == null ? void 0 : _config$tableVm18.$grid;
|
|
10414
10463
|
var height2 = ($grid == null ? void 0 : $grid.height) === "auto" ? "100%" : $grid == null ? void 0 : $grid.height;
|
|
10415
|
-
var parentHeight2 = config2 == null ? void 0 : (_config$
|
|
10464
|
+
var parentHeight2 = config2 == null ? void 0 : (_config$tableVm19 = config2.tableVm) == null ? void 0 : _config$tableVm19.parentHeight;
|
|
10416
10465
|
this.wrapperHeight = isScale(height2) ? Math.floor(parseInt(height2) / 100 * parentHeight2) : toNumber(height2);
|
|
10417
10466
|
},
|
|
10418
10467
|
showTooltip: function showTooltip(e) {
|
|
@@ -10449,6 +10498,7 @@ var _sfc_main = defineComponent({
|
|
|
10449
10498
|
}
|
|
10450
10499
|
});
|
|
10451
10500
|
function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
10501
|
+
var _component_custom_empty = resolveComponent("custom-empty");
|
|
10452
10502
|
var _component_exception = resolveComponent("exception");
|
|
10453
10503
|
var _component_list_view = resolveComponent("list-view");
|
|
10454
10504
|
var _component_gantt_view = resolveComponent("gantt-view");
|
|
@@ -10466,16 +10516,19 @@ function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
|
10466
10516
|
return _ctx.scrollEvent && _ctx.scrollEvent.apply(_ctx, arguments);
|
|
10467
10517
|
})
|
|
10468
10518
|
},
|
|
10469
|
-
[_ctx.exceptionVisible ? (openBlock(), createBlock(
|
|
10470
|
-
key: 0
|
|
10519
|
+
[_ctx.exceptionVisible && (_ctx.slotEmpty || _ctx.renderEmpty) ? (openBlock(), createBlock(_component_custom_empty, {
|
|
10520
|
+
key: 0
|
|
10521
|
+
})) : _ctx.exceptionVisible ? (openBlock(), createBlock(_component_exception, {
|
|
10522
|
+
key: 1,
|
|
10471
10523
|
tiny_mode: "mobile-first",
|
|
10472
10524
|
tiny_mode_root: "",
|
|
10473
10525
|
class: "min-h-[theme(spacing.72)]",
|
|
10474
10526
|
"component-page": "",
|
|
10475
10527
|
type: "nodata"
|
|
10476
|
-
})) :
|
|
10528
|
+
})) : (openBlock(), createElementBlock(
|
|
10477
10529
|
"div",
|
|
10478
10530
|
{
|
|
10531
|
+
key: 2,
|
|
10479
10532
|
"data-tag": "tiny-table",
|
|
10480
10533
|
class: normalizeClass([_ctx.tableClass, _ctx.cardClass]),
|
|
10481
10534
|
ref: "table"
|
|
@@ -10504,7 +10557,7 @@ function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
|
10504
10557
|
))],
|
|
10505
10558
|
2
|
|
10506
10559
|
/* CLASS */
|
|
10507
|
-
), createVNode(_component_tooltip, {
|
|
10560
|
+
)), createVNode(_component_tooltip, {
|
|
10508
10561
|
ref: "tooltip",
|
|
10509
10562
|
modelValue: _ctx.tooltipVisible,
|
|
10510
10563
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
|
|
@@ -10577,8 +10630,8 @@ var initDrag = function initDrag2(dndProxyElement, dndElements, config2) {
|
|
|
10577
10630
|
}
|
|
10578
10631
|
}
|
|
10579
10632
|
});
|
|
10580
|
-
elNodes.forEach(function(
|
|
10581
|
-
|
|
10633
|
+
elNodes.forEach(function(_ref199) {
|
|
10634
|
+
_ref199.dndId; var dndPid = _ref199.dndPid, el = _ref199.el;
|
|
10582
10635
|
if (dndPid) {
|
|
10583
10636
|
var parent = elNodes.find(function(elNode) {
|
|
10584
10637
|
return elNode.dndId === dndPid;
|
|
@@ -10865,10 +10918,10 @@ var createTableColumnWatch = function createTableColumnWatch2($table, state, isC
|
|
|
10865
10918
|
});
|
|
10866
10919
|
});
|
|
10867
10920
|
};
|
|
10868
|
-
var createUseDrag = function createUseDrag2(
|
|
10869
|
-
var reactive =
|
|
10870
|
-
return function(
|
|
10871
|
-
var dropConfig =
|
|
10921
|
+
var createUseDrag = function createUseDrag2(_ref200) {
|
|
10922
|
+
var reactive = _ref200.reactive, watch = _ref200.watch, getCurrentInstance = _ref200.getCurrentInstance, onBeforeUnmount = _ref200.onBeforeUnmount;
|
|
10923
|
+
return function(_ref201) {
|
|
10924
|
+
var dropConfig = _ref201.dropConfig, collectColumn2 = _ref201.collectColumn, tableColumn3 = _ref201.tableColumn;
|
|
10872
10925
|
var state = reactive({
|
|
10873
10926
|
dropConfig,
|
|
10874
10927
|
collectColumn: collectColumn2,
|
|
@@ -10904,10 +10957,10 @@ var createUseDrag = function createUseDrag2(_ref199) {
|
|
|
10904
10957
|
};
|
|
10905
10958
|
};
|
|
10906
10959
|
var useDrag = createUseDrag(hooks);
|
|
10907
|
-
var createUseRowGroup = function createUseRowGroup2(
|
|
10908
|
-
var reactive =
|
|
10909
|
-
return function(
|
|
10910
|
-
var rowGroup =
|
|
10960
|
+
var createUseRowGroup = function createUseRowGroup2(_ref202) {
|
|
10961
|
+
var reactive = _ref202.reactive, watch = _ref202.watch, getCurrentInstance = _ref202.getCurrentInstance, onBeforeUnmount = _ref202.onBeforeUnmount;
|
|
10962
|
+
return function(_ref203) {
|
|
10963
|
+
var rowGroup = _ref203.rowGroup, visibleColumn = _ref203.visibleColumn, tableFullColumn = _ref203.tableFullColumn, tableColumn3 = _ref203.tableColumn;
|
|
10911
10964
|
var state = reactive({
|
|
10912
10965
|
rowGroup,
|
|
10913
10966
|
visibleColumn,
|
|
@@ -10955,7 +11008,7 @@ var createUseRowGroup = function createUseRowGroup2(_ref201) {
|
|
|
10955
11008
|
var useRowGroup = createUseRowGroup(hooks);
|
|
10956
11009
|
var themes$1 = GlobalConfig$1.themes, viewConfig$1 = GlobalConfig$1.viewConfig, columnLevelKey$1 = GlobalConfig$1.columnLevelKey, defaultColumnName$1 = GlobalConfig$1.defaultColumnName;
|
|
10957
11010
|
var T_TINY = themes$1.TINY, T_SAAS$1 = themes$1.SAAS;
|
|
10958
|
-
var V_DEFAULT$1 = viewConfig$1.DEFAULT, V_MF$1 = viewConfig$1.MF
|
|
11011
|
+
var V_DEFAULT$1 = viewConfig$1.DEFAULT, V_MF$1 = viewConfig$1.MF; viewConfig$1.CARD; viewConfig$1.LIST;
|
|
10959
11012
|
var V_MF_LIST = viewConfig$1.MF_SHOW_LIST;
|
|
10960
11013
|
var hiddenContainerClass = "tiny-grid-hidden-column";
|
|
10961
11014
|
function verifyConfig(_vm) {
|
|
@@ -11009,15 +11062,14 @@ function mergeTreeConfig(_vm) {
|
|
|
11009
11062
|
}
|
|
11010
11063
|
}
|
|
11011
11064
|
var renderEmptyPartFn = function renderEmptyPartFn2(opt) {
|
|
11012
|
-
var _vm = opt._vm
|
|
11013
|
-
var _vm$$grid = _vm.$grid, $grid = _vm$$grid === void 0 ? {} : _vm$$grid, renderEmpty = _vm.renderEmpty;
|
|
11014
|
-
var slots = $grid.slots;
|
|
11065
|
+
var _vm = opt._vm;
|
|
11015
11066
|
return function() {
|
|
11016
11067
|
var emptyPartVnode = null;
|
|
11017
|
-
|
|
11018
|
-
|
|
11068
|
+
if (_vm.viewType === V_DEFAULT$1 && _vm.isCenterEmpty && !opt.tableData.length) {
|
|
11069
|
+
var _vm$$grid = _vm.$grid, $grid = _vm$$grid === void 0 ? {} : _vm$$grid, renderEmpty = _vm.renderEmpty;
|
|
11070
|
+
var slots = $grid.slots;
|
|
11071
|
+
var computerTableBodyHeight2 = _vm.computerTableBodyHeight;
|
|
11019
11072
|
var emptyVnodes;
|
|
11020
|
-
var noEmptyClass = _vm.viewType === V_CARD$1 || _vm.viewType === V_LIST;
|
|
11021
11073
|
if (slots.empty) {
|
|
11022
11074
|
emptyVnodes = slots.empty.call(_vm, h);
|
|
11023
11075
|
} else if (renderEmpty) {
|
|
@@ -11031,7 +11083,7 @@ var renderEmptyPartFn = function renderEmptyPartFn2(opt) {
|
|
|
11031
11083
|
}
|
|
11032
11084
|
emptyPartVnode = h("div", {
|
|
11033
11085
|
class: [{
|
|
11034
|
-
"empty-center-block":
|
|
11086
|
+
"empty-center-block": true
|
|
11035
11087
|
}, _vm.viewCls("emptyData")],
|
|
11036
11088
|
style: {
|
|
11037
11089
|
height: computerTableBodyHeight2
|
|
@@ -12059,7 +12111,7 @@ var Table = defineComponent({
|
|
|
12059
12111
|
tableColumn: tableColumn3
|
|
12060
12112
|
};
|
|
12061
12113
|
},
|
|
12062
|
-
render: function
|
|
12114
|
+
render: function render16() {
|
|
12063
12115
|
this.border; var collectColumn2 = this.collectColumn, columnStore = this.columnStore; this.editConfig; this.highlightCell; this.highlightHoverColumn; var instanceSlots = this.instanceSlots;
|
|
12064
12116
|
this.highlightHoverRow; var isGroup2 = this.isGroup, loading = this.loading, loadingComponent = this.loadingComponent; this.mouseConfig; var optimizeOpts2 = this.optimizeOpts;
|
|
12065
12117
|
var overflowX = this.overflowX; this.overflowY; var showFooter = this.showFooter, showHeader = this.showHeader; this.showHeaderOverflow; this.showOverflow; this.dropConfig; this.isThemeSaas;
|
|
@@ -12302,8 +12354,8 @@ var Column = defineComponent({
|
|
|
12302
12354
|
default: null
|
|
12303
12355
|
}
|
|
12304
12356
|
},
|
|
12305
|
-
setup: function setup7(props,
|
|
12306
|
-
var slots =
|
|
12357
|
+
setup: function setup7(props, _ref204) {
|
|
12358
|
+
var slots = _ref204.slots;
|
|
12307
12359
|
var reactive = hooks.reactive, inject = hooks.inject, getCurrentInstance = hooks.getCurrentInstance, onUpdated = hooks.onUpdated, watch = hooks.watch, nextTick = hooks.nextTick;
|
|
12308
12360
|
var currentInstance = getCurrentInstance();
|
|
12309
12361
|
var instance = currentInstance.proxy;
|
|
@@ -12343,7 +12395,7 @@ var Column = defineComponent({
|
|
|
12343
12395
|
});
|
|
12344
12396
|
return state;
|
|
12345
12397
|
},
|
|
12346
|
-
render: function
|
|
12398
|
+
render: function render17() {
|
|
12347
12399
|
var $table = this.$table, firstRow = this.firstRow, columnConfig = this.columnConfig, instanceSlots = this.instanceSlots;
|
|
12348
12400
|
var slotVnode;
|
|
12349
12401
|
try {
|
|
@@ -12357,7 +12409,7 @@ var Column = defineComponent({
|
|
|
12357
12409
|
warn("ui.grid.error.chainCallError");
|
|
12358
12410
|
}
|
|
12359
12411
|
var hasSubColumn = findTree(slotVnode, function(node) {
|
|
12360
|
-
var
|
|
12412
|
+
var _ref205 = node || {}, componentOptions = _ref205.componentOptions, type = _ref205.type;
|
|
12361
12413
|
var componentName = type && type.name || componentOptions && componentOptions.Ctor.extendOptions.name;
|
|
12362
12414
|
return $table.isValidCustomColumn(componentName);
|
|
12363
12415
|
}, null, null);
|
|
@@ -12596,8 +12648,8 @@ var Grid = defineComponent({
|
|
|
12596
12648
|
var tinyTheme = hooks.ref(resolveTheme(props, context));
|
|
12597
12649
|
var tinyMode = hooks.ref(resolveMode(props, context));
|
|
12598
12650
|
var breakpoint = useBreakpoint();
|
|
12599
|
-
var renderless = function renderless2(props2, hooks2,
|
|
12600
|
-
var
|
|
12651
|
+
var renderless = function renderless2(props2, hooks2, _ref206) {
|
|
12652
|
+
var _ref206$designConfig = _ref206.designConfig, designConfig = _ref206$designConfig === void 0 ? null : _ref206$designConfig;
|
|
12601
12653
|
return {
|
|
12602
12654
|
tableListeners,
|
|
12603
12655
|
designConfig,
|
|
@@ -12618,7 +12670,7 @@ var Grid = defineComponent({
|
|
|
12618
12670
|
api: ["designConfig", "tableListeners", "tinyTheme", "tinyMode", "currentBreakpoint"]
|
|
12619
12671
|
});
|
|
12620
12672
|
},
|
|
12621
|
-
render: function
|
|
12673
|
+
render: function render18() {
|
|
12622
12674
|
var _this61 = this;
|
|
12623
12675
|
var editConfig = this.editConfig, fetchOption = this.fetchOption, listeners = this.listeners, loading = this.loading, optimization = this.optimization, pager = this.pager, pagerConfig = this.pagerConfig, remoteFilter = this.remoteFilter, remoteSort = this.remoteSort, selectToolbar = this.selectToolbar;
|
|
12624
12676
|
var seqIndex2 = this.seqIndex, $slots = this.slots, tableCustoms2 = this.tableCustoms, tableData = this.tableData, tableListeners = this.tableListeners, tableLoading = this.tableLoading, tableProps2 = this.tableProps, toolbar = this.toolbar, vSize4 = this.vSize, designConfig = this.designConfig, viewType2 = this.viewType;
|
|
@@ -12709,8 +12761,8 @@ var Grid = defineComponent({
|
|
|
12709
12761
|
this.tasks.updateParentHeight();
|
|
12710
12762
|
},
|
|
12711
12763
|
// 向缓存添加实例
|
|
12712
|
-
connect: function connect2(
|
|
12713
|
-
var name =
|
|
12764
|
+
connect: function connect2(_ref207) {
|
|
12765
|
+
var name = _ref207.name, vm = _ref207.vm;
|
|
12714
12766
|
if (name && typeof name === "string" && vm) {
|
|
12715
12767
|
this.vmStore[name] = vm;
|
|
12716
12768
|
}
|
|
@@ -12807,8 +12859,8 @@ var Grid = defineComponent({
|
|
|
12807
12859
|
Grid.install = function(Vue) {
|
|
12808
12860
|
Vue.component(Grid.name, Grid);
|
|
12809
12861
|
};
|
|
12810
|
-
function operArrs(
|
|
12811
|
-
var _vm =
|
|
12862
|
+
function operArrs(_ref208) {
|
|
12863
|
+
var _vm = _ref208._vm, editStore = _ref208.editStore, newRecords = _ref208.newRecords, newRecordsCopy = _ref208.newRecordsCopy, nowData = _ref208.nowData, row2 = _ref208.row, tableFullData = _ref208.tableFullData, tableSourceData = _ref208.tableSourceData;
|
|
12812
12864
|
if (row2 === -1) {
|
|
12813
12865
|
Array.prototype.push.apply(nowData, newRecords);
|
|
12814
12866
|
Array.prototype.push.apply(tableFullData, newRecords);
|
|
@@ -13200,7 +13252,7 @@ var Methods$c = {
|
|
|
13200
13252
|
var _editor$attrs;
|
|
13201
13253
|
this.updateFooter();
|
|
13202
13254
|
var row22 = args.row, column2 = args.column;
|
|
13203
|
-
var
|
|
13255
|
+
var _ref209 = column2 || {}, editor = _ref209.editor;
|
|
13204
13256
|
if ((editor == null ? void 0 : editor.component) === "input" && (editor == null ? void 0 : (_editor$attrs = editor.attrs) == null ? void 0 : _editor$attrs.type) === "number") {
|
|
13205
13257
|
row22[column2.property] = +row22[column2.property];
|
|
13206
13258
|
}
|
|
@@ -13321,7 +13373,7 @@ var Methods$c = {
|
|
|
13321
13373
|
var _this73 = this;
|
|
13322
13374
|
var editConfig = this.editConfig, editStore = this.editStore, elemStore = this.elemStore, _this$mouseConfig4 = this.mouseConfig, mouseConfig = _this$mouseConfig4 === void 0 ? {} : _this$mouseConfig4;
|
|
13323
13375
|
var actived = editStore.actived, selected = editStore.selected;
|
|
13324
|
-
var
|
|
13376
|
+
var _ref210 = params || {}, cell = _ref210.cell, column = _ref210.column, row2 = _ref210.row;
|
|
13325
13377
|
var selectMethod = function selectMethod2() {
|
|
13326
13378
|
if (selected.row === row2 && selected.column === column || actived.row === row2 && (editConfig.mode !== "cell" || actived.column === column)) {
|
|
13327
13379
|
return _this73.$nextTick();
|
|
@@ -13501,7 +13553,7 @@ function handleCellMousedownEvent(args1) {
|
|
|
13501
13553
|
var $el = args1.$el, _vm = args1._vm, bodyList = args1.bodyList, cell = args1.cell, cellFirstElementChild = args1.cellFirstElementChild;
|
|
13502
13554
|
var cellLastElementChild = args1.cellLastElementChild, headStart = args1.headStart, headerList = args1.headerList, isIndex = args1.isIndex, startCellNode = args1.startCellNode;
|
|
13503
13555
|
var _vm$mouseConfig2 = _vm.mouseConfig, mouseConfig = _vm$mouseConfig2 === void 0 ? {} : _vm$mouseConfig2;
|
|
13504
|
-
var
|
|
13556
|
+
var _ref211 = mouseConfig || {}, _ref211$updateInterva = _ref211.updateInterval, updateInterval = _ref211$updateInterva === void 0 ? 10 : _ref211$updateInterva;
|
|
13505
13557
|
var oldMousemove = document.onmousemove;
|
|
13506
13558
|
var oldMouseup = document.onmouseup;
|
|
13507
13559
|
var updateEvent = function updateEvent2(event) {
|
|
@@ -13540,8 +13592,8 @@ function onCellMousedownSelectEditable(args) {
|
|
|
13540
13592
|
_vm.handleSelected(params, event);
|
|
13541
13593
|
}
|
|
13542
13594
|
}
|
|
13543
|
-
function onCellMousedownSelect(
|
|
13544
|
-
var _vm =
|
|
13595
|
+
function onCellMousedownSelect(_ref212) {
|
|
13596
|
+
var _vm = _ref212._vm, editConfig = _ref212.editConfig, event = _ref212.event, mouseConfig = _ref212.mouseConfig, params = _ref212.params;
|
|
13545
13597
|
if (!editConfig && mouseConfig.selected) {
|
|
13546
13598
|
_vm.handleSelected(params, event);
|
|
13547
13599
|
}
|
|
@@ -13560,8 +13612,8 @@ function onCellMousedownIndexColumn(args) {
|
|
|
13560
13612
|
_vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cell)));
|
|
13561
13613
|
}
|
|
13562
13614
|
}
|
|
13563
|
-
function onCellMousedownNotIndexColumn(
|
|
13564
|
-
var _vm =
|
|
13615
|
+
function onCellMousedownNotIndexColumn(_ref213) {
|
|
13616
|
+
var _vm = _ref213._vm, cell = _ref213.cell, column = _ref213.column, event = _ref213.event, headerList = _ref213.headerList, isIndex = _ref213.isIndex, params = _ref213.params;
|
|
13565
13617
|
if (!isIndex) {
|
|
13566
13618
|
var firstCell = cell.parentNode.firstElementChild;
|
|
13567
13619
|
_vm.handleSelected(params, event);
|
|
@@ -13569,8 +13621,8 @@ function onCellMousedownNotIndexColumn(_ref212) {
|
|
|
13569
13621
|
_vm.handleIndexChecked([[firstCell]]);
|
|
13570
13622
|
}
|
|
13571
13623
|
}
|
|
13572
|
-
function handleHeaderCellMousedownEvent(
|
|
13573
|
-
var $el =
|
|
13624
|
+
function handleHeaderCellMousedownEvent(_ref214) {
|
|
13625
|
+
var $el = _ref214.$el, _vm = _ref214._vm, bodyList = _ref214.bodyList, cell = _ref214.cell, headerList = _ref214.headerList, startCell = _ref214.startCell;
|
|
13574
13626
|
var oldMousemove = document.onmousemove;
|
|
13575
13627
|
var oldMouseup = document.onmouseup;
|
|
13576
13628
|
var updateEvent = function updateEvent2(event) {
|
|
@@ -13603,8 +13655,8 @@ var removeCellClass = function removeCellClass2(bodyRef, clazz) {
|
|
|
13603
13655
|
return removeClass(elem, clazz);
|
|
13604
13656
|
});
|
|
13605
13657
|
};
|
|
13606
|
-
var getCellIndex = function getCellIndex2(
|
|
13607
|
-
var cell =
|
|
13658
|
+
var getCellIndex = function getCellIndex2(_ref215) {
|
|
13659
|
+
var cell = _ref215.cell, bodyList = _ref215.bodyList;
|
|
13608
13660
|
var trElem = cell.parentNode;
|
|
13609
13661
|
var cIndex = arrayIndexOf(trElem.children, cell);
|
|
13610
13662
|
var rIndex = arrayIndexOf(bodyList, trElem);
|
|
@@ -13613,8 +13665,8 @@ var getCellIndex = function getCellIndex2(_ref214) {
|
|
|
13613
13665
|
cIndex
|
|
13614
13666
|
};
|
|
13615
13667
|
};
|
|
13616
|
-
var getModify = function getModify2(
|
|
13617
|
-
var offsetTop =
|
|
13668
|
+
var getModify = function getModify2(_ref216) {
|
|
13669
|
+
var offsetTop = _ref216.offsetTop, offsetLeft = _ref216.offsetLeft, cWidth = _ref216.cWidth, cHeight = _ref216.cHeight;
|
|
13618
13670
|
var modifyDomStyle = function modifyDomStyle2(dom, styleOptions) {
|
|
13619
13671
|
return dom && Object.assign(dom.style, styleOptions);
|
|
13620
13672
|
};
|
|
@@ -13641,8 +13693,8 @@ var getModify = function getModify2(_ref215) {
|
|
|
13641
13693
|
});
|
|
13642
13694
|
};
|
|
13643
13695
|
};
|
|
13644
|
-
var writeClipboardText = function writeClipboardText2(
|
|
13645
|
-
var $table =
|
|
13696
|
+
var writeClipboardText = function writeClipboardText2(_ref217) {
|
|
13697
|
+
var $table = _ref217.$table, columns2 = _ref217.columns, rows = _ref217.rows;
|
|
13646
13698
|
var _$table$keyboardConfi2 = $table.keyboardConfig, keyboardConfig = _$table$keyboardConfi2 === void 0 ? {} : _$table$keyboardConfi2, isAsyncColumn = $table.isAsyncColumn;
|
|
13647
13699
|
var _keyboardConfig$clipb = keyboardConfig.clipboard, clipboard = _keyboardConfig$clipb === void 0 ? {} : _keyboardConfig$clipb;
|
|
13648
13700
|
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;
|
|
@@ -13706,7 +13758,7 @@ var Methods$b = {
|
|
|
13706
13758
|
var params = _extends({}, args);
|
|
13707
13759
|
var columnIndex = visibleColumn.indexOf(params.column);
|
|
13708
13760
|
var rowIndex = tableData.indexOf(params.row);
|
|
13709
|
-
var
|
|
13761
|
+
var _ref218 = {}, targetColumn = _ref218.targetColumn, targetColumnIndex = _ref218.targetColumnIndex, targetRow = _ref218.targetRow, targetRowIndex = _ref218.targetRowIndex;
|
|
13710
13762
|
event.preventDefault();
|
|
13711
13763
|
var checkColumn = function checkColumn2(column) {
|
|
13712
13764
|
return !hasIndexColumn2(column) && (edit ? column.editor : true);
|
|
@@ -13800,9 +13852,9 @@ var Methods$b = {
|
|
|
13800
13852
|
}
|
|
13801
13853
|
},
|
|
13802
13854
|
// 可编辑方向键移动处理
|
|
13803
|
-
moveSelected: function moveSelected(
|
|
13855
|
+
moveSelected: function moveSelected(_ref219) {
|
|
13804
13856
|
var _this75 = this;
|
|
13805
|
-
var args =
|
|
13857
|
+
var args = _ref219.args, isLeftArrow = _ref219.isLeftArrow, isUpArrow = _ref219.isUpArrow, isRightArrow = _ref219.isRightArrow, isDownArrow = _ref219.isDownArrow, event = _ref219.event;
|
|
13806
13858
|
var hasIndexColumn2 = this.hasIndexColumn, visibleColumn = this.tableColumn, tableData = this.tableFullData;
|
|
13807
13859
|
var params = _extends({}, args);
|
|
13808
13860
|
var column = params.column;
|
|
@@ -14020,7 +14072,7 @@ var Methods$b = {
|
|
|
14020
14072
|
_getMouseCheckeds: function _getMouseCheckeds() {
|
|
14021
14073
|
var _this77 = this;
|
|
14022
14074
|
var _this$editStore$check = this.editStore.checked.rowNodes, rowNodes = _this$editStore$check === void 0 ? [] : _this$editStore$check;
|
|
14023
|
-
var
|
|
14075
|
+
var _ref220 = {}, _ref220$rows = _ref220.rows, rows = _ref220$rows === void 0 ? [] : _ref220$rows, _ref220$columns = _ref220.columns, columns2 = _ref220$columns === void 0 ? [] : _ref220$columns;
|
|
14024
14076
|
var res = {
|
|
14025
14077
|
rows,
|
|
14026
14078
|
columns: columns2,
|
|
@@ -14049,7 +14101,7 @@ var Methods$b = {
|
|
|
14049
14101
|
if (!mouseConfig || !mouseConfig.checked) {
|
|
14050
14102
|
return;
|
|
14051
14103
|
}
|
|
14052
|
-
var
|
|
14104
|
+
var _ref221 = {}, cHeight = _ref221.cHeight, cWidth = _ref221.cWidth, offsetLeft = _ref221.offsetLeft, offsetTop = _ref221.offsetTop;
|
|
14053
14105
|
cWidth = cHeight = -2;
|
|
14054
14106
|
offsetTop = offsetLeft = 0;
|
|
14055
14107
|
this.clearChecked();
|
|
@@ -14175,7 +14227,7 @@ var Methods$b = {
|
|
|
14175
14227
|
var editStore = this.editStore, tableColumn3 = this.tableColumn, tableData = this.tableData;
|
|
14176
14228
|
var copyed = editStore.copyed;
|
|
14177
14229
|
var rowNodes = editStore.checked.rowNodes;
|
|
14178
|
-
var
|
|
14230
|
+
var _ref222 = {}, cHeight = _ref222.cHeight, cWidth = _ref222.cWidth, offsetLeft = _ref222.offsetLeft, offsetTop = _ref222.offsetTop, _ref222$rows = _ref222.rows, rows = _ref222$rows === void 0 ? [] : _ref222$rows, _ref222$columns = _ref222.columns, columns2 = _ref222$columns === void 0 ? [] : _ref222$columns;
|
|
14179
14231
|
cWidth = cHeight = -3;
|
|
14180
14232
|
offsetTop = offsetLeft = 0;
|
|
14181
14233
|
this.clearCopyed();
|
|
@@ -14296,13 +14348,13 @@ function adjustParams(rows, cb, vaildDatas) {
|
|
|
14296
14348
|
vaildDatas
|
|
14297
14349
|
};
|
|
14298
14350
|
}
|
|
14299
|
-
var columnHandler = function columnHandler2(
|
|
14300
|
-
var _vm =
|
|
14351
|
+
var columnHandler = function columnHandler2(_ref223) {
|
|
14352
|
+
var _vm = _ref223._vm, colValidPromiseArr = _ref223.colValidPromiseArr, editRules = _ref223.editRules, isAll = _ref223.isAll, row2 = _ref223.row, validRest = _ref223.validRest;
|
|
14301
14353
|
return function(column, columnIndex) {
|
|
14302
14354
|
if (has(editRules, column.property)) {
|
|
14303
14355
|
colValidPromiseArr.push(new Promise(function(resolve, reject) {
|
|
14304
|
-
_vm.validCellRules("all", row2, column).then(resolve).catch(function(
|
|
14305
|
-
var rule =
|
|
14356
|
+
_vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref224) {
|
|
14357
|
+
var rule = _ref224.rule, rules = _ref224.rules;
|
|
14306
14358
|
var rowIndex = _vm.getRowIndex(row2);
|
|
14307
14359
|
var rest = {
|
|
14308
14360
|
rule,
|
|
@@ -14326,8 +14378,8 @@ var columnHandler = function columnHandler2(_ref222) {
|
|
|
14326
14378
|
}
|
|
14327
14379
|
};
|
|
14328
14380
|
};
|
|
14329
|
-
function validTree(
|
|
14330
|
-
var treeConfig =
|
|
14381
|
+
function validTree(_ref225) {
|
|
14382
|
+
var treeConfig = _ref225.treeConfig, handleVaild = _ref225.handleVaild, hasTreeExpand2 = _ref225.hasTreeExpand, vaildDatas = _ref225.vaildDatas, treeOpts = _ref225.treeOpts;
|
|
14331
14383
|
if (treeConfig.validHidden === false) {
|
|
14332
14384
|
var _recurValid = function recurValid(row2) {
|
|
14333
14385
|
var children = row2[treeConfig.children || "children"];
|
|
@@ -14341,8 +14393,8 @@ function validTree(_ref224) {
|
|
|
14341
14393
|
eachTree(vaildDatas, handleVaild, treeOpts);
|
|
14342
14394
|
}
|
|
14343
14395
|
}
|
|
14344
|
-
var realValid = function realValid2(
|
|
14345
|
-
var _vm =
|
|
14396
|
+
var realValid = function realValid2(_ref226) {
|
|
14397
|
+
var _vm = _ref226._vm, editRules = _ref226.editRules, isAll = _ref226.isAll, validRest = _ref226.validRest, treeConfig = _ref226.treeConfig, hasTreeExpand2 = _ref226.hasTreeExpand, vaildDatas = _ref226.vaildDatas, treeOpts = _ref226.treeOpts;
|
|
14346
14398
|
var rowValids = [];
|
|
14347
14399
|
var columns2 = _vm.getColumns();
|
|
14348
14400
|
var handleVaild = function handleVaild2(row2) {
|
|
@@ -14394,8 +14446,8 @@ var Rule = /* @__PURE__ */ function() {
|
|
|
14394
14446
|
var onRejected = function onRejected2(opt, _this) {
|
|
14395
14447
|
var isAll = opt.isAll, validRest = opt.validRest, cb = opt.cb, afterFullData = opt.afterFullData, treeConfig = opt.treeConfig;
|
|
14396
14448
|
return function(params) {
|
|
14397
|
-
var
|
|
14398
|
-
var args = isAll ? validRest : (
|
|
14449
|
+
var _ref227;
|
|
14450
|
+
var args = isAll ? validRest : (_ref227 = {}, _ref227[params.column.property] = params, _ref227);
|
|
14399
14451
|
var funcFinish = function funcFinish2(args2, reject, resolve) {
|
|
14400
14452
|
return function() {
|
|
14401
14453
|
opt.status = false;
|
|
@@ -14465,10 +14517,10 @@ var Methods$a = {
|
|
|
14465
14517
|
},
|
|
14466
14518
|
validatePromise: function validatePromise(row2, column, columnIndex, isAll, validRest) {
|
|
14467
14519
|
var _this80 = this;
|
|
14468
|
-
function onrejected(
|
|
14469
|
-
var _vm =
|
|
14470
|
-
return function(
|
|
14471
|
-
var rule =
|
|
14520
|
+
function onrejected(_ref229) {
|
|
14521
|
+
var _vm = _ref229._vm, reject = _ref229.reject, resolve = _ref229.resolve;
|
|
14522
|
+
return function(_ref230) {
|
|
14523
|
+
var rule = _ref230.rule, rules = _ref230.rules;
|
|
14472
14524
|
var rest = {
|
|
14473
14525
|
$table: _vm,
|
|
14474
14526
|
column,
|
|
@@ -14504,7 +14556,7 @@ var Methods$a = {
|
|
|
14504
14556
|
*/
|
|
14505
14557
|
beginValidate: function beginValidate(rows, callback, isAll) {
|
|
14506
14558
|
var afterFullData = this.afterFullData, editRules = this.editRules, hasTreeExpand2 = this.hasTreeExpand, treeConfig = this.treeConfig, treeOpts = this.treeOpts;
|
|
14507
|
-
var
|
|
14559
|
+
var _ref231 = {}, _ref231$status = _ref231.status, status = _ref231$status === void 0 ? true : _ref231$status, _ref231$validRest = _ref231.validRest, validRest = _ref231$validRest === void 0 ? {} : _ref231$validRest;
|
|
14508
14560
|
var _adjustParams = adjustParams(rows, callback, afterFullData), vaildDatas = _adjustParams.vaildDatas, cb = _adjustParams.cb;
|
|
14509
14561
|
var opt = {
|
|
14510
14562
|
isAll,
|
|
@@ -14543,8 +14595,8 @@ var Methods$a = {
|
|
|
14543
14595
|
};
|
|
14544
14596
|
return Promise.all(rowValids).then(onFulfilled).catch(onRejected(opt, this));
|
|
14545
14597
|
},
|
|
14546
|
-
hasCellRules: function hasCellRules(type, row2,
|
|
14547
|
-
var property =
|
|
14598
|
+
hasCellRules: function hasCellRules(type, row2, _ref232) {
|
|
14599
|
+
var property = _ref232.property;
|
|
14548
14600
|
if (!property || !this.editRules) {
|
|
14549
14601
|
return false;
|
|
14550
14602
|
}
|
|
@@ -14577,7 +14629,7 @@ var Methods$a = {
|
|
|
14577
14629
|
var _this81 = this;
|
|
14578
14630
|
var editRules = this.editRules, rowId = this.rowId;
|
|
14579
14631
|
var property = column.property;
|
|
14580
|
-
var
|
|
14632
|
+
var _ref233 = {}, _ref233$descriptor = _ref233.descriptor, descriptor = _ref233$descriptor === void 0 ? {} : _ref233$descriptor, _ref233$model = _ref233.model, model = _ref233$model === void 0 ? {} : _ref233$model;
|
|
14581
14633
|
if (property && editRules) {
|
|
14582
14634
|
var rules = get(editRules, property);
|
|
14583
14635
|
var cellValue = isUndefined(defaultValue) ? get(row2, property) : defaultValue;
|
|
@@ -14602,8 +14654,8 @@ var Methods$a = {
|
|
|
14602
14654
|
column
|
|
14603
14655
|
}
|
|
14604
14656
|
};
|
|
14605
|
-
var onRejected3 = function onRejected32(
|
|
14606
|
-
var fields =
|
|
14657
|
+
var onRejected3 = function onRejected32(_ref234) {
|
|
14658
|
+
var fields = _ref234.fields;
|
|
14607
14659
|
var cellErrors = Object.keys(fields).map(function(prop) {
|
|
14608
14660
|
var rules2 = _descriptor[prop];
|
|
14609
14661
|
_descriptor[prop] = !rules2.message ? Object.assign(rules2, {
|
|
@@ -14655,8 +14707,8 @@ var Methods$a = {
|
|
|
14655
14707
|
var onfulfilled = function onfulfilled2() {
|
|
14656
14708
|
editConfig.mode === "row" && validStore.visible && validStore.row === row2 && validStore.column === column && _this82.clearValidate();
|
|
14657
14709
|
};
|
|
14658
|
-
var onrejected = function onrejected2(
|
|
14659
|
-
var rule =
|
|
14710
|
+
var onrejected = function onrejected2(_ref235) {
|
|
14711
|
+
var rule = _ref235.rule;
|
|
14660
14712
|
if (rule.trigger && type !== rule.trigger) {
|
|
14661
14713
|
return Promise.resolve();
|
|
14662
14714
|
}
|
|
@@ -14753,7 +14805,7 @@ var Methods$8 = {
|
|
|
14753
14805
|
initFetchOption: function initFetchOption() {
|
|
14754
14806
|
var _this$fetchData = this.fetchData, fetchData = _this$fetchData === void 0 ? {} : _this$fetchData, _this$dataset = this.dataset, dataset = _this$dataset === void 0 ? {} : _this$dataset;
|
|
14755
14807
|
if (fetchData.api || dataset.source || dataset.value || dataset.api) {
|
|
14756
|
-
var
|
|
14808
|
+
var _ref236 = fetchData || dataset.source || dataset.api || {}, loading = _ref236.loading, fields = _ref236.fields, api = _ref236.api, reloadConfig = _ref236.reloadConfig;
|
|
14757
14809
|
var isReloadFilter = false;
|
|
14758
14810
|
var isReloadScroll = false;
|
|
14759
14811
|
if (reloadConfig) {
|
|
@@ -14786,7 +14838,7 @@ var Methods$8 = {
|
|
|
14786
14838
|
error("ui.grid.error.notQuery");
|
|
14787
14839
|
return this.$nextTick();
|
|
14788
14840
|
}
|
|
14789
|
-
var
|
|
14841
|
+
var _ref237 = fetchData || dataset.source || dataset.api || {}, args = _ref237.args, loading = _ref237.loading;
|
|
14790
14842
|
var field = sortData.field, order = sortData.order, prop = sortData.prop, property = sortData.property;
|
|
14791
14843
|
var sortByData = {
|
|
14792
14844
|
field,
|
|
@@ -14894,8 +14946,8 @@ var Methods$7 = {
|
|
|
14894
14946
|
}
|
|
14895
14947
|
},
|
|
14896
14948
|
// 表格内置分页渲染器
|
|
14897
|
-
renderPager: function renderPager(
|
|
14898
|
-
var $slots =
|
|
14949
|
+
renderPager: function renderPager(_ref238) {
|
|
14950
|
+
var $slots = _ref238.$slots, _vm = _ref238._vm, loading = _ref238.loading, pager = _ref238.pager, pagerConfig = _ref238.pagerConfig, tableLoading = _ref238.tableLoading, vSize4 = _ref238.vSize;
|
|
14899
14951
|
var res = null;
|
|
14900
14952
|
var isThemeSaas3 = _vm.isThemeSaas, isModeMobileFirst2 = _vm.isModeMobileFirst, isViewGantt2 = _vm.isViewGantt, currentBreakpoint = _vm.currentBreakpoint, fetchData = _vm.fetchData, isViewCustom2 = _vm.isViewCustom;
|
|
14901
14953
|
var style = {
|
|
@@ -15002,8 +15054,8 @@ var Pager = {
|
|
|
15002
15054
|
Object.assign(host.methods, Methods$7);
|
|
15003
15055
|
}
|
|
15004
15056
|
};
|
|
15005
|
-
function setBodyRecords(
|
|
15006
|
-
var body =
|
|
15057
|
+
function setBodyRecords(_ref239) {
|
|
15058
|
+
var body = _ref239.body, insertRecords = _ref239.insertRecords, pendingRecords = _ref239.pendingRecords;
|
|
15007
15059
|
if (insertRecords.length) {
|
|
15008
15060
|
body.pendingRecords = pendingRecords.filter(function(row2) {
|
|
15009
15061
|
return !insertRecords.includes(row2);
|
|
@@ -15018,8 +15070,8 @@ function setBodyRecords(_ref238) {
|
|
|
15018
15070
|
function canInvokeSaveDataApi(body, removeRecords, updateRecords) {
|
|
15019
15071
|
return body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length;
|
|
15020
15072
|
}
|
|
15021
|
-
function doRemoveOrShowMsg(
|
|
15022
|
-
var _vm =
|
|
15073
|
+
function doRemoveOrShowMsg(_ref240) {
|
|
15074
|
+
var _vm = _ref240._vm, canInvoke = _ref240.canInvoke, code = _ref240.code, isMsg2 = _ref240.isMsg, pendingRecords = _ref240.pendingRecords, resolve = _ref240.resolve, valid = _ref240.valid;
|
|
15023
15075
|
if (valid && !canInvoke) {
|
|
15024
15076
|
if (isMsg2) {
|
|
15025
15077
|
if (pendingRecords.length) {
|
|
@@ -15035,8 +15087,8 @@ function doRemoveOrShowMsg(_ref239) {
|
|
|
15035
15087
|
resolve();
|
|
15036
15088
|
}
|
|
15037
15089
|
}
|
|
15038
|
-
function invokeSaveDataApi(
|
|
15039
|
-
var _vm =
|
|
15090
|
+
function invokeSaveDataApi(_ref241) {
|
|
15091
|
+
var _vm = _ref241._vm, args = _ref241.args, body = _ref241.body, code = _ref241.code, removeRecords = _ref241.removeRecords, resolve = _ref241.resolve, saveData = _ref241.saveData, updateRecords = _ref241.updateRecords, valid = _ref241.valid;
|
|
15040
15092
|
var canInvoke = false;
|
|
15041
15093
|
if (valid) {
|
|
15042
15094
|
canInvoke = canInvokeSaveDataApi(body, removeRecords, updateRecords);
|
|
@@ -15063,8 +15115,8 @@ function invokeSaveDataApi(_ref240) {
|
|
|
15063
15115
|
}
|
|
15064
15116
|
var Methods$6 = {
|
|
15065
15117
|
// 表格工具栏渲染器
|
|
15066
|
-
getRenderedToolbar: function getRenderedToolbar(
|
|
15067
|
-
var $slots =
|
|
15118
|
+
getRenderedToolbar: function getRenderedToolbar(_ref242) {
|
|
15119
|
+
var $slots = _ref242.$slots, _vm = _ref242._vm, loading = _ref242.loading, tableLoading = _ref242.tableLoading, toolbar = _ref242.toolbar;
|
|
15068
15120
|
return _vm.renderedToolbar = function() {
|
|
15069
15121
|
var res = null;
|
|
15070
15122
|
if ($slots.toolbar) {
|
|
@@ -15166,9 +15218,9 @@ var Methods$6 = {
|
|
|
15166
15218
|
};
|
|
15167
15219
|
this.remove(selecteds).then(afterRemove);
|
|
15168
15220
|
},
|
|
15169
|
-
handleFullScreen: function handleFullScreen(
|
|
15221
|
+
handleFullScreen: function handleFullScreen(_ref243) {
|
|
15170
15222
|
var _this90 = this;
|
|
15171
|
-
var show2 =
|
|
15223
|
+
var show2 = _ref243[0];
|
|
15172
15224
|
this.fullScreenClass = show2 ? "tiny-fullscreen-full" : "";
|
|
15173
15225
|
this.$nextTick(function() {
|
|
15174
15226
|
_this90.recalculate(true);
|
|
@@ -15185,8 +15237,8 @@ var Methods$6 = {
|
|
|
15185
15237
|
if (code === "insert") {
|
|
15186
15238
|
this.insert();
|
|
15187
15239
|
} else if (code === "insert_actived") {
|
|
15188
|
-
this.insert().then(function(
|
|
15189
|
-
var row2 =
|
|
15240
|
+
this.insert().then(function(_ref244) {
|
|
15241
|
+
var row2 = _ref244.row;
|
|
15190
15242
|
return _this91.setActiveRow(row2);
|
|
15191
15243
|
});
|
|
15192
15244
|
} else if (code === "mark_cancel") {
|
|
@@ -15273,7 +15325,7 @@ var Methods$6 = {
|
|
|
15273
15325
|
});
|
|
15274
15326
|
}
|
|
15275
15327
|
if (selecteds.length) {
|
|
15276
|
-
var
|
|
15328
|
+
var _ref245 = {}, _ref245$plus = _ref245.plus, plus = _ref245$plus === void 0 ? [] : _ref245$plus, _ref245$minus = _ref245.minus, minus = _ref245$minus === void 0 ? [] : _ref245$minus, tmp = _ref245.tmp;
|
|
15277
15329
|
selecteds.forEach(function(data8) {
|
|
15278
15330
|
var selectedPending = pendings.includes(data8);
|
|
15279
15331
|
tmp = selectedPending ? minus : plus;
|
|
@@ -15296,8 +15348,8 @@ var Toolbar = {
|
|
|
15296
15348
|
};
|
|
15297
15349
|
var Methods$5 = {
|
|
15298
15350
|
renderColumnAnchor: function renderColumnAnchor(params, _vm) {
|
|
15299
|
-
var
|
|
15300
|
-
} :
|
|
15351
|
+
var _ref246 = params || {}, _ref246$anchors = _ref246.anchors, anchors = _ref246$anchors === void 0 ? [] : _ref246$anchors, _ref246$action = _ref246.action, action = _ref246$action === void 0 ? function() {
|
|
15352
|
+
} : _ref246$action;
|
|
15301
15353
|
var viewType2 = _vm.viewType;
|
|
15302
15354
|
return h("div", {
|
|
15303
15355
|
class: ["tiny-grid__column-anchor", _vm.viewCls("columnAnchor")],
|
|
@@ -15305,9 +15357,9 @@ var Methods$5 = {
|
|
|
15305
15357
|
key: _vm.columnAnchorKey,
|
|
15306
15358
|
ref: "tinyGridColumnAnchor"
|
|
15307
15359
|
}, anchors.map(function(anchor) {
|
|
15308
|
-
var _anchor$active = anchor.active, active = _anchor$active === void 0 ? false : _anchor$active, _anchor$label = anchor.label, label = _anchor$label === void 0 ? "" : _anchor$label, _anchor$field = anchor.field, field = _anchor$field === void 0 ? "" : _anchor$field,
|
|
15309
|
-
if (typeof
|
|
15310
|
-
return
|
|
15360
|
+
var _anchor$active = anchor.active, active = _anchor$active === void 0 ? false : _anchor$active, _anchor$label = anchor.label, label = _anchor$label === void 0 ? "" : _anchor$label, _anchor$field = anchor.field, field = _anchor$field === void 0 ? "" : _anchor$field, render19 = anchor.render;
|
|
15361
|
+
if (typeof render19 === "function") {
|
|
15362
|
+
return render19({
|
|
15311
15363
|
h,
|
|
15312
15364
|
anchor,
|
|
15313
15365
|
action
|
|
@@ -15332,8 +15384,8 @@ var Methods$5 = {
|
|
|
15332
15384
|
}, [iconVnode, spanVnode]);
|
|
15333
15385
|
}));
|
|
15334
15386
|
},
|
|
15335
|
-
buildColumnAnchor: function buildColumnAnchor(
|
|
15336
|
-
var property =
|
|
15387
|
+
buildColumnAnchor: function buildColumnAnchor(_ref247) {
|
|
15388
|
+
var property = _ref247.property, label = _ref247.label, anchors = _ref247.anchors, activeAnchor = _ref247.activeAnchor;
|
|
15337
15389
|
var visibleColumn = this.getColumns();
|
|
15338
15390
|
var column = visibleColumn.find(function(col) {
|
|
15339
15391
|
return !col.type && col.property === property;
|
|
@@ -15421,8 +15473,8 @@ var Methods$5 = {
|
|
|
15421
15473
|
});
|
|
15422
15474
|
});
|
|
15423
15475
|
},
|
|
15424
|
-
anchorAction: function anchorAction(
|
|
15425
|
-
var field =
|
|
15476
|
+
anchorAction: function anchorAction(_ref248) {
|
|
15477
|
+
var field = _ref248.field, anchors = _ref248.anchors, _vm = _ref248._vm;
|
|
15426
15478
|
var fromAnchor = anchors.find(function(anchor) {
|
|
15427
15479
|
return anchor.active;
|
|
15428
15480
|
});
|
|
@@ -15468,23 +15520,6 @@ var ColumnAnchor = {
|
|
|
15468
15520
|
Object.assign(host.methods, Methods$5);
|
|
15469
15521
|
}
|
|
15470
15522
|
};
|
|
15471
|
-
function handleIfScrollYLoadTruthy(_ref248) {
|
|
15472
|
-
var isScrollYLoad = _ref248.isScrollYLoad, _vm = _ref248._vm, selfRow = _ref248.selfRow, prevTrElem = _ref248.prevTrElem, targetTrElem = _ref248.targetTrElem;
|
|
15473
|
-
if (!isScrollYLoad) {
|
|
15474
|
-
return;
|
|
15475
|
-
}
|
|
15476
|
-
var actIndex = _vm.tableFullData.indexOf(selfRow);
|
|
15477
|
-
_vm.tableFullData.splice(actIndex, 1);
|
|
15478
|
-
if (prevTrElem) {
|
|
15479
|
-
var prevRow = _vm.getRowNode(prevTrElem).item;
|
|
15480
|
-
var parentIdx = _vm.tableFullData.indexOf(prevRow);
|
|
15481
|
-
var sleftIdx = _vm.tableFullData.indexOf(selfRow);
|
|
15482
|
-
_vm.tableFullData.splice(parentIdx + (sleftIdx < parentIdx ? 1 : 0), 0, selfRow);
|
|
15483
|
-
} else {
|
|
15484
|
-
_vm.tableFullData.unshift(selfRow);
|
|
15485
|
-
}
|
|
15486
|
-
targetTrElem.remove();
|
|
15487
|
-
}
|
|
15488
15523
|
var createHandlerOnEnd = function createHandlerOnEnd2(_ref249) {
|
|
15489
15524
|
var _vm = _ref249._vm, refresh = _ref249.refresh;
|
|
15490
15525
|
return function(event) {
|
|
@@ -15504,43 +15539,33 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref249) {
|
|
|
15504
15539
|
return row2 === selfRow;
|
|
15505
15540
|
}, options);
|
|
15506
15541
|
selfRow._isDraging = true;
|
|
15507
|
-
|
|
15508
|
-
|
|
15509
|
-
|
|
15510
|
-
|
|
15511
|
-
|
|
15512
|
-
|
|
15513
|
-
|
|
15514
|
-
|
|
15515
|
-
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
status: "error"
|
|
15522
|
-
});
|
|
15523
|
-
}
|
|
15524
|
-
var currRow = selfNode.items.splice(selfNode.index, 1)[0];
|
|
15525
|
-
if (_vm.hasTreeExpand(prevRow)) {
|
|
15526
|
-
prevRow[options.children].splice(0, 0, currRow);
|
|
15527
|
-
} else {
|
|
15528
|
-
prevNode.items.splice(prevNode.index + (selfNode.index < prevNode.index ? 0 : 1), 0, currRow);
|
|
15529
|
-
prevNode.items = [].concat(prevNode.items);
|
|
15530
|
-
}
|
|
15531
|
-
} else if (nextEl && nextEl.classList.contains("tiny-grid-body__row")) {
|
|
15532
|
-
var _currRow = selfNode.items.splice(selfNode.index, 1)[0];
|
|
15533
|
-
tableTreeData.unshift(_currRow);
|
|
15534
|
-
_vm.tableFullData = [].concat(tableTreeData);
|
|
15542
|
+
if (prevTrElem) {
|
|
15543
|
+
var prevRow = _vm.getRowNode(prevTrElem).item;
|
|
15544
|
+
var prevNode = findTree$1(tableTreeData, function(row2) {
|
|
15545
|
+
return row2 === prevRow;
|
|
15546
|
+
}, options);
|
|
15547
|
+
if (findTree$1(selfRow[options.children], function(row2) {
|
|
15548
|
+
return prevRow === row2;
|
|
15549
|
+
}, options)) {
|
|
15550
|
+
var oldTrElem = wrapperElem.children[event.oldIndex];
|
|
15551
|
+
wrapperElem.insertBefore(targetTrElem, oldTrElem);
|
|
15552
|
+
return Modal$1.message({
|
|
15553
|
+
message: GlobalConfig$1.i18n("ui.grid.error.notAllowDragSelf"),
|
|
15554
|
+
status: "error"
|
|
15555
|
+
});
|
|
15535
15556
|
}
|
|
15557
|
+
var currRow = selfNode.items.splice(selfNode.index, 1)[0];
|
|
15558
|
+
if (_vm.hasTreeExpand(prevRow)) {
|
|
15559
|
+
prevRow[options.children].splice(0, 0, currRow);
|
|
15560
|
+
} else {
|
|
15561
|
+
prevNode.items.splice(prevNode.index + (selfNode.index < prevNode.index ? 0 : 1), 0, currRow);
|
|
15562
|
+
prevNode.items = [].concat(prevNode.items);
|
|
15563
|
+
}
|
|
15564
|
+
} else if (nextEl && nextEl.classList.contains("tiny-grid-body__row")) {
|
|
15565
|
+
var _currRow = selfNode.items.splice(selfNode.index, 1)[0];
|
|
15566
|
+
tableTreeData.unshift(_currRow);
|
|
15567
|
+
_vm.tableFullData = [].concat(tableTreeData);
|
|
15536
15568
|
}
|
|
15537
|
-
handleIfScrollYLoadTruthy({
|
|
15538
|
-
isScrollYLoad,
|
|
15539
|
-
_vm,
|
|
15540
|
-
selfRow,
|
|
15541
|
-
prevTrElem,
|
|
15542
|
-
targetTrElem
|
|
15543
|
-
});
|
|
15544
15569
|
_vm.$emit("row-drop-end", event, _vm, _vm.scrollYLoad ? tableTreeData : _vm.tableFullData);
|
|
15545
15570
|
refresh && _vm.data && !isVue2 && _vm.refreshData(_vm.data);
|
|
15546
15571
|
};
|
|
@@ -16602,6 +16627,9 @@ var Methods = {
|
|
|
16602
16627
|
return this.$nextTick().then(function() {
|
|
16603
16628
|
return hasExpand ? _this98.recalculate() : 0;
|
|
16604
16629
|
});
|
|
16630
|
+
},
|
|
16631
|
+
getTreeExpandeds: function getTreeExpandeds() {
|
|
16632
|
+
return this.treeExpandeds;
|
|
16605
16633
|
}
|
|
16606
16634
|
};
|
|
16607
16635
|
var Tree = {
|
|
@@ -16610,7 +16638,7 @@ var Tree = {
|
|
|
16610
16638
|
Object.assign(host.methods, Methods);
|
|
16611
16639
|
}
|
|
16612
16640
|
};
|
|
16613
|
-
var version = "3.
|
|
16641
|
+
var version = "3.undefined";
|
|
16614
16642
|
var plugins = [Panel, Edit, Export, Keyboard, Validator, Resize, Panel$1, FetchData, Pager, Toolbar, ColumnAnchor, Dragger, Sort, Tooltip, Checkbox, Tree];
|
|
16615
16643
|
Grid$1.setup({
|
|
16616
16644
|
i18n: t
|