vxe-table 3.12.1-beta.3 → 3.12.1-beta.5
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/es/grid/src/grid.js +79 -38
- package/es/grid/style.css +15 -6
- package/es/grid/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -1
- package/es/locale/lang/de-DE.js +2 -1
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/it-IT.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +1 -0
- package/es/table/src/cell.js +73 -50
- package/es/table/src/header.js +10 -7
- package/es/table/src/methods.js +495 -442
- package/es/table/src/table.js +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +15 -6
- package/es/vxe-grid/style.min.css +1 -1
- package/lib/grid/src/grid.js +69 -30
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +15 -6
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +746 -612
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +2 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +1 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/cell.js +87 -54
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/header.js +11 -6
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +572 -518
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.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/lib/vxe-grid/style/style.css +15 -6
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +86 -40
- package/packages/locale/lang/ar-EG.ts +2 -1
- package/packages/locale/lang/de-DE.ts +2 -1
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/it-IT.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/custom/panel.ts +1 -0
- package/packages/table/src/cell.ts +78 -46
- package/packages/table/src/header.ts +13 -10
- package/packages/table/src/methods.ts +515 -451
- package/packages/table/src/table.ts +1 -1
- package/styles/components/grid.scss +14 -6
- /package/es/{iconfont.1735888162273.ttf → iconfont.1735915735443.ttf} +0 -0
- /package/es/{iconfont.1735888162273.woff → iconfont.1735915735443.woff} +0 -0
- /package/es/{iconfont.1735888162273.woff2 → iconfont.1735915735443.woff2} +0 -0
- /package/lib/{iconfont.1735888162273.ttf → iconfont.1735915735443.ttf} +0 -0
- /package/lib/{iconfont.1735888162273.woff → iconfont.1735915735443.woff} +0 -0
- /package/lib/{iconfont.1735888162273.woff2 → iconfont.1735915735443.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -10,6 +10,7 @@ import { warnLog, errLog } from '../../ui/src/log';
|
|
|
10
10
|
const { getConfig, getI18n, commands, globalEvents, globalMixins, renderEmptyElement } = VxeUI;
|
|
11
11
|
const methods = {};
|
|
12
12
|
const propKeys = Object.keys(tableComponentProps);
|
|
13
|
+
const defaultLayouts = [['Form'], ['Toolbar', 'Top', 'Table', 'Bottom', 'Pager']];
|
|
13
14
|
function renderDefaultForm(h, $xeGrid) {
|
|
14
15
|
const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
|
|
15
16
|
const props = $xeGrid;
|
|
@@ -274,46 +275,73 @@ function renderPager(h, $xeGrid) {
|
|
|
274
275
|
}
|
|
275
276
|
return renderEmptyElement($xeGrid);
|
|
276
277
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const currLayouts = (layouts && layouts.length ? layouts : (getConfig().grid.layouts || defaultLayouts));
|
|
282
|
-
currLayouts.forEach((name) => {
|
|
283
|
-
switch (name) {
|
|
278
|
+
function renderChildLayout(h, $xeGrid, layoutKeys) {
|
|
279
|
+
const childVNs = [];
|
|
280
|
+
layoutKeys.forEach(key => {
|
|
281
|
+
switch (key) {
|
|
284
282
|
case 'Form':
|
|
285
|
-
|
|
283
|
+
childVNs.push(renderForm(h, $xeGrid));
|
|
286
284
|
break;
|
|
287
285
|
case 'Toolbar':
|
|
288
|
-
|
|
286
|
+
childVNs.push(renderToolbar(h, $xeGrid));
|
|
289
287
|
break;
|
|
290
288
|
case 'Top':
|
|
291
|
-
|
|
289
|
+
childVNs.push(renderTop(h, $xeGrid));
|
|
292
290
|
break;
|
|
293
291
|
case 'Table':
|
|
294
|
-
|
|
292
|
+
childVNs.push(h('div', {
|
|
295
293
|
key: 'table',
|
|
296
294
|
class: 'vxe-grid--table-container'
|
|
297
295
|
}, [
|
|
298
|
-
renderTableLeft(h,
|
|
299
|
-
renderTable(h,
|
|
300
|
-
renderTableRight(h,
|
|
296
|
+
renderTableLeft(h, $xeGrid),
|
|
297
|
+
renderTable(h, $xeGrid),
|
|
298
|
+
renderTableRight(h, $xeGrid)
|
|
301
299
|
]));
|
|
302
300
|
break;
|
|
303
301
|
case 'Bottom':
|
|
304
|
-
|
|
302
|
+
childVNs.push(renderBottom(h, $xeGrid));
|
|
305
303
|
break;
|
|
306
304
|
case 'Pager':
|
|
307
|
-
|
|
305
|
+
childVNs.push(renderPager(h, $xeGrid));
|
|
308
306
|
break;
|
|
309
307
|
default:
|
|
310
|
-
|
|
311
|
-
errLog('vxe.error.notProp', [`layouts -> ${name}`]);
|
|
312
|
-
}
|
|
308
|
+
errLog('vxe.error.notProp', [`layouts -> ${key}`]);
|
|
313
309
|
break;
|
|
314
310
|
}
|
|
315
311
|
});
|
|
316
|
-
return
|
|
312
|
+
return childVNs;
|
|
313
|
+
}
|
|
314
|
+
function renderLayout(h, $xeGrid) {
|
|
315
|
+
const slots = $xeGrid.$scopedSlots;
|
|
316
|
+
const currLayoutConf = $xeGrid.computeCurrLayoutConf;
|
|
317
|
+
const { headKeys, bodyKeys, footKeys } = currLayoutConf;
|
|
318
|
+
const asideLeftSlot = slots.asideLeft || slots['aside-left'];
|
|
319
|
+
const asideRightSlot = slots.asideRight || slots['aside-right'];
|
|
320
|
+
return [
|
|
321
|
+
h('div', {
|
|
322
|
+
class: 'vxe-grid--layout-header-wrapper'
|
|
323
|
+
}, renderChildLayout(h, $xeGrid, headKeys)),
|
|
324
|
+
h('div', {
|
|
325
|
+
class: 'vxe-grid--layout-body-wrapper'
|
|
326
|
+
}, [
|
|
327
|
+
asideLeftSlot
|
|
328
|
+
? h('div', {
|
|
329
|
+
class: 'vxe-grid--layout-aside-left-wrapper'
|
|
330
|
+
}, asideLeftSlot({}))
|
|
331
|
+
: renderEmptyElement($xeGrid),
|
|
332
|
+
h('div', {
|
|
333
|
+
class: 'vxe-grid--layout-body-content-wrapper'
|
|
334
|
+
}, renderChildLayout(h, $xeGrid, bodyKeys)),
|
|
335
|
+
asideRightSlot
|
|
336
|
+
? h('div', {
|
|
337
|
+
class: 'vxe-grid--layout-aside-right-wrapper'
|
|
338
|
+
}, asideRightSlot({}))
|
|
339
|
+
: renderEmptyElement($xeGrid)
|
|
340
|
+
]),
|
|
341
|
+
h('div', {
|
|
342
|
+
class: 'vxe-grid--layout-footer-wrapper'
|
|
343
|
+
}, renderChildLayout(h, $xeGrid, footKeys))
|
|
344
|
+
];
|
|
317
345
|
}
|
|
318
346
|
Object.keys(VxeTableComponent.methods).forEach((name) => {
|
|
319
347
|
methods[name] = function (...args) {
|
|
@@ -437,6 +465,36 @@ export default {
|
|
|
437
465
|
}
|
|
438
466
|
return tableProps;
|
|
439
467
|
},
|
|
468
|
+
computeCurrLayoutConf() {
|
|
469
|
+
const $xeGrid = this;
|
|
470
|
+
const props = $xeGrid;
|
|
471
|
+
const { layouts } = props;
|
|
472
|
+
let confs = [];
|
|
473
|
+
if (layouts && layouts.length) {
|
|
474
|
+
confs = layouts;
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
confs = getConfig().grid.layouts || defaultLayouts;
|
|
478
|
+
}
|
|
479
|
+
let headKeys = [];
|
|
480
|
+
let bodyKeys = [];
|
|
481
|
+
let footKeys = [];
|
|
482
|
+
if (confs.length) {
|
|
483
|
+
if (XEUtils.isArray(confs[0])) {
|
|
484
|
+
headKeys = confs[0];
|
|
485
|
+
bodyKeys = (confs[1] || []);
|
|
486
|
+
footKeys = (confs[2] || []);
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
bodyKeys = confs;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return {
|
|
493
|
+
headKeys,
|
|
494
|
+
bodyKeys,
|
|
495
|
+
footKeys
|
|
496
|
+
};
|
|
497
|
+
},
|
|
440
498
|
computePageConfFlag() {
|
|
441
499
|
const $xeGrid = this;
|
|
442
500
|
const pagerOpts = $xeGrid.computePagerOpts;
|
|
@@ -516,11 +574,8 @@ export default {
|
|
|
516
574
|
const $xeGrid = this;
|
|
517
575
|
const props = $xeGrid;
|
|
518
576
|
const reactData = $xeGrid;
|
|
519
|
-
const slots = $xeGrid.$scopedSlots;
|
|
520
577
|
const vSize = $xeGrid.computeSize;
|
|
521
578
|
const styles = $xeGrid.computeStyles;
|
|
522
|
-
const asideLeftSlot = slots.asideLeft || slots['aside-left'];
|
|
523
|
-
const asideRightSlot = slots.asideRight || slots['aside-right'];
|
|
524
579
|
return h('div', {
|
|
525
580
|
class: ['vxe-grid', {
|
|
526
581
|
[`size--${vSize}`]: vSize,
|
|
@@ -530,21 +585,7 @@ export default {
|
|
|
530
585
|
'is--loading': props.loading || reactData.tableLoading
|
|
531
586
|
}],
|
|
532
587
|
style: styles
|
|
533
|
-
},
|
|
534
|
-
asideLeftSlot
|
|
535
|
-
? h('div', {
|
|
536
|
-
class: 'vxe-grid--aside-left-wrapper'
|
|
537
|
-
}, asideLeftSlot.call($xeGrid, {}))
|
|
538
|
-
: renderEmptyElement($xeGrid),
|
|
539
|
-
h('div', {
|
|
540
|
-
class: 'vxe-grid--body-content-wrapper'
|
|
541
|
-
}, renderLayout(h, $xeGrid)),
|
|
542
|
-
asideRightSlot
|
|
543
|
-
? h('div', {
|
|
544
|
-
class: 'vxe-grid--aside-right-wrapper'
|
|
545
|
-
}, asideRightSlot.call($xeGrid, {}))
|
|
546
|
-
: renderEmptyElement($xeGrid)
|
|
547
|
-
]);
|
|
588
|
+
}, renderLayout(h, $xeGrid));
|
|
548
589
|
},
|
|
549
590
|
methods: Object.assign(Object.assign(Object.assign({}, methods), { callSlot(slotFunc, params, h, vNodes) {
|
|
550
591
|
if (slotFunc) {
|
package/es/grid/style.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.vxe-grid {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: row;
|
|
5
3
|
overflow: auto;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
6
|
}
|
|
7
7
|
.vxe-grid.is--loading:before {
|
|
8
8
|
content: "";
|
|
@@ -49,17 +49,26 @@
|
|
|
49
49
|
overflow: hidden;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.vxe-grid--
|
|
53
|
-
|
|
54
|
-
flex-
|
|
52
|
+
.vxe-grid--layout-body-wrapper {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
55
|
overflow: auto;
|
|
56
|
+
flex-grow: 1;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
.vxe-grid--body-content-wrapper {
|
|
59
|
+
.vxe-grid--layout-body-content-wrapper {
|
|
59
60
|
flex-grow: 1;
|
|
60
61
|
overflow: auto;
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
.vxe-grid--layout-header-wrapper,
|
|
65
|
+
.vxe-grid--layout-footer-wrapper,
|
|
66
|
+
.vxe-grid--layout-aside-left-wrapper,
|
|
67
|
+
.vxe-grid--layout-aside-left-wrapper {
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
overflow: auto;
|
|
70
|
+
}
|
|
71
|
+
|
|
63
72
|
.vxe-grid {
|
|
64
73
|
font-size: var(--vxe-ui-font-size-default);
|
|
65
74
|
}
|
package/es/grid/style.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-grid{position:relative;display:flex;flex-direction:
|
|
1
|
+
.vxe-grid{position:relative;overflow:auto;display:flex;flex-direction:column}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid--layout-body-wrapper{display:flex;flex-direction:row;overflow:auto;flex-grow:1}.vxe-grid--layout-body-content-wrapper{flex-grow:1;overflow:auto}.vxe-grid--layout-aside-left-wrapper,.vxe-grid--layout-footer-wrapper,.vxe-grid--layout-header-wrapper{flex-shrink:0;overflow:auto}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}
|