vxe-table 4.15.6 → 4.15.8
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/README.md +6 -3
- package/es/components.js +1 -1
- package/es/style.css +1 -1
- package/es/table/src/body.js +3 -3
- package/es/table/src/footer.js +1 -1
- package/es/table/src/header.js +2 -2
- package/es/table/src/table.js +36 -28
- package/es/table/src/util.js +6 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/components.js +17 -18
- package/lib/components.min.js +1 -1
- package/lib/index.umd.js +30 -25
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +3 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +1 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +3 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +15 -18
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +6 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/components.ts +1 -1
- package/packages/grid/src/grid.ts +11 -11
- package/packages/table/src/body.ts +3 -3
- package/packages/table/src/footer.ts +1 -1
- package/packages/table/src/header.ts +2 -2
- package/packages/table/src/table.ts +37 -28
- package/packages/table/src/util.ts +7 -0
- /package/es/{iconfont.1754905357789.ttf → iconfont.1755133696364.ttf} +0 -0
- /package/es/{iconfont.1754905357789.woff → iconfont.1755133696364.woff} +0 -0
- /package/es/{iconfont.1754905357789.woff2 → iconfont.1755133696364.woff2} +0 -0
- /package/lib/{iconfont.1754905357789.ttf → iconfont.1755133696364.ttf} +0 -0
- /package/lib/{iconfont.1754905357789.woff → iconfont.1755133696364.woff} +0 -0
- /package/lib/{iconfont.1754905357789.woff2 → iconfont.1755133696364.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -79,7 +79,7 @@ export default defineVxeComponent({
|
|
|
79
79
|
const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
|
|
80
80
|
const $xeGrid = $xeTable.xeGrid;
|
|
81
81
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
82
|
-
const { tableData, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
82
|
+
const { tableData, tableColumn, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
83
83
|
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore } = tableInternalData;
|
|
84
84
|
const cellOpts = computeCellOpts.value;
|
|
85
85
|
const validOpts = computeValidOpts.value;
|
|
@@ -265,10 +265,10 @@ export default defineVxeComponent({
|
|
|
265
265
|
let isVNPreEmptyStatus = false;
|
|
266
266
|
if (!isMergeCell) {
|
|
267
267
|
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
|
|
268
|
-
if (overflowY && scrollYLoad && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
268
|
+
if (overflowY && scrollYLoad && tableData.length > 16 && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
269
269
|
isVNPreEmptyStatus = true;
|
|
270
270
|
}
|
|
271
|
-
else if (overflowX && scrollXLoad && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
271
|
+
else if (overflowX && scrollXLoad && tableColumn.length > 10 && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
272
272
|
isVNPreEmptyStatus = true;
|
|
273
273
|
}
|
|
274
274
|
}
|
package/es/table/src/footer.js
CHANGED
|
@@ -148,7 +148,7 @@ export default defineVxeComponent({
|
|
|
148
148
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
149
149
|
let isVNPreEmptyStatus = false;
|
|
150
150
|
if (isOptimizeMode && overflowX && !isMergeCell) {
|
|
151
|
-
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
151
|
+
if (scrollXLoad && tableColumn.length > 10 && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
152
152
|
isVNPreEmptyStatus = true;
|
|
153
153
|
}
|
|
154
154
|
}
|
package/es/table/src/header.js
CHANGED
|
@@ -37,7 +37,7 @@ export default defineVxeComponent({
|
|
|
37
37
|
const $xeGrid = $xeTable.xeGrid;
|
|
38
38
|
const { fixedType } = props;
|
|
39
39
|
const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps;
|
|
40
|
-
const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX } = tableReactData;
|
|
40
|
+
const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX, tableColumn } = tableReactData;
|
|
41
41
|
const { fullColumnIdData, scrollXStore } = tableInternalData;
|
|
42
42
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
43
43
|
const columnOpts = computeColumnOpts.value;
|
|
@@ -117,7 +117,7 @@ export default defineVxeComponent({
|
|
|
117
117
|
let isVNPreEmptyStatus = false;
|
|
118
118
|
if (isOptimizeMode && overflowX && !isGroup) {
|
|
119
119
|
if (!dragCol || dragCol.id !== colid) {
|
|
120
|
-
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
120
|
+
if (scrollXLoad && tableColumn.length > 10 && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
121
121
|
isVNPreEmptyStatus = true;
|
|
122
122
|
}
|
|
123
123
|
}
|
package/es/table/src/table.js
CHANGED
|
@@ -70,12 +70,6 @@ export default defineVxeComponent({
|
|
|
70
70
|
lastScrollTime: 0,
|
|
71
71
|
// 行高
|
|
72
72
|
rowHeight: 0,
|
|
73
|
-
// 表头高度
|
|
74
|
-
tHeaderHeight: 0,
|
|
75
|
-
// 表体高度
|
|
76
|
-
tBodyHeight: 0,
|
|
77
|
-
// 表尾高度
|
|
78
|
-
tFooterHeight: 0,
|
|
79
73
|
// 表格父容器的高度
|
|
80
74
|
parentHeight: 0,
|
|
81
75
|
// 是否使用分组表头
|
|
@@ -97,6 +91,8 @@ export default defineVxeComponent({
|
|
|
97
91
|
rowGroupColumn: null,
|
|
98
92
|
// 展开列信息
|
|
99
93
|
expandColumn: null,
|
|
94
|
+
checkboxColumn: null,
|
|
95
|
+
radioColumn: null,
|
|
100
96
|
// 树节点列信息
|
|
101
97
|
treeNodeColumn: null,
|
|
102
98
|
hasFixedColumn: false,
|
|
@@ -1593,6 +1589,8 @@ export default defineVxeComponent({
|
|
|
1593
1589
|
reactData.rowGroupColumn = rowGroupColumn;
|
|
1594
1590
|
reactData.treeNodeColumn = treeNodeColumn;
|
|
1595
1591
|
reactData.expandColumn = expandColumn;
|
|
1592
|
+
reactData.checkboxColumn = checkboxColumn;
|
|
1593
|
+
reactData.radioColumn = radioColumn;
|
|
1596
1594
|
reactData.isAllOverflow = isAllOverflow;
|
|
1597
1595
|
};
|
|
1598
1596
|
const updateHeight = () => {
|
|
@@ -2157,8 +2155,8 @@ export default defineVxeComponent({
|
|
|
2157
2155
|
};
|
|
2158
2156
|
const updateStyle = () => {
|
|
2159
2157
|
const { showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props;
|
|
2160
|
-
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn, isColLoading
|
|
2161
|
-
const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData;
|
|
2158
|
+
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn, isColLoading } = reactData;
|
|
2159
|
+
const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData;
|
|
2162
2160
|
const $xeGanttView = internalData.xeGanttView;
|
|
2163
2161
|
const el = refElem.value;
|
|
2164
2162
|
if (!el || !el.clientHeight) {
|
|
@@ -2166,8 +2164,9 @@ export default defineVxeComponent({
|
|
|
2166
2164
|
}
|
|
2167
2165
|
const containerList = ['main', 'left', 'right'];
|
|
2168
2166
|
let osbWidth = overflowY ? scrollbarWidth : 0;
|
|
2169
|
-
|
|
2167
|
+
let osbHeight = overflowX ? scrollbarHeight : 0;
|
|
2170
2168
|
const emptyPlaceholderElem = refEmptyPlaceholder.value;
|
|
2169
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
2171
2170
|
const mouseOpts = computeMouseOpts.value;
|
|
2172
2171
|
const expandOpts = computeExpandOpts.value;
|
|
2173
2172
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
|
|
@@ -2178,13 +2177,19 @@ export default defineVxeComponent({
|
|
|
2178
2177
|
}
|
|
2179
2178
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
2180
2179
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
2181
|
-
|
|
2182
|
-
let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
|
|
2180
|
+
let xScrollbarVisible = overflowX ? 'visible' : 'hidden';
|
|
2183
2181
|
if ($xeGanttView) {
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2182
|
+
osbHeight = scrollbarHeight;
|
|
2183
|
+
xScrollbarVisible = 'visible';
|
|
2184
|
+
}
|
|
2185
|
+
else if (scrollbarOpts.x && scrollbarOpts.x.visible === false) {
|
|
2186
|
+
osbHeight = 0;
|
|
2187
|
+
xScrollbarVisible = 'hidden';
|
|
2188
|
+
}
|
|
2189
|
+
let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
|
|
2190
|
+
if ((scrollbarOpts.y && scrollbarOpts.y.visible === false) || ($xeGanttView && !scrollbarYToLeft)) {
|
|
2191
|
+
osbWidth = 0;
|
|
2192
|
+
yScrollbarVisible = 'hidden';
|
|
2188
2193
|
}
|
|
2189
2194
|
let tbHeight = 0;
|
|
2190
2195
|
let bodyMaxHeight = 0;
|
|
@@ -2253,7 +2258,7 @@ export default defineVxeComponent({
|
|
|
2253
2258
|
rowExpandEl.style.height = `${tbHeight}px`;
|
|
2254
2259
|
rowExpandEl.style.top = `${tHeaderHeight}px`;
|
|
2255
2260
|
}
|
|
2256
|
-
|
|
2261
|
+
internalData.tBodyHeight = tbHeight;
|
|
2257
2262
|
containerList.forEach((name, index) => {
|
|
2258
2263
|
const fixedType = index > 0 ? name : '';
|
|
2259
2264
|
const layoutList = ['header', 'body', 'footer'];
|
|
@@ -3012,8 +3017,8 @@ export default defineVxeComponent({
|
|
|
3012
3017
|
const hHeight = headerTableElem ? headerTableElem.clientHeight : 0;
|
|
3013
3018
|
const fHeight = footerTableElem ? footerTableElem.clientHeight : 0;
|
|
3014
3019
|
internalData.tableHeight = bodyWrapperElem.offsetHeight;
|
|
3015
|
-
|
|
3016
|
-
|
|
3020
|
+
internalData.tHeaderHeight = hHeight;
|
|
3021
|
+
internalData.tFooterHeight = fHeight;
|
|
3017
3022
|
reactData.overflowX = overflowX;
|
|
3018
3023
|
reactData.parentHeight = Math.max(hHeight + fHeight + 20, $xeTable.getParentHeight());
|
|
3019
3024
|
}
|
|
@@ -3100,6 +3105,9 @@ export default defineVxeComponent({
|
|
|
3100
3105
|
}, refreshDelay);
|
|
3101
3106
|
});
|
|
3102
3107
|
};
|
|
3108
|
+
const handleResizeEvent = () => {
|
|
3109
|
+
handleLazyRecalculate(true, true, true);
|
|
3110
|
+
};
|
|
3103
3111
|
const handleUpdateAggValues = () => {
|
|
3104
3112
|
const { visibleColumn } = internalData;
|
|
3105
3113
|
const aggCols = [];
|
|
@@ -3966,13 +3974,13 @@ export default defineVxeComponent({
|
|
|
3966
3974
|
}, fpsTime);
|
|
3967
3975
|
};
|
|
3968
3976
|
const checkLastSyncScroll = (isRollX, isRollY) => {
|
|
3969
|
-
const { scrollXLoad, scrollYLoad, isAllOverflow } = reactData;
|
|
3970
3977
|
const { lcsTimeout } = internalData;
|
|
3971
3978
|
reactData.lazScrollLoading = true;
|
|
3972
3979
|
if (lcsTimeout) {
|
|
3973
3980
|
clearTimeout(lcsTimeout);
|
|
3974
3981
|
}
|
|
3975
3982
|
internalData.lcsTimeout = setTimeout(() => {
|
|
3983
|
+
const { scrollXLoad, scrollYLoad, isAllOverflow } = reactData;
|
|
3976
3984
|
internalData.lcsRunTime = Date.now();
|
|
3977
3985
|
internalData.lcsTimeout = undefined;
|
|
3978
3986
|
internalData.intoRunScroll = false;
|
|
@@ -7544,7 +7552,7 @@ export default defineVxeComponent({
|
|
|
7544
7552
|
if (!el || !el.clientWidth) {
|
|
7545
7553
|
return;
|
|
7546
7554
|
}
|
|
7547
|
-
|
|
7555
|
+
handleResizeEvent();
|
|
7548
7556
|
$xeTable.updateCellAreas();
|
|
7549
7557
|
};
|
|
7550
7558
|
const handleTargetEnterEvent = (isClear) => {
|
|
@@ -8997,8 +9005,8 @@ export default defineVxeComponent({
|
|
|
8997
9005
|
* 如果是双击模式,则单击后选中状态
|
|
8998
9006
|
*/
|
|
8999
9007
|
triggerCellClickEvent(evnt, params) {
|
|
9000
|
-
const { highlightCurrentRow, highlightCurrentColumn, editConfig } = props;
|
|
9001
|
-
const { editStore, isDragResize } = reactData;
|
|
9008
|
+
const { treeConfig, highlightCurrentRow, highlightCurrentColumn, editConfig, aggregateConfig, rowGroupConfig } = props;
|
|
9009
|
+
const { editStore, isDragResize, expandColumn, checkboxColumn, radioColumn } = reactData;
|
|
9002
9010
|
if (isDragResize) {
|
|
9003
9011
|
return;
|
|
9004
9012
|
}
|
|
@@ -9027,15 +9035,15 @@ export default defineVxeComponent({
|
|
|
9027
9035
|
params = Object.assign({ cell, triggerRadio, triggerCheckbox, triggerTreeNode, triggerExpandNode }, params);
|
|
9028
9036
|
if (!triggerCheckbox && !triggerRadio) {
|
|
9029
9037
|
// 如果是展开行
|
|
9030
|
-
if (!triggerExpandNode && (expandOpts.trigger === 'row' || (isExpandType && expandOpts.trigger === 'cell'))) {
|
|
9038
|
+
if (!triggerExpandNode && ((expandColumn && expandOpts.trigger === 'row') || (isExpandType && expandOpts.trigger === 'cell'))) {
|
|
9031
9039
|
$xeTable.triggerRowExpandEvent(evnt, params);
|
|
9032
9040
|
}
|
|
9033
9041
|
// 如果是树形表格
|
|
9034
|
-
if ((treeOpts.trigger === 'row' || (treeNode && treeOpts.trigger === 'cell'))) {
|
|
9042
|
+
if (treeConfig && (treeOpts.trigger === 'row' || (treeNode && treeOpts.trigger === 'cell'))) {
|
|
9035
9043
|
$xeTable.triggerTreeExpandEvent(evnt, params);
|
|
9036
9044
|
}
|
|
9037
9045
|
// 如果是行分组
|
|
9038
|
-
if ((aggregateOpts.trigger === 'row' || (rowGroupNode && aggregateOpts.trigger === 'cell'))) {
|
|
9046
|
+
if ((aggregateConfig || rowGroupConfig) && (aggregateOpts.trigger === 'row' || (rowGroupNode && aggregateOpts.trigger === 'cell'))) {
|
|
9039
9047
|
$xeTable.triggerRowGroupExpandEvent(evnt, params);
|
|
9040
9048
|
}
|
|
9041
9049
|
}
|
|
@@ -9055,11 +9063,11 @@ export default defineVxeComponent({
|
|
|
9055
9063
|
}
|
|
9056
9064
|
}
|
|
9057
9065
|
// 如果是单选框
|
|
9058
|
-
if (!triggerRadio && (radioOpts.trigger === 'row' || (isRadioType && radioOpts.trigger === 'cell'))) {
|
|
9066
|
+
if (!triggerRadio && ((radioColumn && radioOpts.trigger === 'row') || (isRadioType && radioOpts.trigger === 'cell'))) {
|
|
9059
9067
|
$xeTable.triggerRadioRowEvent(evnt, params);
|
|
9060
9068
|
}
|
|
9061
9069
|
// 如果是复选框
|
|
9062
|
-
if (!triggerCheckbox && (checkboxOpts.trigger === 'row' || (isCheckboxType && checkboxOpts.trigger === 'cell'))) {
|
|
9070
|
+
if (!triggerCheckbox && ((checkboxColumn && checkboxOpts.trigger === 'row') || (isCheckboxType && checkboxOpts.trigger === 'cell'))) {
|
|
9063
9071
|
$xeTable.handleToggleCheckRowEvent(evnt, params);
|
|
9064
9072
|
}
|
|
9065
9073
|
}
|
|
@@ -12074,7 +12082,7 @@ export default defineVxeComponent({
|
|
|
12074
12082
|
const parentEl = tablePrivateMethods.getParentElem();
|
|
12075
12083
|
resizeObserver = globalResize.create(() => {
|
|
12076
12084
|
if (props.autoResize) {
|
|
12077
|
-
|
|
12085
|
+
handleResizeEvent();
|
|
12078
12086
|
}
|
|
12079
12087
|
});
|
|
12080
12088
|
if (el) {
|
package/es/table/src/util.js
CHANGED
|
@@ -109,6 +109,12 @@ export function createInternalData() {
|
|
|
109
109
|
// 已删除行
|
|
110
110
|
removeRowMaps: {},
|
|
111
111
|
cvCacheMaps: {},
|
|
112
|
+
// 表头高度
|
|
113
|
+
tHeaderHeight: 0,
|
|
114
|
+
// 表体高度
|
|
115
|
+
tBodyHeight: 0,
|
|
116
|
+
// 表尾高度
|
|
117
|
+
tFooterHeight: 0,
|
|
112
118
|
inited: false,
|
|
113
119
|
tooltipTimeout: null,
|
|
114
120
|
initStatus: false,
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/components.js
CHANGED
|
@@ -7,7 +7,18 @@ var _exportNames = {
|
|
|
7
7
|
install: true
|
|
8
8
|
};
|
|
9
9
|
exports.install = install;
|
|
10
|
-
var
|
|
10
|
+
var _ui = require("./ui");
|
|
11
|
+
Object.keys(_ui).forEach(function (key) {
|
|
12
|
+
if (key === "default" || key === "__esModule") return;
|
|
13
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
14
|
+
if (key in exports && exports[key] === _ui[key]) return;
|
|
15
|
+
Object.defineProperty(exports, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return _ui[key];
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
11
22
|
var _column = require("./column");
|
|
12
23
|
Object.keys(_column).forEach(function (key) {
|
|
13
24
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -69,31 +80,19 @@ Object.keys(_toolbar).forEach(function (key) {
|
|
|
69
80
|
});
|
|
70
81
|
});
|
|
71
82
|
var _zhCN = _interopRequireDefault(require("./locale/lang/zh-CN"));
|
|
72
|
-
var _ui = require("./ui");
|
|
73
|
-
Object.keys(_ui).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
76
|
-
if (key in exports && exports[key] === _ui[key]) return;
|
|
77
|
-
Object.defineProperty(exports, key, {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
get: function () {
|
|
80
|
-
return _ui[key];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
83
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
85
84
|
const components = [_column.VxeColumn, _colgroup.VxeColgroup, _grid.VxeGrid, _table.VxeTable, _toolbar.VxeToolbar];
|
|
86
85
|
// 默认安装
|
|
87
86
|
function install(app, options) {
|
|
88
|
-
|
|
87
|
+
_ui.VxeUI.setConfig(options);
|
|
89
88
|
components.forEach(component => component.install(app));
|
|
90
89
|
}
|
|
91
90
|
// 保留兼容老版本
|
|
92
|
-
if (!
|
|
91
|
+
if (!_ui.VxeUI.hasLanguage('zh-CN')) {
|
|
93
92
|
const defaultLanguage = 'zh-CN';
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
_ui.VxeUI.setI18n(defaultLanguage, _zhCN.default);
|
|
94
|
+
_ui.VxeUI.setLanguage(defaultLanguage);
|
|
96
95
|
}
|
|
97
|
-
|
|
96
|
+
_ui.VxeUI.setTheme('light');
|
|
98
97
|
|
|
99
98
|
// Components
|
package/lib/components.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={install:!0},
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={install:!0},_ui=(exports.install=install,require("./ui")),_column=(Object.keys(_ui).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_ui[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _ui[e]}})}),require("./column")),_colgroup=(Object.keys(_column).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_column[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _column[e]}})}),require("./colgroup")),_grid=(Object.keys(_colgroup).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_colgroup[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _colgroup[e]}})}),require("./grid")),_table=(Object.keys(_grid).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_grid[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _grid[e]}})}),require("./table")),_toolbar=(Object.keys(_table).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_table[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _table[e]}})}),require("./toolbar")),_zhCN=(Object.keys(_toolbar).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_toolbar[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _toolbar[e]}})}),_interopRequireDefault(require("./locale/lang/zh-CN")));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let components=[_column.VxeColumn,_colgroup.VxeColgroup,_grid.VxeGrid,_table.VxeTable,_toolbar.VxeToolbar];function install(t,e){_ui.VxeUI.setConfig(e),components.forEach(e=>e.install(t))}if(!_ui.VxeUI.hasLanguage("zh-CN")){let e="zh-CN";_ui.VxeUI.setI18n(e,_zhCN.default),_ui.VxeUI.setLanguage(e)}_ui.VxeUI.setTheme("light");
|