vxe-pc-ui 4.15.24 → 4.15.26
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 +803 -125
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/date-panel/src/date-panel.js +79 -52
- package/es/date-panel/src/util.js +11 -1
- package/es/date-picker/src/date-picker.js +17 -12
- package/es/date-range-picker/src/date-range-picker.js +104 -19
- package/es/icon/style.css +1 -1
- package/es/list/src/list.js +567 -26
- package/es/list/src/util.js +8 -0
- package/es/list/style.css +10 -4
- package/es/list/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +4 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-list/style.css +10 -4
- package/es/vxe-list/style.min.css +1 -1
- package/lib/date-panel/src/date-panel.js +87 -51
- package/lib/date-panel/src/date-panel.min.js +1 -1
- package/lib/date-panel/src/util.js +14 -2
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +19 -12
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +119 -18
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +903 -106
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +647 -18
- package/lib/list/src/list.min.js +1 -1
- package/lib/list/src/util.js +14 -0
- package/lib/list/src/util.min.js +1 -0
- package/lib/list/style/style.css +10 -4
- package/lib/list/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +4 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-list/style/style.css +10 -4
- package/lib/vxe-list/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/date-panel/src/date-panel.ts +85 -54
- package/packages/date-panel/src/util.ts +14 -2
- package/packages/date-picker/src/date-picker.ts +18 -12
- package/packages/date-range-picker/src/date-range-picker.ts +102 -19
- package/packages/list/src/list.ts +581 -22
- package/packages/list/src/util.ts +11 -0
- package/packages/ui/index.ts +3 -0
- package/styles/components/list.scss +8 -4
- package/types/components/date-panel.d.ts +4 -2
- package/types/components/date-range-picker.d.ts +2 -2
- package/types/components/list.d.ts +119 -4
- package/types/components/tree.d.ts +2 -2
- package/types/ui/menus.d.ts +13 -1
- /package/es/icon/{iconfont.1783233742355.ttf → iconfont.1783301651996.ttf} +0 -0
- /package/es/icon/{iconfont.1783233742355.woff → iconfont.1783301651996.woff} +0 -0
- /package/es/icon/{iconfont.1783233742355.woff2 → iconfont.1783301651996.woff2} +0 -0
- /package/es/{iconfont.1783233742355.ttf → iconfont.1783301651996.ttf} +0 -0
- /package/es/{iconfont.1783233742355.woff → iconfont.1783301651996.woff} +0 -0
- /package/es/{iconfont.1783233742355.woff2 → iconfont.1783301651996.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1783233742355.ttf → iconfont.1783301651996.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1783233742355.woff → iconfont.1783301651996.woff} +0 -0
- /package/lib/icon/style/{iconfont.1783233742355.woff2 → iconfont.1783301651996.woff2} +0 -0
- /package/lib/{iconfont.1783233742355.ttf → iconfont.1783301651996.ttf} +0 -0
- /package/lib/{iconfont.1783233742355.woff → iconfont.1783301651996.woff} +0 -0
- /package/lib/{iconfont.1783233742355.woff2 → iconfont.1783301651996.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as core from '@vxe-ui/core';
|
|
2
|
-
import { VxeUI, setConfig as setConfig$1, setIcon, getConfig as getConfig$3, createEvent, getIcon as getIcon$2, renderEmptyElement, useSize, usePermission, permission, globalEvents, renderer, getI18n as getI18n$2, globalResize, GLOBAL_EVENT_KEYS, getSlotVNs as getSlotVNs$1, commands, formats, getComponent, validators } from '@vxe-ui/core';
|
|
2
|
+
import { VxeUI, setConfig as setConfig$1, setIcon, getConfig as getConfig$3, createEvent, getIcon as getIcon$2, renderEmptyElement, useSize, usePermission, permission, globalEvents, renderer, getI18n as getI18n$2, globalResize, menus as menus$3, GLOBAL_EVENT_KEYS, getSlotVNs as getSlotVNs$1, commands, formats, getComponent, validators } from '@vxe-ui/core';
|
|
3
3
|
export * from '@vxe-ui/core';
|
|
4
4
|
import { defineComponent, reactive, h, createCommentVNode, createApp, ref, inject, computed, watch, onMounted, onUnmounted, provide, nextTick, onBeforeUnmount, resolveComponent, Teleport, onActivated, onDeactivated, TransitionGroup } from 'vue';
|
|
5
5
|
import XEUtils from 'xe-utils';
|
|
@@ -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.26"}`;
|
|
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}` : '';
|
|
@@ -92,18 +92,18 @@ function createComponentLog(name) {
|
|
|
92
92
|
errLog: log.create('error', versionInfo + '] [' + name)
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
const warnLog$
|
|
95
|
+
const warnLog$h = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.15.
|
|
98
|
+
const version = "4.15.26";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
102
|
-
warnLog$
|
|
102
|
+
warnLog$h('vxe.error.delFunc', ['config', 'setConfig']);
|
|
103
103
|
return setConfig$1(options);
|
|
104
104
|
}
|
|
105
105
|
function setup(options) {
|
|
106
|
-
warnLog$
|
|
106
|
+
warnLog$h('vxe.error.delFunc', ['setup', 'setConfig']);
|
|
107
107
|
return setConfig$1(options);
|
|
108
108
|
}
|
|
109
109
|
VxeUI.config = config;
|
|
@@ -318,6 +318,9 @@ setConfig$1({
|
|
|
318
318
|
listView: {},
|
|
319
319
|
list: {
|
|
320
320
|
// size: null,
|
|
321
|
+
rowConfig: {
|
|
322
|
+
contentField: 'label'
|
|
323
|
+
},
|
|
321
324
|
dragConfig: {
|
|
322
325
|
showIcon: true,
|
|
323
326
|
animation: true,
|
|
@@ -3120,7 +3123,7 @@ dynamicApp.use(VxeTooltip);
|
|
|
3120
3123
|
VxeUI.component(VxeTooltipComponent);
|
|
3121
3124
|
const Tooltip = VxeTooltip;
|
|
3122
3125
|
|
|
3123
|
-
const { warnLog: warnLog$
|
|
3126
|
+
const { warnLog: warnLog$g } = createComponentLog('button');
|
|
3124
3127
|
const VxeButtonComponent = defineVxeComponent({
|
|
3125
3128
|
name: 'VxeButton',
|
|
3126
3129
|
props: {
|
|
@@ -3839,7 +3842,7 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
3839
3842
|
$xeButton.renderVN = renderVN;
|
|
3840
3843
|
onMounted(() => {
|
|
3841
3844
|
if (props.type === 'text') {
|
|
3842
|
-
warnLog$
|
|
3845
|
+
warnLog$g('vxe.error.delProp', ['type=text', 'mode=text']);
|
|
3843
3846
|
}
|
|
3844
3847
|
globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent);
|
|
3845
3848
|
globalEvents.on($xeButton, 'mousedown', handleGlobalMousedownEvent);
|
|
@@ -3866,7 +3869,7 @@ dynamicApp.use(VxeButton);
|
|
|
3866
3869
|
VxeUI.component(VxeButtonComponent);
|
|
3867
3870
|
const Button = VxeButton;
|
|
3868
3871
|
|
|
3869
|
-
const { errLog: errLog$
|
|
3872
|
+
const { errLog: errLog$i } = createComponentLog('backtop');
|
|
3870
3873
|
function createInternalData$j() {
|
|
3871
3874
|
return {
|
|
3872
3875
|
targetEl: null
|
|
@@ -4044,13 +4047,13 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
4044
4047
|
const { target } = props;
|
|
4045
4048
|
if (!target) {
|
|
4046
4049
|
removeScrollEvent();
|
|
4047
|
-
errLog$
|
|
4050
|
+
errLog$i('vxe.error.reqProp', ['target']);
|
|
4048
4051
|
return;
|
|
4049
4052
|
}
|
|
4050
4053
|
if (XEUtils.isString(target)) {
|
|
4051
4054
|
const tEl = document.querySelector(target);
|
|
4052
4055
|
if (!tEl) {
|
|
4053
|
-
errLog$
|
|
4056
|
+
errLog$i('vxe.error.errProp', [`target=${target}`, 'body']);
|
|
4054
4057
|
}
|
|
4055
4058
|
const { targetEl } = internalData;
|
|
4056
4059
|
if (targetEl !== tEl) {
|
|
@@ -4572,7 +4575,7 @@ function parseDateValue(val, type, options) {
|
|
|
4572
4575
|
const { valueFormat } = options;
|
|
4573
4576
|
if (val) {
|
|
4574
4577
|
if (type === 'time') {
|
|
4575
|
-
return toStringTimeDate(XEUtils.isArray(val) ?
|
|
4578
|
+
return toStringTimeDate(XEUtils.isArray(val) ? XEUtils.last(val) : val);
|
|
4576
4579
|
}
|
|
4577
4580
|
if (XEUtils.isNumber(val) || /^[0-9]{10,15}$/.test(`${val}`)) {
|
|
4578
4581
|
return new Date(Number(val));
|
|
@@ -4753,6 +4756,16 @@ function checkDateInputFormat(numStr, formatKey) {
|
|
|
4753
4756
|
}
|
|
4754
4757
|
return numVal;
|
|
4755
4758
|
}
|
|
4759
|
+
const getPrevYear = (date, size = 1) => {
|
|
4760
|
+
const currtYear = date.getFullYear();
|
|
4761
|
+
date.setFullYear(currtYear - size);
|
|
4762
|
+
return date;
|
|
4763
|
+
};
|
|
4764
|
+
const getNextYear = (date, size = 1) => {
|
|
4765
|
+
const currtYear = date.getFullYear();
|
|
4766
|
+
date.setFullYear(currtYear + size);
|
|
4767
|
+
return date;
|
|
4768
|
+
};
|
|
4756
4769
|
const getPrevMonth = (date) => {
|
|
4757
4770
|
const currtYear = date.getFullYear();
|
|
4758
4771
|
const currMonth = date.getMonth();
|
|
@@ -4778,7 +4791,7 @@ const getNextMonth = (date) => {
|
|
|
4778
4791
|
return date;
|
|
4779
4792
|
};
|
|
4780
4793
|
|
|
4781
|
-
const { errLog: errLog$
|
|
4794
|
+
const { errLog: errLog$h } = createComponentLog('calendar');
|
|
4782
4795
|
const { menus: menus$2, getConfig: getConfig$2, getI18n: getI18n$1 } = VxeUI;
|
|
4783
4796
|
var VxeCalendarComponent = defineVxeComponent({
|
|
4784
4797
|
name: 'VxeCalendar',
|
|
@@ -6046,7 +6059,7 @@ var VxeCalendarComponent = defineVxeComponent({
|
|
|
6046
6059
|
const { menuConfig } = props;
|
|
6047
6060
|
const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
|
|
6048
6061
|
if (menuConfig && !VxeUIContextMenu) {
|
|
6049
|
-
errLog$
|
|
6062
|
+
errLog$h('vxe.error.reqComp', ['vxe-context-menu']);
|
|
6050
6063
|
}
|
|
6051
6064
|
dateOpenPanel();
|
|
6052
6065
|
});
|
|
@@ -6859,7 +6872,16 @@ function clearRowAnimate(elem, clss) {
|
|
|
6859
6872
|
}, 500);
|
|
6860
6873
|
}
|
|
6861
6874
|
|
|
6862
|
-
|
|
6875
|
+
function getItemCacheObj$1(item) {
|
|
6876
|
+
return {
|
|
6877
|
+
item,
|
|
6878
|
+
index: -1,
|
|
6879
|
+
$index: -1,
|
|
6880
|
+
_index: -1
|
|
6881
|
+
};
|
|
6882
|
+
}
|
|
6883
|
+
|
|
6884
|
+
const { warnLog: warnLog$f, errLog: errLog$g } = createComponentLog('tree');
|
|
6863
6885
|
function getRowKeyByField(row, keyField) {
|
|
6864
6886
|
return row ? ('' + (row[keyField] || '')) : '';
|
|
6865
6887
|
}
|
|
@@ -6886,15 +6908,20 @@ function createReactData$j() {
|
|
|
6886
6908
|
updateCheckboxFlag: 1,
|
|
6887
6909
|
isAllChecked: false,
|
|
6888
6910
|
isAllIndeterminate: false,
|
|
6911
|
+
insertRowFlag: 1,
|
|
6912
|
+
removeRowFlag: 1,
|
|
6889
6913
|
dragRow: null,
|
|
6890
|
-
dragTipText: ''
|
|
6914
|
+
dragTipText: '',
|
|
6915
|
+
isCrossDragRow: false
|
|
6891
6916
|
};
|
|
6892
6917
|
}
|
|
6893
6918
|
function createInternalData$i() {
|
|
6894
6919
|
return {
|
|
6895
6920
|
resizeObserver: undefined,
|
|
6896
6921
|
fullData: [],
|
|
6922
|
+
afterList: [],
|
|
6897
6923
|
fullKeyMaps: {},
|
|
6924
|
+
rowMaps: {},
|
|
6898
6925
|
lastScrollLeft: 0,
|
|
6899
6926
|
lastScrollTop: 0,
|
|
6900
6927
|
scrollYStore: {
|
|
@@ -6905,11 +6932,14 @@ function createInternalData$i() {
|
|
|
6905
6932
|
rowHeight: 0
|
|
6906
6933
|
},
|
|
6907
6934
|
currentRow: null,
|
|
6908
|
-
selectCheckboxMaps: {}
|
|
6935
|
+
selectCheckboxMaps: {},
|
|
6936
|
+
insertRowMaps: {},
|
|
6937
|
+
removeRowMaps: {}
|
|
6909
6938
|
// prevDragRow: null,
|
|
6910
6939
|
// prevDragPos: ''
|
|
6911
6940
|
};
|
|
6912
6941
|
}
|
|
6942
|
+
let crossListDragRowObj = null;
|
|
6913
6943
|
var VxeListComponent = defineVxeComponent({
|
|
6914
6944
|
name: 'VxeList',
|
|
6915
6945
|
props: {
|
|
@@ -6927,6 +6957,10 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6927
6957
|
default: () => getConfig$3().list.autoResize
|
|
6928
6958
|
},
|
|
6929
6959
|
syncResize: [Boolean, String, Number],
|
|
6960
|
+
showSeq: {
|
|
6961
|
+
type: Boolean,
|
|
6962
|
+
default: () => getConfig$3().list.showSeq
|
|
6963
|
+
},
|
|
6930
6964
|
showRadio: {
|
|
6931
6965
|
type: Boolean,
|
|
6932
6966
|
default: () => getConfig$3().list.showRadio
|
|
@@ -6941,6 +6975,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6941
6975
|
checkboxConfig: Object,
|
|
6942
6976
|
rowConfig: Object,
|
|
6943
6977
|
dragConfig: Object,
|
|
6978
|
+
menuConfig: Object,
|
|
6944
6979
|
virtualYConfig: Object,
|
|
6945
6980
|
scrollY: Object
|
|
6946
6981
|
},
|
|
@@ -6956,7 +6991,11 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6956
6991
|
'scroll',
|
|
6957
6992
|
'row-dragstart',
|
|
6958
6993
|
'row-dragover',
|
|
6959
|
-
'row-dragend'
|
|
6994
|
+
'row-dragend',
|
|
6995
|
+
'row-remove-dragend',
|
|
6996
|
+
'row-insert-dragend',
|
|
6997
|
+
'row-menu',
|
|
6998
|
+
'menu-click'
|
|
6960
6999
|
],
|
|
6961
7000
|
setup(props, context) {
|
|
6962
7001
|
const { slots, emit } = context;
|
|
@@ -7014,6 +7053,9 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7014
7053
|
const computeCheckboxOpts = computed(() => {
|
|
7015
7054
|
return Object.assign({ showIcon: true }, getConfig$3().list.checkboxConfig, props.checkboxConfig);
|
|
7016
7055
|
});
|
|
7056
|
+
const computeMenuOpts = computed(() => {
|
|
7057
|
+
return Object.assign({}, getConfig$3().list.menuConfig, props.menuConfig);
|
|
7058
|
+
});
|
|
7017
7059
|
const computeWrapperStyles = computed(() => {
|
|
7018
7060
|
const rowHeight = computeRowHeight.value;
|
|
7019
7061
|
const style = {};
|
|
@@ -7082,10 +7124,30 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7082
7124
|
reactData.bodyHeight = scrollYLoad ? fullData.length * scrollYStore.rowHeight : 0;
|
|
7083
7125
|
reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
|
|
7084
7126
|
};
|
|
7085
|
-
const
|
|
7127
|
+
const updateAfterFullData = () => {
|
|
7128
|
+
const { fullData } = internalData;
|
|
7129
|
+
internalData.afterList = fullData.slice(0);
|
|
7130
|
+
updateAfterDataIndex();
|
|
7131
|
+
};
|
|
7132
|
+
const handleData = (force) => {
|
|
7086
7133
|
const { scrollYLoad } = reactData;
|
|
7087
|
-
const { fullData, scrollYStore } = internalData;
|
|
7088
|
-
|
|
7134
|
+
const { fullData, scrollYStore, rowMaps } = internalData;
|
|
7135
|
+
const keyField = computeKeyField.value;
|
|
7136
|
+
if (force) {
|
|
7137
|
+
// 更新数据,处理筛选和排序
|
|
7138
|
+
updateAfterFullData();
|
|
7139
|
+
}
|
|
7140
|
+
const rowList = scrollYLoad ? fullData.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullData.slice(0);
|
|
7141
|
+
if (keyField) {
|
|
7142
|
+
rowList.forEach((item, $index) => {
|
|
7143
|
+
const rowid = getRowIdByField(item, keyField);
|
|
7144
|
+
const rowRest = rowMaps[rowid];
|
|
7145
|
+
if (rowRest) {
|
|
7146
|
+
rowRest.$index = $index;
|
|
7147
|
+
}
|
|
7148
|
+
});
|
|
7149
|
+
}
|
|
7150
|
+
reactData.rowList = rowList;
|
|
7089
7151
|
return nextTick();
|
|
7090
7152
|
};
|
|
7091
7153
|
const updateYData = () => {
|
|
@@ -7251,15 +7313,48 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7251
7313
|
internalData.selectCheckboxMaps = selectMaps;
|
|
7252
7314
|
updateCheckboxStatus();
|
|
7253
7315
|
};
|
|
7316
|
+
const updateAfterDataIndex = () => {
|
|
7317
|
+
const { afterList, rowMaps } = internalData;
|
|
7318
|
+
const keyField = computeKeyField.value;
|
|
7319
|
+
let vtIndex = 0;
|
|
7320
|
+
afterList.forEach((item, index) => {
|
|
7321
|
+
const roweid = getRowIdByField(item, keyField);
|
|
7322
|
+
const rowRest = rowMaps[roweid];
|
|
7323
|
+
if (rowRest) {
|
|
7324
|
+
rowRest._index = vtIndex;
|
|
7325
|
+
}
|
|
7326
|
+
else {
|
|
7327
|
+
const rest = {
|
|
7328
|
+
item,
|
|
7329
|
+
index,
|
|
7330
|
+
$index: -1,
|
|
7331
|
+
_index: vtIndex
|
|
7332
|
+
};
|
|
7333
|
+
rowMaps[roweid] = rest;
|
|
7334
|
+
}
|
|
7335
|
+
vtIndex++;
|
|
7336
|
+
});
|
|
7337
|
+
};
|
|
7254
7338
|
const cacheRowMap = () => {
|
|
7255
7339
|
const { fullData } = internalData;
|
|
7256
7340
|
const keyField = computeKeyField.value;
|
|
7257
7341
|
const keyMaps = {};
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7342
|
+
const rowMaps = {};
|
|
7343
|
+
if (keyField) {
|
|
7344
|
+
fullData.forEach((row, rowIndex) => {
|
|
7345
|
+
const rowid = getRowIdByField(row, keyField);
|
|
7346
|
+
const rowKey = getRowKeyByField(row, keyField);
|
|
7347
|
+
keyMaps[rowKey] = row;
|
|
7348
|
+
rowMaps[rowid] = {
|
|
7349
|
+
item: row,
|
|
7350
|
+
index: rowIndex,
|
|
7351
|
+
$index: -1,
|
|
7352
|
+
_index: -1
|
|
7353
|
+
};
|
|
7354
|
+
});
|
|
7355
|
+
}
|
|
7262
7356
|
internalData.fullKeyMaps = keyMaps;
|
|
7357
|
+
internalData.rowMaps = rowMaps;
|
|
7263
7358
|
};
|
|
7264
7359
|
/**
|
|
7265
7360
|
* 加载数据
|
|
@@ -7268,23 +7363,32 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7268
7363
|
const loadData = (datas) => {
|
|
7269
7364
|
const { scrollYStore } = internalData;
|
|
7270
7365
|
const sYOpts = computeSYOpts.value;
|
|
7271
|
-
const fullData = datas
|
|
7366
|
+
const fullData = datas ? datas.slice(0) : [];
|
|
7272
7367
|
Object.assign(scrollYStore, {
|
|
7273
7368
|
startIndex: 0,
|
|
7274
7369
|
endIndex: 1,
|
|
7275
7370
|
visibleSize: 0
|
|
7276
7371
|
});
|
|
7277
7372
|
internalData.fullData = fullData;
|
|
7373
|
+
internalData.insertRowMaps = {};
|
|
7374
|
+
reactData.insertRowFlag++;
|
|
7375
|
+
internalData.removeRowMaps = {};
|
|
7376
|
+
reactData.removeRowFlag++;
|
|
7278
7377
|
// 如果gt为0,则总是启用
|
|
7279
7378
|
reactData.scrollYLoad = !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= fullData.length);
|
|
7280
7379
|
cacheRowMap();
|
|
7281
|
-
handleData();
|
|
7380
|
+
handleData(true);
|
|
7282
7381
|
updateRadioModeValue();
|
|
7283
7382
|
updateCheckboxModeValue();
|
|
7284
7383
|
return computeScrollLoad().then(() => {
|
|
7285
7384
|
refreshScroll();
|
|
7286
7385
|
});
|
|
7287
7386
|
};
|
|
7387
|
+
const handleRowDragEndClearStatus = () => {
|
|
7388
|
+
clearRowDragData();
|
|
7389
|
+
clearCrossListDragStatus();
|
|
7390
|
+
recalculate();
|
|
7391
|
+
};
|
|
7288
7392
|
const clearRowDropOrigin = () => {
|
|
7289
7393
|
const el = refElem.value;
|
|
7290
7394
|
if (el) {
|
|
@@ -7336,7 +7440,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7336
7440
|
}
|
|
7337
7441
|
};
|
|
7338
7442
|
const clearCrossListDragStatus = () => {
|
|
7339
|
-
|
|
7443
|
+
crossListDragRowObj = null;
|
|
7340
7444
|
crossListDragRowInfo.row = null;
|
|
7341
7445
|
};
|
|
7342
7446
|
const clearDragStatus = () => {
|
|
@@ -7352,7 +7456,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7352
7456
|
evnt.stopPropagation();
|
|
7353
7457
|
const { row } = params;
|
|
7354
7458
|
const dragConfig = computeDragOpts.value;
|
|
7355
|
-
const { trigger, dragStartMethod } = dragConfig;
|
|
7459
|
+
const { isCrossListDrag, trigger, dragStartMethod } = dragConfig;
|
|
7356
7460
|
const dragEl = evnt.currentTarget;
|
|
7357
7461
|
const rowEl = trigger === 'row' ? dragEl : dragEl.parentElement.parentElement;
|
|
7358
7462
|
clearRowDropOrigin();
|
|
@@ -7362,10 +7466,15 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7362
7466
|
hideDropTip();
|
|
7363
7467
|
return;
|
|
7364
7468
|
}
|
|
7469
|
+
if (isCrossListDrag) {
|
|
7470
|
+
crossListDragRowInfo.row = row;
|
|
7471
|
+
crossListDragRowObj = { $oldList: $xeList, $newList: null };
|
|
7472
|
+
}
|
|
7365
7473
|
const dragstartEventParams = {
|
|
7366
7474
|
row
|
|
7367
7475
|
};
|
|
7368
7476
|
reactData.dragRow = row;
|
|
7477
|
+
reactData.isCrossDragRow = false;
|
|
7369
7478
|
rowEl.draggable = true;
|
|
7370
7479
|
updateRowDropOrigin(row);
|
|
7371
7480
|
updateRowDropTipContent(rowEl);
|
|
@@ -7568,11 +7677,23 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7568
7677
|
const handleRowDragDragendEvent = (evnt) => {
|
|
7569
7678
|
const { dragRow } = reactData;
|
|
7570
7679
|
const { prevDragRow, prevDragPos } = internalData;
|
|
7680
|
+
const dragConfig = computeDragOpts.value;
|
|
7681
|
+
const { isCrossListDrag } = dragConfig;
|
|
7682
|
+
// 跨列表拖拽
|
|
7683
|
+
if (isCrossListDrag && crossListDragRowObj) {
|
|
7684
|
+
const { $newList } = crossListDragRowObj;
|
|
7685
|
+
if ($newList && $newList.xID !== $xeList.xID) {
|
|
7686
|
+
$newList.handleCrossListRowDragInsertEvent(evnt);
|
|
7687
|
+
return;
|
|
7688
|
+
}
|
|
7689
|
+
}
|
|
7571
7690
|
handleRowDragSwapEvent(evnt, dragRow, prevDragRow, prevDragPos);
|
|
7572
7691
|
};
|
|
7573
7692
|
const handleRowDragDragoverEvent = (evnt) => {
|
|
7574
7693
|
const { dragRow } = reactData;
|
|
7575
7694
|
const { fullData } = internalData;
|
|
7695
|
+
const dragConfig = computeDragOpts.value;
|
|
7696
|
+
const { isCrossListDrag } = dragConfig;
|
|
7576
7697
|
if (!dragRow) {
|
|
7577
7698
|
evnt.preventDefault();
|
|
7578
7699
|
}
|
|
@@ -7585,6 +7706,32 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7585
7706
|
const dragPos = offsetY < rowEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
7586
7707
|
internalData.prevDragRow = row;
|
|
7587
7708
|
internalData.prevDragPos = dragPos;
|
|
7709
|
+
// 跨列表拖拽
|
|
7710
|
+
if (isCrossListDrag && crossListDragRowObj) {
|
|
7711
|
+
const { $oldList, $newList } = crossListDragRowObj;
|
|
7712
|
+
if ($oldList) {
|
|
7713
|
+
const oldListReactData = $oldList.reactData;
|
|
7714
|
+
if ($oldList.xID === $xeList.xID) {
|
|
7715
|
+
if ($newList) {
|
|
7716
|
+
$newList.hideCrossListRowDropClearStatus();
|
|
7717
|
+
}
|
|
7718
|
+
reactData.isCrossDragRow = false;
|
|
7719
|
+
oldListReactData.isCrossDragRow = false;
|
|
7720
|
+
crossListDragRowObj.$newList = null;
|
|
7721
|
+
}
|
|
7722
|
+
else {
|
|
7723
|
+
if ($newList && $newList.xID !== $xeList.xID) {
|
|
7724
|
+
$newList.hideCrossListRowDropClearStatus();
|
|
7725
|
+
}
|
|
7726
|
+
$oldList.hideCrossListRowDropClearStatus();
|
|
7727
|
+
oldListReactData.isCrossDragRow = true;
|
|
7728
|
+
reactData.dragTipText = oldListReactData.dragTipText;
|
|
7729
|
+
crossListDragRowObj.$newList = $xeList;
|
|
7730
|
+
showDropTip(evnt, rowEl, true, dragPos);
|
|
7731
|
+
return;
|
|
7732
|
+
}
|
|
7733
|
+
}
|
|
7734
|
+
}
|
|
7588
7735
|
if ((dragRow && getRowId(dragRow) === rowid)) {
|
|
7589
7736
|
showDropTip(evnt, rowEl, false, dragPos);
|
|
7590
7737
|
return;
|
|
@@ -7969,6 +8116,135 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7969
8116
|
emitRadioMode(value);
|
|
7970
8117
|
dispatchEvent('radio-change', { row, value, checked: isChecked }, evnt);
|
|
7971
8118
|
};
|
|
8119
|
+
const insertListRow = (newRecords, isAppend) => {
|
|
8120
|
+
const { fullData, rowMaps } = internalData;
|
|
8121
|
+
const keyField = computeKeyField.value;
|
|
8122
|
+
const funcName = isAppend ? 'push' : 'unshift';
|
|
8123
|
+
newRecords.forEach((item) => {
|
|
8124
|
+
const rowid = getRowIdByField(item, keyField);
|
|
8125
|
+
const rowRest = getItemCacheObj$1(item);
|
|
8126
|
+
fullData[funcName](item);
|
|
8127
|
+
rowMaps[rowid] = rowRest;
|
|
8128
|
+
});
|
|
8129
|
+
};
|
|
8130
|
+
const handleInsertRowAt = (records, targetRowOrRowKey, isInsertNextRow) => {
|
|
8131
|
+
const { fullData, rowMaps, removeRowMaps, insertRowMaps } = internalData;
|
|
8132
|
+
const keyField = computeKeyField.value;
|
|
8133
|
+
if (!keyField) {
|
|
8134
|
+
errLog$g('vxe.error.reqSupportProp', ['insert() | insertAt() | insertNextAt()', 'row-config.keyField']);
|
|
8135
|
+
return Promise.resolve({ row: null, rows: [] });
|
|
8136
|
+
}
|
|
8137
|
+
if (!XEUtils.isArray(records)) {
|
|
8138
|
+
records = [records];
|
|
8139
|
+
}
|
|
8140
|
+
let targetRow = targetRowOrRowKey;
|
|
8141
|
+
if (XEUtils.isString(targetRowOrRowKey) || XEUtils.isNumber(targetRowOrRowKey)) {
|
|
8142
|
+
const rowRest = rowMaps[targetRowOrRowKey];
|
|
8143
|
+
if (rowRest) {
|
|
8144
|
+
targetRow = rowRest.item;
|
|
8145
|
+
}
|
|
8146
|
+
}
|
|
8147
|
+
if (!records.length) {
|
|
8148
|
+
return Promise.resolve({ row: null, rows: [] });
|
|
8149
|
+
}
|
|
8150
|
+
const newRecords = records.map(record => XEUtils.assign({}, record));
|
|
8151
|
+
if (XEUtils.eqNull(targetRow)) {
|
|
8152
|
+
insertListRow(newRecords, false);
|
|
8153
|
+
}
|
|
8154
|
+
else {
|
|
8155
|
+
if (targetRow === -1) {
|
|
8156
|
+
insertListRow(newRecords, true);
|
|
8157
|
+
}
|
|
8158
|
+
else {
|
|
8159
|
+
const rowIndex = fullData.findIndex(item => targetRow[keyField] === item[keyField]);
|
|
8160
|
+
if (rowIndex > -1) {
|
|
8161
|
+
newRecords.forEach(item => {
|
|
8162
|
+
const rowid = getRowIdByField(item, keyField);
|
|
8163
|
+
const rowRest = getItemCacheObj$1(item);
|
|
8164
|
+
rowMaps[rowid] = rowRest;
|
|
8165
|
+
});
|
|
8166
|
+
let targetIndex = rowIndex;
|
|
8167
|
+
if (isInsertNextRow) {
|
|
8168
|
+
targetIndex = targetIndex + 1;
|
|
8169
|
+
}
|
|
8170
|
+
fullData.splice(targetIndex, 0, ...newRecords);
|
|
8171
|
+
}
|
|
8172
|
+
else {
|
|
8173
|
+
warnLog$f('vxe.error.unableInsert');
|
|
8174
|
+
insertListRow(newRecords, true);
|
|
8175
|
+
}
|
|
8176
|
+
}
|
|
8177
|
+
}
|
|
8178
|
+
newRecords.forEach((newItem) => {
|
|
8179
|
+
const rowid = getRowIdByField(newItem, keyField);
|
|
8180
|
+
// 如果是被删除的数据,则还原状态
|
|
8181
|
+
if (removeRowMaps[rowid]) {
|
|
8182
|
+
delete removeRowMaps[rowid];
|
|
8183
|
+
if (insertRowMaps[rowid]) {
|
|
8184
|
+
delete insertRowMaps[rowid];
|
|
8185
|
+
}
|
|
8186
|
+
}
|
|
8187
|
+
else {
|
|
8188
|
+
insertRowMaps[rowid] = newItem;
|
|
8189
|
+
}
|
|
8190
|
+
});
|
|
8191
|
+
reactData.removeRowFlag++;
|
|
8192
|
+
reactData.insertRowFlag++;
|
|
8193
|
+
cacheRowMap();
|
|
8194
|
+
handleData(true);
|
|
8195
|
+
updateAfterDataIndex();
|
|
8196
|
+
updateCheckboxStatus();
|
|
8197
|
+
if (reactData.scrollYLoad) {
|
|
8198
|
+
updateYSpace();
|
|
8199
|
+
}
|
|
8200
|
+
return nextTick().then(() => {
|
|
8201
|
+
return {
|
|
8202
|
+
row: newRecords.length ? newRecords[newRecords.length - 1] : null,
|
|
8203
|
+
rows: newRecords
|
|
8204
|
+
};
|
|
8205
|
+
});
|
|
8206
|
+
};
|
|
8207
|
+
const handleContextmenuEvent = (evnt, row) => {
|
|
8208
|
+
const { menuConfig } = props;
|
|
8209
|
+
const menuOpts = computeMenuOpts.value;
|
|
8210
|
+
const rowOpts = computeRowOpts.value;
|
|
8211
|
+
const { isCurrent } = rowOpts;
|
|
8212
|
+
if (menuConfig ? isEnableConf(menuOpts) : menuOpts.enabled) {
|
|
8213
|
+
const { options, visibleMethod } = menuOpts;
|
|
8214
|
+
if (!visibleMethod || visibleMethod({ $list: $xeList, options, row })) {
|
|
8215
|
+
if (isCurrent) {
|
|
8216
|
+
changeCurrentEvent(evnt, row);
|
|
8217
|
+
}
|
|
8218
|
+
else if (internalData.currentRow) {
|
|
8219
|
+
internalData.currentRow = null;
|
|
8220
|
+
reactData.currRowFlag++;
|
|
8221
|
+
}
|
|
8222
|
+
if (VxeUI.contextMenu) {
|
|
8223
|
+
VxeUI.contextMenu.openByEvent(evnt, {
|
|
8224
|
+
options,
|
|
8225
|
+
events: {
|
|
8226
|
+
optionClick(eventParams) {
|
|
8227
|
+
const { option } = eventParams;
|
|
8228
|
+
const gMenuOpts = menus$3.get(option.code);
|
|
8229
|
+
const tmMethod = gMenuOpts ? gMenuOpts.listMenuMethod : null;
|
|
8230
|
+
const params = {
|
|
8231
|
+
menu: option,
|
|
8232
|
+
row,
|
|
8233
|
+
$event: evnt,
|
|
8234
|
+
$list: $xeList
|
|
8235
|
+
};
|
|
8236
|
+
if (tmMethod) {
|
|
8237
|
+
tmMethod(params, evnt);
|
|
8238
|
+
}
|
|
8239
|
+
dispatchEvent('menu-click', params, eventParams.$event);
|
|
8240
|
+
}
|
|
8241
|
+
}
|
|
8242
|
+
});
|
|
8243
|
+
}
|
|
8244
|
+
}
|
|
8245
|
+
}
|
|
8246
|
+
dispatchEvent('row-menu', { row }, evnt);
|
|
8247
|
+
};
|
|
7972
8248
|
const listMethods = {
|
|
7973
8249
|
dispatchEvent,
|
|
7974
8250
|
loadData,
|
|
@@ -8015,9 +8291,282 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8015
8291
|
getCheckboxRows,
|
|
8016
8292
|
getCheckboxRowKeys,
|
|
8017
8293
|
clearCheckboxRow,
|
|
8018
|
-
setAllCheckboxRow
|
|
8294
|
+
setAllCheckboxRow,
|
|
8295
|
+
insert(records) {
|
|
8296
|
+
return handleInsertRowAt(records, null);
|
|
8297
|
+
},
|
|
8298
|
+
insertAt(records, targetRowOrRowKey) {
|
|
8299
|
+
return handleInsertRowAt(records, targetRowOrRowKey);
|
|
8300
|
+
},
|
|
8301
|
+
insertNextAt(records, targetRowOrRowKey) {
|
|
8302
|
+
return handleInsertRowAt(records, targetRowOrRowKey, true);
|
|
8303
|
+
},
|
|
8304
|
+
getInsertRecords() {
|
|
8305
|
+
const { insertRowMaps } = internalData;
|
|
8306
|
+
const insertRecords = [];
|
|
8307
|
+
XEUtils.each(insertRowMaps, (item) => {
|
|
8308
|
+
insertRecords.push(item);
|
|
8309
|
+
});
|
|
8310
|
+
return insertRecords;
|
|
8311
|
+
},
|
|
8312
|
+
isInsertByRow(row) {
|
|
8313
|
+
const rowid = getRowId(row);
|
|
8314
|
+
return !!reactData.insertRowFlag && !!internalData.insertRowMaps[rowid];
|
|
8315
|
+
},
|
|
8316
|
+
remove(rows) {
|
|
8317
|
+
const { fullData, insertRowMaps, removeRowMaps } = internalData;
|
|
8318
|
+
const keyField = computeKeyField.value;
|
|
8319
|
+
if (!keyField) {
|
|
8320
|
+
errLog$g('vxe.error.reqSupportProp', ['insert() | insertAt() | insertNextAt()', 'row-config.keyField']);
|
|
8321
|
+
return Promise.resolve({ row: null, rows: [] });
|
|
8322
|
+
}
|
|
8323
|
+
let delList = [];
|
|
8324
|
+
if (!rows) {
|
|
8325
|
+
rows = fullData;
|
|
8326
|
+
}
|
|
8327
|
+
else if (!XEUtils.isArray(rows)) {
|
|
8328
|
+
rows = [rows];
|
|
8329
|
+
}
|
|
8330
|
+
if (!rows.length) {
|
|
8331
|
+
return Promise.resolve({ row: null, rows: [] });
|
|
8332
|
+
}
|
|
8333
|
+
// 如果是新增,则保存记录
|
|
8334
|
+
rows.forEach((item) => {
|
|
8335
|
+
if (!$xeList.isInsertByRow(item)) {
|
|
8336
|
+
const rowid = getRowId(item);
|
|
8337
|
+
removeRowMaps[rowid] = item;
|
|
8338
|
+
}
|
|
8339
|
+
});
|
|
8340
|
+
// 从数据源中移除
|
|
8341
|
+
if (fullData === rows) {
|
|
8342
|
+
rows = delList = fullData.slice(0);
|
|
8343
|
+
internalData.fullData = [];
|
|
8344
|
+
}
|
|
8345
|
+
else {
|
|
8346
|
+
rows.forEach((item) => {
|
|
8347
|
+
const rowid = getRowId(item);
|
|
8348
|
+
const rowIndex = XEUtils.findIndexOf(fullData, item => rowid === getRowId(item));
|
|
8349
|
+
if (rowIndex > -1) {
|
|
8350
|
+
const rItems = fullData.splice(rowIndex, 1);
|
|
8351
|
+
delList.push(rItems[0]);
|
|
8352
|
+
}
|
|
8353
|
+
});
|
|
8354
|
+
}
|
|
8355
|
+
// 从新增中移除已删除的数据
|
|
8356
|
+
rows.forEach((item) => {
|
|
8357
|
+
const rowid = getRowId(item);
|
|
8358
|
+
if (insertRowMaps[rowid]) {
|
|
8359
|
+
delete insertRowMaps[rowid];
|
|
8360
|
+
}
|
|
8361
|
+
});
|
|
8362
|
+
reactData.removeRowFlag++;
|
|
8363
|
+
reactData.insertRowFlag++;
|
|
8364
|
+
cacheRowMap();
|
|
8365
|
+
handleData(true);
|
|
8366
|
+
updateAfterDataIndex();
|
|
8367
|
+
updateCheckboxStatus();
|
|
8368
|
+
if (reactData.scrollYLoad) {
|
|
8369
|
+
updateYSpace();
|
|
8370
|
+
}
|
|
8371
|
+
return nextTick().then(() => {
|
|
8372
|
+
return recalculate();
|
|
8373
|
+
}).then(() => {
|
|
8374
|
+
return { row: delList.length ? delList[delList.length - 1] : null, rows: delList };
|
|
8375
|
+
});
|
|
8376
|
+
},
|
|
8377
|
+
getRemoveRecords() {
|
|
8378
|
+
const { removeRowMaps } = internalData;
|
|
8379
|
+
const removeRecords = [];
|
|
8380
|
+
XEUtils.each(removeRowMaps, (item) => {
|
|
8381
|
+
removeRecords.push(item);
|
|
8382
|
+
});
|
|
8383
|
+
return removeRecords;
|
|
8384
|
+
},
|
|
8385
|
+
isRemoveByRow(row) {
|
|
8386
|
+
const rowid = getRowId(row);
|
|
8387
|
+
return !!reactData.removeRowFlag && !!internalData.removeRowMaps[rowid];
|
|
8388
|
+
}
|
|
8389
|
+
};
|
|
8390
|
+
const listPrivateMethods = {
|
|
8391
|
+
handleCrossListRowDragCancelEvent() {
|
|
8392
|
+
clearRowDragData();
|
|
8393
|
+
clearCrossListDragStatus();
|
|
8394
|
+
},
|
|
8395
|
+
/**
|
|
8396
|
+
* 处理跨树拖拽完成
|
|
8397
|
+
*/
|
|
8398
|
+
handleCrossListRowDragFinishEvent(evnt) {
|
|
8399
|
+
const { rowList } = reactData;
|
|
8400
|
+
const { rowMaps } = internalData;
|
|
8401
|
+
const dragOpts = computeDragOpts.value;
|
|
8402
|
+
const { animation, isCrossListDrag } = dragOpts;
|
|
8403
|
+
const el = refElem.value;
|
|
8404
|
+
if (!el) {
|
|
8405
|
+
return;
|
|
8406
|
+
}
|
|
8407
|
+
if (isCrossListDrag && crossListDragRowObj && crossListDragRowInfo) {
|
|
8408
|
+
const { row: dragRow } = crossListDragRowInfo;
|
|
8409
|
+
if (dragRow) {
|
|
8410
|
+
const dragRowid = getRowId(dragRow);
|
|
8411
|
+
const dragRowRest = rowMaps[dragRowid];
|
|
8412
|
+
let dragRowHeight = 0;
|
|
8413
|
+
let rsIndex = -1;
|
|
8414
|
+
if (dragRowRest) {
|
|
8415
|
+
if (animation) {
|
|
8416
|
+
const oldItemEl = el.querySelector(`.vxe-list--row[rowid="${dragRowid}"]`);
|
|
8417
|
+
const targetItemEl = oldItemEl;
|
|
8418
|
+
if (targetItemEl) {
|
|
8419
|
+
dragRowHeight = targetItemEl.offsetHeight;
|
|
8420
|
+
}
|
|
8421
|
+
}
|
|
8422
|
+
rsIndex = dragRowRest.$index;
|
|
8423
|
+
}
|
|
8424
|
+
const dragRangeList = rsIndex > -1 && rsIndex < rowList.length - 1 ? rowList.slice(rsIndex + 1) : [];
|
|
8425
|
+
const dragList = [dragRow];
|
|
8426
|
+
$xeList.remove(dragList).then(() => {
|
|
8427
|
+
if (animation && dragRowHeight && dragRangeList.length) {
|
|
8428
|
+
const wrapperEl = el;
|
|
8429
|
+
const dtClss = [];
|
|
8430
|
+
dragRangeList.forEach(item => {
|
|
8431
|
+
const rowid = getRowId(item);
|
|
8432
|
+
dtClss.push(`.vxe-list--row[rowid="${rowid}"]`);
|
|
8433
|
+
});
|
|
8434
|
+
const dtTrList = wrapperEl.querySelectorAll(dtClss.join(','));
|
|
8435
|
+
moveRowAnimateToTb(dtTrList, dragRowHeight);
|
|
8436
|
+
}
|
|
8437
|
+
});
|
|
8438
|
+
dispatchEvent('row-remove-dragend', {
|
|
8439
|
+
row: dragRow
|
|
8440
|
+
}, evnt);
|
|
8441
|
+
handleRowDragEndClearStatus();
|
|
8442
|
+
}
|
|
8443
|
+
}
|
|
8444
|
+
},
|
|
8445
|
+
/**
|
|
8446
|
+
* 处理跨树拖至新的空树
|
|
8447
|
+
*/
|
|
8448
|
+
handleCrossListRowDragoverEmptyEvent(evnt) {
|
|
8449
|
+
const { rowList } = reactData;
|
|
8450
|
+
const dragOpts = computeDragOpts.value;
|
|
8451
|
+
const { isCrossListDrag } = dragOpts;
|
|
8452
|
+
if (isCrossListDrag && crossListDragRowObj && !rowList.length) {
|
|
8453
|
+
const { $oldList, $newList } = crossListDragRowObj;
|
|
8454
|
+
if ($oldList) {
|
|
8455
|
+
const oldListReactData = $oldList;
|
|
8456
|
+
if ($oldList.xID !== $xeList.xID) {
|
|
8457
|
+
if ($newList && $newList.xID !== $xeList.xID) {
|
|
8458
|
+
$newList.hideCrossListRowDropClearStatus();
|
|
8459
|
+
}
|
|
8460
|
+
evnt.preventDefault();
|
|
8461
|
+
$oldList.hideCrossListRowDropClearStatus();
|
|
8462
|
+
crossListDragRowObj.$newList = $xeList;
|
|
8463
|
+
internalData.prevDragRow = null;
|
|
8464
|
+
reactData.dragTipText = oldListReactData.dragTipText;
|
|
8465
|
+
showDropTip(evnt, evnt.currentTarget, true, '');
|
|
8466
|
+
}
|
|
8467
|
+
}
|
|
8468
|
+
}
|
|
8469
|
+
},
|
|
8470
|
+
/**
|
|
8471
|
+
* 处理跨树拖插入
|
|
8472
|
+
*/
|
|
8473
|
+
handleCrossListRowDragInsertEvent(evnt) {
|
|
8474
|
+
const { prevDragRow, prevDragPos } = internalData;
|
|
8475
|
+
const dragOpts = computeDragOpts.value;
|
|
8476
|
+
const { animation, isCrossListDrag, dragEndMethod } = dragOpts;
|
|
8477
|
+
// 跨表拖拽
|
|
8478
|
+
if (isCrossListDrag && crossListDragRowObj && crossListDragRowInfo) {
|
|
8479
|
+
const { row: oldRow } = crossListDragRowInfo;
|
|
8480
|
+
const { $oldList } = crossListDragRowObj;
|
|
8481
|
+
const el = refElem.value;
|
|
8482
|
+
if (!el) {
|
|
8483
|
+
return;
|
|
8484
|
+
}
|
|
8485
|
+
if ($oldList && oldRow) {
|
|
8486
|
+
const dragRow = oldRow;
|
|
8487
|
+
let dragOffsetIndex = -1;
|
|
8488
|
+
if (prevDragRow) {
|
|
8489
|
+
dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
8490
|
+
}
|
|
8491
|
+
const dragParams = {
|
|
8492
|
+
oldRow: dragRow,
|
|
8493
|
+
newRow: prevDragRow,
|
|
8494
|
+
dragRow,
|
|
8495
|
+
dragPos: prevDragPos,
|
|
8496
|
+
offsetIndex: dragOffsetIndex
|
|
8497
|
+
};
|
|
8498
|
+
const errRest = {
|
|
8499
|
+
status: false
|
|
8500
|
+
};
|
|
8501
|
+
Promise.resolve(dragEndMethod ? dragEndMethod(dragParams) : true).then((status) => {
|
|
8502
|
+
if (!status) {
|
|
8503
|
+
if ($oldList) {
|
|
8504
|
+
if ($oldList.xID !== $xeList.xID) {
|
|
8505
|
+
$oldList.handleCrossListRowDragCancelEvent(evnt);
|
|
8506
|
+
}
|
|
8507
|
+
}
|
|
8508
|
+
handleRowDragEndClearStatus();
|
|
8509
|
+
return errRest;
|
|
8510
|
+
}
|
|
8511
|
+
let insertRest = Promise.resolve();
|
|
8512
|
+
const dragList = [dragRow];
|
|
8513
|
+
$oldList.handleCrossListRowDragFinishEvent(evnt);
|
|
8514
|
+
if (prevDragRow) {
|
|
8515
|
+
if (prevDragPos === 'bottom') {
|
|
8516
|
+
insertRest = $xeList.insertNextAt(dragList, prevDragRow);
|
|
8517
|
+
}
|
|
8518
|
+
else {
|
|
8519
|
+
insertRest = $xeList.insertAt(dragList, prevDragRow);
|
|
8520
|
+
}
|
|
8521
|
+
}
|
|
8522
|
+
else {
|
|
8523
|
+
insertRest = $xeList.insert(dragList);
|
|
8524
|
+
}
|
|
8525
|
+
$xeList.dispatchEvent('row-insert-dragend', {
|
|
8526
|
+
oldRow,
|
|
8527
|
+
newRow: prevDragRow,
|
|
8528
|
+
dragRow,
|
|
8529
|
+
dragPos: prevDragPos,
|
|
8530
|
+
offsetIndex: dragOffsetIndex
|
|
8531
|
+
}, evnt);
|
|
8532
|
+
clearRowDragData();
|
|
8533
|
+
insertRest.then(() => {
|
|
8534
|
+
const { rowList } = reactData;
|
|
8535
|
+
const { rowMaps } = internalData;
|
|
8536
|
+
const oldRowid = getRowId(dragRow);
|
|
8537
|
+
const oldRowRest = rowMaps[oldRowid];
|
|
8538
|
+
let dragRowHeight = 0;
|
|
8539
|
+
let rsIndex = -1;
|
|
8540
|
+
if (oldRowRest) {
|
|
8541
|
+
if (animation) {
|
|
8542
|
+
const oldItemEl = el.querySelector(`.vxe-list--row[rowid="${oldRowid}"]`);
|
|
8543
|
+
const targetItemEl = oldItemEl;
|
|
8544
|
+
if (targetItemEl) {
|
|
8545
|
+
dragRowHeight = targetItemEl.offsetHeight;
|
|
8546
|
+
}
|
|
8547
|
+
}
|
|
8548
|
+
rsIndex = oldRowRest.$index;
|
|
8549
|
+
}
|
|
8550
|
+
const dragRangeList = rsIndex > -1 ? rowList.slice(rsIndex) : [];
|
|
8551
|
+
if (animation && dragRowHeight && dragRangeList.length) {
|
|
8552
|
+
const wrapperEl = el;
|
|
8553
|
+
const dtClss = [];
|
|
8554
|
+
dragRangeList.forEach(item => {
|
|
8555
|
+
const rowid = getRowId(item);
|
|
8556
|
+
dtClss.push(`.vxe-list--row[rowid="${rowid}"]`);
|
|
8557
|
+
});
|
|
8558
|
+
const dtTrList = wrapperEl.querySelectorAll(dtClss.join(','));
|
|
8559
|
+
moveRowAnimateToTb(dtTrList, -dragRowHeight);
|
|
8560
|
+
}
|
|
8561
|
+
});
|
|
8562
|
+
});
|
|
8563
|
+
}
|
|
8564
|
+
}
|
|
8565
|
+
},
|
|
8566
|
+
hideCrossListRowDropClearStatus() {
|
|
8567
|
+
hideDropTip();
|
|
8568
|
+
}
|
|
8019
8569
|
};
|
|
8020
|
-
const listPrivateMethods = {};
|
|
8021
8570
|
Object.assign($xeList, listMethods, listPrivateMethods);
|
|
8022
8571
|
const renderDragTip = () => {
|
|
8023
8572
|
const { dragRow, dragTipText } = reactData;
|
|
@@ -8119,6 +8668,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8119
8668
|
const { selectRadioRow, currRowFlag, updateCheckboxFlag } = reactData;
|
|
8120
8669
|
const { selectCheckboxMaps, currentRow } = internalData;
|
|
8121
8670
|
const contentSlot = slots.content;
|
|
8671
|
+
const extraSlot = slots.extra;
|
|
8122
8672
|
const dragOpts = computeDragOpts.value;
|
|
8123
8673
|
const { trigger, icon, disabledMethod, visibleMethod } = dragOpts;
|
|
8124
8674
|
const rowOpts = computeRowOpts.value;
|
|
@@ -8172,6 +8722,12 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8172
8722
|
key: 'ct5',
|
|
8173
8723
|
class: 'vxe-list--row-content'
|
|
8174
8724
|
}, contentSlot ? contentSlot(rowParams) : (contentField ? getText(row[contentField]) : '')));
|
|
8725
|
+
if (extraSlot) {
|
|
8726
|
+
ctVNs.push(h('div', {
|
|
8727
|
+
key: 'ct7',
|
|
8728
|
+
class: 'vxe-list--row-extra'
|
|
8729
|
+
}, extraSlot(rowParams)));
|
|
8730
|
+
}
|
|
8175
8731
|
const rowOns = {
|
|
8176
8732
|
onMousedown(evnt) {
|
|
8177
8733
|
handleRowMousedownEvent(evnt, row);
|
|
@@ -8182,6 +8738,9 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8182
8738
|
},
|
|
8183
8739
|
onDblclick(evnt) {
|
|
8184
8740
|
handleRowDblclickEvent(evnt, row);
|
|
8741
|
+
},
|
|
8742
|
+
onContextmenu(evnt) {
|
|
8743
|
+
handleContextmenuEvent(evnt, row);
|
|
8185
8744
|
}
|
|
8186
8745
|
};
|
|
8187
8746
|
// 拖拽行事件
|
|
@@ -8210,20 +8769,20 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8210
8769
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
8211
8770
|
const { showHeader, headerTitle } = checkboxOpts;
|
|
8212
8771
|
const dragOpts = computeDragOpts.value;
|
|
8213
|
-
const { trigger } = dragOpts;
|
|
8772
|
+
const { trigger, isCrossListDrag } = dragOpts;
|
|
8214
8773
|
const rowOpts = computeRowOpts.value;
|
|
8215
8774
|
const { isHover, padding } = rowOpts;
|
|
8216
8775
|
const isDrag = computeIsDrag.value;
|
|
8217
8776
|
const showDefChekboxHead = showCheckbox && showHeader !== false;
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8777
|
+
const leOns = {};
|
|
8778
|
+
if (isCrossListDrag && !rowList.length) {
|
|
8779
|
+
leOns.onDragover = $xeList.handleCrossListRowDragoverEmptyEvent;
|
|
8780
|
+
}
|
|
8781
|
+
return h('div', Object.assign({ ref: refElem, class: ['vxe-list', className ? (XEUtils.isFunction(className) ? className({ $list: $xeList }) : className) : '', {
|
|
8221
8782
|
[`size--${vSize}`]: vSize,
|
|
8222
8783
|
'is--drag': isDrag,
|
|
8223
8784
|
'is--loading': loading
|
|
8224
|
-
}],
|
|
8225
|
-
style: wrapperStyles
|
|
8226
|
-
}, [
|
|
8785
|
+
}], style: wrapperStyles }, leOns), [
|
|
8227
8786
|
headerSlot || showDefChekboxHead
|
|
8228
8787
|
? h('div', {
|
|
8229
8788
|
ref: refHeaderElem,
|
|
@@ -8349,24 +8908,27 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8349
8908
|
loadData(props.data || []);
|
|
8350
8909
|
});
|
|
8351
8910
|
onMounted(() => {
|
|
8352
|
-
const { showRadio, showCheckbox } = props;
|
|
8911
|
+
const { showSeq, showRadio, showCheckbox } = props;
|
|
8353
8912
|
const rowOpts = computeRowOpts.value;
|
|
8354
8913
|
const { useKey } = rowOpts;
|
|
8355
8914
|
const isDrag = computeIsDrag.value;
|
|
8356
8915
|
const keyField = computeKeyField.value;
|
|
8357
8916
|
if (!keyField) {
|
|
8917
|
+
if (showSeq) {
|
|
8918
|
+
errLog$g('vxe.error.reqSupportProp', ['show-seq', 'row-config.keyField']);
|
|
8919
|
+
}
|
|
8358
8920
|
if (showRadio) {
|
|
8359
|
-
errLog$
|
|
8921
|
+
errLog$g('vxe.error.reqSupportProp', ['show-radio', 'row-config.keyField']);
|
|
8360
8922
|
}
|
|
8361
8923
|
if (showCheckbox) {
|
|
8362
|
-
errLog$
|
|
8924
|
+
errLog$g('vxe.error.reqSupportProp', ['show-checkbox', 'row-config.keyField']);
|
|
8363
8925
|
}
|
|
8364
8926
|
if (isDrag) {
|
|
8365
|
-
errLog$
|
|
8927
|
+
errLog$g('vxe.error.reqSupportProp', ['drag-config', 'row-config.keyField']);
|
|
8366
8928
|
}
|
|
8367
8929
|
}
|
|
8368
8930
|
if (useKey && !keyField) {
|
|
8369
|
-
errLog$
|
|
8931
|
+
errLog$g('vxe.error.reqSupportProp', ['row-config.useKey', 'row-config.keyField']);
|
|
8370
8932
|
}
|
|
8371
8933
|
if (props.autoResize) {
|
|
8372
8934
|
const el = refElem.value;
|
|
@@ -17430,6 +17992,7 @@ dynamicApp.use(VxeCountdown);
|
|
|
17430
17992
|
VxeUI.component(VxeCountdownComponent);
|
|
17431
17993
|
const Countdown = VxeCountdown;
|
|
17432
17994
|
|
|
17995
|
+
const { errLog: errLog$f } = createComponentLog('date-panel');
|
|
17433
17996
|
var VxeDatePanelComponent = defineVxeComponent({
|
|
17434
17997
|
name: 'VxeDatePanel',
|
|
17435
17998
|
props: {
|
|
@@ -17515,32 +18078,26 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17515
18078
|
currentDate: null
|
|
17516
18079
|
});
|
|
17517
18080
|
const internalData = {
|
|
17518
|
-
yearSize:
|
|
17519
|
-
monthSize:
|
|
17520
|
-
quarterSize:
|
|
18081
|
+
yearSize: 16,
|
|
18082
|
+
monthSize: 12,
|
|
18083
|
+
quarterSize: 4,
|
|
17521
18084
|
hpTimeout: undefined
|
|
17522
18085
|
};
|
|
17523
18086
|
const refElem = ref();
|
|
17524
18087
|
const refPanelWrapper = ref();
|
|
17525
18088
|
const refInputTimeBody = ref();
|
|
17526
|
-
const
|
|
17527
|
-
refElem
|
|
17528
|
-
};
|
|
17529
|
-
const $xeDatePanel = {
|
|
17530
|
-
xID,
|
|
17531
|
-
props,
|
|
17532
|
-
context,
|
|
17533
|
-
reactData,
|
|
17534
|
-
internalData,
|
|
17535
|
-
getRefMaps: () => refMaps
|
|
17536
|
-
};
|
|
17537
|
-
const computeIsDateTimeType = computed(() => {
|
|
18089
|
+
const computeIsTimeType = computed(() => {
|
|
17538
18090
|
const { type } = props;
|
|
17539
|
-
return type === 'time'
|
|
18091
|
+
return type === 'time';
|
|
18092
|
+
});
|
|
18093
|
+
const computeIsTimeOrDateTimeType = computed(() => {
|
|
18094
|
+
const { type } = props;
|
|
18095
|
+
const isTimeType = computeIsTimeType.value;
|
|
18096
|
+
return isTimeType || type === 'datetime';
|
|
17540
18097
|
});
|
|
17541
18098
|
const computeIsDatePanelType = computed(() => {
|
|
17542
|
-
const
|
|
17543
|
-
return
|
|
18099
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
18100
|
+
return isTimeOrDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
17544
18101
|
});
|
|
17545
18102
|
const computeDateStartDate = computed(() => {
|
|
17546
18103
|
return props.startDate ? XEUtils.toStringDate(props.startDate) : null;
|
|
@@ -17549,19 +18106,25 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17549
18106
|
return props.endDate ? XEUtils.toStringDate(props.endDate) : null;
|
|
17550
18107
|
});
|
|
17551
18108
|
const computeDateListValue = computed(() => {
|
|
17552
|
-
const { modelValue } = props;
|
|
18109
|
+
const { modelValue, valueFormat } = props;
|
|
17553
18110
|
const isDatePanelType = computeIsDatePanelType.value;
|
|
17554
18111
|
const dateValueFormat = computeDateValueFormat.value;
|
|
18112
|
+
const restList = [];
|
|
17555
18113
|
if (modelValue && isDatePanelType) {
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
if (
|
|
17559
|
-
|
|
18114
|
+
(XEUtils.isArray(modelValue) ? modelValue : XEUtils.toValueString(modelValue).split(',')).forEach(val => {
|
|
18115
|
+
let strVal = val;
|
|
18116
|
+
if (val) {
|
|
18117
|
+
if (valueFormat === 'timestamp') {
|
|
18118
|
+
if (XEUtils.isString(val) && /^\d+$/.test(val)) {
|
|
18119
|
+
strVal = Number(strVal);
|
|
18120
|
+
}
|
|
18121
|
+
}
|
|
18122
|
+
const date = parseDate(strVal, dateValueFormat);
|
|
18123
|
+
restList.push(date);
|
|
17560
18124
|
}
|
|
17561
|
-
return date;
|
|
17562
18125
|
});
|
|
17563
18126
|
}
|
|
17564
|
-
return
|
|
18127
|
+
return restList;
|
|
17565
18128
|
});
|
|
17566
18129
|
const computeDateMultipleValue = computed(() => {
|
|
17567
18130
|
const dateListValue = computeDateListValue.value;
|
|
@@ -17634,8 +18197,8 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17634
18197
|
});
|
|
17635
18198
|
const computeDateHMSTime = computed(() => {
|
|
17636
18199
|
const dateValue = computeDateValue.value;
|
|
17637
|
-
const
|
|
17638
|
-
return dateValue &&
|
|
18200
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
18201
|
+
return dateValue && isTimeOrDateTimeType ? (dateValue.getHours() * 3600 + dateValue.getMinutes() * 60 + dateValue.getSeconds()) * 1000 : 0;
|
|
17639
18202
|
});
|
|
17640
18203
|
const computeDateLabelFormat = computed(() => {
|
|
17641
18204
|
const { labelFormat } = props;
|
|
@@ -17653,7 +18216,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17653
18216
|
const currFullYear = currentDate.getFullYear();
|
|
17654
18217
|
const selectFullYear = selectMonth.getFullYear();
|
|
17655
18218
|
const startYearDate = new Date(selectFullYear - selectFullYear % yearSize, 0, 1);
|
|
17656
|
-
for (let index =
|
|
18219
|
+
for (let index = 0; index < yearSize; index++) {
|
|
17657
18220
|
const date = XEUtils.getWhatYear(startYearDate, index, 'first');
|
|
17658
18221
|
const itemFullYear = date.getFullYear();
|
|
17659
18222
|
years.push({
|
|
@@ -17753,7 +18316,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17753
18316
|
const currQuarter = getDateQuarter(currentDate);
|
|
17754
18317
|
const firstYear = XEUtils.getWhatYear(selectMonth, 0, 'first');
|
|
17755
18318
|
const selFullYear = firstYear.getFullYear();
|
|
17756
|
-
for (let index =
|
|
18319
|
+
for (let index = 0; index < quarterSize; index++) {
|
|
17757
18320
|
const date = XEUtils.getWhatQuarter(firstYear, index);
|
|
17758
18321
|
const itemFullYear = date.getFullYear();
|
|
17759
18322
|
const itemQuarter = getDateQuarter(date);
|
|
@@ -17782,7 +18345,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17782
18345
|
const currFullYear = currentDate.getFullYear();
|
|
17783
18346
|
const currMonth = currentDate.getMonth();
|
|
17784
18347
|
const selFullYear = XEUtils.getWhatYear(selectMonth, 0, 'first').getFullYear();
|
|
17785
|
-
for (let index =
|
|
18348
|
+
for (let index = 0; index < monthSize; index++) {
|
|
17786
18349
|
const date = XEUtils.getWhatYear(selectMonth, 0, index);
|
|
17787
18350
|
const itemFullYear = date.getFullYear();
|
|
17788
18351
|
const itemMonth = date.getMonth();
|
|
@@ -17860,8 +18423,8 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17860
18423
|
const timeOpts = computeTimeOpts.value;
|
|
17861
18424
|
const { hours: hourOptions, hourDisabledMethod } = timeOpts;
|
|
17862
18425
|
const list = [];
|
|
17863
|
-
const
|
|
17864
|
-
if (
|
|
18426
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
18427
|
+
if (isTimeOrDateTimeType) {
|
|
17865
18428
|
if (hourOptions && hourOptions.length) {
|
|
17866
18429
|
hourOptions.forEach(item => {
|
|
17867
18430
|
if (XEUtils.isNumber(item) || XEUtils.isString(item)) {
|
|
@@ -17899,8 +18462,8 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17899
18462
|
const timeOpts = computeTimeOpts.value;
|
|
17900
18463
|
const { minutes: minuteOptions, minuteDisabledMethod } = timeOpts;
|
|
17901
18464
|
const list = [];
|
|
17902
|
-
const
|
|
17903
|
-
if (
|
|
18465
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
18466
|
+
if (isTimeOrDateTimeType) {
|
|
17904
18467
|
if (minuteOptions && minuteOptions.length) {
|
|
17905
18468
|
minuteOptions.forEach(item => {
|
|
17906
18469
|
if (XEUtils.isNumber(item) || XEUtils.isString(item)) {
|
|
@@ -17948,8 +18511,8 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17948
18511
|
const timeOpts = computeTimeOpts.value;
|
|
17949
18512
|
const { seconds: secondOptions, secondDisabledMethod } = timeOpts;
|
|
17950
18513
|
const list = [];
|
|
17951
|
-
const
|
|
17952
|
-
if (
|
|
18514
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
18515
|
+
if (isTimeOrDateTimeType) {
|
|
17953
18516
|
if (secondOptions && secondOptions.length) {
|
|
17954
18517
|
secondOptions.forEach(item => {
|
|
17955
18518
|
if (XEUtils.isNumber(item) || XEUtils.isString(item)) {
|
|
@@ -17983,6 +18546,22 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17983
18546
|
}
|
|
17984
18547
|
return list;
|
|
17985
18548
|
});
|
|
18549
|
+
const refMaps = {
|
|
18550
|
+
refElem
|
|
18551
|
+
};
|
|
18552
|
+
const computeMaps = {
|
|
18553
|
+
computeSize,
|
|
18554
|
+
computeYearList
|
|
18555
|
+
};
|
|
18556
|
+
const $xeDatePanel = {
|
|
18557
|
+
xID,
|
|
18558
|
+
props,
|
|
18559
|
+
context,
|
|
18560
|
+
reactData,
|
|
18561
|
+
internalData,
|
|
18562
|
+
getRefMaps: () => refMaps,
|
|
18563
|
+
getComputeMaps: () => computeMaps
|
|
18564
|
+
};
|
|
17986
18565
|
const updateModelValue = (modelValue) => {
|
|
17987
18566
|
const { type } = props;
|
|
17988
18567
|
const dateValueFormat = computeDateValueFormat.value;
|
|
@@ -17994,7 +18573,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
17994
18573
|
const parseDate = (value, format) => {
|
|
17995
18574
|
const { type, multiple } = props;
|
|
17996
18575
|
if (type === 'time') {
|
|
17997
|
-
return toStringTimeDate(XEUtils.isArray(value) ?
|
|
18576
|
+
return toStringTimeDate(XEUtils.isArray(value) ? XEUtils.last(value) : value);
|
|
17998
18577
|
}
|
|
17999
18578
|
if (XEUtils.isArray(value)) {
|
|
18000
18579
|
return XEUtils.toStringDate(XEUtils.last(value), format);
|
|
@@ -18148,14 +18727,15 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
18148
18727
|
const dateChange = (date, isReload) => {
|
|
18149
18728
|
const { modelValue, multiple, valueSort } = props;
|
|
18150
18729
|
const { datetimePanelValue } = reactData;
|
|
18151
|
-
const
|
|
18730
|
+
const isTimeType = computeIsTimeType.value;
|
|
18731
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
18152
18732
|
const dateValueFormat = computeDateValueFormat.value;
|
|
18153
18733
|
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
18154
18734
|
if (props.type === 'week') {
|
|
18155
18735
|
const sWeek = XEUtils.toNumber(props.selectDay);
|
|
18156
18736
|
date = XEUtils.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
|
|
18157
18737
|
}
|
|
18158
|
-
else if (
|
|
18738
|
+
else if (isTimeOrDateTimeType) {
|
|
18159
18739
|
if (datetimePanelValue) {
|
|
18160
18740
|
date.setHours(datetimePanelValue.getHours());
|
|
18161
18741
|
date.setMinutes(datetimePanelValue.getMinutes());
|
|
@@ -18164,10 +18744,10 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
18164
18744
|
}
|
|
18165
18745
|
const inpVal = XEUtils.toDateString(date, dateValueFormat, { firstDay: firstDayOfWeek });
|
|
18166
18746
|
dateCheckMonth(date);
|
|
18167
|
-
if (multiple) {
|
|
18747
|
+
if (!isTimeType && multiple) {
|
|
18168
18748
|
const overCount = computeOverCount.value;
|
|
18169
18749
|
// 如果为多选
|
|
18170
|
-
if (
|
|
18750
|
+
if (isTimeOrDateTimeType) {
|
|
18171
18751
|
// 如果是datetime特殊类型
|
|
18172
18752
|
const dateListValue = isReload ? [] : [...computeDateListValue.value];
|
|
18173
18753
|
let datetimeRest = [];
|
|
@@ -18503,19 +19083,21 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
18503
19083
|
};
|
|
18504
19084
|
const dateConfirmEvent = (evnt) => {
|
|
18505
19085
|
const { multiple } = props;
|
|
18506
|
-
const { datetimePanelValue } = reactData;
|
|
19086
|
+
const { datetimePanelValue, currentDate } = reactData;
|
|
18507
19087
|
const dateValue = computeDateValue.value;
|
|
18508
|
-
const
|
|
18509
|
-
|
|
19088
|
+
const isTimeType = computeIsTimeType.value;
|
|
19089
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
19090
|
+
if (isTimeOrDateTimeType) {
|
|
18510
19091
|
const dateValueFormat = computeDateValueFormat.value;
|
|
18511
|
-
if (multiple) {
|
|
19092
|
+
if (!isTimeType && multiple) {
|
|
18512
19093
|
// 如果为多选
|
|
18513
19094
|
const dateMultipleValue = computeDateMultipleValue.value;
|
|
18514
|
-
|
|
19095
|
+
const dateListValue = computeDateListValue.value;
|
|
19096
|
+
if (isTimeOrDateTimeType) {
|
|
18515
19097
|
// 如果是datetime特殊类型
|
|
18516
|
-
const
|
|
19098
|
+
const listVals = dateListValue.length ? [...dateListValue] : [];
|
|
18517
19099
|
const datetimeRest = [];
|
|
18518
|
-
|
|
19100
|
+
listVals.forEach(item => {
|
|
18519
19101
|
if (item) {
|
|
18520
19102
|
if (datetimePanelValue) {
|
|
18521
19103
|
item.setHours(datetimePanelValue.getHours());
|
|
@@ -18533,7 +19115,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
18533
19115
|
}
|
|
18534
19116
|
}
|
|
18535
19117
|
else {
|
|
18536
|
-
dateChange(dateValue ||
|
|
19118
|
+
dateChange(dateValue || currentDate);
|
|
18537
19119
|
}
|
|
18538
19120
|
}
|
|
18539
19121
|
hidePanel();
|
|
@@ -18559,7 +19141,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
18559
19141
|
};
|
|
18560
19142
|
const dateOpenPanel = () => {
|
|
18561
19143
|
const { type, defaultDate, defaultTime } = props;
|
|
18562
|
-
const
|
|
19144
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
18563
19145
|
const dateValue = computeDateValue.value;
|
|
18564
19146
|
if (['year', 'quarter', 'month', 'week'].indexOf(type) > -1) {
|
|
18565
19147
|
reactData.datePanelType = type;
|
|
@@ -18587,7 +19169,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
18587
19169
|
dateNowHandle();
|
|
18588
19170
|
}
|
|
18589
19171
|
}
|
|
18590
|
-
if (
|
|
19172
|
+
if (isTimeOrDateTimeType) {
|
|
18591
19173
|
let dtPanelValue = reactData.datePanelValue;
|
|
18592
19174
|
if (!dtPanelValue) {
|
|
18593
19175
|
dtPanelValue = XEUtils.getWhatDay(Date.now(), 0, 'first');
|
|
@@ -19194,6 +19776,12 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
19194
19776
|
});
|
|
19195
19777
|
initValue();
|
|
19196
19778
|
dateOpenPanel();
|
|
19779
|
+
onMounted(() => {
|
|
19780
|
+
const { type, multiple } = props;
|
|
19781
|
+
if (multiple && type === 'time') {
|
|
19782
|
+
errLog$f('vxe.error.notSupportProp', [`type=${type}`, 'multiple=true', 'multiple=false']);
|
|
19783
|
+
}
|
|
19784
|
+
});
|
|
19197
19785
|
$xeDatePanel.renderVN = renderVN;
|
|
19198
19786
|
return $xeDatePanel;
|
|
19199
19787
|
},
|
|
@@ -19428,20 +20016,25 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
19428
20016
|
}
|
|
19429
20017
|
return disabled;
|
|
19430
20018
|
});
|
|
19431
|
-
const
|
|
20019
|
+
const computeIsTimeType = computed(() => {
|
|
19432
20020
|
const { type } = props;
|
|
19433
|
-
return type === 'time'
|
|
20021
|
+
return type === 'time';
|
|
20022
|
+
});
|
|
20023
|
+
const computeIsTimeOrDateTimeType = computed(() => {
|
|
20024
|
+
const { type } = props;
|
|
20025
|
+
const isTimeType = computeIsTimeType.value;
|
|
20026
|
+
return isTimeType || type === 'datetime';
|
|
19434
20027
|
});
|
|
19435
20028
|
const computeIsDatePickerType = computed(() => {
|
|
19436
|
-
const
|
|
19437
|
-
return
|
|
20029
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
20030
|
+
return isTimeOrDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
19438
20031
|
});
|
|
19439
20032
|
const computeIsClearable = computed(() => {
|
|
19440
20033
|
return props.clearable;
|
|
19441
20034
|
});
|
|
19442
20035
|
const computeIsDatePanelType = computed(() => {
|
|
19443
|
-
const
|
|
19444
|
-
return
|
|
20036
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
20037
|
+
return isTimeOrDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
19445
20038
|
});
|
|
19446
20039
|
const computeDateListValue = computed(() => {
|
|
19447
20040
|
const { modelValue, type, multiple } = props;
|
|
@@ -19655,7 +20248,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
19655
20248
|
};
|
|
19656
20249
|
const dateChange = (date, isReload) => {
|
|
19657
20250
|
const { modelValue, multiple } = props;
|
|
19658
|
-
const
|
|
20251
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
19659
20252
|
const dateValueFormat = computeDateValueFormat.value;
|
|
19660
20253
|
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
19661
20254
|
if (props.type === 'week') {
|
|
@@ -19666,7 +20259,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
19666
20259
|
if (multiple) {
|
|
19667
20260
|
const overCount = computeOverCount.value;
|
|
19668
20261
|
// 如果为多选
|
|
19669
|
-
if (
|
|
20262
|
+
if (isTimeOrDateTimeType) {
|
|
19670
20263
|
// 如果是datetime特殊类型
|
|
19671
20264
|
const dateListValue = [...computeDateListValue.value];
|
|
19672
20265
|
const datetimeRest = [];
|
|
@@ -20219,9 +20812,9 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
20219
20812
|
const panelChangeEvent = (params) => {
|
|
20220
20813
|
const { multiple, autoClose } = props;
|
|
20221
20814
|
const { value, $event } = params;
|
|
20222
|
-
const
|
|
20815
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
20223
20816
|
handleChange(value, $event);
|
|
20224
|
-
if (!multiple && !
|
|
20817
|
+
if (!multiple && !isTimeOrDateTimeType) {
|
|
20225
20818
|
if (autoClose) {
|
|
20226
20819
|
hidePanel();
|
|
20227
20820
|
}
|
|
@@ -20505,7 +21098,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
20505
21098
|
const btnTransfer = computeBtnTransfer.value;
|
|
20506
21099
|
const shortcutOpts = computeShortcutOpts.value;
|
|
20507
21100
|
const isClearable = computeIsClearable.value;
|
|
20508
|
-
const
|
|
21101
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
20509
21102
|
const shortcutList = computeShortcutList.value;
|
|
20510
21103
|
const timeOpts = computeTimeOpts.value;
|
|
20511
21104
|
const dateStartDate = computeDateStartDate.value;
|
|
@@ -20519,7 +21112,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
20519
21112
|
const rightSlot = slots.right;
|
|
20520
21113
|
const ppClassName = popupOpts.className;
|
|
20521
21114
|
const hasShortcutBtn = shortcutList.length > 0;
|
|
20522
|
-
const showConfirmBtn = (showConfirmButton === null ? (
|
|
21115
|
+
const showConfirmBtn = (showConfirmButton === null ? (isTimeOrDateTimeType || multiple) : showConfirmButton);
|
|
20523
21116
|
const showClearBtn = (showClearButton === null ? (isClearable && showConfirmBtn && type !== 'time') : showClearButton);
|
|
20524
21117
|
return h(Teleport, {
|
|
20525
21118
|
to: 'body',
|
|
@@ -20833,8 +21426,8 @@ function createReactData$d() {
|
|
|
20833
21426
|
isActivated: false,
|
|
20834
21427
|
selectStValue: '',
|
|
20835
21428
|
selectEdValue: '',
|
|
20836
|
-
paneStartVal:
|
|
20837
|
-
paneEndVal:
|
|
21429
|
+
paneStartVal: [],
|
|
21430
|
+
paneEndVal: []
|
|
20838
21431
|
};
|
|
20839
21432
|
}
|
|
20840
21433
|
function createInternalData$c() {
|
|
@@ -21067,9 +21660,14 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21067
21660
|
const { startValue, endValue } = props;
|
|
21068
21661
|
return `${startValue || ''}${endValue || ''}`;
|
|
21069
21662
|
});
|
|
21070
|
-
const
|
|
21663
|
+
const computeIsTimeType = computed(() => {
|
|
21071
21664
|
const { type } = props;
|
|
21072
|
-
return type === 'time'
|
|
21665
|
+
return type === 'time';
|
|
21666
|
+
});
|
|
21667
|
+
const computeIsTimeOrDateTimeType = computed(() => {
|
|
21668
|
+
const { type } = props;
|
|
21669
|
+
const isTimeType = computeIsTimeType.value;
|
|
21670
|
+
return isTimeType || type === 'datetime';
|
|
21073
21671
|
});
|
|
21074
21672
|
const computeIsDatePickerType = computed(() => {
|
|
21075
21673
|
return ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
@@ -21221,7 +21819,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21221
21819
|
};
|
|
21222
21820
|
};
|
|
21223
21821
|
const updateModelValue = (isModel) => {
|
|
21224
|
-
const { modelValue, startValue, endValue } = props;
|
|
21822
|
+
const { modelValue, startValue, endValue, valueFormat } = props;
|
|
21225
21823
|
let restObj = {
|
|
21226
21824
|
sValue: '',
|
|
21227
21825
|
eValue: ''
|
|
@@ -21242,8 +21840,20 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21242
21840
|
restObj = paraeUpdateModel();
|
|
21243
21841
|
}
|
|
21244
21842
|
}
|
|
21245
|
-
|
|
21246
|
-
|
|
21843
|
+
let startRest = restObj.sValue;
|
|
21844
|
+
let endRest = restObj.eValue;
|
|
21845
|
+
if (valueFormat === 'timestamp') {
|
|
21846
|
+
if (XEUtils.isString(startRest) && /^\d+$/.test(startRest)) {
|
|
21847
|
+
startRest = Number(startRest);
|
|
21848
|
+
}
|
|
21849
|
+
if (XEUtils.isString(endRest) && /^\d+$/.test(endRest)) {
|
|
21850
|
+
endRest = Number(endRest);
|
|
21851
|
+
}
|
|
21852
|
+
}
|
|
21853
|
+
reactData.selectStValue = startRest;
|
|
21854
|
+
reactData.selectEdValue = endRest;
|
|
21855
|
+
reactData.paneEndVal = [startRest, endRest];
|
|
21856
|
+
reactData.paneStartVal = [startRest, endRest];
|
|
21247
21857
|
};
|
|
21248
21858
|
const triggerEvent = (evnt) => {
|
|
21249
21859
|
const { selectStValue, selectEdValue } = reactData;
|
|
@@ -21407,12 +22017,17 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21407
22017
|
triggerEvent(evnt);
|
|
21408
22018
|
};
|
|
21409
22019
|
const confirmEvent = (evnt) => {
|
|
22020
|
+
const isTimeType = computeIsTimeType.value;
|
|
21410
22021
|
const $startDatePanel = refStartDatePanel.value;
|
|
21411
22022
|
const $endDatePanel = refEndDatePanel.value;
|
|
21412
22023
|
if ($startDatePanel && $endDatePanel) {
|
|
21413
22024
|
const startValue = $startDatePanel.getModelValue();
|
|
21414
22025
|
const endValue = $endDatePanel.getModelValue();
|
|
21415
|
-
if (
|
|
22026
|
+
if (isTimeType) {
|
|
22027
|
+
$startDatePanel.confirmByEvent(evnt);
|
|
22028
|
+
$endDatePanel.confirmByEvent(evnt);
|
|
22029
|
+
}
|
|
22030
|
+
else if ((startValue && !endValue) || (!startValue && endValue)) {
|
|
21416
22031
|
handleChange('', '', evnt);
|
|
21417
22032
|
}
|
|
21418
22033
|
else {
|
|
@@ -21442,11 +22057,16 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21442
22057
|
else {
|
|
21443
22058
|
startValue = currValue || XEUtils.last(paneVals);
|
|
21444
22059
|
}
|
|
21445
|
-
reactData.paneEndVal = [startValue, endValue]
|
|
21446
|
-
reactData.paneStartVal = [startValue, endValue]
|
|
22060
|
+
reactData.paneEndVal = [startValue, endValue];
|
|
22061
|
+
reactData.paneStartVal = [startValue, endValue];
|
|
21447
22062
|
handleChange(startValue, endValue, $event);
|
|
21448
22063
|
handleSelectClose();
|
|
21449
|
-
if (
|
|
22064
|
+
if (selectStatus) {
|
|
22065
|
+
if (startValue && endValue) {
|
|
22066
|
+
internalData.selectStatus = false;
|
|
22067
|
+
}
|
|
22068
|
+
}
|
|
22069
|
+
else {
|
|
21450
22070
|
internalData.selectStatus = true;
|
|
21451
22071
|
}
|
|
21452
22072
|
nextTick(() => {
|
|
@@ -21472,11 +22092,16 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21472
22092
|
else {
|
|
21473
22093
|
endValue = currValue || XEUtils.last(paneVals);
|
|
21474
22094
|
}
|
|
21475
|
-
reactData.paneEndVal = [startValue, endValue]
|
|
21476
|
-
reactData.paneStartVal = [startValue, endValue]
|
|
22095
|
+
reactData.paneEndVal = [startValue, endValue];
|
|
22096
|
+
reactData.paneStartVal = [startValue, endValue];
|
|
21477
22097
|
handleChange(startValue, endValue, $event);
|
|
21478
22098
|
handleSelectClose();
|
|
21479
|
-
if (
|
|
22099
|
+
if (selectStatus) {
|
|
22100
|
+
if (startValue && endValue) {
|
|
22101
|
+
internalData.selectStatus = false;
|
|
22102
|
+
}
|
|
22103
|
+
}
|
|
22104
|
+
else {
|
|
21480
22105
|
internalData.selectStatus = true;
|
|
21481
22106
|
}
|
|
21482
22107
|
nextTick(() => {
|
|
@@ -21508,6 +22133,21 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21508
22133
|
}
|
|
21509
22134
|
break;
|
|
21510
22135
|
}
|
|
22136
|
+
case 'month':
|
|
22137
|
+
case 'quarter': {
|
|
22138
|
+
if (endYear <= startYear) {
|
|
22139
|
+
$endDatePanel.setPanelDate(getNextYear(startPanelDate));
|
|
22140
|
+
}
|
|
22141
|
+
break;
|
|
22142
|
+
}
|
|
22143
|
+
case 'year': {
|
|
22144
|
+
const { computeYearList } = $startDatePanel.getComputeMaps();
|
|
22145
|
+
const yearList = computeYearList.value;
|
|
22146
|
+
if (yearList.some((item) => XEUtils.isDateSame(item.date, endPanelDate, 'yyyy'))) {
|
|
22147
|
+
$endDatePanel.setPanelDate(getNextYear(startPanelDate, yearList.length));
|
|
22148
|
+
}
|
|
22149
|
+
break;
|
|
22150
|
+
}
|
|
21511
22151
|
}
|
|
21512
22152
|
};
|
|
21513
22153
|
const startPanelDateBtnChangeEvent = () => {
|
|
@@ -21531,6 +22171,17 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21531
22171
|
$endDatePanel.setPanelDate(getNextMonth(startPanelDate));
|
|
21532
22172
|
break;
|
|
21533
22173
|
}
|
|
22174
|
+
case 'month':
|
|
22175
|
+
case 'quarter': {
|
|
22176
|
+
$endDatePanel.setPanelDate(getNextYear(startPanelDate));
|
|
22177
|
+
break;
|
|
22178
|
+
}
|
|
22179
|
+
case 'year': {
|
|
22180
|
+
const { computeYearList } = $startDatePanel.getComputeMaps();
|
|
22181
|
+
const yearList = computeYearList.value;
|
|
22182
|
+
$endDatePanel.setPanelDate(getNextYear(startPanelDate, yearList.length));
|
|
22183
|
+
break;
|
|
22184
|
+
}
|
|
21534
22185
|
}
|
|
21535
22186
|
}
|
|
21536
22187
|
else {
|
|
@@ -21562,6 +22213,21 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21562
22213
|
}
|
|
21563
22214
|
break;
|
|
21564
22215
|
}
|
|
22216
|
+
case 'month':
|
|
22217
|
+
case 'quarter': {
|
|
22218
|
+
if (startYear >= endYear) {
|
|
22219
|
+
$startDatePanel.setPanelDate(getPrevYear(endPanelDate));
|
|
22220
|
+
}
|
|
22221
|
+
break;
|
|
22222
|
+
}
|
|
22223
|
+
case 'year': {
|
|
22224
|
+
const { computeYearList } = $endDatePanel.getComputeMaps();
|
|
22225
|
+
const yearList = computeYearList.value;
|
|
22226
|
+
if (yearList.some((item) => XEUtils.isDateSame(item.date, startPanelDate, 'yyyy'))) {
|
|
22227
|
+
$startDatePanel.setPanelDate(getPrevYear(endPanelDate, yearList.length));
|
|
22228
|
+
}
|
|
22229
|
+
break;
|
|
22230
|
+
}
|
|
21565
22231
|
}
|
|
21566
22232
|
};
|
|
21567
22233
|
const endPanelDateBtnChangeEvent = () => {
|
|
@@ -21585,6 +22251,17 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21585
22251
|
$startDatePanel.setPanelDate(getPrevMonth(endPanelDate));
|
|
21586
22252
|
break;
|
|
21587
22253
|
}
|
|
22254
|
+
case 'month':
|
|
22255
|
+
case 'quarter': {
|
|
22256
|
+
$startDatePanel.setPanelDate(getPrevYear(endPanelDate));
|
|
22257
|
+
break;
|
|
22258
|
+
}
|
|
22259
|
+
case 'year': {
|
|
22260
|
+
const { computeYearList } = $endDatePanel.getComputeMaps();
|
|
22261
|
+
const yearList = computeYearList.value;
|
|
22262
|
+
$startDatePanel.setPanelDate(getPrevYear(endPanelDate, yearList.length));
|
|
22263
|
+
break;
|
|
22264
|
+
}
|
|
21588
22265
|
}
|
|
21589
22266
|
}
|
|
21590
22267
|
else {
|
|
@@ -21877,7 +22554,8 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21877
22554
|
const isClearable = computeIsClearable.value;
|
|
21878
22555
|
const panelLabelObj = computePanelLabelObj.value;
|
|
21879
22556
|
const shortcutList = computeShortcutList.value;
|
|
21880
|
-
const
|
|
22557
|
+
const isTimeType = computeIsTimeType.value;
|
|
22558
|
+
const isTimeOrDateTimeType = computeIsTimeOrDateTimeType.value;
|
|
21881
22559
|
const defaultDates = computeDefaultDates.value;
|
|
21882
22560
|
const defaultTimes = computeDefaultTimes.value;
|
|
21883
22561
|
const timeOpts = computeTimeOpts.value;
|
|
@@ -21893,7 +22571,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21893
22571
|
const [sdDate, edDate] = defaultDates;
|
|
21894
22572
|
const [sdTime, edTime] = defaultTimes;
|
|
21895
22573
|
const hasShortcutBtn = shortcutList.length > 0;
|
|
21896
|
-
const showConfirmBtn = (showConfirmButton === null ? (
|
|
22574
|
+
const showConfirmBtn = (showConfirmButton === null ? (isTimeOrDateTimeType || !autoClose) : showConfirmButton);
|
|
21897
22575
|
const showClearBtn = (showClearButton === null ? isClearable : showClearButton);
|
|
21898
22576
|
return h(Teleport, {
|
|
21899
22577
|
to: 'body',
|
|
@@ -21948,7 +22626,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21948
22626
|
h(VxeDatePanel, {
|
|
21949
22627
|
ref: refStartDatePanel,
|
|
21950
22628
|
modelValue: paneStartVal,
|
|
21951
|
-
multiple:
|
|
22629
|
+
multiple: !isTimeType,
|
|
21952
22630
|
valueSort: true,
|
|
21953
22631
|
limitCount: 3,
|
|
21954
22632
|
defaultMode: 'first',
|
|
@@ -21975,7 +22653,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21975
22653
|
h(VxeDatePanel, {
|
|
21976
22654
|
ref: refEndDatePanel,
|
|
21977
22655
|
modelValue: paneEndVal,
|
|
21978
|
-
multiple:
|
|
22656
|
+
multiple: !isTimeType,
|
|
21979
22657
|
valueSort: true,
|
|
21980
22658
|
limitCount: 3,
|
|
21981
22659
|
defaultMode: 'last',
|
|
@@ -32996,7 +33674,7 @@ function handlePrint(opts, printHtml = '') {
|
|
|
32996
33674
|
if (styleUrls && styleUrls.length) {
|
|
32997
33675
|
styleUrls.forEach(url => {
|
|
32998
33676
|
if (!/.css$/.test(url)) {
|
|
32999
|
-
warnLog$
|
|
33677
|
+
warnLog$h('vxe.error.errProp', [url, `${url}.css`]);
|
|
33000
33678
|
}
|
|
33001
33679
|
});
|
|
33002
33680
|
}
|