vxe-pc-ui 4.15.11 → 4.15.12
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/dist/all.esm.js +1597 -236
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/collapse/src/collapse.js +73 -40
- package/es/components.js +6 -0
- package/es/date-picker/src/date-picker.js +1 -0
- package/es/icon/style.css +1 -1
- package/es/image/src/image.js +14 -14
- package/es/language/ar-EG.js +4 -0
- package/es/language/de-DE.js +4 -0
- package/es/language/en-US.js +5 -1
- package/es/language/es-ES.js +4 -0
- package/es/language/fr-FR.js +4 -0
- package/es/language/hu-HU.js +4 -0
- package/es/language/hy-AM.js +4 -0
- package/es/language/id-ID.js +4 -0
- package/es/language/it-IT.js +4 -0
- package/es/language/ja-JP.js +4 -0
- package/es/language/ko-KR.js +4 -0
- package/es/language/ms-MY.js +4 -0
- package/es/language/nb-NO.js +4 -0
- package/es/language/pt-BR.js +4 -0
- package/es/language/ru-RU.js +4 -0
- package/es/language/th-TH.js +4 -0
- package/es/language/ug-CN.js +4 -0
- package/es/language/uk-UA.js +4 -0
- package/es/language/uz-UZ.js +4 -0
- package/es/language/vi-VN.js +4 -0
- package/es/language/zh-CHT.js +4 -0
- package/es/language/zh-CN.js +4 -0
- package/es/list/src/list.js +1163 -32
- package/es/list/src/store.js +8 -0
- package/es/list/style.css +328 -0
- package/es/list/style.min.css +1 -1
- package/es/print/src/util.js +1 -1
- package/es/pulldown/src/pulldown.js +4 -4
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-transfer/index.js +12 -0
- package/es/table-transfer/src/table-transfer.js +65 -0
- package/es/table-transfer/style.css +0 -0
- package/es/table-transfer/style.min.css +0 -0
- package/es/transfer/index.js +12 -0
- package/es/transfer/src/transfer.js +91 -0
- package/es/transfer/style.css +4 -0
- package/es/transfer/style.min.css +1 -0
- package/es/tree/src/tree.js +20 -26
- package/es/tree/src/util.js +0 -7
- package/es/tree-select/src/tree-select.js +8 -7
- package/es/ui/index.js +14 -2
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +12 -0
- package/es/vxe-list/style.css +328 -0
- package/es/vxe-list/style.min.css +1 -1
- package/es/vxe-table-transfer/index.js +3 -0
- package/es/vxe-table-transfer/style.css +0 -0
- package/es/vxe-table-transfer/style.min.css +0 -0
- package/es/vxe-transfer/index.js +3 -0
- package/es/vxe-transfer/style.css +4 -0
- package/es/vxe-transfer/style.min.css +1 -0
- package/lib/collapse/src/collapse.js +89 -47
- package/lib/collapse/src/collapse.min.js +1 -1
- package/lib/components.js +25 -1
- package/lib/components.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +1 -0
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/image/src/image.js +17 -17
- package/lib/image/src/image.min.js +1 -1
- package/lib/index.umd.js +1753 -188
- package/lib/index.umd.min.js +1 -1
- package/lib/language/ar-EG.js +4 -0
- package/lib/language/ar-EG.min.js +1 -1
- package/lib/language/ar-EG.umd.js +4 -0
- package/lib/language/de-DE.js +4 -0
- package/lib/language/de-DE.min.js +1 -1
- package/lib/language/de-DE.umd.js +4 -0
- package/lib/language/en-US.js +5 -1
- package/lib/language/en-US.min.js +1 -1
- package/lib/language/en-US.umd.js +5 -1
- package/lib/language/es-ES.js +4 -0
- package/lib/language/es-ES.min.js +1 -1
- package/lib/language/es-ES.umd.js +4 -0
- package/lib/language/fr-FR.js +4 -0
- package/lib/language/fr-FR.min.js +1 -1
- package/lib/language/fr-FR.umd.js +4 -0
- package/lib/language/hu-HU.js +4 -0
- package/lib/language/hu-HU.min.js +1 -1
- package/lib/language/hu-HU.umd.js +4 -0
- package/lib/language/hy-AM.js +4 -0
- package/lib/language/hy-AM.min.js +1 -1
- package/lib/language/hy-AM.umd.js +4 -0
- package/lib/language/id-ID.js +4 -0
- package/lib/language/id-ID.min.js +1 -1
- package/lib/language/id-ID.umd.js +4 -0
- package/lib/language/it-IT.js +4 -0
- package/lib/language/it-IT.min.js +1 -1
- package/lib/language/it-IT.umd.js +4 -0
- package/lib/language/ja-JP.js +4 -0
- package/lib/language/ja-JP.min.js +1 -1
- package/lib/language/ja-JP.umd.js +4 -0
- package/lib/language/ko-KR.js +4 -0
- package/lib/language/ko-KR.min.js +1 -1
- package/lib/language/ko-KR.umd.js +4 -0
- package/lib/language/ms-MY.js +4 -0
- package/lib/language/ms-MY.min.js +1 -1
- package/lib/language/ms-MY.umd.js +4 -0
- package/lib/language/nb-NO.js +4 -0
- package/lib/language/nb-NO.min.js +1 -1
- package/lib/language/nb-NO.umd.js +4 -0
- package/lib/language/pt-BR.js +4 -0
- package/lib/language/pt-BR.min.js +1 -1
- package/lib/language/pt-BR.umd.js +4 -0
- package/lib/language/ru-RU.js +4 -0
- package/lib/language/ru-RU.min.js +1 -1
- package/lib/language/ru-RU.umd.js +4 -0
- package/lib/language/th-TH.js +4 -0
- package/lib/language/th-TH.min.js +1 -1
- package/lib/language/th-TH.umd.js +4 -0
- package/lib/language/ug-CN.js +4 -0
- package/lib/language/ug-CN.min.js +1 -1
- package/lib/language/ug-CN.umd.js +4 -0
- package/lib/language/uk-UA.js +4 -0
- package/lib/language/uk-UA.min.js +1 -1
- package/lib/language/uk-UA.umd.js +4 -0
- package/lib/language/uz-UZ.js +4 -0
- package/lib/language/uz-UZ.min.js +1 -1
- package/lib/language/uz-UZ.umd.js +4 -0
- package/lib/language/vi-VN.js +4 -0
- package/lib/language/vi-VN.min.js +1 -1
- package/lib/language/vi-VN.umd.js +4 -0
- package/lib/language/zh-CHT.js +4 -0
- package/lib/language/zh-CHT.min.js +1 -1
- package/lib/language/zh-CHT.umd.js +4 -0
- package/lib/language/zh-CN.js +4 -0
- package/lib/language/zh-CN.min.js +1 -1
- package/lib/language/zh-CN.umd.js +4 -0
- package/lib/list/src/list.js +1319 -30
- package/lib/list/src/list.min.js +1 -1
- package/lib/list/src/store.js +15 -0
- package/lib/list/src/store.min.js +1 -0
- package/lib/list/style/style.css +328 -0
- package/lib/list/style/style.min.css +1 -1
- package/lib/print/src/util.js +1 -1
- package/lib/print/src/util.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +4 -0
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-transfer/index.js +19 -0
- package/lib/table-transfer/index.min.js +1 -0
- package/lib/table-transfer/src/table-transfer.js +76 -0
- package/lib/table-transfer/src/table-transfer.min.js +1 -0
- package/lib/table-transfer/style/index.js +1 -0
- package/lib/table-transfer/style/style.css +0 -0
- package/lib/table-transfer/style/style.min.css +0 -0
- package/lib/transfer/index.js +19 -0
- package/lib/transfer/index.min.js +1 -0
- package/lib/transfer/src/transfer.js +95 -0
- package/lib/transfer/src/transfer.min.js +1 -0
- package/lib/transfer/style/index.js +1 -0
- package/lib/transfer/style/style.css +4 -0
- package/lib/transfer/style/style.min.css +1 -0
- package/lib/tree/src/tree.js +18 -24
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree/src/util.js +0 -10
- package/lib/tree/src/util.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +9 -6
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +14 -2
- 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/ui/src/utils.js +15 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/lib/vxe-list/style/style.css +328 -0
- package/lib/vxe-list/style/style.min.css +1 -1
- package/lib/vxe-table-transfer/index.js +21 -0
- package/lib/vxe-table-transfer/index.min.js +1 -0
- package/lib/vxe-table-transfer/style/index.js +1 -0
- package/lib/vxe-table-transfer/style/style.css +0 -0
- package/lib/vxe-table-transfer/style/style.min.css +0 -0
- package/lib/vxe-transfer/index.js +21 -0
- package/lib/vxe-transfer/index.min.js +1 -0
- package/lib/vxe-transfer/style/index.js +1 -0
- package/lib/vxe-transfer/style/style.css +4 -0
- package/lib/vxe-transfer/style/style.min.css +1 -0
- package/package.json +1 -1
- package/packages/collapse/src/collapse.ts +81 -42
- package/packages/components.ts +6 -0
- package/packages/date-picker/src/date-picker.ts +1 -0
- package/packages/image/src/image.ts +14 -14
- package/packages/language/ar-EG.ts +4 -0
- package/packages/language/de-DE.ts +4 -0
- package/packages/language/en-US.ts +5 -1
- package/packages/language/es-ES.ts +4 -0
- package/packages/language/fr-FR.ts +4 -0
- package/packages/language/hu-HU.ts +4 -0
- package/packages/language/hy-AM.ts +4 -0
- package/packages/language/id-ID.ts +4 -0
- package/packages/language/it-IT.ts +4 -0
- package/packages/language/ja-JP.ts +4 -0
- package/packages/language/ko-KR.ts +4 -0
- package/packages/language/ms-MY.ts +4 -0
- package/packages/language/nb-NO.ts +4 -0
- package/packages/language/pt-BR.ts +4 -0
- package/packages/language/ru-RU.ts +4 -0
- package/packages/language/th-TH.ts +4 -0
- package/packages/language/ug-CN.ts +4 -0
- package/packages/language/uk-UA.ts +4 -0
- package/packages/language/uz-UZ.ts +4 -0
- package/packages/language/vi-VN.ts +4 -0
- package/packages/language/zh-CHT.ts +4 -0
- package/packages/language/zh-CN.ts +4 -0
- package/packages/list/src/list.ts +1276 -37
- package/packages/list/src/store.ts +14 -0
- package/packages/print/src/util.ts +1 -2
- package/packages/pulldown/src/pulldown.ts +4 -4
- package/packages/table-transfer/index.ts +16 -0
- package/packages/table-transfer/src/table-transfer.ts +91 -0
- package/packages/transfer/index.ts +16 -0
- package/packages/transfer/src/transfer.ts +117 -0
- package/packages/tree/src/tree.ts +20 -26
- package/packages/tree/src/util.ts +0 -10
- package/packages/tree-select/src/tree-select.ts +8 -7
- package/packages/ui/index.ts +14 -1
- package/packages/ui/src/utils.ts +15 -0
- package/styles/all.scss +2 -0
- package/styles/components/list.scss +245 -0
- package/styles/components/table-transfer.scss +0 -0
- package/styles/components/transfer.scss +4 -0
- package/styles/components/tree.scss +1 -0
- package/styles/theme/base.scss +3 -0
- package/styles/theme/dark.scss +10 -0
- package/styles/theme/light.scss +10 -0
- package/styles/variable.scss +11 -1
- package/types/all.d.ts +6 -0
- package/types/components/collapse.d.ts +4 -2
- package/types/components/list.d.ts +347 -15
- package/types/components/pulldown.d.ts +1 -0
- package/types/components/table-transfer.d.ts +84 -0
- package/types/components/table.d.ts +4 -0
- package/types/components/transfer.d.ts +84 -0
- package/types/components/tree-select.d.ts +4 -0
- package/types/components/tree.d.ts +1 -1
- package/types/ui/global-config.d.ts +4 -0
- package/types/ui/global-icon.d.ts +6 -1
- /package/es/icon/{iconfont.1782358507268.ttf → iconfont.1782655724330.ttf} +0 -0
- /package/es/icon/{iconfont.1782358507268.woff → iconfont.1782655724330.woff} +0 -0
- /package/es/icon/{iconfont.1782358507268.woff2 → iconfont.1782655724330.woff2} +0 -0
- /package/es/{iconfont.1782358507268.ttf → iconfont.1782655724330.ttf} +0 -0
- /package/es/{iconfont.1782358507268.woff → iconfont.1782655724330.woff} +0 -0
- /package/es/{iconfont.1782358507268.woff2 → iconfont.1782655724330.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782358507268.ttf → iconfont.1782655724330.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782358507268.woff → iconfont.1782655724330.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782358507268.woff2 → iconfont.1782655724330.woff2} +0 -0
- /package/lib/{iconfont.1782358507268.ttf → iconfont.1782655724330.ttf} +0 -0
- /package/lib/{iconfont.1782358507268.woff → iconfont.1782655724330.woff} +0 -0
- /package/lib/{iconfont.1782358507268.woff2 → iconfont.1782655724330.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -81,7 +81,7 @@ function checkDynamic() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.15.
|
|
84
|
+
const uiVersion = `ui v${"4.15.12"}`;
|
|
85
85
|
function createComponentLog(name) {
|
|
86
86
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
87
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -95,7 +95,7 @@ function createComponentLog(name) {
|
|
|
95
95
|
const warnLog$b = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.15.
|
|
98
|
+
const version = "4.15.12";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
@@ -315,6 +315,12 @@ setConfig$1({
|
|
|
315
315
|
listView: {},
|
|
316
316
|
list: {
|
|
317
317
|
// size: null,
|
|
318
|
+
dragConfig: {
|
|
319
|
+
showIcon: true,
|
|
320
|
+
animation: true,
|
|
321
|
+
showGuidesStatus: true,
|
|
322
|
+
showDragTip: true
|
|
323
|
+
},
|
|
318
324
|
virtualYConfig: {
|
|
319
325
|
enabled: true,
|
|
320
326
|
gt: 100
|
|
@@ -470,6 +476,7 @@ setConfig$1({
|
|
|
470
476
|
}
|
|
471
477
|
}
|
|
472
478
|
},
|
|
479
|
+
tableTransfer: {},
|
|
473
480
|
tabs: {
|
|
474
481
|
// destroyOnClose: false
|
|
475
482
|
},
|
|
@@ -497,6 +504,7 @@ setConfig$1({
|
|
|
497
504
|
leaveDelay: 300,
|
|
498
505
|
isArrow: true
|
|
499
506
|
},
|
|
507
|
+
transfer: {},
|
|
500
508
|
tree: {
|
|
501
509
|
// autoResize: false,
|
|
502
510
|
indent: 20,
|
|
@@ -758,7 +766,11 @@ setIcon({
|
|
|
758
766
|
// cascader
|
|
759
767
|
CASCADER_NODE_OPEN: iconPrefix + 'arrow-right',
|
|
760
768
|
CASCADER_NODE_CLOSE: iconPrefix + 'arrow-right',
|
|
761
|
-
CASCADER_NODE_LOADED: iconPrefix + 'spinner roll'
|
|
769
|
+
CASCADER_NODE_LOADED: iconPrefix + 'spinner roll',
|
|
770
|
+
// list
|
|
771
|
+
LIST_DRAG: iconPrefix + 'drag-handle',
|
|
772
|
+
LIST_DRAG_STATUS_NODE: iconPrefix + 'sort',
|
|
773
|
+
LIST_DRAG_DISABLED: iconPrefix + 'no-drop'
|
|
762
774
|
});
|
|
763
775
|
|
|
764
776
|
var zhCN = {
|
|
@@ -876,6 +888,10 @@ var zhCN = {
|
|
|
876
888
|
overSizeErr: '已超出最大可选数量 {0} 个,超出部分将被忽略!',
|
|
877
889
|
searchEmpty: '未匹配到数据!'
|
|
878
890
|
},
|
|
891
|
+
list: {
|
|
892
|
+
allChecked: '全选',
|
|
893
|
+
dragTip: '移动:{0}'
|
|
894
|
+
},
|
|
879
895
|
tree: {
|
|
880
896
|
searchEmpty: '未匹配到数据!',
|
|
881
897
|
dragTip: '移动:{0}'
|
|
@@ -2484,6 +2500,12 @@ function getFuncText(content, args) {
|
|
|
2484
2500
|
const translate = getConfig$3().translate;
|
|
2485
2501
|
return `${translate ? translate('' + content, args) : content}`;
|
|
2486
2502
|
}
|
|
2503
|
+
function getText(content) {
|
|
2504
|
+
if (XEUtils.eqNull(content)) {
|
|
2505
|
+
return '';
|
|
2506
|
+
}
|
|
2507
|
+
return '' + content;
|
|
2508
|
+
}
|
|
2487
2509
|
/**
|
|
2488
2510
|
* 判断值为:'' | null | undefined 时都属于空值
|
|
2489
2511
|
*/
|
|
@@ -2493,6 +2515,12 @@ function eqEmptyValue(cellValue) {
|
|
|
2493
2515
|
function handleBooleanDefaultValue(value) {
|
|
2494
2516
|
return XEUtils.isBoolean(value) ? value : null;
|
|
2495
2517
|
}
|
|
2518
|
+
function enModelValue(nodeid) {
|
|
2519
|
+
return XEUtils.eqNull(nodeid) ? '' : encodeURIComponent(`${nodeid}`);
|
|
2520
|
+
}
|
|
2521
|
+
function deModelValue(nodeid) {
|
|
2522
|
+
return nodeid ? decodeURIComponent(`${nodeid}`) : nodeid;
|
|
2523
|
+
}
|
|
2496
2524
|
|
|
2497
2525
|
var VxeTooltipComponent = defineVxeComponent({
|
|
2498
2526
|
name: 'VxeTooltip',
|
|
@@ -3803,13 +3831,13 @@ dynamicApp.use(VxeButton);
|
|
|
3803
3831
|
VxeUI.component(VxeButtonComponent);
|
|
3804
3832
|
const Button = VxeButton;
|
|
3805
3833
|
|
|
3806
|
-
const { errLog: errLog$
|
|
3807
|
-
function createInternalData$
|
|
3834
|
+
const { errLog: errLog$h } = createComponentLog('backtop');
|
|
3835
|
+
function createInternalData$h() {
|
|
3808
3836
|
return {
|
|
3809
3837
|
targetEl: null
|
|
3810
3838
|
};
|
|
3811
3839
|
}
|
|
3812
|
-
function createReactData$
|
|
3840
|
+
function createReactData$i() {
|
|
3813
3841
|
return {
|
|
3814
3842
|
showBtn: false,
|
|
3815
3843
|
backtopZindex: 0
|
|
@@ -3888,8 +3916,8 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
3888
3916
|
const xID = XEUtils.uniqueId();
|
|
3889
3917
|
const refElem = ref();
|
|
3890
3918
|
const { computeSize } = useSize(props);
|
|
3891
|
-
const internalData = createInternalData$
|
|
3892
|
-
const reactData = reactive(createReactData$
|
|
3919
|
+
const internalData = createInternalData$h();
|
|
3920
|
+
const reactData = reactive(createReactData$i());
|
|
3893
3921
|
const refMaps = {
|
|
3894
3922
|
refElem
|
|
3895
3923
|
};
|
|
@@ -3981,13 +4009,13 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
3981
4009
|
const { target } = props;
|
|
3982
4010
|
if (!target) {
|
|
3983
4011
|
removeScrollEvent();
|
|
3984
|
-
errLog$
|
|
4012
|
+
errLog$h('vxe.error.reqProp', ['target']);
|
|
3985
4013
|
return;
|
|
3986
4014
|
}
|
|
3987
4015
|
if (XEUtils.isString(target)) {
|
|
3988
4016
|
const tEl = document.querySelector(target);
|
|
3989
4017
|
if (!tEl) {
|
|
3990
|
-
errLog$
|
|
4018
|
+
errLog$h('vxe.error.errProp', [`target=${target}`, 'body']);
|
|
3991
4019
|
}
|
|
3992
4020
|
const { targetEl } = internalData;
|
|
3993
4021
|
if (targetEl !== tEl) {
|
|
@@ -4066,8 +4094,8 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
4066
4094
|
});
|
|
4067
4095
|
onBeforeUnmount(() => {
|
|
4068
4096
|
removeScrollEvent();
|
|
4069
|
-
XEUtils.assign(reactData, createReactData$
|
|
4070
|
-
XEUtils.assign(internalData, createInternalData$
|
|
4097
|
+
XEUtils.assign(reactData, createReactData$i());
|
|
4098
|
+
XEUtils.assign(internalData, createInternalData$h());
|
|
4071
4099
|
});
|
|
4072
4100
|
$xeBacktop.renderVN = renderVN;
|
|
4073
4101
|
return $xeBacktop;
|
|
@@ -4688,7 +4716,7 @@ function checkDateInputFormat(numStr, formatKey) {
|
|
|
4688
4716
|
return numVal;
|
|
4689
4717
|
}
|
|
4690
4718
|
|
|
4691
|
-
const { errLog: errLog$
|
|
4719
|
+
const { errLog: errLog$g } = createComponentLog('calendar');
|
|
4692
4720
|
const { menus: menus$2, getConfig: getConfig$2, getI18n: getI18n$1 } = VxeUI;
|
|
4693
4721
|
var VxeCalendarComponent = defineVxeComponent({
|
|
4694
4722
|
name: 'VxeCalendar',
|
|
@@ -5956,7 +5984,7 @@ var VxeCalendarComponent = defineVxeComponent({
|
|
|
5956
5984
|
const { menuConfig } = props;
|
|
5957
5985
|
const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
|
|
5958
5986
|
if (menuConfig && !VxeUIContextMenu) {
|
|
5959
|
-
errLog$
|
|
5987
|
+
errLog$g('vxe.error.reqComp', ['vxe-context-menu']);
|
|
5960
5988
|
}
|
|
5961
5989
|
dateOpenPanel();
|
|
5962
5990
|
});
|
|
@@ -6731,28 +6759,80 @@ dynamicApp.use(VxeCarouselItem);
|
|
|
6731
6759
|
VxeUI.component(VxeCarouselItemComponent);
|
|
6732
6760
|
const CarouselItem = VxeCarouselItem;
|
|
6733
6761
|
|
|
6734
|
-
function enNodeValue
|
|
6762
|
+
function enNodeValue(nodeid) {
|
|
6735
6763
|
return XEUtils.eqNull(nodeid) ? '' : encodeURIComponent(`${nodeid}`);
|
|
6736
6764
|
}
|
|
6737
|
-
function deNodeValue
|
|
6765
|
+
function deNodeValue(nodeid) {
|
|
6738
6766
|
return nodeid ? decodeURIComponent(`${nodeid}`) : nodeid;
|
|
6739
6767
|
}
|
|
6740
6768
|
|
|
6741
|
-
|
|
6769
|
+
// 跨列表拖拽
|
|
6770
|
+
const crossListDragRowInfo = reactive({
|
|
6771
|
+
row: null
|
|
6772
|
+
});
|
|
6773
|
+
function getCrossListDragRowInfo() {
|
|
6774
|
+
return crossListDragRowInfo;
|
|
6775
|
+
}
|
|
6776
|
+
|
|
6777
|
+
const rowMoveCls = 'row--drag-move';
|
|
6778
|
+
/**
|
|
6779
|
+
* 上下拖拽
|
|
6780
|
+
*/
|
|
6781
|
+
function moveRowAnimateToTb(elemList, offsetTop) {
|
|
6782
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
6783
|
+
trEl.style.transform = `translateY(${offsetTop}px)`;
|
|
6784
|
+
});
|
|
6785
|
+
requestAnimationFrame(() => {
|
|
6786
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
6787
|
+
addClass(trEl, rowMoveCls);
|
|
6788
|
+
trEl.style.transform = '';
|
|
6789
|
+
});
|
|
6790
|
+
});
|
|
6791
|
+
}
|
|
6792
|
+
function clearRowAnimate(elem, clss) {
|
|
6793
|
+
setTimeout(() => {
|
|
6794
|
+
if (elem) {
|
|
6795
|
+
XEUtils.arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, rowMoveCls));
|
|
6796
|
+
}
|
|
6797
|
+
}, 500);
|
|
6798
|
+
}
|
|
6799
|
+
|
|
6800
|
+
const { errLog: errLog$f } = createComponentLog('tree');
|
|
6801
|
+
function getRowKeyByField(row, keyField) {
|
|
6802
|
+
return row ? ('' + (row[keyField] || '')) : '';
|
|
6803
|
+
}
|
|
6804
|
+
function getRowIdByField(row, keyField) {
|
|
6805
|
+
if (!row) {
|
|
6806
|
+
return '';
|
|
6807
|
+
}
|
|
6808
|
+
const rowKey = getRowKeyByField(row, keyField);
|
|
6809
|
+
return enModelValue(rowKey);
|
|
6810
|
+
}
|
|
6811
|
+
function createReactData$h() {
|
|
6742
6812
|
return {
|
|
6743
6813
|
scrollYLoad: false,
|
|
6744
6814
|
bodyHeight: 0,
|
|
6815
|
+
headHeight: 0,
|
|
6816
|
+
footHeight: 0,
|
|
6745
6817
|
customHeight: 0,
|
|
6746
6818
|
customMaxHeight: 0,
|
|
6747
6819
|
parentHeight: 0,
|
|
6748
6820
|
topSpaceHeight: 0,
|
|
6749
|
-
|
|
6821
|
+
rowList: [],
|
|
6822
|
+
selectRadioRow: null,
|
|
6823
|
+
currRowFlag: 1,
|
|
6824
|
+
updateCheckboxFlag: 1,
|
|
6825
|
+
isAllChecked: false,
|
|
6826
|
+
isAllIndeterminate: false,
|
|
6827
|
+
dragRow: null,
|
|
6828
|
+
dragTipText: ''
|
|
6750
6829
|
};
|
|
6751
6830
|
}
|
|
6752
|
-
function createInternalData$
|
|
6831
|
+
function createInternalData$g() {
|
|
6753
6832
|
return {
|
|
6754
6833
|
resizeObserver: undefined,
|
|
6755
6834
|
fullData: [],
|
|
6835
|
+
fullKeyMaps: {},
|
|
6756
6836
|
lastScrollLeft: 0,
|
|
6757
6837
|
lastScrollTop: 0,
|
|
6758
6838
|
scrollYStore: {
|
|
@@ -6761,7 +6841,11 @@ function createInternalData$e() {
|
|
|
6761
6841
|
visibleSize: 0,
|
|
6762
6842
|
offsetSize: 0,
|
|
6763
6843
|
rowHeight: 0
|
|
6764
|
-
}
|
|
6844
|
+
},
|
|
6845
|
+
currentRow: null,
|
|
6846
|
+
selectCheckboxMaps: {}
|
|
6847
|
+
// prevDragRow: null,
|
|
6848
|
+
// prevDragPos: ''
|
|
6765
6849
|
};
|
|
6766
6850
|
}
|
|
6767
6851
|
var VxeListComponent = defineVxeComponent({
|
|
@@ -6781,22 +6865,52 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6781
6865
|
default: () => getConfig$3().list.autoResize
|
|
6782
6866
|
},
|
|
6783
6867
|
syncResize: [Boolean, String, Number],
|
|
6868
|
+
showRadio: {
|
|
6869
|
+
type: Boolean,
|
|
6870
|
+
default: () => getConfig$3().list.showRadio
|
|
6871
|
+
},
|
|
6872
|
+
checkRowKey: [String, Number],
|
|
6873
|
+
radioConfig: Object,
|
|
6874
|
+
showCheckbox: {
|
|
6875
|
+
type: Boolean,
|
|
6876
|
+
default: () => getConfig$3().list.showCheckbox
|
|
6877
|
+
},
|
|
6878
|
+
checkRowKeys: Array,
|
|
6879
|
+
checkboxConfig: Object,
|
|
6880
|
+
rowConfig: Object,
|
|
6881
|
+
dragConfig: Object,
|
|
6784
6882
|
virtualYConfig: Object,
|
|
6785
6883
|
scrollY: Object
|
|
6786
6884
|
},
|
|
6787
6885
|
emits: [
|
|
6788
|
-
'
|
|
6886
|
+
'update:checkRowKey',
|
|
6887
|
+
'update:checkRowKeys',
|
|
6888
|
+
'row-click',
|
|
6889
|
+
'row-dblclick',
|
|
6890
|
+
'current-change',
|
|
6891
|
+
'radio-change',
|
|
6892
|
+
'checkbox-change',
|
|
6893
|
+
'checkbox-all',
|
|
6894
|
+
'scroll',
|
|
6895
|
+
'row-dragstart',
|
|
6896
|
+
'row-dragover',
|
|
6897
|
+
'row-dragend'
|
|
6789
6898
|
],
|
|
6790
6899
|
setup(props, context) {
|
|
6791
6900
|
const { slots, emit } = context;
|
|
6792
6901
|
const xID = XEUtils.uniqueId();
|
|
6793
6902
|
const browseObj = XEUtils.browse();
|
|
6794
6903
|
const { computeSize } = useSize(props);
|
|
6795
|
-
const reactData = reactive(createReactData$
|
|
6796
|
-
const internalData = createInternalData$
|
|
6904
|
+
const reactData = reactive(createReactData$h());
|
|
6905
|
+
const internalData = createInternalData$g();
|
|
6906
|
+
const crossListDragRowInfo = getCrossListDragRowInfo();
|
|
6797
6907
|
const refElem = ref();
|
|
6908
|
+
const refHeaderElem = ref();
|
|
6909
|
+
const refFooterElem = ref();
|
|
6798
6910
|
const refVirtualWrapper = ref();
|
|
6799
6911
|
const refVirtualBody = ref();
|
|
6912
|
+
const refDragRowLineElem = ref();
|
|
6913
|
+
const refDragTipElem = ref();
|
|
6800
6914
|
const refMaps = {
|
|
6801
6915
|
refElem
|
|
6802
6916
|
};
|
|
@@ -6808,25 +6922,70 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6808
6922
|
internalData,
|
|
6809
6923
|
getRefMaps: () => refMaps
|
|
6810
6924
|
};
|
|
6925
|
+
const computeRowOpts = computed(() => {
|
|
6926
|
+
return Object.assign({}, getConfig$3().list.rowConfig, props.rowConfig);
|
|
6927
|
+
});
|
|
6928
|
+
const computeDragOpts = computed(() => {
|
|
6929
|
+
return Object.assign({}, getConfig$3().list.dragConfig, props.dragConfig);
|
|
6930
|
+
});
|
|
6811
6931
|
const computeSYOpts = computed(() => {
|
|
6812
6932
|
return Object.assign({}, getConfig$3().list.virtualYConfig || getConfig$3().list.scrollY, props.virtualYConfig || props.scrollY);
|
|
6813
6933
|
});
|
|
6814
|
-
const
|
|
6934
|
+
const computeKeyField = computed(() => {
|
|
6935
|
+
const rowOpts = computeRowOpts.value;
|
|
6936
|
+
const { keyField } = rowOpts;
|
|
6937
|
+
return keyField || '';
|
|
6938
|
+
});
|
|
6939
|
+
const computeIsDrag = computed(() => {
|
|
6940
|
+
const { dragConfig } = props;
|
|
6941
|
+
const dragOpts = computeDragOpts.value;
|
|
6942
|
+
return dragConfig && isEnableConf(dragOpts);
|
|
6943
|
+
});
|
|
6944
|
+
const computeRowHeight = computed(() => {
|
|
6945
|
+
const rowOpts = computeRowOpts.value;
|
|
6946
|
+
const { height } = rowOpts;
|
|
6947
|
+
return height;
|
|
6948
|
+
});
|
|
6949
|
+
const computeRadioOpts = computed(() => {
|
|
6950
|
+
return Object.assign({ showIcon: true }, getConfig$3().list.radioConfig, props.radioConfig);
|
|
6951
|
+
});
|
|
6952
|
+
const computeCheckboxOpts = computed(() => {
|
|
6953
|
+
return Object.assign({ showIcon: true }, getConfig$3().list.checkboxConfig, props.checkboxConfig);
|
|
6954
|
+
});
|
|
6955
|
+
const computeWrapperStyles = computed(() => {
|
|
6956
|
+
const rowHeight = computeRowHeight.value;
|
|
6957
|
+
const style = {};
|
|
6958
|
+
if (rowHeight) {
|
|
6959
|
+
style['--vxe-ui-list-row-height'] = toCssUnit(rowHeight);
|
|
6960
|
+
}
|
|
6961
|
+
return style;
|
|
6962
|
+
});
|
|
6963
|
+
const computeVirtualStyles = computed(() => {
|
|
6815
6964
|
const { height, maxHeight } = props;
|
|
6816
|
-
const { customHeight, customMaxHeight } = reactData;
|
|
6965
|
+
const { customHeight, customMaxHeight, headHeight, footHeight } = reactData;
|
|
6817
6966
|
const style = {};
|
|
6818
6967
|
if (height) {
|
|
6819
|
-
style.height =
|
|
6968
|
+
style.height = toCssUnit(Math.max(20, customHeight - headHeight - footHeight));
|
|
6820
6969
|
}
|
|
6821
6970
|
else if (maxHeight) {
|
|
6822
6971
|
style.height = 'auto';
|
|
6823
|
-
style.maxHeight =
|
|
6972
|
+
style.maxHeight = toCssUnit(Math.max(20, customMaxHeight - headHeight - footHeight));
|
|
6824
6973
|
}
|
|
6825
6974
|
return style;
|
|
6826
6975
|
});
|
|
6827
6976
|
const dispatchEvent = (type, params, evnt) => {
|
|
6828
6977
|
emit(type, createEvent(evnt, { $list: $xeList }, params));
|
|
6829
6978
|
};
|
|
6979
|
+
const emitCheckboxMode = (value) => {
|
|
6980
|
+
emit('update:checkRowKeys', value);
|
|
6981
|
+
};
|
|
6982
|
+
const emitRadioMode = (value) => {
|
|
6983
|
+
emit('update:checkRowKey', value);
|
|
6984
|
+
};
|
|
6985
|
+
const getRowId = (row) => {
|
|
6986
|
+
const keyField = computeKeyField.value;
|
|
6987
|
+
return getRowIdByField(row, keyField);
|
|
6988
|
+
};
|
|
6830
6989
|
const calcTableHeight = (key) => {
|
|
6831
6990
|
const { parentHeight } = reactData;
|
|
6832
6991
|
const val = props[key];
|
|
@@ -6848,6 +7007,10 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6848
7007
|
return num;
|
|
6849
7008
|
};
|
|
6850
7009
|
const updateHeight = () => {
|
|
7010
|
+
const headEl = refHeaderElem.value;
|
|
7011
|
+
const footEl = refFooterElem.value;
|
|
7012
|
+
reactData.headHeight = headEl ? Math.floor(headEl.offsetHeight) : 0;
|
|
7013
|
+
reactData.footHeight = footEl ? Math.floor(footEl.offsetHeight) : 0;
|
|
6851
7014
|
reactData.customHeight = calcTableHeight('height');
|
|
6852
7015
|
reactData.customMaxHeight = calcTableHeight('maxHeight');
|
|
6853
7016
|
};
|
|
@@ -6860,7 +7023,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6860
7023
|
const handleData = () => {
|
|
6861
7024
|
const { scrollYLoad } = reactData;
|
|
6862
7025
|
const { fullData, scrollYStore } = internalData;
|
|
6863
|
-
reactData.
|
|
7026
|
+
reactData.rowList = scrollYLoad ? fullData.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullData.slice(0);
|
|
6864
7027
|
return nextTick();
|
|
6865
7028
|
};
|
|
6866
7029
|
const updateYData = () => {
|
|
@@ -6874,17 +7037,17 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6874
7037
|
const virtualBodyElem = refVirtualBody.value;
|
|
6875
7038
|
const sYOpts = computeSYOpts.value;
|
|
6876
7039
|
let rowHeight = 0;
|
|
6877
|
-
let
|
|
7040
|
+
let firstRowElem;
|
|
6878
7041
|
if (virtualBodyElem) {
|
|
6879
7042
|
if (sYOpts.sItem) {
|
|
6880
|
-
|
|
7043
|
+
firstRowElem = virtualBodyElem.querySelector(sYOpts.sItem);
|
|
6881
7044
|
}
|
|
6882
|
-
if (!
|
|
6883
|
-
|
|
7045
|
+
if (!firstRowElem) {
|
|
7046
|
+
firstRowElem = virtualBodyElem.children[0];
|
|
6884
7047
|
}
|
|
6885
7048
|
}
|
|
6886
|
-
if (
|
|
6887
|
-
rowHeight =
|
|
7049
|
+
if (firstRowElem) {
|
|
7050
|
+
rowHeight = firstRowElem.offsetHeight;
|
|
6888
7051
|
}
|
|
6889
7052
|
rowHeight = Math.max(12, rowHeight);
|
|
6890
7053
|
scrollYStore.rowHeight = rowHeight;
|
|
@@ -6998,6 +7161,44 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6998
7161
|
}
|
|
6999
7162
|
dispatchEvent('scroll', { scrollLeft, scrollTop, isX, isY }, evnt);
|
|
7000
7163
|
};
|
|
7164
|
+
const updateRadioModeValue = () => {
|
|
7165
|
+
const { checkRowKey } = props;
|
|
7166
|
+
const { fullKeyMaps } = internalData;
|
|
7167
|
+
if (checkRowKey) {
|
|
7168
|
+
const row = fullKeyMaps[checkRowKey];
|
|
7169
|
+
reactData.selectRadioRow = row || null;
|
|
7170
|
+
}
|
|
7171
|
+
else {
|
|
7172
|
+
reactData.selectRadioRow = null;
|
|
7173
|
+
}
|
|
7174
|
+
};
|
|
7175
|
+
const updateCheckboxModeValue = () => {
|
|
7176
|
+
const { checkRowKeys } = props;
|
|
7177
|
+
const { fullKeyMaps } = internalData;
|
|
7178
|
+
const keyField = computeKeyField.value;
|
|
7179
|
+
const selectMaps = {};
|
|
7180
|
+
if (checkRowKeys && checkRowKeys.length) {
|
|
7181
|
+
for (const rowKey of checkRowKeys) {
|
|
7182
|
+
const row = fullKeyMaps[rowKey];
|
|
7183
|
+
if (row) {
|
|
7184
|
+
const rowid = getRowIdByField(row, keyField);
|
|
7185
|
+
selectMaps[rowid] = row;
|
|
7186
|
+
}
|
|
7187
|
+
}
|
|
7188
|
+
}
|
|
7189
|
+
internalData.selectCheckboxMaps = selectMaps;
|
|
7190
|
+
updateCheckboxStatus();
|
|
7191
|
+
};
|
|
7192
|
+
const cacheRowMap = () => {
|
|
7193
|
+
const { fullData } = internalData;
|
|
7194
|
+
const keyField = computeKeyField.value;
|
|
7195
|
+
const keyMaps = {};
|
|
7196
|
+
fullData.forEach(row => {
|
|
7197
|
+
const rowKey = getRowKeyByField(row, keyField);
|
|
7198
|
+
keyMaps[rowKey] = row;
|
|
7199
|
+
});
|
|
7200
|
+
internalData.fullKeyMaps = keyMaps;
|
|
7201
|
+
};
|
|
7001
7202
|
/**
|
|
7002
7203
|
* 加载数据
|
|
7003
7204
|
* @param {Array} datas 数据
|
|
@@ -7014,11 +7215,685 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7014
7215
|
internalData.fullData = fullData;
|
|
7015
7216
|
// 如果gt为0,则总是启用
|
|
7016
7217
|
reactData.scrollYLoad = !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= fullData.length);
|
|
7218
|
+
cacheRowMap();
|
|
7017
7219
|
handleData();
|
|
7220
|
+
updateRadioModeValue();
|
|
7221
|
+
updateCheckboxModeValue();
|
|
7018
7222
|
return computeScrollLoad().then(() => {
|
|
7019
7223
|
refreshScroll();
|
|
7020
7224
|
});
|
|
7021
7225
|
};
|
|
7226
|
+
const clearRowDropOrigin = () => {
|
|
7227
|
+
const el = refElem.value;
|
|
7228
|
+
if (el) {
|
|
7229
|
+
const clss = 'row--drag-origin';
|
|
7230
|
+
XEUtils.arrayEach(el.querySelectorAll(`.${clss}`), (elem) => {
|
|
7231
|
+
elem.draggable = false;
|
|
7232
|
+
removeClass(elem, clss);
|
|
7233
|
+
});
|
|
7234
|
+
}
|
|
7235
|
+
};
|
|
7236
|
+
const updateRowDropOrigin = (row) => {
|
|
7237
|
+
const sYOpts = computeSYOpts.value;
|
|
7238
|
+
const { sItem } = sYOpts;
|
|
7239
|
+
const el = refElem.value;
|
|
7240
|
+
if (el) {
|
|
7241
|
+
const clss = 'row--drag-origin';
|
|
7242
|
+
const rowid = getRowId(row);
|
|
7243
|
+
XEUtils.arrayEach(el.querySelectorAll(`.vxe-list--row[rowid="${rowid}"]` + (sItem ? `${sItem}[rowid="${rowid}"]` : '')), (elem) => {
|
|
7244
|
+
addClass(elem, clss);
|
|
7245
|
+
});
|
|
7246
|
+
}
|
|
7247
|
+
};
|
|
7248
|
+
const updateRowDropTipContent = (rowEl) => {
|
|
7249
|
+
const { dragRow } = reactData;
|
|
7250
|
+
const dragOpts = computeDragOpts.value;
|
|
7251
|
+
const { tooltipMethod } = dragOpts;
|
|
7252
|
+
const rTooltipMethod = tooltipMethod;
|
|
7253
|
+
let tipContent = '';
|
|
7254
|
+
if (rTooltipMethod) {
|
|
7255
|
+
const rtParams = {
|
|
7256
|
+
$list: $xeList,
|
|
7257
|
+
row: dragRow
|
|
7258
|
+
};
|
|
7259
|
+
tipContent = `${rTooltipMethod(rtParams) || ''}`;
|
|
7260
|
+
}
|
|
7261
|
+
else {
|
|
7262
|
+
tipContent = getI18n$2('vxe.list.dragTip', [rowEl.textContent || '']);
|
|
7263
|
+
}
|
|
7264
|
+
reactData.dragTipText = tipContent;
|
|
7265
|
+
};
|
|
7266
|
+
const hideDropTip = () => {
|
|
7267
|
+
const rdTipEl = refDragTipElem.value;
|
|
7268
|
+
const rdLineEl = refDragRowLineElem.value;
|
|
7269
|
+
if (rdTipEl) {
|
|
7270
|
+
rdTipEl.style.display = '';
|
|
7271
|
+
}
|
|
7272
|
+
if (rdLineEl) {
|
|
7273
|
+
rdLineEl.style.display = '';
|
|
7274
|
+
}
|
|
7275
|
+
};
|
|
7276
|
+
const clearCrossListDragStatus = () => {
|
|
7277
|
+
// crossListDragRowObj = null
|
|
7278
|
+
crossListDragRowInfo.row = null;
|
|
7279
|
+
};
|
|
7280
|
+
const clearDragStatus = () => {
|
|
7281
|
+
const { dragRow } = reactData;
|
|
7282
|
+
if (dragRow) {
|
|
7283
|
+
hideDropTip();
|
|
7284
|
+
clearRowDropOrigin();
|
|
7285
|
+
clearCrossListDragStatus();
|
|
7286
|
+
reactData.dragRow = null;
|
|
7287
|
+
}
|
|
7288
|
+
};
|
|
7289
|
+
const handleRowDragMousedownEvent = (evnt, params) => {
|
|
7290
|
+
evnt.stopPropagation();
|
|
7291
|
+
const { row } = params;
|
|
7292
|
+
const dragConfig = computeDragOpts.value;
|
|
7293
|
+
const { trigger, dragStartMethod } = dragConfig;
|
|
7294
|
+
const dragEl = evnt.currentTarget;
|
|
7295
|
+
const rowEl = trigger === 'row' ? dragEl : dragEl.parentElement.parentElement;
|
|
7296
|
+
clearRowDropOrigin();
|
|
7297
|
+
if (dragStartMethod && !dragStartMethod(params)) {
|
|
7298
|
+
rowEl.draggable = false;
|
|
7299
|
+
reactData.dragRow = null;
|
|
7300
|
+
hideDropTip();
|
|
7301
|
+
return;
|
|
7302
|
+
}
|
|
7303
|
+
const dragstartEventParams = {
|
|
7304
|
+
row
|
|
7305
|
+
};
|
|
7306
|
+
reactData.dragRow = row;
|
|
7307
|
+
rowEl.draggable = true;
|
|
7308
|
+
updateRowDropOrigin(row);
|
|
7309
|
+
updateRowDropTipContent(rowEl);
|
|
7310
|
+
dispatchEvent('row-dragstart', dragstartEventParams, evnt);
|
|
7311
|
+
};
|
|
7312
|
+
const handleRowDragMouseupEvent = () => {
|
|
7313
|
+
clearDragStatus();
|
|
7314
|
+
};
|
|
7315
|
+
const showDropTip = (evnt, rowEl, showLine, dragPos) => {
|
|
7316
|
+
const wrapperEl = refElem.value;
|
|
7317
|
+
if (!wrapperEl) {
|
|
7318
|
+
return;
|
|
7319
|
+
}
|
|
7320
|
+
const wrapperRect = wrapperEl.getBoundingClientRect();
|
|
7321
|
+
const wrapperHeight = wrapperEl.clientHeight;
|
|
7322
|
+
if (rowEl) {
|
|
7323
|
+
const rdLineEl = refDragRowLineElem.value;
|
|
7324
|
+
if (rdLineEl) {
|
|
7325
|
+
if (showLine) {
|
|
7326
|
+
const trRect = rowEl.getBoundingClientRect();
|
|
7327
|
+
let rowHeight = rowEl.clientHeight;
|
|
7328
|
+
const offsetTop = Math.max(1, trRect.y - wrapperRect.y);
|
|
7329
|
+
if (offsetTop + rowHeight > wrapperHeight) {
|
|
7330
|
+
rowHeight = wrapperHeight - offsetTop;
|
|
7331
|
+
}
|
|
7332
|
+
rdLineEl.style.display = 'block';
|
|
7333
|
+
rdLineEl.style.top = `${offsetTop}px`;
|
|
7334
|
+
rdLineEl.style.height = `${rowHeight}px`;
|
|
7335
|
+
rdLineEl.setAttribute('drag-pos', dragPos);
|
|
7336
|
+
}
|
|
7337
|
+
else {
|
|
7338
|
+
rdLineEl.style.display = '';
|
|
7339
|
+
}
|
|
7340
|
+
}
|
|
7341
|
+
}
|
|
7342
|
+
const rdTipEl = refDragTipElem.value;
|
|
7343
|
+
if (rdTipEl) {
|
|
7344
|
+
rdTipEl.style.display = 'block';
|
|
7345
|
+
rdTipEl.style.top = `${Math.min(wrapperEl.clientHeight - wrapperEl.scrollTop - rdTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
|
|
7346
|
+
rdTipEl.style.left = `${Math.min(wrapperEl.clientWidth - wrapperEl.scrollLeft - rdTipEl.clientWidth - 1, evnt.clientX - wrapperRect.x)}px`;
|
|
7347
|
+
rdTipEl.setAttribute('drag-status', showLine ? 'normal' : 'disabled');
|
|
7348
|
+
}
|
|
7349
|
+
};
|
|
7350
|
+
const clearRowDragData = () => {
|
|
7351
|
+
const wrapperEl = refElem.value;
|
|
7352
|
+
const dtClss = ['.vxe-list--row'];
|
|
7353
|
+
hideDropTip();
|
|
7354
|
+
clearRowDropOrigin();
|
|
7355
|
+
clearRowAnimate(wrapperEl, dtClss);
|
|
7356
|
+
reactData.dragRow = null;
|
|
7357
|
+
};
|
|
7358
|
+
const handleRowDragSwapEvent = (evnt, dragRow, prevDragRow, prevDragPos) => {
|
|
7359
|
+
const { fullData } = internalData;
|
|
7360
|
+
const dragConfig = computeDragOpts.value;
|
|
7361
|
+
const { animation, dragEndMethod } = dragConfig;
|
|
7362
|
+
const dEndMethod = dragEndMethod || (dragConfig ? dragConfig.dragEndMethod : null);
|
|
7363
|
+
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
7364
|
+
const el = refElem.value;
|
|
7365
|
+
const errRest = {
|
|
7366
|
+
status: false
|
|
7367
|
+
};
|
|
7368
|
+
if (!(el && prevDragRow && dragRow)) {
|
|
7369
|
+
return Promise.resolve(errRest);
|
|
7370
|
+
}
|
|
7371
|
+
// 判断是否有拖动
|
|
7372
|
+
if (prevDragRow !== dragRow) {
|
|
7373
|
+
const dragParams = {
|
|
7374
|
+
oldRow: dragRow,
|
|
7375
|
+
newRow: prevDragRow,
|
|
7376
|
+
dragRow,
|
|
7377
|
+
dragPos: prevDragPos,
|
|
7378
|
+
offsetIndex: dragOffsetIndex
|
|
7379
|
+
};
|
|
7380
|
+
const dragRowid = getRowId(dragRow);
|
|
7381
|
+
const _dragRowIndex = findRowIndexOfByKey(fullData, dragRowid);
|
|
7382
|
+
const newRowid = getRowKey(prevDragRow);
|
|
7383
|
+
let dragRowHeight = 0;
|
|
7384
|
+
let dragOffsetTop = -1;
|
|
7385
|
+
if (animation) {
|
|
7386
|
+
const prevRowEl = el.querySelector(`.vxe-list--row[rowid="${newRowid}"]`);
|
|
7387
|
+
const oldRowEl = el.querySelector(`.vxe-list--row[rowid="${dragRowid}"]`);
|
|
7388
|
+
const targetRowEl = prevRowEl || oldRowEl;
|
|
7389
|
+
if (targetRowEl) {
|
|
7390
|
+
dragRowHeight = targetRowEl.offsetHeight;
|
|
7391
|
+
}
|
|
7392
|
+
if (oldRowEl) {
|
|
7393
|
+
dragOffsetTop = oldRowEl.offsetTop;
|
|
7394
|
+
}
|
|
7395
|
+
}
|
|
7396
|
+
let oafIndex = -1;
|
|
7397
|
+
let nafIndex = -1;
|
|
7398
|
+
return Promise.resolve(dEndMethod ? dEndMethod(dragParams) : true).then((status) => {
|
|
7399
|
+
if (!status) {
|
|
7400
|
+
return errRest;
|
|
7401
|
+
}
|
|
7402
|
+
// 移出
|
|
7403
|
+
oafIndex = findRowIndexOf(fullData, dragRow);
|
|
7404
|
+
fullData.splice(oafIndex, 1);
|
|
7405
|
+
// 插入
|
|
7406
|
+
const pafIndex = findRowIndexOf(fullData, prevDragRow);
|
|
7407
|
+
nafIndex = pafIndex + dragOffsetIndex;
|
|
7408
|
+
fullData.splice(nafIndex, 0, dragRow);
|
|
7409
|
+
handleData();
|
|
7410
|
+
if (reactData.scrollYLoad) {
|
|
7411
|
+
updateYSpace();
|
|
7412
|
+
}
|
|
7413
|
+
if (evnt) {
|
|
7414
|
+
const dragendEventParams = {
|
|
7415
|
+
oldRow: dragRow,
|
|
7416
|
+
newRow: prevDragRow,
|
|
7417
|
+
dragRow,
|
|
7418
|
+
dragPos: prevDragPos,
|
|
7419
|
+
offsetIndex: dragOffsetIndex,
|
|
7420
|
+
_index: {
|
|
7421
|
+
newIndex: nafIndex,
|
|
7422
|
+
oldIndex: oafIndex
|
|
7423
|
+
}
|
|
7424
|
+
};
|
|
7425
|
+
dispatchEvent('row-dragend', dragendEventParams, evnt);
|
|
7426
|
+
}
|
|
7427
|
+
return nextTick().then(() => {
|
|
7428
|
+
if (animation) {
|
|
7429
|
+
const { rowList } = reactData;
|
|
7430
|
+
const { fullData } = internalData;
|
|
7431
|
+
const _newRowIndex = findRowIndexOfByKey(fullData, dragRowid);
|
|
7432
|
+
const firstRow = fullData[0];
|
|
7433
|
+
const _firstRowIndex = findRowIndexOf(fullData, firstRow);
|
|
7434
|
+
const wrapperEl = el;
|
|
7435
|
+
if (_firstRowIndex > -1) {
|
|
7436
|
+
const _lastRowIndex = _firstRowIndex + fullData.length;
|
|
7437
|
+
let rsIndex = -1;
|
|
7438
|
+
let reIndex = -1;
|
|
7439
|
+
let offsetRate = 1;
|
|
7440
|
+
if (_dragRowIndex < _firstRowIndex) {
|
|
7441
|
+
// 从上往下虚拟拖拽
|
|
7442
|
+
rsIndex = 0;
|
|
7443
|
+
reIndex = _newRowIndex - _firstRowIndex;
|
|
7444
|
+
}
|
|
7445
|
+
else if (_dragRowIndex > _lastRowIndex) {
|
|
7446
|
+
// 从下往上虚拟拖拽
|
|
7447
|
+
const $newRowIndex = findRowIndexOfByKey(rowList, dragRowid);
|
|
7448
|
+
rsIndex = $newRowIndex + 1;
|
|
7449
|
+
reIndex = fullData.length;
|
|
7450
|
+
offsetRate = -1;
|
|
7451
|
+
}
|
|
7452
|
+
else {
|
|
7453
|
+
if (_newRowIndex > _dragRowIndex) {
|
|
7454
|
+
// 从上往下拖拽
|
|
7455
|
+
rsIndex = _dragRowIndex - _firstRowIndex;
|
|
7456
|
+
reIndex = rsIndex + _newRowIndex - _dragRowIndex;
|
|
7457
|
+
}
|
|
7458
|
+
else {
|
|
7459
|
+
// 从下往上拖拽
|
|
7460
|
+
rsIndex = _newRowIndex - _firstRowIndex;
|
|
7461
|
+
reIndex = rsIndex + _dragRowIndex - _newRowIndex + 1;
|
|
7462
|
+
offsetRate = -1;
|
|
7463
|
+
}
|
|
7464
|
+
}
|
|
7465
|
+
const dragRangeList = fullData.slice(rsIndex, reIndex);
|
|
7466
|
+
if (dragRangeList.length) {
|
|
7467
|
+
const dtClss = [];
|
|
7468
|
+
dragRangeList.forEach(obj => {
|
|
7469
|
+
const rowid = getRowId(obj);
|
|
7470
|
+
dtClss.push(`.vxe-list--row[rowid="${rowid}"]`);
|
|
7471
|
+
});
|
|
7472
|
+
const dtTrList = wrapperEl.querySelectorAll(dtClss.join(','));
|
|
7473
|
+
moveRowAnimateToTb(dtTrList, offsetRate * dragRowHeight);
|
|
7474
|
+
}
|
|
7475
|
+
}
|
|
7476
|
+
const drClss = [`.vxe-list--row[rowid="${dragRowid}"]`];
|
|
7477
|
+
const newDtTrList = wrapperEl.querySelectorAll(drClss.join(','));
|
|
7478
|
+
const newTrEl = newDtTrList[0];
|
|
7479
|
+
if (dragOffsetTop > -1 && newTrEl) {
|
|
7480
|
+
moveRowAnimateToTb(newDtTrList, dragOffsetTop - newTrEl.offsetTop);
|
|
7481
|
+
}
|
|
7482
|
+
}
|
|
7483
|
+
recalculate();
|
|
7484
|
+
}).then(() => {
|
|
7485
|
+
return {
|
|
7486
|
+
status: true
|
|
7487
|
+
};
|
|
7488
|
+
});
|
|
7489
|
+
}).catch(() => {
|
|
7490
|
+
return errRest;
|
|
7491
|
+
}).then((rest) => {
|
|
7492
|
+
clearRowDragData();
|
|
7493
|
+
clearCrossListDragStatus();
|
|
7494
|
+
return rest;
|
|
7495
|
+
});
|
|
7496
|
+
}
|
|
7497
|
+
clearRowDragData();
|
|
7498
|
+
clearCrossListDragStatus();
|
|
7499
|
+
return Promise.resolve(errRest);
|
|
7500
|
+
};
|
|
7501
|
+
const handleRowDragDragstartEvent = (evnt) => {
|
|
7502
|
+
if (evnt.dataTransfer) {
|
|
7503
|
+
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
|
|
7504
|
+
}
|
|
7505
|
+
};
|
|
7506
|
+
const handleRowDragDragendEvent = (evnt) => {
|
|
7507
|
+
const { dragRow } = reactData;
|
|
7508
|
+
const { prevDragRow, prevDragPos } = internalData;
|
|
7509
|
+
handleRowDragSwapEvent(evnt, dragRow, prevDragRow, prevDragPos);
|
|
7510
|
+
};
|
|
7511
|
+
const handleRowDragDragoverEvent = (evnt) => {
|
|
7512
|
+
const { dragRow } = reactData;
|
|
7513
|
+
const { fullData } = internalData;
|
|
7514
|
+
if (!dragRow) {
|
|
7515
|
+
evnt.preventDefault();
|
|
7516
|
+
}
|
|
7517
|
+
const rowEl = evnt.currentTarget;
|
|
7518
|
+
const rowid = rowEl.getAttribute('rowid') || '';
|
|
7519
|
+
const row = findRowByKey(fullData, rowid);
|
|
7520
|
+
if (row) {
|
|
7521
|
+
evnt.preventDefault();
|
|
7522
|
+
const offsetY = evnt.clientY - rowEl.getBoundingClientRect().y;
|
|
7523
|
+
const dragPos = offsetY < rowEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
7524
|
+
internalData.prevDragRow = row;
|
|
7525
|
+
internalData.prevDragPos = dragPos;
|
|
7526
|
+
if ((dragRow && getRowId(dragRow) === rowid)) {
|
|
7527
|
+
showDropTip(evnt, rowEl, false, dragPos);
|
|
7528
|
+
return;
|
|
7529
|
+
}
|
|
7530
|
+
const dragOffsetIndex = dragPos === 'bottom' ? 1 : 0;
|
|
7531
|
+
const offsetIndex = dragOffsetIndex;
|
|
7532
|
+
const dragoverEventParams = {
|
|
7533
|
+
oldRow: dragRow,
|
|
7534
|
+
targetRow: row,
|
|
7535
|
+
dragPos,
|
|
7536
|
+
dragRow,
|
|
7537
|
+
offsetIndex
|
|
7538
|
+
};
|
|
7539
|
+
showDropTip(evnt, rowEl, true, dragPos);
|
|
7540
|
+
dispatchEvent('row-dragover', dragoverEventParams, evnt);
|
|
7541
|
+
}
|
|
7542
|
+
};
|
|
7543
|
+
const handleRowMousedownEvent = (evnt, row) => {
|
|
7544
|
+
const dragConfig = computeDragOpts.value;
|
|
7545
|
+
const isDrag = computeIsDrag.value;
|
|
7546
|
+
const { trigger, disabledMethod } = dragConfig;
|
|
7547
|
+
let isRowDrag = false;
|
|
7548
|
+
if (isDrag) {
|
|
7549
|
+
isRowDrag = trigger === 'row';
|
|
7550
|
+
}
|
|
7551
|
+
const params = { row, $list: $xeList };
|
|
7552
|
+
if (isRowDrag && !(disabledMethod && disabledMethod(params))) {
|
|
7553
|
+
handleRowDragMousedownEvent(evnt, params);
|
|
7554
|
+
}
|
|
7555
|
+
};
|
|
7556
|
+
const handleRowClickEvent = (evnt, row) => {
|
|
7557
|
+
const { currentRow } = internalData;
|
|
7558
|
+
const rowOpts = computeRowOpts.value;
|
|
7559
|
+
const { isCurrent } = rowOpts;
|
|
7560
|
+
let triggerCurrent = false;
|
|
7561
|
+
if (isCurrent) {
|
|
7562
|
+
triggerCurrent = true;
|
|
7563
|
+
changeCurrentEvent(evnt, row);
|
|
7564
|
+
}
|
|
7565
|
+
else if (currentRow) {
|
|
7566
|
+
internalData.currentRow = null;
|
|
7567
|
+
reactData.currRowFlag++;
|
|
7568
|
+
}
|
|
7569
|
+
dispatchEvent('row-click', { row, triggerCurrent }, evnt);
|
|
7570
|
+
};
|
|
7571
|
+
const handleRowDblclickEvent = (evnt, row) => {
|
|
7572
|
+
dispatchEvent('row-dblclick', { row }, evnt);
|
|
7573
|
+
};
|
|
7574
|
+
const getRowKey = (row) => {
|
|
7575
|
+
const keyField = computeKeyField.value;
|
|
7576
|
+
return getRowKeyByField(row, keyField);
|
|
7577
|
+
};
|
|
7578
|
+
const eqRowKey = (rowKey1, rowKey2) => {
|
|
7579
|
+
return ('' + rowKey1) === ('' + rowKey2);
|
|
7580
|
+
};
|
|
7581
|
+
const eqRow = (row1, row2) => {
|
|
7582
|
+
if (row1 && row2) {
|
|
7583
|
+
if (row1 === row2) {
|
|
7584
|
+
return true;
|
|
7585
|
+
}
|
|
7586
|
+
return eqRowKey(getRowId(row1), getRowId(row2));
|
|
7587
|
+
}
|
|
7588
|
+
return false;
|
|
7589
|
+
};
|
|
7590
|
+
const eqRowByKey = (row, rowKey) => {
|
|
7591
|
+
return row && eqRowKey(getRowKey(row), rowKey);
|
|
7592
|
+
};
|
|
7593
|
+
const findRow = (list, row) => {
|
|
7594
|
+
return row ? XEUtils.find(list, obj => eqRow(obj, row)) : null;
|
|
7595
|
+
};
|
|
7596
|
+
const findRowByKey = (list, rowKey) => {
|
|
7597
|
+
const keyField = computeKeyField.value;
|
|
7598
|
+
return XEUtils.find(list, obj => eqRowKey(getRowIdByField(obj, keyField), rowKey));
|
|
7599
|
+
};
|
|
7600
|
+
const findRowIndexOf = (list, row) => {
|
|
7601
|
+
return row ? XEUtils.findIndexOf(list, obj => eqRow(obj, row)) : -1;
|
|
7602
|
+
};
|
|
7603
|
+
const findRowIndexOfByKey = (list, rowKey) => {
|
|
7604
|
+
const keyField = computeKeyField.value;
|
|
7605
|
+
return XEUtils.findIndexOf(list, obj => eqRowKey(getRowIdByField(obj, keyField), rowKey));
|
|
7606
|
+
};
|
|
7607
|
+
const isCheckedByRadioRowKey = (rowKey) => {
|
|
7608
|
+
const { selectRadioRow } = reactData;
|
|
7609
|
+
return getRowKey(selectRadioRow) === rowKey;
|
|
7610
|
+
};
|
|
7611
|
+
const isCheckedByRadioRow = (row) => {
|
|
7612
|
+
return isCheckedByRadioRowKey(getRowKey(row));
|
|
7613
|
+
};
|
|
7614
|
+
const isCheckedByCheckboxRowKey = (rowid) => {
|
|
7615
|
+
const { updateCheckboxFlag } = reactData;
|
|
7616
|
+
const { selectCheckboxMaps } = internalData;
|
|
7617
|
+
return !!(updateCheckboxFlag && selectCheckboxMaps[rowid]);
|
|
7618
|
+
};
|
|
7619
|
+
const isCheckedByCheckboxRow = (row) => {
|
|
7620
|
+
return isCheckedByCheckboxRowKey(getRowKey(row));
|
|
7621
|
+
};
|
|
7622
|
+
const setCurrentRow = (row) => {
|
|
7623
|
+
internalData.currentRow = row;
|
|
7624
|
+
reactData.currRowFlag++;
|
|
7625
|
+
return nextTick();
|
|
7626
|
+
};
|
|
7627
|
+
const setCurrentRowByKey = (rowKey) => {
|
|
7628
|
+
const { fullData } = internalData;
|
|
7629
|
+
internalData.currentRow = findRowByKey(fullData, rowKey);
|
|
7630
|
+
reactData.currRowFlag++;
|
|
7631
|
+
return nextTick();
|
|
7632
|
+
};
|
|
7633
|
+
const getCurrentRow = () => {
|
|
7634
|
+
const { currentRow } = internalData;
|
|
7635
|
+
return currentRow;
|
|
7636
|
+
};
|
|
7637
|
+
const getCurrentRowKey = () => {
|
|
7638
|
+
const { currentRow } = internalData;
|
|
7639
|
+
return currentRow ? getRowKey(currentRow) : null;
|
|
7640
|
+
};
|
|
7641
|
+
const clearCurrentRow = () => {
|
|
7642
|
+
internalData.currentRow = null;
|
|
7643
|
+
reactData.currRowFlag++;
|
|
7644
|
+
return nextTick();
|
|
7645
|
+
};
|
|
7646
|
+
const setRadioRow = (row) => {
|
|
7647
|
+
reactData.selectRadioRow = row;
|
|
7648
|
+
const value = getRowKey(row);
|
|
7649
|
+
emitRadioMode(value);
|
|
7650
|
+
return nextTick();
|
|
7651
|
+
};
|
|
7652
|
+
const setRadioRowByKey = (rowKey) => {
|
|
7653
|
+
const { fullData } = internalData;
|
|
7654
|
+
reactData.selectRadioRow = findRowByKey(fullData, rowKey);
|
|
7655
|
+
const value = rowKey;
|
|
7656
|
+
emitRadioMode(value);
|
|
7657
|
+
return nextTick();
|
|
7658
|
+
};
|
|
7659
|
+
const getRadioRow = () => {
|
|
7660
|
+
const { selectRadioRow } = reactData;
|
|
7661
|
+
return selectRadioRow;
|
|
7662
|
+
};
|
|
7663
|
+
const getRadioRowKey = () => {
|
|
7664
|
+
const { selectRadioRow } = reactData;
|
|
7665
|
+
return selectRadioRow ? getRowKey(selectRadioRow) : null;
|
|
7666
|
+
};
|
|
7667
|
+
const clearRadioRow = () => {
|
|
7668
|
+
const value = null;
|
|
7669
|
+
reactData.selectRadioRow = value;
|
|
7670
|
+
emitRadioMode(value);
|
|
7671
|
+
return nextTick();
|
|
7672
|
+
};
|
|
7673
|
+
const setCheckboxRow = (row, checked) => {
|
|
7674
|
+
const { selectCheckboxMaps } = internalData;
|
|
7675
|
+
const keyField = computeKeyField.value;
|
|
7676
|
+
const rowList = row ? (XEUtils.isArray(row) ? row : [row]) : [];
|
|
7677
|
+
rowList.forEach(checked
|
|
7678
|
+
? (obj) => {
|
|
7679
|
+
const rowid = getRowIdByField(obj, keyField);
|
|
7680
|
+
if (!selectCheckboxMaps[rowid]) {
|
|
7681
|
+
selectCheckboxMaps[rowid] = obj;
|
|
7682
|
+
}
|
|
7683
|
+
}
|
|
7684
|
+
: (obj) => {
|
|
7685
|
+
const rowid = getRowIdByField(obj, keyField);
|
|
7686
|
+
if (selectCheckboxMaps[rowid]) {
|
|
7687
|
+
delete selectCheckboxMaps[rowid];
|
|
7688
|
+
}
|
|
7689
|
+
});
|
|
7690
|
+
const value = getCheckboxRowKeys();
|
|
7691
|
+
emitCheckboxMode(value);
|
|
7692
|
+
return updateCheckboxStatus();
|
|
7693
|
+
};
|
|
7694
|
+
const setCheckboxRowByKey = (rowKey, checked) => {
|
|
7695
|
+
const { selectCheckboxMaps, fullKeyMaps } = internalData;
|
|
7696
|
+
const keyField = computeKeyField.value;
|
|
7697
|
+
const rowKeys = rowKey ? (XEUtils.isArray(rowKey) ? rowKey : [rowKey]) : [];
|
|
7698
|
+
rowKeys.forEach(checked
|
|
7699
|
+
? (key) => {
|
|
7700
|
+
const row = fullKeyMaps[key || ''];
|
|
7701
|
+
if (row) {
|
|
7702
|
+
const rowid = getRowIdByField(row, keyField);
|
|
7703
|
+
if (row && !selectCheckboxMaps[rowid]) {
|
|
7704
|
+
selectCheckboxMaps[rowid] = row;
|
|
7705
|
+
}
|
|
7706
|
+
}
|
|
7707
|
+
}
|
|
7708
|
+
: (key) => {
|
|
7709
|
+
const row = fullKeyMaps[key || ''];
|
|
7710
|
+
if (row) {
|
|
7711
|
+
const rowid = getRowIdByField(row, keyField);
|
|
7712
|
+
if (selectCheckboxMaps[rowid]) {
|
|
7713
|
+
delete selectCheckboxMaps[rowid];
|
|
7714
|
+
}
|
|
7715
|
+
}
|
|
7716
|
+
});
|
|
7717
|
+
const value = getCheckboxRowKeys();
|
|
7718
|
+
emitCheckboxMode(value);
|
|
7719
|
+
return updateCheckboxStatus();
|
|
7720
|
+
};
|
|
7721
|
+
const getCheckboxRows = () => {
|
|
7722
|
+
const { updateCheckboxFlag } = reactData;
|
|
7723
|
+
const { selectCheckboxMaps } = internalData;
|
|
7724
|
+
const rowList = [];
|
|
7725
|
+
if (updateCheckboxFlag) {
|
|
7726
|
+
XEUtils.each(selectCheckboxMaps, row => {
|
|
7727
|
+
if (row) {
|
|
7728
|
+
rowList.push(row);
|
|
7729
|
+
}
|
|
7730
|
+
});
|
|
7731
|
+
}
|
|
7732
|
+
return rowList;
|
|
7733
|
+
};
|
|
7734
|
+
const getCheckboxRowKeys = () => {
|
|
7735
|
+
const { updateCheckboxFlag } = reactData;
|
|
7736
|
+
const { selectCheckboxMaps } = internalData;
|
|
7737
|
+
const keyField = computeKeyField.value;
|
|
7738
|
+
const rowKeys = [];
|
|
7739
|
+
if (updateCheckboxFlag) {
|
|
7740
|
+
XEUtils.each(selectCheckboxMaps, row => {
|
|
7741
|
+
if (row) {
|
|
7742
|
+
const rowKey = getRowKeyByField(row, keyField);
|
|
7743
|
+
rowKeys.push(rowKey);
|
|
7744
|
+
}
|
|
7745
|
+
});
|
|
7746
|
+
}
|
|
7747
|
+
return rowKeys;
|
|
7748
|
+
};
|
|
7749
|
+
const clearCheckboxRow = () => {
|
|
7750
|
+
internalData.selectCheckboxMaps = {};
|
|
7751
|
+
reactData.updateCheckboxFlag++;
|
|
7752
|
+
reactData.isAllChecked = false;
|
|
7753
|
+
reactData.isAllIndeterminate = false;
|
|
7754
|
+
const value = [];
|
|
7755
|
+
emitCheckboxMode(value);
|
|
7756
|
+
return nextTick();
|
|
7757
|
+
};
|
|
7758
|
+
const setAllCheckboxRow = (checked) => {
|
|
7759
|
+
const { fullData, selectCheckboxMaps } = internalData;
|
|
7760
|
+
const keyField = computeKeyField.value;
|
|
7761
|
+
if (checked) {
|
|
7762
|
+
const value = [];
|
|
7763
|
+
for (const row of fullData) {
|
|
7764
|
+
const rowKey = getRowKeyByField(row, keyField);
|
|
7765
|
+
const rowid = getRowIdByField(row, keyField);
|
|
7766
|
+
selectCheckboxMaps[rowid] = row;
|
|
7767
|
+
value.push(rowKey);
|
|
7768
|
+
}
|
|
7769
|
+
emitCheckboxMode(value);
|
|
7770
|
+
return updateCheckboxStatus();
|
|
7771
|
+
}
|
|
7772
|
+
return clearCheckboxRow();
|
|
7773
|
+
};
|
|
7774
|
+
const updateCheckboxStatus = () => {
|
|
7775
|
+
const { selectCheckboxMaps, fullData } = internalData;
|
|
7776
|
+
const keyField = computeKeyField.value;
|
|
7777
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
7778
|
+
const { checkMethod } = checkboxOpts;
|
|
7779
|
+
let hasChecked = false;
|
|
7780
|
+
let hasUnchecked = false;
|
|
7781
|
+
if (checkMethod) {
|
|
7782
|
+
for (const row of fullData) {
|
|
7783
|
+
if (checkMethod({ row, $list: $xeList })) {
|
|
7784
|
+
const rowid = getRowIdByField(row, keyField);
|
|
7785
|
+
if (selectCheckboxMaps[rowid]) {
|
|
7786
|
+
hasChecked = true;
|
|
7787
|
+
}
|
|
7788
|
+
else {
|
|
7789
|
+
hasUnchecked = true;
|
|
7790
|
+
if (hasChecked) {
|
|
7791
|
+
break;
|
|
7792
|
+
}
|
|
7793
|
+
}
|
|
7794
|
+
}
|
|
7795
|
+
}
|
|
7796
|
+
}
|
|
7797
|
+
else {
|
|
7798
|
+
for (const row of fullData) {
|
|
7799
|
+
const rowid = getRowIdByField(row, keyField);
|
|
7800
|
+
if (selectCheckboxMaps[rowid]) {
|
|
7801
|
+
hasChecked = true;
|
|
7802
|
+
}
|
|
7803
|
+
else {
|
|
7804
|
+
hasUnchecked = true;
|
|
7805
|
+
if (hasChecked) {
|
|
7806
|
+
break;
|
|
7807
|
+
}
|
|
7808
|
+
}
|
|
7809
|
+
}
|
|
7810
|
+
}
|
|
7811
|
+
reactData.isAllChecked = hasChecked && !hasUnchecked;
|
|
7812
|
+
reactData.isAllIndeterminate = hasChecked && hasUnchecked;
|
|
7813
|
+
reactData.updateCheckboxFlag++;
|
|
7814
|
+
return nextTick();
|
|
7815
|
+
};
|
|
7816
|
+
const changeCheckboxAllEvent = (evnt) => {
|
|
7817
|
+
const { isAllChecked } = reactData;
|
|
7818
|
+
const isChecked = !isAllChecked;
|
|
7819
|
+
if (isChecked) {
|
|
7820
|
+
setAllCheckboxRow(true);
|
|
7821
|
+
}
|
|
7822
|
+
else {
|
|
7823
|
+
clearCheckboxRow();
|
|
7824
|
+
}
|
|
7825
|
+
dispatchEvent('checkbox-all', { checked: isChecked }, evnt);
|
|
7826
|
+
};
|
|
7827
|
+
const changeCheckboxEvent = (evnt, row) => {
|
|
7828
|
+
evnt.preventDefault();
|
|
7829
|
+
evnt.stopPropagation();
|
|
7830
|
+
const { selectCheckboxMaps } = internalData;
|
|
7831
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
7832
|
+
const { checkMethod } = checkboxOpts;
|
|
7833
|
+
const rowid = getRowId(row);
|
|
7834
|
+
const isDisabled = checkMethod ? !checkMethod({ $list: $xeList, row }) : false;
|
|
7835
|
+
if (isDisabled) {
|
|
7836
|
+
return;
|
|
7837
|
+
}
|
|
7838
|
+
let isChecked = false;
|
|
7839
|
+
if (selectCheckboxMaps[rowid]) {
|
|
7840
|
+
delete selectCheckboxMaps[rowid];
|
|
7841
|
+
}
|
|
7842
|
+
else {
|
|
7843
|
+
isChecked = true;
|
|
7844
|
+
selectCheckboxMaps[rowid] = row;
|
|
7845
|
+
}
|
|
7846
|
+
reactData.updateCheckboxFlag++;
|
|
7847
|
+
updateCheckboxStatus();
|
|
7848
|
+
const rowids = XEUtils.keys(selectCheckboxMaps);
|
|
7849
|
+
const value = rowids.map(deModelValue);
|
|
7850
|
+
emitCheckboxMode(value);
|
|
7851
|
+
dispatchEvent('checkbox-change', { row, value, checked: isChecked }, evnt);
|
|
7852
|
+
};
|
|
7853
|
+
const changeCurrentEvent = (evnt, row) => {
|
|
7854
|
+
evnt.preventDefault();
|
|
7855
|
+
const rowOpts = computeRowOpts.value;
|
|
7856
|
+
const { currentMethod } = rowOpts;
|
|
7857
|
+
let isDisabled = false;
|
|
7858
|
+
if (currentMethod) {
|
|
7859
|
+
isDisabled = !currentMethod({ row });
|
|
7860
|
+
}
|
|
7861
|
+
if (isDisabled) {
|
|
7862
|
+
return;
|
|
7863
|
+
}
|
|
7864
|
+
const isChecked = true;
|
|
7865
|
+
internalData.currentRow = row;
|
|
7866
|
+
reactData.currRowFlag++;
|
|
7867
|
+
dispatchEvent('current-change', { row, checked: isChecked }, evnt);
|
|
7868
|
+
};
|
|
7869
|
+
const changeRadioEvent = (evnt, row) => {
|
|
7870
|
+
evnt.preventDefault();
|
|
7871
|
+
evnt.stopPropagation();
|
|
7872
|
+
const { selectRadioRow } = reactData;
|
|
7873
|
+
const radioOpts = computeRadioOpts.value;
|
|
7874
|
+
const { strict, checkMethod } = radioOpts;
|
|
7875
|
+
const rowKey = getRowKey(row);
|
|
7876
|
+
const isDisabled = checkMethod ? !checkMethod({ $list: $xeList, row }) : false;
|
|
7877
|
+
if (isDisabled) {
|
|
7878
|
+
return;
|
|
7879
|
+
}
|
|
7880
|
+
const value = rowKey;
|
|
7881
|
+
let isChecked = true;
|
|
7882
|
+
if (strict) {
|
|
7883
|
+
if (selectRadioRow && rowKey === getRowKey(selectRadioRow)) {
|
|
7884
|
+
isChecked = false;
|
|
7885
|
+
reactData.selectRadioRow = null;
|
|
7886
|
+
}
|
|
7887
|
+
else {
|
|
7888
|
+
reactData.selectRadioRow = row;
|
|
7889
|
+
}
|
|
7890
|
+
}
|
|
7891
|
+
else {
|
|
7892
|
+
reactData.selectRadioRow = row;
|
|
7893
|
+
}
|
|
7894
|
+
emitRadioMode(value);
|
|
7895
|
+
dispatchEvent('radio-change', { row, value, checked: isChecked }, evnt);
|
|
7896
|
+
};
|
|
7022
7897
|
const listMethods = {
|
|
7023
7898
|
dispatchEvent,
|
|
7024
7899
|
loadData,
|
|
@@ -7030,29 +7905,286 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7030
7905
|
clearScroll();
|
|
7031
7906
|
return loadData(datas);
|
|
7032
7907
|
},
|
|
7908
|
+
getFullData() {
|
|
7909
|
+
const { fullData } = internalData;
|
|
7910
|
+
return fullData;
|
|
7911
|
+
},
|
|
7033
7912
|
recalculate,
|
|
7034
7913
|
scrollTo,
|
|
7035
7914
|
refreshScroll,
|
|
7036
|
-
clearScroll
|
|
7915
|
+
clearScroll,
|
|
7916
|
+
getRowKey,
|
|
7917
|
+
eqRowKey,
|
|
7918
|
+
eqRow,
|
|
7919
|
+
eqRowByKey,
|
|
7920
|
+
findRow,
|
|
7921
|
+
findRowByKey,
|
|
7922
|
+
findRowIndexOf,
|
|
7923
|
+
findRowIndexOfByKey,
|
|
7924
|
+
isCheckedByRadioRowKey,
|
|
7925
|
+
isCheckedByRadioRow,
|
|
7926
|
+
isCheckedByCheckboxRowKey,
|
|
7927
|
+
isCheckedByCheckboxRow,
|
|
7928
|
+
setCurrentRow,
|
|
7929
|
+
setCurrentRowByKey,
|
|
7930
|
+
getCurrentRow,
|
|
7931
|
+
getCurrentRowKey,
|
|
7932
|
+
clearCurrentRow,
|
|
7933
|
+
setRadioRow,
|
|
7934
|
+
setRadioRowByKey,
|
|
7935
|
+
getRadioRow,
|
|
7936
|
+
getRadioRowKey,
|
|
7937
|
+
clearRadioRow,
|
|
7938
|
+
setCheckboxRow,
|
|
7939
|
+
setCheckboxRowByKey,
|
|
7940
|
+
getCheckboxRows,
|
|
7941
|
+
getCheckboxRowKeys,
|
|
7942
|
+
clearCheckboxRow,
|
|
7943
|
+
setAllCheckboxRow
|
|
7944
|
+
};
|
|
7945
|
+
const listPrivateMethods = {};
|
|
7946
|
+
Object.assign($xeList, listMethods, listPrivateMethods);
|
|
7947
|
+
const renderDragTip = () => {
|
|
7948
|
+
const { dragRow, dragTipText } = reactData;
|
|
7949
|
+
const dragOpts = computeDragOpts.value;
|
|
7950
|
+
const isDrag = computeIsDrag.value;
|
|
7951
|
+
const dRow = dragRow;
|
|
7952
|
+
if (isDrag) {
|
|
7953
|
+
return h('div', {
|
|
7954
|
+
class: 'vxe-list--drag-wrapper'
|
|
7955
|
+
}, [
|
|
7956
|
+
h('div', {
|
|
7957
|
+
ref: refDragRowLineElem,
|
|
7958
|
+
class: ['vxe-list--drag-row-line', {
|
|
7959
|
+
'is--guides': dragOpts.showGuidesStatus
|
|
7960
|
+
}]
|
|
7961
|
+
}),
|
|
7962
|
+
dRow && dragOpts.showDragTip
|
|
7963
|
+
? h('div', {
|
|
7964
|
+
ref: refDragTipElem,
|
|
7965
|
+
class: 'vxe-list--drag-sort-tip'
|
|
7966
|
+
}, [
|
|
7967
|
+
h('div', {
|
|
7968
|
+
class: 'vxe-list--drag-sort-tip-wrapper'
|
|
7969
|
+
}, [
|
|
7970
|
+
h('div', {
|
|
7971
|
+
class: 'vxe-list--drag-sort-tip-status'
|
|
7972
|
+
}, [
|
|
7973
|
+
h('span', {
|
|
7974
|
+
class: ['vxe-list--drag-sort-tip-normal-status', getIcon$2().LIST_DRAG_STATUS_NODE]
|
|
7975
|
+
}),
|
|
7976
|
+
h('span', {
|
|
7977
|
+
class: ['vxe-list--drag-sort-tip-disabled-status', getIcon$2().LIST_DRAG_DISABLED]
|
|
7978
|
+
})
|
|
7979
|
+
]),
|
|
7980
|
+
h('div', {
|
|
7981
|
+
class: 'vxe-list--drag-sort-tip-content'
|
|
7982
|
+
}, dragTipText)
|
|
7983
|
+
])
|
|
7984
|
+
])
|
|
7985
|
+
: renderEmptyElement($xeList)
|
|
7986
|
+
]);
|
|
7987
|
+
}
|
|
7988
|
+
return renderEmptyElement($xeList);
|
|
7989
|
+
};
|
|
7990
|
+
const renderRadio = (row, rowid, isChecked) => {
|
|
7991
|
+
const { showRadio } = props;
|
|
7992
|
+
const radioOpts = computeRadioOpts.value;
|
|
7993
|
+
const { showIcon, checkMethod, visibleMethod } = radioOpts;
|
|
7994
|
+
const isVisible = !visibleMethod || visibleMethod({ $list: $xeList, row });
|
|
7995
|
+
if (showRadio && showIcon && isVisible) {
|
|
7996
|
+
const isDisabled = checkMethod ? !checkMethod({ $list: $xeList, row }) : false;
|
|
7997
|
+
return h('div', {
|
|
7998
|
+
key: 'ct2',
|
|
7999
|
+
class: ['vxe-list--radio-option', {
|
|
8000
|
+
'is--checked': isChecked,
|
|
8001
|
+
'is--disabled': isDisabled
|
|
8002
|
+
}],
|
|
8003
|
+
onClick(evnt) {
|
|
8004
|
+
if (!isDisabled) {
|
|
8005
|
+
changeRadioEvent(evnt, row);
|
|
8006
|
+
}
|
|
8007
|
+
}
|
|
8008
|
+
}, [
|
|
8009
|
+
h('span', {
|
|
8010
|
+
class: ['vxe-radio--icon', isChecked ? getIcon$2().RADIO_CHECKED : getIcon$2().RADIO_UNCHECKED]
|
|
8011
|
+
})
|
|
8012
|
+
]);
|
|
8013
|
+
}
|
|
8014
|
+
return renderEmptyElement($xeList);
|
|
8015
|
+
};
|
|
8016
|
+
const renderCheckbox = (row, rowid, isChecked) => {
|
|
8017
|
+
const { showCheckbox } = props;
|
|
8018
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
8019
|
+
const { showIcon, checkMethod, visibleMethod } = checkboxOpts;
|
|
8020
|
+
const isVisible = !visibleMethod || visibleMethod({ $list: $xeList, row });
|
|
8021
|
+
if (showCheckbox && showIcon && isVisible) {
|
|
8022
|
+
const isDisabled = checkMethod ? !checkMethod({ $list: $xeList, row }) : false;
|
|
8023
|
+
return h('div', {
|
|
8024
|
+
key: 'ct3',
|
|
8025
|
+
class: ['vxe-list--checkbox-option', {
|
|
8026
|
+
'is--checked': isChecked,
|
|
8027
|
+
'is--disabled': isDisabled
|
|
8028
|
+
}],
|
|
8029
|
+
onClick(evnt) {
|
|
8030
|
+
if (!isDisabled) {
|
|
8031
|
+
changeCheckboxEvent(evnt, row);
|
|
8032
|
+
}
|
|
8033
|
+
}
|
|
8034
|
+
}, [
|
|
8035
|
+
h('span', {
|
|
8036
|
+
class: ['vxe-checkbox--icon', isChecked ? getIcon$2().CHECKBOX_CHECKED : getIcon$2().CHECKBOX_UNCHECKED]
|
|
8037
|
+
})
|
|
8038
|
+
]);
|
|
8039
|
+
}
|
|
8040
|
+
return renderEmptyElement($xeList);
|
|
8041
|
+
};
|
|
8042
|
+
const renderRow = (row, rowIndex) => {
|
|
8043
|
+
const { showRadio, showCheckbox } = props;
|
|
8044
|
+
const { selectRadioRow, currRowFlag, updateCheckboxFlag } = reactData;
|
|
8045
|
+
const { selectCheckboxMaps, currentRow } = internalData;
|
|
8046
|
+
const contentSlot = slots.content;
|
|
8047
|
+
const dragOpts = computeDragOpts.value;
|
|
8048
|
+
const { trigger, icon, disabledMethod, visibleMethod } = dragOpts;
|
|
8049
|
+
const rowOpts = computeRowOpts.value;
|
|
8050
|
+
const { useKey, contentField, className: rowClassName, isCurrent } = rowOpts;
|
|
8051
|
+
const isDrag = computeIsDrag.value;
|
|
8052
|
+
const keyField = computeKeyField.value;
|
|
8053
|
+
const isRowFnCls = rowClassName && XEUtils.isFunction(rowClassName);
|
|
8054
|
+
const hasKey = keyField || useKey || isDrag || isCurrent || showRadio || showCheckbox;
|
|
8055
|
+
const rowKey = hasKey && keyField ? getRowIdByField(row, keyField) : '';
|
|
8056
|
+
const rowid = enModelValue(rowKey);
|
|
8057
|
+
const rowParams = { row, $list: $xeList };
|
|
8058
|
+
let isRadioChecked = false;
|
|
8059
|
+
if (showRadio) {
|
|
8060
|
+
isRadioChecked = selectRadioRow && (row === selectRadioRow || eqRowByKey(selectRadioRow, rowKey));
|
|
8061
|
+
}
|
|
8062
|
+
let isCheckboxChecked = false;
|
|
8063
|
+
if (showCheckbox) {
|
|
8064
|
+
isCheckboxChecked = !!(updateCheckboxFlag && selectCheckboxMaps[rowid]);
|
|
8065
|
+
}
|
|
8066
|
+
const ctVNs = [];
|
|
8067
|
+
let isDragDisabled = false;
|
|
8068
|
+
if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
|
|
8069
|
+
const handleOns = {};
|
|
8070
|
+
if (trigger !== 'row') {
|
|
8071
|
+
isDragDisabled = !!(disabledMethod && disabledMethod(rowParams));
|
|
8072
|
+
handleOns.onMousedown = (evnt) => {
|
|
8073
|
+
if (!isDragDisabled) {
|
|
8074
|
+
handleRowDragMousedownEvent(evnt, rowParams);
|
|
8075
|
+
}
|
|
8076
|
+
};
|
|
8077
|
+
handleOns.onMouseup = handleRowDragMouseupEvent;
|
|
8078
|
+
}
|
|
8079
|
+
ctVNs.push(h('div', {
|
|
8080
|
+
key: 'ct1',
|
|
8081
|
+
class: 'vxe-list--row-drag'
|
|
8082
|
+
}, [
|
|
8083
|
+
h('span', Object.assign({ class: 'vxe-list--drag-handle' }, handleOns), [
|
|
8084
|
+
h('i', {
|
|
8085
|
+
class: icon || getIcon$2().LIST_DRAG
|
|
8086
|
+
})
|
|
8087
|
+
])
|
|
8088
|
+
]));
|
|
8089
|
+
}
|
|
8090
|
+
if (showRadio) {
|
|
8091
|
+
ctVNs.push(renderRadio(row, rowid, isRadioChecked));
|
|
8092
|
+
}
|
|
8093
|
+
if (showCheckbox) {
|
|
8094
|
+
ctVNs.push(renderCheckbox(row, rowid, isCheckboxChecked));
|
|
8095
|
+
}
|
|
8096
|
+
ctVNs.push(h('div', {
|
|
8097
|
+
key: 'ct5',
|
|
8098
|
+
class: 'vxe-list--row-content'
|
|
8099
|
+
}, contentSlot ? contentSlot(rowParams) : (contentField ? getText(row[contentField]) : '')));
|
|
8100
|
+
const rowOns = {
|
|
8101
|
+
onMousedown(evnt) {
|
|
8102
|
+
handleRowMousedownEvent(evnt, row);
|
|
8103
|
+
},
|
|
8104
|
+
onMouseup: handleRowDragMouseupEvent,
|
|
8105
|
+
onClick(evnt) {
|
|
8106
|
+
handleRowClickEvent(evnt, row);
|
|
8107
|
+
},
|
|
8108
|
+
onDblclick(evnt) {
|
|
8109
|
+
handleRowDblclickEvent(evnt, row);
|
|
8110
|
+
}
|
|
8111
|
+
};
|
|
8112
|
+
// 拖拽行事件
|
|
8113
|
+
if (isDrag) {
|
|
8114
|
+
rowOns.onDragstart = handleRowDragDragstartEvent;
|
|
8115
|
+
rowOns.onDragend = handleRowDragDragendEvent;
|
|
8116
|
+
rowOns.onDragover = handleRowDragDragoverEvent;
|
|
8117
|
+
}
|
|
8118
|
+
return h('div', Object.assign({ key: hasKey && keyField ? rowid : rowIndex, class: ['vxe-list--row', isRowFnCls ? rowClassName(rowParams) : (rowClassName || ''), {
|
|
8119
|
+
'is--drag-disabled': isDragDisabled,
|
|
8120
|
+
'is--current': currRowFlag && currentRow && eqRowByKey(currentRow, rowKey),
|
|
8121
|
+
'is-radio--checked': isRadioChecked,
|
|
8122
|
+
'is-checkbox--checked': isCheckboxChecked
|
|
8123
|
+
}], rowid: hasKey && keyField ? rowid : undefined }, rowOns), ctVNs);
|
|
7037
8124
|
};
|
|
7038
|
-
Object.assign($xeList, listMethods);
|
|
7039
8125
|
const renderVN = () => {
|
|
7040
|
-
const { className, loading } = props;
|
|
7041
|
-
const { bodyHeight, topSpaceHeight,
|
|
8126
|
+
const { showCheckbox, className, loading } = props;
|
|
8127
|
+
const { bodyHeight, topSpaceHeight, rowList, isAllChecked, isAllIndeterminate } = reactData;
|
|
7042
8128
|
const defaultSlot = slots.default;
|
|
8129
|
+
const headerSlot = slots.header;
|
|
8130
|
+
const footerSlot = slots.footer;
|
|
7043
8131
|
const vSize = computeSize.value;
|
|
7044
|
-
const
|
|
8132
|
+
const wrapperStyles = computeWrapperStyles.value;
|
|
8133
|
+
const virtualStyles = computeVirtualStyles.value;
|
|
8134
|
+
const radioOpts = computeRadioOpts.value;
|
|
8135
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
8136
|
+
const { showHeader, headerTitle } = checkboxOpts;
|
|
8137
|
+
const dragOpts = computeDragOpts.value;
|
|
8138
|
+
const { trigger } = dragOpts;
|
|
8139
|
+
const rowOpts = computeRowOpts.value;
|
|
8140
|
+
const { isHover, padding } = rowOpts;
|
|
8141
|
+
const isDrag = computeIsDrag.value;
|
|
8142
|
+
const showDefChekboxHead = showCheckbox && showHeader !== false;
|
|
7045
8143
|
return h('div', {
|
|
7046
8144
|
ref: refElem,
|
|
7047
8145
|
class: ['vxe-list', className ? (XEUtils.isFunction(className) ? className({ $list: $xeList }) : className) : '', {
|
|
7048
8146
|
[`size--${vSize}`]: vSize,
|
|
8147
|
+
'is--drag': isDrag,
|
|
7049
8148
|
'is--loading': loading
|
|
7050
|
-
}]
|
|
8149
|
+
}],
|
|
8150
|
+
style: wrapperStyles
|
|
7051
8151
|
}, [
|
|
8152
|
+
headerSlot || showDefChekboxHead
|
|
8153
|
+
? h('div', {
|
|
8154
|
+
ref: refHeaderElem,
|
|
8155
|
+
class: 'vxe-list--header-wrapper'
|
|
8156
|
+
}, [
|
|
8157
|
+
showDefChekboxHead
|
|
8158
|
+
? h('div', {
|
|
8159
|
+
class: 'vxe-list--header-left'
|
|
8160
|
+
}, [
|
|
8161
|
+
h('div', {
|
|
8162
|
+
class: ['vxe-list--checkbox-header', {
|
|
8163
|
+
'is--checked': isAllChecked,
|
|
8164
|
+
'is--indeterminate': isAllIndeterminate
|
|
8165
|
+
}],
|
|
8166
|
+
onClick: changeCheckboxAllEvent
|
|
8167
|
+
}, [
|
|
8168
|
+
h('span', {
|
|
8169
|
+
class: ['vxe-checkbox--icon', isAllChecked ? getIcon$2().CHECKBOX_CHECKED : (isAllIndeterminate ? getIcon$2().CHECKBOX_INDETERMINATE : getIcon$2().CHECKBOX_UNCHECKED)]
|
|
8170
|
+
}),
|
|
8171
|
+
h('span', {
|
|
8172
|
+
class: 'vxe-checkbox--label'
|
|
8173
|
+
}, XEUtils.eqNull(headerTitle) ? getI18n$2('vxe.list.allChecked') : getText(headerTitle))
|
|
8174
|
+
])
|
|
8175
|
+
])
|
|
8176
|
+
: renderEmptyElement($xeList),
|
|
8177
|
+
headerSlot
|
|
8178
|
+
? h('div', {
|
|
8179
|
+
class: 'vxe-list--header-content'
|
|
8180
|
+
}, headerSlot({ rows: rowList, $list: $xeList }))
|
|
8181
|
+
: renderEmptyElement($xeList)
|
|
8182
|
+
])
|
|
8183
|
+
: renderEmptyElement($xeList),
|
|
7052
8184
|
h('div', {
|
|
7053
8185
|
ref: refVirtualWrapper,
|
|
7054
8186
|
class: 'vxe-list--virtual-wrapper',
|
|
7055
|
-
style:
|
|
8187
|
+
style: virtualStyles,
|
|
7056
8188
|
onScroll: scrollEvent
|
|
7057
8189
|
}, [
|
|
7058
8190
|
h('div', {
|
|
@@ -7063,12 +8195,28 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7063
8195
|
}),
|
|
7064
8196
|
h('div', {
|
|
7065
8197
|
ref: refVirtualBody,
|
|
7066
|
-
class: 'vxe-list--body',
|
|
8198
|
+
class: ['vxe-list--body', {
|
|
8199
|
+
'trigger--row': trigger === 'row',
|
|
8200
|
+
'checkbox--highlight': checkboxOpts.highlight,
|
|
8201
|
+
'radio--highlight': radioOpts.highlight,
|
|
8202
|
+
'row--hover': isHover,
|
|
8203
|
+
'is--padding': padding
|
|
8204
|
+
}],
|
|
7067
8205
|
style: {
|
|
7068
8206
|
marginTop: topSpaceHeight ? `${topSpaceHeight}px` : ''
|
|
7069
8207
|
}
|
|
7070
|
-
}, defaultSlot ? defaultSlot({
|
|
8208
|
+
}, defaultSlot ? defaultSlot({ rows: rowList, $list: $xeList }) : rowList.map((row, i) => renderRow(row, i)))
|
|
7071
8209
|
]),
|
|
8210
|
+
footerSlot
|
|
8211
|
+
? h('div', {
|
|
8212
|
+
ref: refFooterElem,
|
|
8213
|
+
class: 'vxe-list--footer-wrapper'
|
|
8214
|
+
}, footerSlot({ rows: rowList, $list: $xeList }))
|
|
8215
|
+
: renderEmptyElement($xeList),
|
|
8216
|
+
/**
|
|
8217
|
+
* 拖拽提示
|
|
8218
|
+
*/
|
|
8219
|
+
renderDragTip(),
|
|
7072
8220
|
/**
|
|
7073
8221
|
* 加载中
|
|
7074
8222
|
*/
|
|
@@ -7088,17 +8236,36 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7088
8236
|
watch(dataFlag, () => {
|
|
7089
8237
|
loadData(props.data || []);
|
|
7090
8238
|
});
|
|
8239
|
+
const reFlag = ref(0);
|
|
7091
8240
|
watch(() => props.height, () => {
|
|
7092
|
-
|
|
8241
|
+
reFlag.value++;
|
|
7093
8242
|
});
|
|
7094
8243
|
watch(() => props.maxHeight, () => {
|
|
7095
|
-
|
|
8244
|
+
reFlag.value++;
|
|
7096
8245
|
});
|
|
7097
|
-
watch(() => props.syncResize, (
|
|
7098
|
-
|
|
8246
|
+
watch(() => props.syncResize, () => {
|
|
8247
|
+
reFlag.value++;
|
|
8248
|
+
});
|
|
8249
|
+
watch(computeRowHeight, () => {
|
|
8250
|
+
reFlag.value++;
|
|
8251
|
+
});
|
|
8252
|
+
watch(reFlag, () => {
|
|
8253
|
+
nextTick(() => {
|
|
7099
8254
|
recalculate();
|
|
7100
|
-
|
|
7101
|
-
|
|
8255
|
+
});
|
|
8256
|
+
});
|
|
8257
|
+
watch(() => props.checkRowKey, () => {
|
|
8258
|
+
updateRadioModeValue();
|
|
8259
|
+
});
|
|
8260
|
+
const checkKeyFlag = ref(0);
|
|
8261
|
+
watch(() => props.checkRowKeys ? props.checkRowKeys.length : -1, () => {
|
|
8262
|
+
checkKeyFlag.value++;
|
|
8263
|
+
});
|
|
8264
|
+
watch(() => props.checkRowKeys, () => {
|
|
8265
|
+
checkKeyFlag.value++;
|
|
8266
|
+
});
|
|
8267
|
+
watch(checkKeyFlag, () => {
|
|
8268
|
+
updateCheckboxModeValue();
|
|
7102
8269
|
});
|
|
7103
8270
|
onActivated(() => {
|
|
7104
8271
|
recalculate().then(() => refreshScroll());
|
|
@@ -7107,7 +8274,25 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7107
8274
|
loadData(props.data || []);
|
|
7108
8275
|
});
|
|
7109
8276
|
onMounted(() => {
|
|
7110
|
-
|
|
8277
|
+
const { showRadio, showCheckbox } = props;
|
|
8278
|
+
const rowOpts = computeRowOpts.value;
|
|
8279
|
+
const { useKey } = rowOpts;
|
|
8280
|
+
const isDrag = computeIsDrag.value;
|
|
8281
|
+
const keyField = computeKeyField.value;
|
|
8282
|
+
if (!keyField) {
|
|
8283
|
+
if (showRadio) {
|
|
8284
|
+
errLog$f('vxe.error.reqSupportProp', ['show-radio', 'row-config.keyField']);
|
|
8285
|
+
}
|
|
8286
|
+
if (showCheckbox) {
|
|
8287
|
+
errLog$f('vxe.error.reqSupportProp', ['show-checkbox', 'row-config.keyField']);
|
|
8288
|
+
}
|
|
8289
|
+
if (isDrag) {
|
|
8290
|
+
errLog$f('vxe.error.reqSupportProp', ['drag-config', 'row-config.keyField']);
|
|
8291
|
+
}
|
|
8292
|
+
}
|
|
8293
|
+
if (useKey && !keyField) {
|
|
8294
|
+
errLog$f('vxe.error.reqSupportProp', ['row-config.useKey', 'row-config.keyField']);
|
|
8295
|
+
}
|
|
7111
8296
|
if (props.autoResize) {
|
|
7112
8297
|
const el = refElem.value;
|
|
7113
8298
|
const resizeObserver = globalResize.create(() => recalculate());
|
|
@@ -7117,6 +8302,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7117
8302
|
}
|
|
7118
8303
|
internalData.resizeObserver = resizeObserver;
|
|
7119
8304
|
}
|
|
8305
|
+
recalculate();
|
|
7120
8306
|
globalEvents.on($xeList, 'resize', recalculate);
|
|
7121
8307
|
});
|
|
7122
8308
|
onBeforeUnmount(() => {
|
|
@@ -7125,8 +8311,8 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7125
8311
|
resizeObserver.disconnect();
|
|
7126
8312
|
}
|
|
7127
8313
|
globalEvents.off($xeList, 'resize');
|
|
7128
|
-
XEUtils.assign(reactData, createReactData$
|
|
7129
|
-
XEUtils.assign(internalData, createInternalData$
|
|
8314
|
+
XEUtils.assign(reactData, createReactData$h());
|
|
8315
|
+
XEUtils.assign(internalData, createInternalData$g());
|
|
7130
8316
|
});
|
|
7131
8317
|
$xeList.renderVN = renderVN;
|
|
7132
8318
|
return $xeList;
|
|
@@ -9839,7 +11025,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9839
11025
|
function getNodeUniqueId$1() {
|
|
9840
11026
|
return XEUtils.uniqueId('node_');
|
|
9841
11027
|
}
|
|
9842
|
-
function createReactData$
|
|
11028
|
+
function createReactData$g() {
|
|
9843
11029
|
return {
|
|
9844
11030
|
initialized: false,
|
|
9845
11031
|
searchValue: '',
|
|
@@ -9862,7 +11048,7 @@ function createReactData$e() {
|
|
|
9862
11048
|
lazyOptFlag: 1
|
|
9863
11049
|
};
|
|
9864
11050
|
}
|
|
9865
|
-
function createInternalData$
|
|
11051
|
+
function createInternalData$f() {
|
|
9866
11052
|
return {
|
|
9867
11053
|
// hpTimeout: undefined,
|
|
9868
11054
|
listVirtualYOpts: {
|
|
@@ -9989,8 +11175,8 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9989
11175
|
const refInpSearch = ref();
|
|
9990
11176
|
const refChunkWrapper = ref();
|
|
9991
11177
|
const refOptionPanel = ref();
|
|
9992
|
-
const reactData = reactive(createReactData$
|
|
9993
|
-
const internalData = createInternalData$
|
|
11178
|
+
const reactData = reactive(createReactData$g());
|
|
11179
|
+
const internalData = createInternalData$f();
|
|
9994
11180
|
const refMaps = {
|
|
9995
11181
|
refElem
|
|
9996
11182
|
};
|
|
@@ -10139,7 +11325,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10139
11325
|
}
|
|
10140
11326
|
const valueField = computeValueField.value;
|
|
10141
11327
|
const nodeKey = node[valueField];
|
|
10142
|
-
return enNodeValue
|
|
11328
|
+
return enNodeValue(nodeKey);
|
|
10143
11329
|
};
|
|
10144
11330
|
const isCheckedByCheckboxNodeId = (nodeid) => {
|
|
10145
11331
|
const { updateCheckboxFlag } = reactData;
|
|
@@ -10191,7 +11377,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10191
11377
|
}
|
|
10192
11378
|
const nodeList = [];
|
|
10193
11379
|
nodeKeys.forEach((nodeKey) => {
|
|
10194
|
-
const nodeid = enNodeValue
|
|
11380
|
+
const nodeid = enNodeValue(nodeKey);
|
|
10195
11381
|
const nodeItem = nodeMaps[nodeid];
|
|
10196
11382
|
if (nodeItem) {
|
|
10197
11383
|
nodeList.push(nodeItem.item);
|
|
@@ -10216,7 +11402,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10216
11402
|
}
|
|
10217
11403
|
else {
|
|
10218
11404
|
if (modelValue) {
|
|
10219
|
-
const nodeid = enNodeValue
|
|
11405
|
+
const nodeid = enNodeValue(XEUtils.isArray(modelValue) ? modelValue[0] : modelValue);
|
|
10220
11406
|
const itemRest = nodeMaps[nodeid];
|
|
10221
11407
|
if (itemRest) {
|
|
10222
11408
|
itemRest.nodes.forEach(item => {
|
|
@@ -10519,7 +11705,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10519
11705
|
const stItems = [];
|
|
10520
11706
|
const expandedMaps = {};
|
|
10521
11707
|
if (selectVals.length) {
|
|
10522
|
-
const lastVal = enNodeValue
|
|
11708
|
+
const lastVal = enNodeValue(XEUtils.last(selectVals));
|
|
10523
11709
|
const stRest = XEUtils.findTree(afterTreeList, (item) => lastVal === getNodeId(item), { children: transform ? mapChildrenField : childrenField });
|
|
10524
11710
|
if (stRest) {
|
|
10525
11711
|
const { nodes } = stRest;
|
|
@@ -10637,7 +11823,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10637
11823
|
});
|
|
10638
11824
|
};
|
|
10639
11825
|
const changeEvent = (evnt, selectValue, node) => {
|
|
10640
|
-
const value = XEUtils.isArray(selectValue) ? selectValue.map(deNodeValue
|
|
11826
|
+
const value = XEUtils.isArray(selectValue) ? selectValue.map(deNodeValue) : deNodeValue(selectValue);
|
|
10641
11827
|
emitModel(value);
|
|
10642
11828
|
if (value !== props.modelValue) {
|
|
10643
11829
|
dispatchEvent('change', { value, node, option: node }, evnt);
|
|
@@ -11562,7 +12748,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
11562
12748
|
globalEvents.off($xeCascader, 'mousedown');
|
|
11563
12749
|
globalEvents.off($xeCascader, 'blur');
|
|
11564
12750
|
globalEvents.off($xeCascader, 'resize');
|
|
11565
|
-
XEUtils.assign(internalData, createInternalData$
|
|
12751
|
+
XEUtils.assign(internalData, createInternalData$f());
|
|
11566
12752
|
});
|
|
11567
12753
|
provide('$xeCascader', $xeCascader);
|
|
11568
12754
|
$xeCascader.renderVN = renderVN;
|
|
@@ -11895,10 +13081,10 @@ dynamicApp.use(VxeCheckboxButton);
|
|
|
11895
13081
|
VxeUI.component(VxeCheckboxButtonComponent);
|
|
11896
13082
|
const CheckboxButton = VxeCheckboxButton;
|
|
11897
13083
|
|
|
11898
|
-
function createReactData$
|
|
13084
|
+
function createReactData$f() {
|
|
11899
13085
|
return {};
|
|
11900
13086
|
}
|
|
11901
|
-
function createInternalData$
|
|
13087
|
+
function createInternalData$e() {
|
|
11902
13088
|
return {
|
|
11903
13089
|
// isLoaded: false
|
|
11904
13090
|
};
|
|
@@ -11937,8 +13123,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
11937
13123
|
const $xeForm = inject('$xeForm', null);
|
|
11938
13124
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
11939
13125
|
const xID = XEUtils.uniqueId();
|
|
11940
|
-
const reactData = reactive(createReactData$
|
|
11941
|
-
const internalData = createInternalData$
|
|
13126
|
+
const reactData = reactive(createReactData$f());
|
|
13127
|
+
const internalData = createInternalData$e();
|
|
11942
13128
|
const computeIsReadonly = computed(() => {
|
|
11943
13129
|
const { readonly } = props;
|
|
11944
13130
|
if (readonly === null) {
|
|
@@ -12097,8 +13283,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
12097
13283
|
});
|
|
12098
13284
|
});
|
|
12099
13285
|
onUnmounted(() => {
|
|
12100
|
-
XEUtils.assign(reactData, createReactData$
|
|
12101
|
-
XEUtils.assign(internalData, createInternalData$
|
|
13286
|
+
XEUtils.assign(reactData, createReactData$f());
|
|
13287
|
+
XEUtils.assign(internalData, createInternalData$e());
|
|
12102
13288
|
});
|
|
12103
13289
|
provide('$xeCheckboxGroup', $xeCheckboxGroup);
|
|
12104
13290
|
$xeCheckboxGroup.renderVN = renderVN;
|
|
@@ -12231,17 +13417,19 @@ dynamicApp.use(VxeCol);
|
|
|
12231
13417
|
VxeUI.component(VxeColComponent);
|
|
12232
13418
|
const Col = VxeCol;
|
|
12233
13419
|
|
|
12234
|
-
function createReactData$
|
|
13420
|
+
function createReactData$e() {
|
|
12235
13421
|
return {
|
|
12236
13422
|
staticPanes: [],
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
|
|
13423
|
+
cachePaneMaps: {},
|
|
13424
|
+
activeKeyFlag: 0,
|
|
13425
|
+
openKeyFlag: 0
|
|
12240
13426
|
};
|
|
12241
13427
|
}
|
|
12242
|
-
function createInternalData$
|
|
13428
|
+
function createInternalData$d() {
|
|
12243
13429
|
return {
|
|
12244
|
-
|
|
13430
|
+
// esTime: null,
|
|
13431
|
+
activeKeyMaps: {},
|
|
13432
|
+
openKeyMaps: {}
|
|
12245
13433
|
};
|
|
12246
13434
|
}
|
|
12247
13435
|
var VxeCollapseComponent = defineVxeComponent({
|
|
@@ -12274,8 +13462,8 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12274
13462
|
const xID = XEUtils.uniqueId();
|
|
12275
13463
|
const { computeSize } = useSize(props);
|
|
12276
13464
|
const refElem = ref();
|
|
12277
|
-
const reactData = reactive(createReactData$
|
|
12278
|
-
const internalData = createInternalData$
|
|
13465
|
+
const reactData = reactive(createReactData$e());
|
|
13466
|
+
const internalData = createInternalData$d();
|
|
12279
13467
|
const refMaps = {
|
|
12280
13468
|
refElem
|
|
12281
13469
|
};
|
|
@@ -12300,6 +13488,15 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12300
13488
|
getRefMaps: () => refMaps,
|
|
12301
13489
|
getComputeMaps: () => computeMaps
|
|
12302
13490
|
};
|
|
13491
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
13492
|
+
emit(type, createEvent(evnt, { $collapse: $xeCollapse }, params));
|
|
13493
|
+
};
|
|
13494
|
+
const collapseMethods = {
|
|
13495
|
+
dispatchEvent
|
|
13496
|
+
};
|
|
13497
|
+
const emitModel = (value) => {
|
|
13498
|
+
emit('update:modelValue', value);
|
|
13499
|
+
};
|
|
12303
13500
|
const handleFilterItem = (item) => {
|
|
12304
13501
|
const { permissionCode } = item;
|
|
12305
13502
|
if (permissionCode) {
|
|
@@ -12309,46 +13506,51 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12309
13506
|
}
|
|
12310
13507
|
return true;
|
|
12311
13508
|
};
|
|
12312
|
-
const
|
|
12313
|
-
const {
|
|
12314
|
-
|
|
12315
|
-
|
|
13509
|
+
const updateModel = () => {
|
|
13510
|
+
const { modelValue } = props;
|
|
13511
|
+
const { openKeyMaps } = internalData;
|
|
13512
|
+
const activeMaps = {};
|
|
13513
|
+
if (modelValue) {
|
|
13514
|
+
modelValue.forEach(name => {
|
|
13515
|
+
if (!openKeyMaps[name]) {
|
|
13516
|
+
openKeyMaps[name] = true;
|
|
13517
|
+
}
|
|
13518
|
+
activeMaps[name] = true;
|
|
13519
|
+
});
|
|
13520
|
+
}
|
|
13521
|
+
internalData.activeKeyMaps = activeMaps;
|
|
13522
|
+
reactData.activeKeyFlag++;
|
|
13523
|
+
reactData.openKeyFlag++;
|
|
13524
|
+
};
|
|
13525
|
+
const handleOpen = (name) => {
|
|
13526
|
+
const { openKeyMaps } = internalData;
|
|
13527
|
+
if (name && !openKeyMaps[name]) {
|
|
13528
|
+
openKeyMaps[name] = true;
|
|
12316
13529
|
dispatchEvent('load', { name }, null);
|
|
12317
13530
|
return true;
|
|
12318
13531
|
}
|
|
12319
13532
|
return false;
|
|
12320
13533
|
};
|
|
12321
13534
|
const initDefaultName = (list) => {
|
|
12322
|
-
const {
|
|
13535
|
+
const { activeKeyMaps } = internalData;
|
|
12323
13536
|
const nameMaps = {};
|
|
12324
13537
|
if (list && list.length) {
|
|
12325
13538
|
list.forEach((item) => {
|
|
12326
13539
|
const { name, preload } = item || {};
|
|
12327
13540
|
if (name) {
|
|
12328
|
-
const isActive =
|
|
12329
|
-
nameMaps[
|
|
13541
|
+
const isActive = activeKeyMaps[name];
|
|
13542
|
+
nameMaps[name] = {
|
|
12330
13543
|
height: 0,
|
|
12331
13544
|
loading: false
|
|
12332
13545
|
};
|
|
12333
|
-
if (isActive) {
|
|
12334
|
-
|
|
12335
|
-
}
|
|
12336
|
-
if (preload) {
|
|
12337
|
-
if (!isActive) {
|
|
12338
|
-
activeNames.push(name);
|
|
12339
|
-
}
|
|
13546
|
+
if (isActive || preload) {
|
|
13547
|
+
handleOpen(name);
|
|
12340
13548
|
}
|
|
12341
13549
|
}
|
|
12342
13550
|
});
|
|
12343
13551
|
}
|
|
12344
|
-
reactData.activeNames = activeNames ? activeNames.slice(0) : [];
|
|
12345
13552
|
reactData.cachePaneMaps = nameMaps;
|
|
12346
|
-
|
|
12347
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
12348
|
-
emit(type, createEvent(evnt, { $collapse: $xeCollapse }, params));
|
|
12349
|
-
};
|
|
12350
|
-
const collapseMethods = {
|
|
12351
|
-
dispatchEvent
|
|
13553
|
+
reactData.openKeyFlag++;
|
|
12352
13554
|
};
|
|
12353
13555
|
const callSlot = (slotFunc, params) => {
|
|
12354
13556
|
if (slotFunc) {
|
|
@@ -12362,8 +13564,10 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12362
13564
|
return [];
|
|
12363
13565
|
};
|
|
12364
13566
|
const handleClickEvent = (evnt, item) => {
|
|
12365
|
-
|
|
13567
|
+
let { activeKeyMaps } = internalData;
|
|
12366
13568
|
const { esTime } = internalData;
|
|
13569
|
+
const expandOpts = computeExpandOpts.value;
|
|
13570
|
+
const { accordion } = expandOpts;
|
|
12367
13571
|
const { name } = item;
|
|
12368
13572
|
if (esTime) {
|
|
12369
13573
|
clearTimeout(esTime);
|
|
@@ -12371,14 +13575,16 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12371
13575
|
if (name) {
|
|
12372
13576
|
const headEl = evnt.currentTarget;
|
|
12373
13577
|
const bodyEl = headEl.nextElementSibling;
|
|
12374
|
-
const aIndex = activeNames.indexOf(name);
|
|
12375
13578
|
let expanded = false;
|
|
12376
|
-
if (
|
|
12377
|
-
|
|
12378
|
-
activeNames.push(name);
|
|
13579
|
+
if (activeKeyMaps[name]) {
|
|
13580
|
+
delete activeKeyMaps[name];
|
|
12379
13581
|
}
|
|
12380
13582
|
else {
|
|
12381
|
-
|
|
13583
|
+
if (accordion) {
|
|
13584
|
+
activeKeyMaps = {};
|
|
13585
|
+
}
|
|
13586
|
+
expanded = true;
|
|
13587
|
+
activeKeyMaps[name] = true;
|
|
12382
13588
|
}
|
|
12383
13589
|
const startAnimation = () => {
|
|
12384
13590
|
const itemEl = bodyEl.firstElementChild;
|
|
@@ -12399,6 +13605,11 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12399
13605
|
}
|
|
12400
13606
|
}
|
|
12401
13607
|
};
|
|
13608
|
+
const value = Object.keys(activeKeyMaps);
|
|
13609
|
+
internalData.activeKeyMaps = activeKeyMaps;
|
|
13610
|
+
handleOpen(name);
|
|
13611
|
+
reactData.activeKeyFlag++;
|
|
13612
|
+
reactData.openKeyFlag++;
|
|
12402
13613
|
if (bodyEl) {
|
|
12403
13614
|
const itemEl = bodyEl.firstElementChild;
|
|
12404
13615
|
if (itemEl) {
|
|
@@ -12409,21 +13620,22 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12409
13620
|
nextTick(startAnimation);
|
|
12410
13621
|
}
|
|
12411
13622
|
}
|
|
12412
|
-
|
|
12413
|
-
dispatchEvent('change', { value
|
|
12414
|
-
dispatchEvent('toggle-expand', { value
|
|
13623
|
+
emitModel(value);
|
|
13624
|
+
dispatchEvent('change', { value, name }, evnt);
|
|
13625
|
+
dispatchEvent('toggle-expand', { value, name, expanded }, evnt);
|
|
12415
13626
|
}
|
|
12416
13627
|
};
|
|
12417
13628
|
const collapsePrivateMethods = {};
|
|
12418
13629
|
Object.assign($xeCollapse, collapseMethods, collapsePrivateMethods);
|
|
12419
13630
|
const renderList = (itemList) => {
|
|
12420
|
-
const {
|
|
13631
|
+
const { activeKeyFlag, openKeyFlag } = reactData;
|
|
13632
|
+
const { activeKeyMaps, openKeyMaps } = internalData;
|
|
12421
13633
|
const expandOpts = computeExpandOpts.value;
|
|
12422
13634
|
return itemList.map(item => {
|
|
12423
13635
|
const { icon, name, title, slots } = item;
|
|
12424
13636
|
const titleSlot = slots ? slots.title : null;
|
|
12425
13637
|
const defaultSlot = slots ? slots.default : null;
|
|
12426
|
-
const isActive = name &&
|
|
13638
|
+
const isActive = name && activeKeyFlag && activeKeyMaps[name];
|
|
12427
13639
|
return h('div', {
|
|
12428
13640
|
class: 'vxe-collapse-item'
|
|
12429
13641
|
}, [
|
|
@@ -12461,7 +13673,7 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12461
13673
|
'is--hidden': !isActive
|
|
12462
13674
|
}]
|
|
12463
13675
|
}, [
|
|
12464
|
-
name &&
|
|
13676
|
+
name && openKeyFlag && openKeyMaps[name]
|
|
12465
13677
|
? h('div', {
|
|
12466
13678
|
class: 'vxe-collapse--item-inner'
|
|
12467
13679
|
}, [
|
|
@@ -12493,8 +13705,15 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12493
13705
|
renderList(itemList)
|
|
12494
13706
|
]);
|
|
12495
13707
|
};
|
|
12496
|
-
|
|
12497
|
-
|
|
13708
|
+
const valFlag = ref(0);
|
|
13709
|
+
watch(() => props.modelValue ? props.modelValue.length : -1, () => {
|
|
13710
|
+
valFlag.value++;
|
|
13711
|
+
});
|
|
13712
|
+
watch(() => props.modelValue, () => {
|
|
13713
|
+
valFlag.value++;
|
|
13714
|
+
});
|
|
13715
|
+
watch(valFlag, () => {
|
|
13716
|
+
updateModel();
|
|
12498
13717
|
});
|
|
12499
13718
|
const optsFlag = ref(0);
|
|
12500
13719
|
watch(() => props.options ? props.options.length : -1, () => {
|
|
@@ -12516,15 +13735,15 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12516
13735
|
watch(stFlag, () => {
|
|
12517
13736
|
initDefaultName(reactData.staticPanes);
|
|
12518
13737
|
});
|
|
12519
|
-
|
|
13738
|
+
updateModel();
|
|
12520
13739
|
initDefaultName(reactData.staticPanes.length ? reactData.staticPanes : props.options);
|
|
12521
13740
|
onUnmounted(() => {
|
|
12522
13741
|
const { esTime } = internalData;
|
|
12523
13742
|
if (esTime) {
|
|
12524
13743
|
clearTimeout(esTime);
|
|
12525
13744
|
}
|
|
12526
|
-
XEUtils.assign(reactData, createReactData$
|
|
12527
|
-
XEUtils.assign(internalData, createInternalData$
|
|
13745
|
+
XEUtils.assign(reactData, createReactData$e());
|
|
13746
|
+
XEUtils.assign(internalData, createInternalData$d());
|
|
12528
13747
|
});
|
|
12529
13748
|
provide('$xeCollapse', $xeCollapse);
|
|
12530
13749
|
$xeCollapse.renderVN = renderVN;
|
|
@@ -14900,12 +16119,12 @@ dynamicApp.use(VxeColorPicker);
|
|
|
14900
16119
|
VxeUI.component(VxeColorPickerComponent);
|
|
14901
16120
|
const ColorPicker = VxeColorPicker;
|
|
14902
16121
|
|
|
14903
|
-
function createInternalData$
|
|
16122
|
+
function createInternalData$c() {
|
|
14904
16123
|
return {
|
|
14905
16124
|
// leaveTime: null
|
|
14906
16125
|
};
|
|
14907
16126
|
}
|
|
14908
|
-
function createReactData$
|
|
16127
|
+
function createReactData$d() {
|
|
14909
16128
|
return {
|
|
14910
16129
|
visible: false,
|
|
14911
16130
|
activeOption: null,
|
|
@@ -14960,8 +16179,8 @@ var VxeContextMenuComponent = defineVxeComponent({
|
|
|
14960
16179
|
const xID = XEUtils.uniqueId();
|
|
14961
16180
|
const refElem = ref();
|
|
14962
16181
|
const { computeSize } = useSize(props);
|
|
14963
|
-
const internalData = createInternalData$
|
|
14964
|
-
const reactData = reactive(createReactData$
|
|
16182
|
+
const internalData = createInternalData$c();
|
|
16183
|
+
const reactData = reactive(createReactData$d());
|
|
14965
16184
|
const refMaps = {
|
|
14966
16185
|
refElem
|
|
14967
16186
|
};
|
|
@@ -15516,8 +16735,8 @@ var VxeContextMenuComponent = defineVxeComponent({
|
|
|
15516
16735
|
globalEvents.off($xeContextMenu, 'keydown');
|
|
15517
16736
|
globalEvents.off($xeContextMenu, 'mousedown');
|
|
15518
16737
|
globalEvents.off($xeContextMenu, 'blur');
|
|
15519
|
-
XEUtils.assign(reactData, createReactData$
|
|
15520
|
-
XEUtils.assign(internalData, createInternalData$
|
|
16738
|
+
XEUtils.assign(reactData, createReactData$d());
|
|
16739
|
+
XEUtils.assign(internalData, createInternalData$c());
|
|
15521
16740
|
});
|
|
15522
16741
|
$xeContextMenu.renderVN = renderVN;
|
|
15523
16742
|
return $xeContextMenu;
|
|
@@ -17791,7 +19010,7 @@ const parseInputKayMaps = {};
|
|
|
17791
19010
|
inputMaskedKeys.forEach(key => {
|
|
17792
19011
|
parseInputKayMaps[key] = true;
|
|
17793
19012
|
});
|
|
17794
|
-
function createReactData$
|
|
19013
|
+
function createReactData$c() {
|
|
17795
19014
|
return {
|
|
17796
19015
|
initialized: false,
|
|
17797
19016
|
panelIndex: 0,
|
|
@@ -17804,7 +19023,7 @@ function createReactData$a() {
|
|
|
17804
19023
|
labelFlag: 0
|
|
17805
19024
|
};
|
|
17806
19025
|
}
|
|
17807
|
-
function createInternalData$
|
|
19026
|
+
function createInternalData$b() {
|
|
17808
19027
|
return {
|
|
17809
19028
|
// hpTimeout: undefined,
|
|
17810
19029
|
// fsTimeout: undefined,
|
|
@@ -17944,8 +19163,8 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17944
19163
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
17945
19164
|
const xID = XEUtils.uniqueId();
|
|
17946
19165
|
const { computeSize } = useSize(props);
|
|
17947
|
-
const reactData = reactive(createReactData$
|
|
17948
|
-
const internalData = createInternalData$
|
|
19166
|
+
const reactData = reactive(createReactData$c());
|
|
19167
|
+
const internalData = createInternalData$b();
|
|
17949
19168
|
const refElem = ref();
|
|
17950
19169
|
const refInputTarget = ref();
|
|
17951
19170
|
const refInputPanel = ref();
|
|
@@ -19368,6 +20587,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
19368
20587
|
onUnmounted(() => {
|
|
19369
20588
|
globalEvents.off($xeDatePicker, 'mousewheel');
|
|
19370
20589
|
globalEvents.off($xeDatePicker, 'mousedown');
|
|
20590
|
+
globalEvents.off($xeDatePicker, 'keydown');
|
|
19371
20591
|
globalEvents.off($xeDatePicker, 'blur');
|
|
19372
20592
|
globalEvents.off($xeDatePicker, 'resize');
|
|
19373
20593
|
});
|
|
@@ -22855,7 +24075,7 @@ function checkRuleStatus(rule, data, val) {
|
|
|
22855
24075
|
}
|
|
22856
24076
|
return true;
|
|
22857
24077
|
}
|
|
22858
|
-
function createReactData$
|
|
24078
|
+
function createReactData$b() {
|
|
22859
24079
|
return {
|
|
22860
24080
|
collapseAll: false,
|
|
22861
24081
|
staticItems: [],
|
|
@@ -22863,7 +24083,7 @@ function createReactData$9() {
|
|
|
22863
24083
|
itemWidth: 0
|
|
22864
24084
|
};
|
|
22865
24085
|
}
|
|
22866
|
-
function createInternalData$
|
|
24086
|
+
function createInternalData$a() {
|
|
22867
24087
|
return {
|
|
22868
24088
|
meTimeout: undefined,
|
|
22869
24089
|
stTimeout: undefined,
|
|
@@ -22972,8 +24192,8 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
22972
24192
|
const $xeGrid = inject('$xeGrid', null);
|
|
22973
24193
|
const xID = XEUtils.uniqueId();
|
|
22974
24194
|
const { computeSize } = useSize(props);
|
|
22975
|
-
const reactData = reactive(createReactData$
|
|
22976
|
-
const internalData = createInternalData$
|
|
24195
|
+
const reactData = reactive(createReactData$b());
|
|
24196
|
+
const internalData = createInternalData$a();
|
|
22977
24197
|
const refElem = ref();
|
|
22978
24198
|
const refTooltip = ref();
|
|
22979
24199
|
let formMethods = {};
|
|
@@ -23667,7 +24887,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
23667
24887
|
});
|
|
23668
24888
|
onUnmounted(() => {
|
|
23669
24889
|
globalEvents.off($xeForm, 'resize');
|
|
23670
|
-
XEUtils.assign(internalData, createInternalData$
|
|
24890
|
+
XEUtils.assign(internalData, createInternalData$a());
|
|
23671
24891
|
});
|
|
23672
24892
|
reactData.collapseAll = !!props.collapseStatus;
|
|
23673
24893
|
if (props.items) {
|
|
@@ -25071,13 +26291,13 @@ const openPreviewImage = (options) => {
|
|
|
25071
26291
|
return Promise.resolve();
|
|
25072
26292
|
};
|
|
25073
26293
|
|
|
25074
|
-
function createInternalData$
|
|
26294
|
+
function createInternalData$9() {
|
|
25075
26295
|
return {
|
|
25076
26296
|
// dgTime: 0,
|
|
25077
26297
|
// mdTime: 0
|
|
25078
26298
|
};
|
|
25079
26299
|
}
|
|
25080
|
-
function createReactData$
|
|
26300
|
+
function createReactData$a() {
|
|
25081
26301
|
return {};
|
|
25082
26302
|
}
|
|
25083
26303
|
var VxeImageComponent = defineVxeComponent({
|
|
@@ -25136,26 +26356,14 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
25136
26356
|
const $xeImageGroup = inject('$xeImageGroup', null);
|
|
25137
26357
|
const refElem = ref();
|
|
25138
26358
|
const { computeSize } = useSize(props);
|
|
25139
|
-
const internalData = createInternalData$
|
|
25140
|
-
const reactData = reactive(createReactData$
|
|
26359
|
+
const internalData = createInternalData$9();
|
|
26360
|
+
const reactData = reactive(createReactData$a());
|
|
25141
26361
|
const refMaps = {
|
|
25142
26362
|
refElem
|
|
25143
26363
|
};
|
|
25144
26364
|
const computeWrapperStyle = computed(() => {
|
|
25145
|
-
const { width, height,
|
|
26365
|
+
const { width, height, circle } = props;
|
|
25146
26366
|
const stys = {};
|
|
25147
|
-
if (minWidth) {
|
|
25148
|
-
stys.minWidth = toCssUnit(minWidth);
|
|
25149
|
-
}
|
|
25150
|
-
if (minHeight) {
|
|
25151
|
-
stys.minHeight = toCssUnit(minHeight);
|
|
25152
|
-
}
|
|
25153
|
-
if (maxWidth) {
|
|
25154
|
-
stys.maxWidth = toCssUnit(maxWidth);
|
|
25155
|
-
}
|
|
25156
|
-
if (maxHeight) {
|
|
25157
|
-
stys.maxHeight = toCssUnit(maxHeight);
|
|
25158
|
-
}
|
|
25159
26367
|
if (circle) {
|
|
25160
26368
|
// 圆形只能生效一个
|
|
25161
26369
|
if (width) {
|
|
@@ -25178,7 +26386,7 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
25178
26386
|
return stys;
|
|
25179
26387
|
});
|
|
25180
26388
|
const computeImgStyle = computed(() => {
|
|
25181
|
-
const { width, height } = props;
|
|
26389
|
+
const { width, height, minWidth, minHeight, maxHeight, maxWidth } = props;
|
|
25182
26390
|
const stys = {};
|
|
25183
26391
|
if (width && height) {
|
|
25184
26392
|
stys.maxWidth = toCssUnit(width);
|
|
@@ -25191,6 +26399,18 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
25191
26399
|
if (height) {
|
|
25192
26400
|
stys.height = toCssUnit(height);
|
|
25193
26401
|
}
|
|
26402
|
+
if (minWidth) {
|
|
26403
|
+
stys.minWidth = toCssUnit(minWidth);
|
|
26404
|
+
}
|
|
26405
|
+
if (minHeight) {
|
|
26406
|
+
stys.minHeight = toCssUnit(minHeight);
|
|
26407
|
+
}
|
|
26408
|
+
if (maxWidth) {
|
|
26409
|
+
stys.maxWidth = toCssUnit(maxWidth);
|
|
26410
|
+
}
|
|
26411
|
+
if (maxHeight) {
|
|
26412
|
+
stys.maxHeight = toCssUnit(maxHeight);
|
|
26413
|
+
}
|
|
25194
26414
|
}
|
|
25195
26415
|
return stys;
|
|
25196
26416
|
});
|
|
@@ -25323,8 +26543,8 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
25323
26543
|
]);
|
|
25324
26544
|
};
|
|
25325
26545
|
onBeforeUnmount(() => {
|
|
25326
|
-
XEUtils.assign(reactData, createReactData$
|
|
25327
|
-
XEUtils.assign(internalData, createInternalData$
|
|
26546
|
+
XEUtils.assign(reactData, createReactData$a());
|
|
26547
|
+
XEUtils.assign(internalData, createInternalData$9());
|
|
25328
26548
|
});
|
|
25329
26549
|
$xeImage.renderVN = renderVN;
|
|
25330
26550
|
return $xeImage;
|
|
@@ -25613,10 +26833,10 @@ dynamicApp.use(VxeLayoutAside);
|
|
|
25613
26833
|
VxeUI.component(VxeLayoutAsideComponent);
|
|
25614
26834
|
const LayoutAside = VxeLayoutAside;
|
|
25615
26835
|
|
|
25616
|
-
function createInternalData$
|
|
26836
|
+
function createInternalData$8() {
|
|
25617
26837
|
return {};
|
|
25618
26838
|
}
|
|
25619
|
-
function createReactData$
|
|
26839
|
+
function createReactData$9() {
|
|
25620
26840
|
return {};
|
|
25621
26841
|
}
|
|
25622
26842
|
var VxeLayoutBodyComponent = defineVxeComponent({
|
|
@@ -25641,8 +26861,8 @@ var VxeLayoutBodyComponent = defineVxeComponent({
|
|
|
25641
26861
|
const backtopId = `vxe_layout_body_backtop_${xID}`;
|
|
25642
26862
|
const refElem = ref();
|
|
25643
26863
|
const { computeSize } = useSize(props);
|
|
25644
|
-
const internalData = createInternalData$
|
|
25645
|
-
const reactData = reactive(createReactData$
|
|
26864
|
+
const internalData = createInternalData$8();
|
|
26865
|
+
const reactData = reactive(createReactData$9());
|
|
25646
26866
|
const refMaps = {
|
|
25647
26867
|
refElem
|
|
25648
26868
|
};
|
|
@@ -28438,7 +29658,7 @@ function isOptionVisible(option) {
|
|
|
28438
29658
|
function getOptUniqueId$1() {
|
|
28439
29659
|
return XEUtils.uniqueId('opt_');
|
|
28440
29660
|
}
|
|
28441
|
-
function createReactData$
|
|
29661
|
+
function createReactData$8() {
|
|
28442
29662
|
return {
|
|
28443
29663
|
initialized: false,
|
|
28444
29664
|
scrollYLoad: false,
|
|
@@ -28459,7 +29679,7 @@ function createReactData$6() {
|
|
|
28459
29679
|
isActivated: false
|
|
28460
29680
|
};
|
|
28461
29681
|
}
|
|
28462
|
-
function createInternalData$
|
|
29682
|
+
function createInternalData$7() {
|
|
28463
29683
|
return {
|
|
28464
29684
|
// isLoaded: false,
|
|
28465
29685
|
synchData: [],
|
|
@@ -28634,8 +29854,8 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
28634
29854
|
const refOptionPanel = ref();
|
|
28635
29855
|
const refVirtualBody = ref();
|
|
28636
29856
|
const { computeSize } = useSize(props);
|
|
28637
|
-
const reactData = reactive(createReactData$
|
|
28638
|
-
const internalData = createInternalData$
|
|
29857
|
+
const reactData = reactive(createReactData$8());
|
|
29858
|
+
const internalData = createInternalData$7();
|
|
28639
29859
|
const refMaps = {
|
|
28640
29860
|
refElem
|
|
28641
29861
|
};
|
|
@@ -30156,8 +31376,8 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
30156
31376
|
globalEvents.off($xeSelect, 'keydown');
|
|
30157
31377
|
globalEvents.off($xeSelect, 'blur');
|
|
30158
31378
|
globalEvents.off($xeSelect, 'resize');
|
|
30159
|
-
XEUtils.assign(reactData, createReactData$
|
|
30160
|
-
XEUtils.assign(internalData, createInternalData$
|
|
31379
|
+
XEUtils.assign(reactData, createReactData$8());
|
|
31380
|
+
XEUtils.assign(internalData, createInternalData$7());
|
|
30161
31381
|
});
|
|
30162
31382
|
provide('$xeSelect', $xeSelect);
|
|
30163
31383
|
$xeSelect.renderVN = renderVN;
|
|
@@ -31228,7 +32448,6 @@ dynamicApp.use(VxePasswordInput);
|
|
|
31228
32448
|
VxeUI.component(VxePasswordInputComponent);
|
|
31229
32449
|
const PasswordInput = VxePasswordInput;
|
|
31230
32450
|
|
|
31231
|
-
const browseObj = XEUtils.browse();
|
|
31232
32451
|
// 打印
|
|
31233
32452
|
let printFrame;
|
|
31234
32453
|
// 默认导出或打印的 HTML 样式
|
|
@@ -31363,6 +32582,7 @@ function createHtmlPage(opts, printHtml) {
|
|
|
31363
32582
|
].join('');
|
|
31364
32583
|
}
|
|
31365
32584
|
function handlePrint(opts, printHtml = '') {
|
|
32585
|
+
const browseObj = XEUtils.browse();
|
|
31366
32586
|
const { beforeMethod, styleUrls } = opts;
|
|
31367
32587
|
if (styleUrls && styleUrls.length) {
|
|
31368
32588
|
styleUrls.forEach(url => {
|
|
@@ -32176,7 +33396,7 @@ var VxePulldownComponent = defineVxeComponent({
|
|
|
32176
33396
|
ref: refPulldownContent,
|
|
32177
33397
|
class: 'vxe-pulldown--content',
|
|
32178
33398
|
onClick: clickTargetEvent
|
|
32179
|
-
}, defaultSlot ? defaultSlot({ $pulldown: $xePulldown }) : []),
|
|
33399
|
+
}, defaultSlot ? defaultSlot({ options, $pulldown: $xePulldown }) : []),
|
|
32180
33400
|
h(Teleport, {
|
|
32181
33401
|
to: 'body',
|
|
32182
33402
|
disabled: btnTransfer ? !initialized : true
|
|
@@ -32201,19 +33421,19 @@ var VxePulldownComponent = defineVxeComponent({
|
|
|
32201
33421
|
headerSlot
|
|
32202
33422
|
? h('div', {
|
|
32203
33423
|
class: 'vxe-pulldown--panel-header'
|
|
32204
|
-
}, headerSlot({ $pulldown: $xePulldown }))
|
|
33424
|
+
}, headerSlot({ options, $pulldown: $xePulldown }))
|
|
32205
33425
|
: renderEmptyElement($xePulldown),
|
|
32206
33426
|
h('div', {
|
|
32207
33427
|
class: 'vxe-pulldown--panel-body'
|
|
32208
33428
|
}, dropdownSlot
|
|
32209
|
-
? dropdownSlot({ $pulldown: $xePulldown })
|
|
33429
|
+
? dropdownSlot({ options, $pulldown: $xePulldown })
|
|
32210
33430
|
: [
|
|
32211
33431
|
renderDefaultPanel(options)
|
|
32212
33432
|
]),
|
|
32213
33433
|
footerSlot
|
|
32214
33434
|
? h('div', {
|
|
32215
33435
|
class: 'vxe-pulldown--panel-footer'
|
|
32216
|
-
}, footerSlot({ $pulldown: $xePulldown }))
|
|
33436
|
+
}, footerSlot({ options, $pulldown: $xePulldown }))
|
|
32217
33437
|
: renderEmptyElement($xePulldown)
|
|
32218
33438
|
]
|
|
32219
33439
|
: [])
|
|
@@ -32596,10 +33816,10 @@ dynamicApp.use(VxeRadioButton);
|
|
|
32596
33816
|
VxeUI.component(VxeRadioButtonComponent);
|
|
32597
33817
|
const RadioButton = VxeRadioButton;
|
|
32598
33818
|
|
|
32599
|
-
function createReactData$
|
|
33819
|
+
function createReactData$7() {
|
|
32600
33820
|
return {};
|
|
32601
33821
|
}
|
|
32602
|
-
function createInternalData$
|
|
33822
|
+
function createInternalData$6() {
|
|
32603
33823
|
return {
|
|
32604
33824
|
// isLoaded: false
|
|
32605
33825
|
};
|
|
@@ -32640,8 +33860,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
32640
33860
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
32641
33861
|
const xID = XEUtils.uniqueId();
|
|
32642
33862
|
const { computeSize } = useSize(props);
|
|
32643
|
-
const reactData = reactive(createReactData$
|
|
32644
|
-
const internalData = createInternalData$
|
|
33863
|
+
const reactData = reactive(createReactData$7());
|
|
33864
|
+
const internalData = createInternalData$6();
|
|
32645
33865
|
const computeIsReadonly = computed(() => {
|
|
32646
33866
|
const { readonly } = props;
|
|
32647
33867
|
if (readonly === null) {
|
|
@@ -32777,8 +33997,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
32777
33997
|
});
|
|
32778
33998
|
});
|
|
32779
33999
|
onUnmounted(() => {
|
|
32780
|
-
XEUtils.assign(reactData, createReactData$
|
|
32781
|
-
XEUtils.assign(internalData, createInternalData$
|
|
34000
|
+
XEUtils.assign(reactData, createReactData$7());
|
|
34001
|
+
XEUtils.assign(internalData, createInternalData$6());
|
|
32782
34002
|
});
|
|
32783
34003
|
provide('$xeRadioGroup', $xeRadioGroup);
|
|
32784
34004
|
$xeRadioGroup.renderVN = renderVN;
|
|
@@ -33163,7 +34383,7 @@ dynamicApp.use(VxeRow);
|
|
|
33163
34383
|
VxeUI.component(VxeRowComponent);
|
|
33164
34384
|
const Row = VxeRow;
|
|
33165
34385
|
|
|
33166
|
-
function createReactData$
|
|
34386
|
+
function createReactData$6() {
|
|
33167
34387
|
return {
|
|
33168
34388
|
groupName: XEUtils.uniqueId('xe_group_'),
|
|
33169
34389
|
selectStyle: {
|
|
@@ -33204,7 +34424,7 @@ var VxeSegmentedComponent = defineVxeComponent({
|
|
|
33204
34424
|
const refElem = ref();
|
|
33205
34425
|
const refWrapperElem = ref();
|
|
33206
34426
|
const refSelectedElem = ref();
|
|
33207
|
-
const reactData = reactive(createReactData$
|
|
34427
|
+
const reactData = reactive(createReactData$6());
|
|
33208
34428
|
const refMaps = {
|
|
33209
34429
|
refElem
|
|
33210
34430
|
};
|
|
@@ -33377,7 +34597,7 @@ var VxeSegmentedComponent = defineVxeComponent({
|
|
|
33377
34597
|
updateStyle();
|
|
33378
34598
|
});
|
|
33379
34599
|
onBeforeUnmount(() => {
|
|
33380
|
-
XEUtils.assign(reactData, createReactData$
|
|
34600
|
+
XEUtils.assign(reactData, createReactData$6());
|
|
33381
34601
|
});
|
|
33382
34602
|
$xeSegmented.renderVN = renderVN;
|
|
33383
34603
|
return $xeSegmented;
|
|
@@ -35188,7 +36408,7 @@ const { errLog: errLog$4 } = createComponentLog('table-select');
|
|
|
35188
36408
|
function getRowUniqueId() {
|
|
35189
36409
|
return XEUtils.uniqueId('row_');
|
|
35190
36410
|
}
|
|
35191
|
-
function createReactData$
|
|
36411
|
+
function createReactData$5() {
|
|
35192
36412
|
return {
|
|
35193
36413
|
initialized: false,
|
|
35194
36414
|
tableColumns: [],
|
|
@@ -35202,7 +36422,7 @@ function createReactData$3() {
|
|
|
35202
36422
|
isActivated: false
|
|
35203
36423
|
};
|
|
35204
36424
|
}
|
|
35205
|
-
function createInternalData$
|
|
36425
|
+
function createInternalData$5() {
|
|
35206
36426
|
return {
|
|
35207
36427
|
// hpTimeout: undefined,
|
|
35208
36428
|
// vpTimeout: undefined,
|
|
@@ -35281,8 +36501,8 @@ var VxeTableSelectComponent = defineVxeComponent({
|
|
|
35281
36501
|
const refGridWrapper = ref();
|
|
35282
36502
|
const refOptionPanel = ref();
|
|
35283
36503
|
const refGrid = ref();
|
|
35284
|
-
const reactData = reactive(createReactData$
|
|
35285
|
-
const internalData = createInternalData$
|
|
36504
|
+
const reactData = reactive(createReactData$5());
|
|
36505
|
+
const internalData = createInternalData$5();
|
|
35286
36506
|
const refMaps = {
|
|
35287
36507
|
refElem
|
|
35288
36508
|
};
|
|
@@ -35885,8 +37105,8 @@ var VxeTableSelectComponent = defineVxeComponent({
|
|
|
35885
37105
|
globalEvents.off($xeTableSelect, 'mousedown');
|
|
35886
37106
|
globalEvents.off($xeTableSelect, 'blur');
|
|
35887
37107
|
globalEvents.off($xeTableSelect, 'resize');
|
|
35888
|
-
XEUtils.assign(reactData, createReactData$
|
|
35889
|
-
XEUtils.assign(internalData, createInternalData$
|
|
37108
|
+
XEUtils.assign(reactData, createReactData$5());
|
|
37109
|
+
XEUtils.assign(internalData, createInternalData$5());
|
|
35890
37110
|
});
|
|
35891
37111
|
nextTick(() => {
|
|
35892
37112
|
if (!VxeTableGridComponent) {
|
|
@@ -35911,6 +37131,77 @@ dynamicApp.use(VxeTableSelect);
|
|
|
35911
37131
|
VxeUI.component(VxeTableSelectComponent);
|
|
35912
37132
|
const TableSelect = VxeTableSelect;
|
|
35913
37133
|
|
|
37134
|
+
function createReactData$4() {
|
|
37135
|
+
return {};
|
|
37136
|
+
}
|
|
37137
|
+
function createInternalData$4() {
|
|
37138
|
+
return {};
|
|
37139
|
+
}
|
|
37140
|
+
var VxeTableTransferComponent = defineVxeComponent({
|
|
37141
|
+
name: 'VxeTableTransfer',
|
|
37142
|
+
props: {
|
|
37143
|
+
modelValue: Array,
|
|
37144
|
+
options: Array,
|
|
37145
|
+
size: {
|
|
37146
|
+
type: String,
|
|
37147
|
+
default: () => getConfig$3().tableTransfer.size || getConfig$3().size
|
|
37148
|
+
}
|
|
37149
|
+
},
|
|
37150
|
+
emits: [],
|
|
37151
|
+
setup(props, context) {
|
|
37152
|
+
const { emit } = context;
|
|
37153
|
+
const xID = XEUtils.uniqueId();
|
|
37154
|
+
const refElem = ref();
|
|
37155
|
+
const reactData = reactive(createReactData$4());
|
|
37156
|
+
const internalData = createInternalData$4();
|
|
37157
|
+
const refMaps = {
|
|
37158
|
+
refElem
|
|
37159
|
+
};
|
|
37160
|
+
const computeMaps = {};
|
|
37161
|
+
const $xeTableTransfer = {
|
|
37162
|
+
xID,
|
|
37163
|
+
props,
|
|
37164
|
+
context,
|
|
37165
|
+
reactData,
|
|
37166
|
+
internalData,
|
|
37167
|
+
getRefMaps: () => refMaps,
|
|
37168
|
+
getComputeMaps: () => computeMaps
|
|
37169
|
+
};
|
|
37170
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
37171
|
+
emit(type, createEvent(evnt, { $tableTransfer: $xeTableTransfer }, params));
|
|
37172
|
+
};
|
|
37173
|
+
const tableTransferMethods = {
|
|
37174
|
+
dispatchEvent
|
|
37175
|
+
};
|
|
37176
|
+
const tableTransferPrivateMethods = {};
|
|
37177
|
+
Object.assign($xeTableTransfer, tableTransferMethods, tableTransferPrivateMethods);
|
|
37178
|
+
const renderVN = () => {
|
|
37179
|
+
return h('div', {
|
|
37180
|
+
ref: refElem,
|
|
37181
|
+
class: 'vxe-table-transfer'
|
|
37182
|
+
}, []);
|
|
37183
|
+
};
|
|
37184
|
+
onBeforeUnmount(() => {
|
|
37185
|
+
XEUtils.assign(reactData, createReactData$4());
|
|
37186
|
+
XEUtils.assign(internalData, createInternalData$4());
|
|
37187
|
+
});
|
|
37188
|
+
$xeTableTransfer.renderVN = renderVN;
|
|
37189
|
+
return $xeTableTransfer;
|
|
37190
|
+
},
|
|
37191
|
+
render() {
|
|
37192
|
+
return this.renderVN();
|
|
37193
|
+
}
|
|
37194
|
+
});
|
|
37195
|
+
|
|
37196
|
+
const VxeTableTransfer = Object.assign({}, VxeTableTransferComponent, {
|
|
37197
|
+
install(app) {
|
|
37198
|
+
app.component(VxeTableTransferComponent.name, VxeTableTransferComponent);
|
|
37199
|
+
}
|
|
37200
|
+
});
|
|
37201
|
+
dynamicApp.use(VxeTableTransfer);
|
|
37202
|
+
VxeUI.component(VxeTableTransferComponent);
|
|
37203
|
+
const TableTransfer = VxeTableTransfer;
|
|
37204
|
+
|
|
35914
37205
|
const { warnLog: warnLog$3, errLog: errLog$3 } = createComponentLog('tabs');
|
|
35915
37206
|
const scrollbarOffsetSize = 20;
|
|
35916
37207
|
var VxeTabsComponent = defineVxeComponent({
|
|
@@ -37887,12 +39178,103 @@ dynamicApp.use(VxeTour);
|
|
|
37887
39178
|
VxeUI.component(VxeTourComponent);
|
|
37888
39179
|
const Tour = VxeTour;
|
|
37889
39180
|
|
|
37890
|
-
function
|
|
37891
|
-
return
|
|
39181
|
+
function createReactData$3() {
|
|
39182
|
+
return {};
|
|
37892
39183
|
}
|
|
37893
|
-
function
|
|
37894
|
-
return
|
|
39184
|
+
function createInternalData$3() {
|
|
39185
|
+
return {};
|
|
37895
39186
|
}
|
|
39187
|
+
var VxeTransferComponent = defineVxeComponent({
|
|
39188
|
+
name: 'VxeTransfer',
|
|
39189
|
+
props: {
|
|
39190
|
+
modelValue: Array,
|
|
39191
|
+
options: Array,
|
|
39192
|
+
size: {
|
|
39193
|
+
type: String,
|
|
39194
|
+
default: () => getConfig$3().transfer.size || getConfig$3().size
|
|
39195
|
+
}
|
|
39196
|
+
},
|
|
39197
|
+
emits: [],
|
|
39198
|
+
setup(props, context) {
|
|
39199
|
+
const { emit, slots } = context;
|
|
39200
|
+
const xID = XEUtils.uniqueId();
|
|
39201
|
+
const refElem = ref();
|
|
39202
|
+
const reactData = reactive(createReactData$3());
|
|
39203
|
+
const internalData = createInternalData$3();
|
|
39204
|
+
const refMaps = {
|
|
39205
|
+
refElem
|
|
39206
|
+
};
|
|
39207
|
+
const computeMaps = {};
|
|
39208
|
+
const $xeTransfer = {
|
|
39209
|
+
xID,
|
|
39210
|
+
props,
|
|
39211
|
+
context,
|
|
39212
|
+
reactData,
|
|
39213
|
+
internalData,
|
|
39214
|
+
getRefMaps: () => refMaps,
|
|
39215
|
+
getComputeMaps: () => computeMaps
|
|
39216
|
+
};
|
|
39217
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
39218
|
+
emit(type, createEvent(evnt, { $transfer: $xeTransfer }, params));
|
|
39219
|
+
};
|
|
39220
|
+
const transferMethods = {
|
|
39221
|
+
dispatchEvent
|
|
39222
|
+
};
|
|
39223
|
+
const transferPrivateMethods = {};
|
|
39224
|
+
Object.assign($xeTransfer, transferMethods, transferPrivateMethods);
|
|
39225
|
+
const renderVN = () => {
|
|
39226
|
+
const headerSlot = slots.header;
|
|
39227
|
+
const footerSlot = slots.footer;
|
|
39228
|
+
return h('div', {
|
|
39229
|
+
ref: refElem,
|
|
39230
|
+
class: 'vxe-transfer'
|
|
39231
|
+
}, [
|
|
39232
|
+
headerSlot
|
|
39233
|
+
? h('div', {
|
|
39234
|
+
class: 'vxe-transfer--header'
|
|
39235
|
+
}, headerSlot({ $transfer: $xeTransfer }))
|
|
39236
|
+
: renderEmptyElement($xeTransfer),
|
|
39237
|
+
h('div', {
|
|
39238
|
+
class: 'vxe-transfer--body'
|
|
39239
|
+
}, [
|
|
39240
|
+
h('div', {
|
|
39241
|
+
class: 'vxe-transfer--left-wrapper'
|
|
39242
|
+
}),
|
|
39243
|
+
h('div', {
|
|
39244
|
+
class: 'vxe-transfer--buttons-wrapper'
|
|
39245
|
+
}),
|
|
39246
|
+
h('div', {
|
|
39247
|
+
class: 'vxe-transfer--right-wrapper'
|
|
39248
|
+
})
|
|
39249
|
+
]),
|
|
39250
|
+
footerSlot
|
|
39251
|
+
? h('div', {
|
|
39252
|
+
class: 'vxe-transfer--footer'
|
|
39253
|
+
}, footerSlot({ $transfer: $xeTransfer }))
|
|
39254
|
+
: renderEmptyElement($xeTransfer)
|
|
39255
|
+
]);
|
|
39256
|
+
};
|
|
39257
|
+
onBeforeUnmount(() => {
|
|
39258
|
+
XEUtils.assign(reactData, createReactData$3());
|
|
39259
|
+
XEUtils.assign(internalData, createInternalData$3());
|
|
39260
|
+
});
|
|
39261
|
+
$xeTransfer.renderVN = renderVN;
|
|
39262
|
+
return $xeTransfer;
|
|
39263
|
+
},
|
|
39264
|
+
render() {
|
|
39265
|
+
return this.renderVN();
|
|
39266
|
+
}
|
|
39267
|
+
});
|
|
39268
|
+
|
|
39269
|
+
const VxeTransfer = Object.assign({}, VxeTransferComponent, {
|
|
39270
|
+
install(app) {
|
|
39271
|
+
app.component(VxeTransferComponent.name, VxeTransferComponent);
|
|
39272
|
+
}
|
|
39273
|
+
});
|
|
39274
|
+
dynamicApp.use(VxeTransfer);
|
|
39275
|
+
VxeUI.component(VxeTransferComponent);
|
|
39276
|
+
const Transfer = VxeTransfer;
|
|
39277
|
+
|
|
37896
39278
|
function countTreeExpand($xeTree, prevNode) {
|
|
37897
39279
|
let count = 1;
|
|
37898
39280
|
if (!prevNode) {
|
|
@@ -37934,29 +39316,6 @@ function getCrossTreeDragNodeInfo() {
|
|
|
37934
39316
|
return crossTreeDragNodeInfo;
|
|
37935
39317
|
}
|
|
37936
39318
|
|
|
37937
|
-
const rowMoveCls = 'row--drag-move';
|
|
37938
|
-
/**
|
|
37939
|
-
* 上下拖拽
|
|
37940
|
-
*/
|
|
37941
|
-
function moveRowAnimateToTb(elemList, offsetTop) {
|
|
37942
|
-
XEUtils.arrayEach(elemList, trEl => {
|
|
37943
|
-
trEl.style.transform = `translateY(${offsetTop}px)`;
|
|
37944
|
-
});
|
|
37945
|
-
requestAnimationFrame(() => {
|
|
37946
|
-
XEUtils.arrayEach(elemList, trEl => {
|
|
37947
|
-
addClass(trEl, rowMoveCls);
|
|
37948
|
-
trEl.style.transform = '';
|
|
37949
|
-
});
|
|
37950
|
-
});
|
|
37951
|
-
}
|
|
37952
|
-
function clearRowAnimate(elem, clss) {
|
|
37953
|
-
setTimeout(() => {
|
|
37954
|
-
if (elem) {
|
|
37955
|
-
XEUtils.arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, rowMoveCls));
|
|
37956
|
-
}
|
|
37957
|
-
}, 500);
|
|
37958
|
-
}
|
|
37959
|
-
|
|
37960
39319
|
const { errLog: errLog$2 } = createComponentLog('tree');
|
|
37961
39320
|
const { menus, getConfig, getI18n, getIcon } = VxeUI;
|
|
37962
39321
|
/**
|
|
@@ -38086,19 +39445,13 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38086
39445
|
type: Boolean,
|
|
38087
39446
|
default: () => getConfig().tree.showRadio
|
|
38088
39447
|
},
|
|
38089
|
-
checkNodeKey:
|
|
38090
|
-
type: [String, Number],
|
|
38091
|
-
default: () => getConfig().tree.checkNodeKey
|
|
38092
|
-
},
|
|
39448
|
+
checkNodeKey: [String, Number],
|
|
38093
39449
|
radioConfig: Object,
|
|
38094
39450
|
showCheckbox: {
|
|
38095
39451
|
type: Boolean,
|
|
38096
39452
|
default: () => getConfig().tree.showCheckbox
|
|
38097
39453
|
},
|
|
38098
|
-
checkNodeKeys:
|
|
38099
|
-
type: Array,
|
|
38100
|
-
default: () => getConfig().tree.checkNodeKeys
|
|
38101
|
-
},
|
|
39454
|
+
checkNodeKeys: Array,
|
|
38102
39455
|
checkboxConfig: Object,
|
|
38103
39456
|
nodeConfig: Object,
|
|
38104
39457
|
lazy: Boolean,
|
|
@@ -38294,7 +39647,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38294
39647
|
}
|
|
38295
39648
|
const valueField = computeValueField.value;
|
|
38296
39649
|
const nodeKey = XEUtils.get(node, valueField);
|
|
38297
|
-
return
|
|
39650
|
+
return enModelValue(nodeKey);
|
|
38298
39651
|
};
|
|
38299
39652
|
const isExpandByNode = (node) => {
|
|
38300
39653
|
const { updateExpandedFlag } = reactData;
|
|
@@ -38339,7 +39692,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38339
39692
|
}
|
|
38340
39693
|
const nodeList = [];
|
|
38341
39694
|
nodeKeys.forEach((nodeKey) => {
|
|
38342
|
-
const nodeid =
|
|
39695
|
+
const nodeid = enModelValue(nodeKey);
|
|
38343
39696
|
const nodeItem = nodeMaps[nodeid];
|
|
38344
39697
|
if (nodeItem) {
|
|
38345
39698
|
nodeList.push(nodeItem.item);
|
|
@@ -39220,7 +40573,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39220
40573
|
reactData.updateCheckboxFlag++;
|
|
39221
40574
|
updateCheckboxStatus();
|
|
39222
40575
|
const nodeids = XEUtils.keys(selectCheckboxMaps);
|
|
39223
|
-
const value = nodeids.map(
|
|
40576
|
+
const value = nodeids.map(deModelValue);
|
|
39224
40577
|
emitCheckboxMode(value);
|
|
39225
40578
|
dispatchEvent('checkbox-change', { node, value, checked: isChecked }, evnt);
|
|
39226
40579
|
};
|
|
@@ -39269,7 +40622,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39269
40622
|
return;
|
|
39270
40623
|
}
|
|
39271
40624
|
const isChecked = true;
|
|
39272
|
-
const value =
|
|
40625
|
+
const value = deModelValue(nodeid);
|
|
39273
40626
|
reactData.selectRadioKey = nodeid;
|
|
39274
40627
|
emitRadioMode(value);
|
|
39275
40628
|
dispatchEvent('radio-change', { node, value, checked: isChecked }, evnt);
|
|
@@ -39307,7 +40660,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39307
40660
|
getCurrentNodeId() {
|
|
39308
40661
|
const { currentNode } = reactData;
|
|
39309
40662
|
if (currentNode) {
|
|
39310
|
-
return
|
|
40663
|
+
return deModelValue(getNodeId(currentNode));
|
|
39311
40664
|
}
|
|
39312
40665
|
return null;
|
|
39313
40666
|
},
|
|
@@ -39324,7 +40677,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39324
40677
|
},
|
|
39325
40678
|
setCurrentNodeId(nodeKey) {
|
|
39326
40679
|
const { nodeMaps } = internalData;
|
|
39327
|
-
const nodeItem = nodeMaps[
|
|
40680
|
+
const nodeItem = nodeMaps[enModelValue(nodeKey)];
|
|
39328
40681
|
reactData.currentNode = nodeItem ? nodeItem.item : null;
|
|
39329
40682
|
return nextTick();
|
|
39330
40683
|
},
|
|
@@ -39352,7 +40705,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39352
40705
|
return null;
|
|
39353
40706
|
},
|
|
39354
40707
|
setRadioNodeId(nodeKey) {
|
|
39355
|
-
reactData.selectRadioKey =
|
|
40708
|
+
reactData.selectRadioKey = enModelValue(nodeKey);
|
|
39356
40709
|
emitRadioMode(nodeKey);
|
|
39357
40710
|
return nextTick();
|
|
39358
40711
|
},
|
|
@@ -39360,7 +40713,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39360
40713
|
if (node) {
|
|
39361
40714
|
const nodeid = getNodeId(node);
|
|
39362
40715
|
reactData.selectRadioKey = nodeid;
|
|
39363
|
-
emitRadioMode(
|
|
40716
|
+
emitRadioMode(deModelValue(nodeid));
|
|
39364
40717
|
}
|
|
39365
40718
|
else {
|
|
39366
40719
|
emitRadioMode(null);
|
|
@@ -39386,7 +40739,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39386
40739
|
const { selectCheckboxMaps } = internalData;
|
|
39387
40740
|
const nodeKeys = [];
|
|
39388
40741
|
XEUtils.each(selectCheckboxMaps, (item, nodeId) => {
|
|
39389
|
-
nodeKeys.push(
|
|
40742
|
+
nodeKeys.push(deModelValue(nodeId));
|
|
39390
40743
|
});
|
|
39391
40744
|
return nodeKeys;
|
|
39392
40745
|
},
|
|
@@ -39464,7 +40817,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39464
40817
|
nodeKeys = [nodeKeys];
|
|
39465
40818
|
}
|
|
39466
40819
|
nodeKeys.forEach((nodeKey) => {
|
|
39467
|
-
const nodeid =
|
|
40820
|
+
const nodeid = enModelValue(nodeKey);
|
|
39468
40821
|
handleSetExpand(nodeid, expanded, treeExpandedMaps);
|
|
39469
40822
|
});
|
|
39470
40823
|
reactData.updateExpandedFlag++;
|
|
@@ -39477,7 +40830,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39477
40830
|
const { treeExpandedMaps } = internalData;
|
|
39478
40831
|
const nodeKeys = [];
|
|
39479
40832
|
XEUtils.each(treeExpandedMaps, (item, nodeId) => {
|
|
39480
|
-
nodeKeys.push(
|
|
40833
|
+
nodeKeys.push(deModelValue(nodeId));
|
|
39481
40834
|
});
|
|
39482
40835
|
return nodeKeys;
|
|
39483
40836
|
},
|
|
@@ -39515,7 +40868,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39515
40868
|
nodeKeys = [nodeKeys];
|
|
39516
40869
|
}
|
|
39517
40870
|
nodeKeys.forEach((nodeKey) => {
|
|
39518
|
-
const nodeid =
|
|
40871
|
+
const nodeid = enModelValue(nodeKey);
|
|
39519
40872
|
handleSetExpand(nodeid, !treeExpandedMaps[`${nodeid}`], treeExpandedMaps);
|
|
39520
40873
|
});
|
|
39521
40874
|
reactData.updateExpandedFlag++;
|
|
@@ -39847,10 +41200,11 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39847
41200
|
const dragNodeid = getNodeId(dragNode);
|
|
39848
41201
|
const dragNodeRest = nodeMaps[dragNodeid] || {};
|
|
39849
41202
|
const _dragNodeIndex = dragNodeRest._index;
|
|
41203
|
+
const newNodeid = getNodeId(prevDragNode);
|
|
39850
41204
|
let dragNodeHeight = 0;
|
|
39851
41205
|
let dragOffsetTop = -1;
|
|
39852
41206
|
if (animation) {
|
|
39853
|
-
const prevItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${
|
|
41207
|
+
const prevItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${newNodeid}"]`);
|
|
39854
41208
|
const oldItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${dragNodeid}"]`);
|
|
39855
41209
|
const targetItemEl = prevItemEl || oldItemEl;
|
|
39856
41210
|
if (targetItemEl) {
|
|
@@ -39865,7 +41219,6 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39865
41219
|
const oldAllMaps = {};
|
|
39866
41220
|
let isSelfToChildStatus = false;
|
|
39867
41221
|
const oldRest = dragNodeRest;
|
|
39868
|
-
const newNodeid = getNodeId(prevDragNode);
|
|
39869
41222
|
const newRest = nodeMaps[newNodeid];
|
|
39870
41223
|
if (transform) {
|
|
39871
41224
|
if (oldRest && newRest) {
|
|
@@ -40571,7 +41924,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
40571
41924
|
loadData(props.data || []);
|
|
40572
41925
|
});
|
|
40573
41926
|
watch(() => props.checkNodeKey, (nodeKey) => {
|
|
40574
|
-
reactData.selectRadioKey =
|
|
41927
|
+
reactData.selectRadioKey = enModelValue(nodeKey);
|
|
40575
41928
|
});
|
|
40576
41929
|
const checkboxFlag = ref(0);
|
|
40577
41930
|
watch(() => props.checkNodeKeys ? props.checkNodeKeys.length : 0, () => {
|
|
@@ -40642,7 +41995,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
40642
41995
|
XEUtils.assign(reactData, createReactData$2());
|
|
40643
41996
|
XEUtils.assign(internalData, createInternalData$2());
|
|
40644
41997
|
});
|
|
40645
|
-
reactData.selectRadioKey =
|
|
41998
|
+
reactData.selectRadioKey = enModelValue(props.checkNodeKey);
|
|
40646
41999
|
loadData(props.data || []);
|
|
40647
42000
|
$xeTree.renderVN = renderVN;
|
|
40648
42001
|
provide('$xeTree', $xeTree);
|
|
@@ -40748,10 +42101,12 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
40748
42101
|
type: Boolean,
|
|
40749
42102
|
default: () => getConfig$3().treeSelect.showRadio
|
|
40750
42103
|
},
|
|
42104
|
+
radioConfig: Object,
|
|
40751
42105
|
showCheckbox: {
|
|
40752
42106
|
type: Boolean,
|
|
40753
42107
|
default: () => getConfig$3().treeSelect.showCheckbox
|
|
40754
42108
|
},
|
|
42109
|
+
checkboxConfig: Object,
|
|
40755
42110
|
popupConfig: Object,
|
|
40756
42111
|
treeConfig: Object,
|
|
40757
42112
|
menuConfig: Object,
|
|
@@ -40884,20 +42239,20 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
40884
42239
|
return Object.assign({ isHover: true }, treeOpts.nodeConfig);
|
|
40885
42240
|
});
|
|
40886
42241
|
const computeTreeCheckboxOpts = computed(() => {
|
|
40887
|
-
const { showCheckbox } = props;
|
|
42242
|
+
const { showCheckbox, checkboxConfig } = props;
|
|
40888
42243
|
const treeOpts = computeTreeOpts.value;
|
|
40889
42244
|
return Object.assign({
|
|
40890
42245
|
showIcon: XEUtils.isBoolean(showCheckbox) ? showCheckbox : !!treeOpts.showCheckbox
|
|
40891
|
-
}, treeOpts.checkboxConfig, {
|
|
42246
|
+
}, treeOpts.checkboxConfig, checkboxConfig, {
|
|
40892
42247
|
trigger: 'node'
|
|
40893
42248
|
});
|
|
40894
42249
|
});
|
|
40895
42250
|
const computeTreeRadioOpts = computed(() => {
|
|
40896
|
-
const { showRadio } = props;
|
|
42251
|
+
const { showRadio, radioConfig } = props;
|
|
40897
42252
|
const treeOpts = computeTreeOpts.value;
|
|
40898
42253
|
return Object.assign({
|
|
40899
42254
|
showIcon: XEUtils.isBoolean(showRadio) ? showRadio : !!treeOpts.showRadio
|
|
40900
|
-
}, treeOpts.radioConfig, {
|
|
42255
|
+
}, treeOpts.radioConfig, radioConfig, {
|
|
40901
42256
|
trigger: 'node'
|
|
40902
42257
|
});
|
|
40903
42258
|
});
|
|
@@ -41145,7 +42500,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
41145
42500
|
dispatchEvent('visible-change', { visible: false }, evnt || null);
|
|
41146
42501
|
};
|
|
41147
42502
|
const changeEvent = (evnt, selectValue, node) => {
|
|
41148
|
-
const value = XEUtils.isArray(selectValue) ? selectValue.map(
|
|
42503
|
+
const value = XEUtils.isArray(selectValue) ? selectValue.map(deModelValue) : deModelValue(selectValue);
|
|
41149
42504
|
emitModel(value);
|
|
41150
42505
|
if (value !== props.modelValue) {
|
|
41151
42506
|
dispatchEvent('change', { value, node, option: node }, evnt);
|
|
@@ -43974,6 +45329,7 @@ const components = [
|
|
|
43974
45329
|
VxeSwitch,
|
|
43975
45330
|
VxeTabPane,
|
|
43976
45331
|
VxeTableSelect,
|
|
45332
|
+
VxeTableTransfer,
|
|
43977
45333
|
VxeTabs,
|
|
43978
45334
|
VxeTag,
|
|
43979
45335
|
VxeTextEllipsis,
|
|
@@ -43984,6 +45340,7 @@ const components = [
|
|
|
43984
45340
|
VxeTip,
|
|
43985
45341
|
VxeTooltip,
|
|
43986
45342
|
VxeTour,
|
|
45343
|
+
VxeTransfer,
|
|
43987
45344
|
VxeTree,
|
|
43988
45345
|
VxeTreeSelect,
|
|
43989
45346
|
VxeUpload,
|
|
@@ -44088,6 +45445,7 @@ var VxeUIExport = /*#__PURE__*/Object.freeze({
|
|
|
44088
45445
|
Switch: Switch,
|
|
44089
45446
|
TabPane: TabPane,
|
|
44090
45447
|
TableSelect: TableSelect,
|
|
45448
|
+
TableTransfer: TableTransfer,
|
|
44091
45449
|
Tabs: Tabs,
|
|
44092
45450
|
Tag: Tag,
|
|
44093
45451
|
Text: Text,
|
|
@@ -44099,6 +45457,7 @@ var VxeUIExport = /*#__PURE__*/Object.freeze({
|
|
|
44099
45457
|
Tips: Tips,
|
|
44100
45458
|
Tooltip: Tooltip,
|
|
44101
45459
|
Tour: Tour,
|
|
45460
|
+
Transfer: Transfer,
|
|
44102
45461
|
Tree: Tree,
|
|
44103
45462
|
TreeSelect: TreeSelect,
|
|
44104
45463
|
Upload: Upload,
|
|
@@ -44177,6 +45536,7 @@ var VxeUIExport = /*#__PURE__*/Object.freeze({
|
|
|
44177
45536
|
VxeSwitch: VxeSwitch,
|
|
44178
45537
|
VxeTabPane: VxeTabPane,
|
|
44179
45538
|
VxeTableSelect: VxeTableSelect,
|
|
45539
|
+
VxeTableTransfer: VxeTableTransfer,
|
|
44180
45540
|
VxeTabs: VxeTabs,
|
|
44181
45541
|
VxeTag: VxeTag,
|
|
44182
45542
|
VxeText: VxeText,
|
|
@@ -44187,6 +45547,7 @@ var VxeUIExport = /*#__PURE__*/Object.freeze({
|
|
|
44187
45547
|
VxeTip: VxeTip,
|
|
44188
45548
|
VxeTooltip: VxeTooltip,
|
|
44189
45549
|
VxeTour: VxeTour,
|
|
45550
|
+
VxeTransfer: VxeTransfer,
|
|
44190
45551
|
VxeTree: VxeTree,
|
|
44191
45552
|
VxeTreeSelect: VxeTreeSelect,
|
|
44192
45553
|
VxeUpload: VxeUpload,
|
|
@@ -44206,4 +45567,4 @@ var VxeUIExport = /*#__PURE__*/Object.freeze({
|
|
|
44206
45567
|
watermark: watermark
|
|
44207
45568
|
});
|
|
44208
45569
|
|
|
44209
|
-
export { Alert, Anchor, AnchorLink, Avatar, Backtop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, CheckboxGroup, Col, Collapse, CollapsePane, ColorPicker, ContextMenu, ContextMenuController, Countdown, DatePanel, DatePicker, DateRangePicker, Drawer, DrawerController, Empty, Form, FormGather, FormGroup, FormItem, Icon, IconPicker, Image$1 as Image, ImageGroup, ImagePreview, Input, LayoutAside, LayoutBody, LayoutContainer, LayoutFooter, LayoutHeader, Link, List, Loading, LoadingController, Menu, Modal, ModalController, NoticeBar, NumberInput, Optgroup, Option, Pager, PasswordInput, Print, PrintPageBreak, Pulldown, Radio, RadioButton, RadioGroup, Rate, Result, Row, Segmented, Select, Slider, Split, SplitPane, Splitter, SplitterPanel, Steps, Switch, TabPane, TableSelect, Tabs, Tag, Text, TextEllipsis, Textarea, Timeline, TimelineItem, Tip, Tips, Tooltip, Tour, Tree, TreeSelect, Upload, VxeAlert, VxeAnchor, VxeAnchorLink, VxeAvatar, VxeBacktop, VxeBadge, VxeBreadcrumb, VxeBreadcrumbItem, VxeButton, VxeButtonGroup, VxeCalendar, VxeCard, VxeCarousel, VxeCarouselItem, VxeCascader, VxeCheckbox, VxeCheckboxButton, VxeCheckboxGroup, VxeCol, VxeCollapse, VxeCollapsePane, VxeColorPicker, VxeContextMenu, VxeCountdown, VxeDatePanel, VxeDatePicker, VxeDateRangePicker, VxeDrawer, VxeEmpty, VxeForm, VxeFormGather, VxeFormGroup, VxeFormItem, VxeIcon, VxeIconPicker, VxeImage, VxeImageGroup, VxeImagePreview, VxeInput, VxeLayoutAside, VxeLayoutBody, VxeLayoutContainer, VxeLayoutFooter, VxeLayoutHeader, VxeLink, VxeList, VxeLoading, VxeMenu, VxeModal, VxeNoticeBar, VxeNumberInput, VxeOptgroup, VxeOption, VxePager, VxePasswordInput, VxePrint, VxePrintPageBreak, VxePulldown, VxeRadio, VxeRadioButton, VxeRadioGroup, VxeRate, VxeResult, VxeRow, VxeSegmented, VxeSelect, VxeSlider, VxeSplit, VxeSplitPane, VxeSplitter, VxeSplitterPanel, VxeSteps, VxeSwitch, VxeTabPane, VxeTableSelect, VxeTabs, VxeTag, VxeText, VxeTextEllipsis, VxeTextarea, VxeTimeline, VxeTimelineItem, VxeTip, VxeTooltip, VxeTour, VxeTree, VxeTreeSelect, VxeUpload, VxeWatermark, Watermark, WatermarkController, config, VxeUIExport as default, drawer, install, loading, modal, print, readFile, saveFile, setup, version, watermark };
|
|
45570
|
+
export { Alert, Anchor, AnchorLink, Avatar, Backtop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, CheckboxGroup, Col, Collapse, CollapsePane, ColorPicker, ContextMenu, ContextMenuController, Countdown, DatePanel, DatePicker, DateRangePicker, Drawer, DrawerController, Empty, Form, FormGather, FormGroup, FormItem, Icon, IconPicker, Image$1 as Image, ImageGroup, ImagePreview, Input, LayoutAside, LayoutBody, LayoutContainer, LayoutFooter, LayoutHeader, Link, List, Loading, LoadingController, Menu, Modal, ModalController, NoticeBar, NumberInput, Optgroup, Option, Pager, PasswordInput, Print, PrintPageBreak, Pulldown, Radio, RadioButton, RadioGroup, Rate, Result, Row, Segmented, Select, Slider, Split, SplitPane, Splitter, SplitterPanel, Steps, Switch, TabPane, TableSelect, TableTransfer, Tabs, Tag, Text, TextEllipsis, Textarea, Timeline, TimelineItem, Tip, Tips, Tooltip, Tour, Transfer, Tree, TreeSelect, Upload, VxeAlert, VxeAnchor, VxeAnchorLink, VxeAvatar, VxeBacktop, VxeBadge, VxeBreadcrumb, VxeBreadcrumbItem, VxeButton, VxeButtonGroup, VxeCalendar, VxeCard, VxeCarousel, VxeCarouselItem, VxeCascader, VxeCheckbox, VxeCheckboxButton, VxeCheckboxGroup, VxeCol, VxeCollapse, VxeCollapsePane, VxeColorPicker, VxeContextMenu, VxeCountdown, VxeDatePanel, VxeDatePicker, VxeDateRangePicker, VxeDrawer, VxeEmpty, VxeForm, VxeFormGather, VxeFormGroup, VxeFormItem, VxeIcon, VxeIconPicker, VxeImage, VxeImageGroup, VxeImagePreview, VxeInput, VxeLayoutAside, VxeLayoutBody, VxeLayoutContainer, VxeLayoutFooter, VxeLayoutHeader, VxeLink, VxeList, VxeLoading, VxeMenu, VxeModal, VxeNoticeBar, VxeNumberInput, VxeOptgroup, VxeOption, VxePager, VxePasswordInput, VxePrint, VxePrintPageBreak, VxePulldown, VxeRadio, VxeRadioButton, VxeRadioGroup, VxeRate, VxeResult, VxeRow, VxeSegmented, VxeSelect, VxeSlider, VxeSplit, VxeSplitPane, VxeSplitter, VxeSplitterPanel, VxeSteps, VxeSwitch, VxeTabPane, VxeTableSelect, VxeTableTransfer, VxeTabs, VxeTag, VxeText, VxeTextEllipsis, VxeTextarea, VxeTimeline, VxeTimelineItem, VxeTip, VxeTooltip, VxeTour, VxeTransfer, VxeTree, VxeTreeSelect, VxeUpload, VxeWatermark, Watermark, WatermarkController, config, VxeUIExport as default, drawer, install, loading, modal, print, readFile, saveFile, setup, version, watermark };
|