vxe-pc-ui 4.15.1 → 4.15.3
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 +834 -175
- package/es/backtop/src/backtop.js +2 -1
- package/es/button/src/button.js +3 -2
- package/es/calendar/src/calendar.js +2 -1
- package/es/cascader/src/cascader.js +2 -1
- package/es/checkbox/src/group.js +5 -1
- package/es/date-panel/src/util.js +27 -4
- package/es/date-picker/src/date-picker.js +609 -45
- package/es/date-range-picker/src/date-range-picker.js +20 -4
- package/es/drawer/src/drawer.js +2 -0
- package/es/form/render/index.js +3 -2
- package/es/form/src/form.js +6 -5
- package/es/form/src/itemInfo.js +6 -5
- package/es/input/src/input.js +2 -1
- package/es/menu/src/menu.js +2 -1
- package/es/modal/src/modal.js +5 -2
- package/es/number-input/src/number-input.js +2 -3
- package/es/pager/src/pager.js +4 -3
- package/es/radio/src/group.js +5 -1
- package/es/select/src/select.js +25 -20
- package/es/splitter/src/splitter.js +12 -7
- package/es/table-select/src/table-select.js +21 -16
- package/es/tabs/src/tabs.js +4 -3
- package/es/textarea/src/textarea.js +2 -1
- package/es/tree/src/tree.js +3 -2
- package/es/tree-select/src/tree-select.js +2 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +7 -1
- package/es/upload/src/upload.js +12 -3
- package/lib/backtop/src/backtop.js +5 -2
- package/lib/backtop/src/backtop.min.js +1 -1
- package/lib/button/src/button.js +4 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/calendar/src/calendar.js +4 -1
- package/lib/calendar/src/calendar.min.js +1 -1
- package/lib/cascader/src/cascader.js +4 -1
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/checkbox/src/group.js +5 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/date-panel/src/util.js +37 -6
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +665 -43
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +21 -3
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/drawer/src/drawer.js +2 -0
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/form/render/index.js +4 -1
- package/lib/form/render/index.min.js +1 -1
- package/lib/form/src/form.js +8 -4
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +7 -4
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/index.umd.js +916 -137
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +6 -3
- package/lib/input/src/input.min.js +1 -1
- package/lib/menu/src/menu.js +4 -1
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +8 -2
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/number-input/src/number-input.js +2 -3
- package/lib/pager/src/pager.js +6 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/radio/src/group.js +5 -1
- package/lib/radio/src/group.min.js +1 -1
- package/lib/select/src/select.js +27 -20
- package/lib/select/src/select.min.js +1 -1
- package/lib/splitter/src/splitter.js +17 -9
- package/lib/splitter/src/splitter.min.js +1 -1
- package/lib/table-select/src/table-select.js +22 -15
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tabs/src/tabs.js +7 -3
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/textarea/src/textarea.js +4 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tree/src/tree.js +7 -4
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +7 -3
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +8 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +20 -3
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/backtop/src/backtop.ts +3 -1
- package/packages/button/src/button.ts +4 -2
- package/packages/calendar/src/calendar.ts +3 -1
- package/packages/cascader/src/cascader.ts +3 -1
- package/packages/checkbox/src/group.ts +6 -2
- package/packages/date-panel/src/util.ts +28 -3
- package/packages/date-picker/src/date-picker.ts +624 -48
- package/packages/date-range-picker/src/date-range-picker.ts +19 -4
- package/packages/drawer/src/drawer.ts +2 -0
- package/packages/form/render/index.ts +4 -2
- package/packages/form/src/form.ts +7 -5
- package/packages/form/src/itemInfo.ts +7 -5
- package/packages/input/src/input.ts +3 -1
- package/packages/menu/src/menu.ts +3 -1
- package/packages/modal/src/modal.ts +6 -2
- package/packages/number-input/src/number-input.ts +2 -6
- package/packages/pager/src/pager.ts +5 -3
- package/packages/radio/src/group.ts +6 -2
- package/packages/select/src/select.ts +29 -22
- package/packages/splitter/src/splitter.ts +13 -7
- package/packages/table-select/src/table-select.ts +24 -17
- package/packages/tabs/src/tabs.ts +5 -3
- package/packages/textarea/src/textarea.ts +3 -1
- package/packages/tree/src/tree.ts +4 -2
- package/packages/tree-select/src/tree-select.ts +3 -1
- package/packages/ui/src/log.ts +7 -0
- package/packages/upload/src/upload.ts +14 -3
- package/types/components/date-picker.d.ts +27 -1
- package/types/components/date-range-picker.d.ts +4 -0
- package/types/components/drawer.d.ts +2 -0
- package/types/components/modal.d.ts +2 -0
- package/types/components/splitter.d.ts +1 -0
- package/types/components/table.d.ts +29 -3
- package/types/components/upload.d.ts +28 -1
- /package/es/icon/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/es/icon/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
- /package/es/icon/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
- /package/es/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/es/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
- /package/es/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
- /package/lib/{iconfont.1781675429363.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/lib/{iconfont.1781675429363.woff → iconfont.1781852740683.woff} +0 -0
- /package/lib/{iconfont.1781675429363.woff2 → iconfont.1781852740683.woff2} +0 -0
|
@@ -6,10 +6,11 @@ import { getFuncText, getLastZIndex, nextZIndex, isEnableConf } from '../../ui/s
|
|
|
6
6
|
import { updatePanelPlacement, getEventTargetNode } from '../../ui/src/dom';
|
|
7
7
|
import { parseDateString, parseDateObj, getRangeDateByCode, handleValueFormat } from '../../date-panel/src/util';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
9
|
-
import {
|
|
9
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
10
10
|
import VxeDatePanelComponent from '../../date-panel/src/date-panel';
|
|
11
11
|
import VxeButtonComponent from '../../button/src/button';
|
|
12
12
|
import VxeButtonGroupComponent from '../../button/src/button-group';
|
|
13
|
+
const { errLog } = createComponentLog('date-range-picker');
|
|
13
14
|
export default defineVxeComponent({
|
|
14
15
|
name: 'VxeDateRangePicker',
|
|
15
16
|
props: {
|
|
@@ -460,6 +461,9 @@ export default defineVxeComponent({
|
|
|
460
461
|
if (!trigger || trigger === 'default') {
|
|
461
462
|
dateRangePickerOpenEvent(evnt);
|
|
462
463
|
}
|
|
464
|
+
else if (trigger === 'icon') {
|
|
465
|
+
hidePanel();
|
|
466
|
+
}
|
|
463
467
|
triggerEvent(evnt);
|
|
464
468
|
};
|
|
465
469
|
const clickPrefixEvent = (evnt) => {
|
|
@@ -771,6 +775,9 @@ export default defineVxeComponent({
|
|
|
771
775
|
const { panelIndex } = reactData;
|
|
772
776
|
const targetElem = refInputTarget.value;
|
|
773
777
|
const panelElem = refInputPanel.value;
|
|
778
|
+
if (!panelElem) {
|
|
779
|
+
return nextTick();
|
|
780
|
+
}
|
|
774
781
|
const btnTransfer = computeBtnTransfer.value;
|
|
775
782
|
const popupOpts = computePopupOpts.value;
|
|
776
783
|
const handleStyle = () => {
|
|
@@ -819,10 +826,16 @@ export default defineVxeComponent({
|
|
|
819
826
|
}
|
|
820
827
|
};
|
|
821
828
|
const clickIconEvent = (evnt) => {
|
|
829
|
+
const { visiblePanel } = reactData;
|
|
822
830
|
const popupOpts = computePopupOpts.value;
|
|
823
831
|
const { trigger } = popupOpts;
|
|
824
832
|
if (!trigger || trigger === 'default' || trigger === 'icon') {
|
|
825
|
-
|
|
833
|
+
if (visiblePanel) {
|
|
834
|
+
hidePanel();
|
|
835
|
+
}
|
|
836
|
+
else {
|
|
837
|
+
dateRangePickerOpenEvent(evnt);
|
|
838
|
+
}
|
|
826
839
|
}
|
|
827
840
|
};
|
|
828
841
|
const clickEvent = (evnt) => {
|
|
@@ -875,7 +888,7 @@ export default defineVxeComponent({
|
|
|
875
888
|
break;
|
|
876
889
|
}
|
|
877
890
|
default:
|
|
878
|
-
errLog('vxe.error.notCommands', [
|
|
891
|
+
errLog('vxe.error.notCommands', [code]);
|
|
879
892
|
break;
|
|
880
893
|
}
|
|
881
894
|
}
|
|
@@ -948,6 +961,10 @@ export default defineVxeComponent({
|
|
|
948
961
|
return renderEmptyElement($xeDateRangePicker);
|
|
949
962
|
};
|
|
950
963
|
const renderPanel = () => {
|
|
964
|
+
const popupOpts = computePopupOpts.value;
|
|
965
|
+
if (popupOpts.enabled === false) {
|
|
966
|
+
return renderEmptyElement($xeDateRangePicker);
|
|
967
|
+
}
|
|
951
968
|
const { type, separator, autoClose, showConfirmButton, showClearButton } = props;
|
|
952
969
|
const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, startValue, endValue } = reactData;
|
|
953
970
|
const vSize = computeSize.value;
|
|
@@ -960,7 +977,6 @@ export default defineVxeComponent({
|
|
|
960
977
|
const defaultDates = computeDefaultDates.value;
|
|
961
978
|
const defaultTimes = computeDefaultTimes.value;
|
|
962
979
|
const timeOpts = computeTimeOpts.value;
|
|
963
|
-
const popupOpts = computePopupOpts.value;
|
|
964
980
|
const { startLabel, endLabel } = panelLabelObj;
|
|
965
981
|
const { position } = shortcutOpts;
|
|
966
982
|
const headerSlot = slots.header;
|
package/es/drawer/src/drawer.js
CHANGED
|
@@ -89,6 +89,7 @@ export default defineVxeComponent({
|
|
|
89
89
|
type: Boolean,
|
|
90
90
|
default: () => getConfig().drawer.showTitleOverflow
|
|
91
91
|
},
|
|
92
|
+
preload: Boolean,
|
|
92
93
|
width: [Number, String],
|
|
93
94
|
height: [Number, String],
|
|
94
95
|
resize: {
|
|
@@ -595,6 +596,7 @@ export default defineVxeComponent({
|
|
|
595
596
|
}
|
|
596
597
|
});
|
|
597
598
|
onMounted(() => {
|
|
599
|
+
reactData.initialized = !!props.preload;
|
|
598
600
|
nextTick(() => {
|
|
599
601
|
if (props.modelValue) {
|
|
600
602
|
openDrawer();
|
package/es/form/render/index.js
CHANGED
|
@@ -2,7 +2,8 @@ import { h, resolveComponent } from 'vue';
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { renderer, getComponent } from '../../ui';
|
|
4
4
|
import { getOnName, getModelEvent, getChangeEvent } from '../../ui/src/vn';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
|
+
const { errLog } = createComponentLog('form');
|
|
6
7
|
const componentDefaultModelProp = 'modelValue';
|
|
7
8
|
/**
|
|
8
9
|
* 已废弃
|
|
@@ -89,7 +90,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
89
90
|
XEUtils.objectEach(events, (func, key) => {
|
|
90
91
|
ons[getOnName(key)] = function (...args) {
|
|
91
92
|
if (!XEUtils.isFunction(func)) {
|
|
92
|
-
errLog('vxe.error.errFunc', [
|
|
93
|
+
errLog('vxe.error.errFunc', [func]);
|
|
93
94
|
}
|
|
94
95
|
func(params, ...args);
|
|
95
96
|
};
|
package/es/form/src/form.js
CHANGED
|
@@ -9,8 +9,9 @@ import VxeTooltipComponent from '../../tooltip';
|
|
|
9
9
|
import VxeFormConfigItem from './form-config-item';
|
|
10
10
|
import VxeLoadingComponent from '../../loading';
|
|
11
11
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
12
|
-
import {
|
|
12
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
13
13
|
import '../render';
|
|
14
|
+
const { warnLog, errLog } = createComponentLog('form');
|
|
14
15
|
class Rule {
|
|
15
16
|
constructor(rule) {
|
|
16
17
|
Object.assign(this, {
|
|
@@ -319,7 +320,7 @@ export default defineVxeComponent({
|
|
|
319
320
|
XEUtils.each(item.slots, (func) => {
|
|
320
321
|
if (!XEUtils.isFunction(func)) {
|
|
321
322
|
if (!slots[func]) {
|
|
322
|
-
errLog('vxe.error.notSlot', [
|
|
323
|
+
errLog('vxe.error.notSlot', [func]);
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
326
|
});
|
|
@@ -542,11 +543,11 @@ export default defineVxeComponent({
|
|
|
542
543
|
customValid = validatorMethod(validParams);
|
|
543
544
|
}
|
|
544
545
|
else {
|
|
545
|
-
warnLog('vxe.error.notValidators', [
|
|
546
|
+
warnLog('vxe.error.notValidators', [validator]);
|
|
546
547
|
}
|
|
547
548
|
}
|
|
548
549
|
else {
|
|
549
|
-
errLog('vxe.error.notValidators', [
|
|
550
|
+
errLog('vxe.error.notValidators', [validator]);
|
|
550
551
|
}
|
|
551
552
|
}
|
|
552
553
|
else {
|
|
@@ -936,7 +937,7 @@ export default defineVxeComponent({
|
|
|
936
937
|
onMounted(() => {
|
|
937
938
|
nextTick(() => {
|
|
938
939
|
if (props.customLayout && props.items) {
|
|
939
|
-
errLog('vxe.error.errConflicts', ['
|
|
940
|
+
errLog('vxe.error.errConflicts', ['custom-layout', 'items']);
|
|
940
941
|
}
|
|
941
942
|
});
|
|
942
943
|
globalEvents.on($xeForm, 'resize', handleGlobalResizeEvent);
|
package/es/form/src/itemInfo.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { formats } from '../../ui';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import {
|
|
3
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
4
|
+
const { errLog } = createComponentLog('form');
|
|
4
5
|
export class ItemInfo {
|
|
5
6
|
constructor($xeForm, item) {
|
|
6
7
|
const { field, itemRender, formatter } = item;
|
|
@@ -8,22 +9,22 @@ export class ItemInfo {
|
|
|
8
9
|
if (XEUtils.isString(formatter)) {
|
|
9
10
|
const gFormatOpts = formats.get(formatter);
|
|
10
11
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
11
|
-
errLog('vxe.error.notFormats', [
|
|
12
|
+
errLog('vxe.error.notFormats', [formatter]);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
else if (XEUtils.isArray(formatter)) {
|
|
15
16
|
const gFormatOpts = formats.get(formatter[0]);
|
|
16
17
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
17
|
-
errLog('vxe.error.notFormats', [
|
|
18
|
+
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
if (field && itemRender) {
|
|
22
23
|
if (itemRender.startField && `${itemRender.startField}`.indexOf(field) >= 0) {
|
|
23
|
-
errLog('vxe.error.modelConflicts', [`
|
|
24
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.startField=${itemRender.startField}`]);
|
|
24
25
|
}
|
|
25
26
|
if (itemRender.endField && `${itemRender.endField}`.indexOf(field) >= 0) {
|
|
26
|
-
errLog('vxe.error.modelConflicts', [`
|
|
27
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.endField=${itemRender.endField}`]);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
Object.assign(this, {
|
package/es/input/src/input.js
CHANGED
|
@@ -7,7 +7,8 @@ import { hasClass, getAbsolutePos, getEventTargetNode, hasControlKey } from '../
|
|
|
7
7
|
import { toStringTimeDate, getDateQuarter } from '../../date-panel/src/util';
|
|
8
8
|
import { handleNumber, toFloatValueFixed } from '../../number-input/src/util';
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
10
|
-
import {
|
|
10
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
11
|
+
const { warnLog } = createComponentLog('input');
|
|
11
12
|
export default defineVxeComponent({
|
|
12
13
|
name: 'VxeInput',
|
|
13
14
|
props: {
|
package/es/menu/src/menu.js
CHANGED
|
@@ -5,8 +5,9 @@ import { VxeUI, createEvent, permission, useSize, globalEvents, renderEmptyEleme
|
|
|
5
5
|
import { toCssUnit } from '../../ui/src/dom';
|
|
6
6
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
9
9
|
import VxeLoadingComponent from '../../loading';
|
|
10
|
+
const { errLog } = createComponentLog('menu');
|
|
10
11
|
const { menus, getConfig, getIcon } = VxeUI;
|
|
11
12
|
export default defineVxeComponent({
|
|
12
13
|
name: 'VxeMenu',
|
package/es/modal/src/modal.js
CHANGED
|
@@ -7,7 +7,8 @@ import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, cr
|
|
|
7
7
|
import VxeButtonComponent from '../../button/src/button';
|
|
8
8
|
import VxeLoadingComponent from '../../loading/index';
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
10
|
-
import {
|
|
10
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
11
|
+
const { warnLog, errLog } = createComponentLog('modal');
|
|
11
12
|
export const allActiveModals = [];
|
|
12
13
|
const msgQueue = [];
|
|
13
14
|
const notifyQueue = [];
|
|
@@ -94,6 +95,7 @@ export default defineVxeComponent({
|
|
|
94
95
|
type: Boolean,
|
|
95
96
|
default: () => getConfig().modal.showFooter
|
|
96
97
|
},
|
|
98
|
+
preload: Boolean,
|
|
97
99
|
showZoom: Boolean,
|
|
98
100
|
zoomConfig: Object,
|
|
99
101
|
showMaximize: {
|
|
@@ -1395,9 +1397,10 @@ export default defineVxeComponent({
|
|
|
1395
1397
|
if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
|
|
1396
1398
|
warnLog('vxe.modal.footPropErr');
|
|
1397
1399
|
}
|
|
1400
|
+
reactData.initialized = !!props.preload;
|
|
1398
1401
|
nextTick(() => {
|
|
1399
1402
|
if (props.storage && !props.id) {
|
|
1400
|
-
errLog('vxe.error.reqProp', ['
|
|
1403
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
1401
1404
|
}
|
|
1402
1405
|
if (props.modelValue) {
|
|
1403
1406
|
openModal();
|
|
@@ -47,7 +47,6 @@ export default defineVxeComponent({
|
|
|
47
47
|
type: String,
|
|
48
48
|
default: () => getConfig().numberInput.size || getConfig().size
|
|
49
49
|
},
|
|
50
|
-
// number、integer、float
|
|
51
50
|
min: {
|
|
52
51
|
type: [String, Number],
|
|
53
52
|
default: null
|
|
@@ -70,12 +69,12 @@ export default defineVxeComponent({
|
|
|
70
69
|
default: () => getConfig().numberInput.currencySymbol
|
|
71
70
|
},
|
|
72
71
|
controlConfig: Object,
|
|
73
|
-
// float
|
|
72
|
+
// number、float、amount
|
|
74
73
|
roundingMode: {
|
|
75
74
|
type: String,
|
|
76
75
|
default: () => getConfig().numberInput.roundingMode
|
|
77
76
|
},
|
|
78
|
-
// float
|
|
77
|
+
// float、amount
|
|
79
78
|
digits: {
|
|
80
79
|
type: [String, Number],
|
|
81
80
|
default: null
|
package/es/pager/src/pager.js
CHANGED
|
@@ -2,9 +2,10 @@ import { h, computed, inject, ref, reactive, nextTick, watch } from 'vue';
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize } from '../../ui';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
6
|
import VxeSelectComponent from '../../select/src/select';
|
|
7
7
|
import VxeNumberInputComponent from '../../number-input/src/number-input';
|
|
8
|
+
const { warnLog, errLog } = createComponentLog('pager');
|
|
8
9
|
export default defineVxeComponent({
|
|
9
10
|
name: 'VxePager',
|
|
10
11
|
props: {
|
|
@@ -606,7 +607,7 @@ export default defineVxeComponent({
|
|
|
606
607
|
* @deprecated
|
|
607
608
|
*/
|
|
608
609
|
jumpPage(currentPage) {
|
|
609
|
-
warnLog('vxe.error.delFunc', ['
|
|
610
|
+
warnLog('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
|
|
610
611
|
return $xePager.setCurrentPage(currentPage);
|
|
611
612
|
}
|
|
612
613
|
};
|
|
@@ -677,7 +678,7 @@ export default defineVxeComponent({
|
|
|
677
678
|
childNodes.push(renderFn());
|
|
678
679
|
}
|
|
679
680
|
else {
|
|
680
|
-
errLog('vxe.error.notProp', [`
|
|
681
|
+
errLog('vxe.error.notProp', [`layouts -> ${name}`]);
|
|
681
682
|
}
|
|
682
683
|
});
|
|
683
684
|
if (slots.right) {
|
package/es/radio/src/group.js
CHANGED
|
@@ -4,6 +4,9 @@ import XEUtils from 'xe-utils';
|
|
|
4
4
|
import { getConfig, createEvent, useSize } from '../../ui';
|
|
5
5
|
import VxeRadioComponent from './radio';
|
|
6
6
|
import VxeRadioButtonComponent from './button';
|
|
7
|
+
function createReactData() {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
7
10
|
function createInternalData() {
|
|
8
11
|
return {
|
|
9
12
|
// isLoaded: false
|
|
@@ -45,7 +48,7 @@ export default defineVxeComponent({
|
|
|
45
48
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
46
49
|
const xID = XEUtils.uniqueId();
|
|
47
50
|
const { computeSize } = useSize(props);
|
|
48
|
-
const reactData = reactive(
|
|
51
|
+
const reactData = reactive(createReactData());
|
|
49
52
|
const internalData = createInternalData();
|
|
50
53
|
const computeIsReadonly = computed(() => {
|
|
51
54
|
const { readonly } = props;
|
|
@@ -182,6 +185,7 @@ export default defineVxeComponent({
|
|
|
182
185
|
});
|
|
183
186
|
});
|
|
184
187
|
onUnmounted(() => {
|
|
188
|
+
XEUtils.assign(reactData, createReactData());
|
|
185
189
|
XEUtils.assign(internalData, createInternalData());
|
|
186
190
|
});
|
|
187
191
|
provide('$xeRadioGroup', $xeRadioGroup);
|
package/es/select/src/select.js
CHANGED
|
@@ -5,15 +5,37 @@ import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, cr
|
|
|
5
5
|
import { getEventTargetNode, toCssUnit, updatePanelPlacement } from '../../ui/src/dom';
|
|
6
6
|
import { getLastZIndex, nextZIndex, getFuncText, eqEmptyValue } from '../../ui/src/utils';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
9
9
|
import VxeInputComponent from '../../input/src/input';
|
|
10
10
|
import VxeButtonComponent from '../../button/src/button';
|
|
11
|
+
const { errLog } = createComponentLog('select');
|
|
11
12
|
function isOptionVisible(option) {
|
|
12
13
|
return option.visible !== false;
|
|
13
14
|
}
|
|
14
15
|
function getOptUniqueId() {
|
|
15
16
|
return XEUtils.uniqueId('opt_');
|
|
16
17
|
}
|
|
18
|
+
function createReactData() {
|
|
19
|
+
return {
|
|
20
|
+
initialized: false,
|
|
21
|
+
scrollYLoad: false,
|
|
22
|
+
bodyHeight: 0,
|
|
23
|
+
topSpaceHeight: 0,
|
|
24
|
+
optList: [],
|
|
25
|
+
staticOptions: [],
|
|
26
|
+
reactFlag: 0,
|
|
27
|
+
currentOption: null,
|
|
28
|
+
searchValue: '',
|
|
29
|
+
searchLoading: false,
|
|
30
|
+
panelIndex: 0,
|
|
31
|
+
panelStyle: {},
|
|
32
|
+
panelPlacement: null,
|
|
33
|
+
triggerFocusPanel: false,
|
|
34
|
+
visiblePanel: false,
|
|
35
|
+
isAniVisible: false,
|
|
36
|
+
isActivated: false
|
|
37
|
+
};
|
|
38
|
+
}
|
|
17
39
|
function createInternalData() {
|
|
18
40
|
return {
|
|
19
41
|
// isLoaded: false,
|
|
@@ -189,25 +211,7 @@ export default defineVxeComponent({
|
|
|
189
211
|
const refOptionPanel = ref();
|
|
190
212
|
const refVirtualBody = ref();
|
|
191
213
|
const { computeSize } = useSize(props);
|
|
192
|
-
const reactData = reactive(
|
|
193
|
-
initialized: false,
|
|
194
|
-
scrollYLoad: false,
|
|
195
|
-
bodyHeight: 0,
|
|
196
|
-
topSpaceHeight: 0,
|
|
197
|
-
optList: [],
|
|
198
|
-
staticOptions: [],
|
|
199
|
-
reactFlag: 0,
|
|
200
|
-
currentOption: null,
|
|
201
|
-
searchValue: '',
|
|
202
|
-
searchLoading: false,
|
|
203
|
-
panelIndex: 0,
|
|
204
|
-
panelStyle: {},
|
|
205
|
-
panelPlacement: null,
|
|
206
|
-
triggerFocusPanel: false,
|
|
207
|
-
visiblePanel: false,
|
|
208
|
-
isAniVisible: false,
|
|
209
|
-
isActivated: false
|
|
210
|
-
});
|
|
214
|
+
const reactData = reactive(createReactData());
|
|
211
215
|
const internalData = createInternalData();
|
|
212
216
|
const refMaps = {
|
|
213
217
|
refElem
|
|
@@ -1729,6 +1733,7 @@ export default defineVxeComponent({
|
|
|
1729
1733
|
globalEvents.off($xeSelect, 'keydown');
|
|
1730
1734
|
globalEvents.off($xeSelect, 'blur');
|
|
1731
1735
|
globalEvents.off($xeSelect, 'resize');
|
|
1736
|
+
XEUtils.assign(reactData, createReactData());
|
|
1732
1737
|
XEUtils.assign(internalData, createInternalData());
|
|
1733
1738
|
});
|
|
1734
1739
|
provide('$xeSelect', $xeSelect);
|
|
@@ -4,8 +4,9 @@ import { getConfig, getIcon, createEvent, globalEvents, globalResize, useSize, r
|
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
5
|
import { toCssUnit, isScale, addClass, removeClass } from '../../ui/src/dom';
|
|
6
6
|
import { getGlobalDefaultConfig } from '../../ui/src/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import XEUtils from 'xe-utils';
|
|
9
|
+
const { warnLog, errLog } = createComponentLog('splitter');
|
|
9
10
|
export default defineVxeComponent({
|
|
10
11
|
name: 'VxeSplitter',
|
|
11
12
|
props: {
|
|
@@ -56,7 +57,8 @@ export default defineVxeComponent({
|
|
|
56
57
|
staticItems: [],
|
|
57
58
|
itemList: [],
|
|
58
59
|
barWidth: 0,
|
|
59
|
-
barHeight: 0
|
|
60
|
+
barHeight: 0,
|
|
61
|
+
resizeFlag: 0
|
|
60
62
|
});
|
|
61
63
|
const internalData = {
|
|
62
64
|
wrapperWidth: 0,
|
|
@@ -204,13 +206,13 @@ export default defineVxeComponent({
|
|
|
204
206
|
};
|
|
205
207
|
reactData.itemList = list.map(item => {
|
|
206
208
|
if (item.showAction) {
|
|
207
|
-
warnLog('vxe.error.removeProp', ['
|
|
209
|
+
warnLog('vxe.error.removeProp', ['show-action']);
|
|
208
210
|
}
|
|
209
211
|
if (item.slots) {
|
|
210
212
|
XEUtils.each(item.slots, (func) => {
|
|
211
213
|
if (!XEUtils.isFunction(func)) {
|
|
212
214
|
if (!slots[func]) {
|
|
213
|
-
errLog('vxe.error.notSlot', [
|
|
215
|
+
errLog('vxe.error.notSlot', [func]);
|
|
214
216
|
}
|
|
215
217
|
}
|
|
216
218
|
});
|
|
@@ -559,6 +561,7 @@ export default defineVxeComponent({
|
|
|
559
561
|
document.onmousemove = (evnt) => {
|
|
560
562
|
evnt.preventDefault();
|
|
561
563
|
handleDrag(evnt);
|
|
564
|
+
reactData.resizeFlag++;
|
|
562
565
|
};
|
|
563
566
|
document.onmouseup = (evnt) => {
|
|
564
567
|
document.onmousemove = null;
|
|
@@ -570,6 +573,7 @@ export default defineVxeComponent({
|
|
|
570
573
|
removeClass(el, 'is--drag');
|
|
571
574
|
dispatchEvent('resize-end', { prevItem, nextItem, offsetHeight: targetOffsetHeight, offsetWidth: targetOffsetWidth }, evnt);
|
|
572
575
|
recalculate();
|
|
576
|
+
reactData.resizeFlag++;
|
|
573
577
|
};
|
|
574
578
|
if (rsSplitterLineEl) {
|
|
575
579
|
rsSplitterLineEl.style.display = 'block';
|
|
@@ -624,6 +628,7 @@ export default defineVxeComponent({
|
|
|
624
628
|
dispatchEvent('toggle-expand', { prevItem, nextItem, expanded, item }, evnt);
|
|
625
629
|
}
|
|
626
630
|
recalculate();
|
|
631
|
+
reactData.resizeFlag++;
|
|
627
632
|
};
|
|
628
633
|
const handlePrevActionDblclickEvent = (evnt) => {
|
|
629
634
|
const { itemList } = reactData;
|
|
@@ -910,11 +915,11 @@ export default defineVxeComponent({
|
|
|
910
915
|
}
|
|
911
916
|
reactData.itemList = val || [];
|
|
912
917
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
913
|
-
errLog('vxe.error.modelConflicts', ['
|
|
918
|
+
errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel']);
|
|
914
919
|
}
|
|
915
920
|
reactData.itemList.forEach(item => {
|
|
916
921
|
if (item.showAction) {
|
|
917
|
-
warnLog('vxe.error.removeProp', ['
|
|
922
|
+
warnLog('vxe.error.removeProp', ['showAction']);
|
|
918
923
|
}
|
|
919
924
|
});
|
|
920
925
|
recalculate();
|
|
@@ -933,7 +938,7 @@ export default defineVxeComponent({
|
|
|
933
938
|
}
|
|
934
939
|
const actionOpts = computeActionOpts.value;
|
|
935
940
|
if (actionOpts.direction) {
|
|
936
|
-
errLog('vxe.error.delProp', ['
|
|
941
|
+
errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
|
|
937
942
|
}
|
|
938
943
|
globalEvents.on($xeSplitter, 'resize', handleGlobalResizeEvent);
|
|
939
944
|
});
|
|
@@ -5,11 +5,26 @@ import { VxeUI, getConfig, getIcon, globalEvents, getI18n, createEvent, useSize,
|
|
|
5
5
|
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom';
|
|
6
6
|
import { getOnName } from '../../ui/src/vn';
|
|
7
7
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
9
9
|
import VxeInputComponent from '../../input/src/input';
|
|
10
|
+
const { errLog } = createComponentLog('table-select');
|
|
10
11
|
export function getRowUniqueId() {
|
|
11
12
|
return XEUtils.uniqueId('row_');
|
|
12
13
|
}
|
|
14
|
+
function createReactData() {
|
|
15
|
+
return {
|
|
16
|
+
initialized: false,
|
|
17
|
+
tableColumns: [],
|
|
18
|
+
fullOptionList: [],
|
|
19
|
+
panelIndex: 0,
|
|
20
|
+
panelStyle: {},
|
|
21
|
+
panelPlacement: null,
|
|
22
|
+
triggerFocusPanel: false,
|
|
23
|
+
visiblePanel: false,
|
|
24
|
+
isAniVisible: false,
|
|
25
|
+
isActivated: false
|
|
26
|
+
};
|
|
27
|
+
}
|
|
13
28
|
function createInternalData() {
|
|
14
29
|
return {
|
|
15
30
|
// hpTimeout: undefined,
|
|
@@ -89,18 +104,7 @@ export default defineVxeComponent({
|
|
|
89
104
|
const refGridWrapper = ref();
|
|
90
105
|
const refOptionPanel = ref();
|
|
91
106
|
const refGrid = ref();
|
|
92
|
-
const reactData = reactive(
|
|
93
|
-
initialized: false,
|
|
94
|
-
tableColumns: [],
|
|
95
|
-
fullOptionList: [],
|
|
96
|
-
panelIndex: 0,
|
|
97
|
-
panelStyle: {},
|
|
98
|
-
panelPlacement: null,
|
|
99
|
-
triggerFocusPanel: false,
|
|
100
|
-
visiblePanel: false,
|
|
101
|
-
isAniVisible: false,
|
|
102
|
-
isActivated: false
|
|
103
|
-
});
|
|
107
|
+
const reactData = reactive(createReactData());
|
|
104
108
|
const internalData = createInternalData();
|
|
105
109
|
const refMaps = {
|
|
106
110
|
refElem
|
|
@@ -357,12 +361,12 @@ export default defineVxeComponent({
|
|
|
357
361
|
rowid = getRowUniqueId();
|
|
358
362
|
}
|
|
359
363
|
if (keyMaps[rowid]) {
|
|
360
|
-
errLog('vxe.error.repeatKey', [
|
|
364
|
+
errLog('vxe.error.repeatKey', [rowKeyField, rowid]);
|
|
361
365
|
}
|
|
362
366
|
keyMaps[rowid] = true;
|
|
363
367
|
const value = item[valueField];
|
|
364
368
|
if (rowMaps[value]) {
|
|
365
|
-
errLog('vxe.error.repeatKey', [
|
|
369
|
+
errLog('vxe.error.repeatKey', [valueField, value]);
|
|
366
370
|
}
|
|
367
371
|
rowMaps[value] = { item, index, items, parent: null, nodes: [] };
|
|
368
372
|
});
|
|
@@ -706,11 +710,12 @@ export default defineVxeComponent({
|
|
|
706
710
|
globalEvents.off($xeTableSelect, 'mousedown');
|
|
707
711
|
globalEvents.off($xeTableSelect, 'blur');
|
|
708
712
|
globalEvents.off($xeTableSelect, 'resize');
|
|
713
|
+
XEUtils.assign(reactData, createReactData());
|
|
709
714
|
XEUtils.assign(internalData, createInternalData());
|
|
710
715
|
});
|
|
711
716
|
nextTick(() => {
|
|
712
717
|
if (!VxeTableGridComponent) {
|
|
713
|
-
errLog('vxe.error.reqComp', ['
|
|
718
|
+
errLog('vxe.error.reqComp', ['vxe-grid']);
|
|
714
719
|
}
|
|
715
720
|
});
|
|
716
721
|
provide('$xeTableSelect', $xeTableSelect);
|
package/es/tabs/src/tabs.js
CHANGED
|
@@ -4,9 +4,10 @@ import { createEvent, getConfig, getIcon, globalEvents, permission, useSize, ren
|
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
5
|
import { toCssUnit, addClass, removeClass } from '../../ui/src/dom';
|
|
6
6
|
import { isEnableConf } from '../../ui/src/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import XEUtils from 'xe-utils';
|
|
9
9
|
import VxeLoadingComponent from '../../loading/src/loading';
|
|
10
|
+
const { warnLog, errLog } = createComponentLog('tabs');
|
|
10
11
|
const scrollbarOffsetSize = 20;
|
|
11
12
|
export default defineVxeComponent({
|
|
12
13
|
name: 'VxeTabs',
|
|
@@ -543,11 +544,11 @@ export default defineVxeComponent({
|
|
|
543
544
|
return handlePrevNext(true);
|
|
544
545
|
},
|
|
545
546
|
prevTab() {
|
|
546
|
-
warnLog('vxe.error.delFunc', ['
|
|
547
|
+
warnLog('vxe.error.delFunc', ['prevTab', 'prev']);
|
|
547
548
|
return tabsMethods.prev();
|
|
548
549
|
},
|
|
549
550
|
nextTab() {
|
|
550
|
-
warnLog('vxe.error.delFunc', ['
|
|
551
|
+
warnLog('vxe.error.delFunc', ['nextTab', 'next']);
|
|
551
552
|
return tabsMethods.next();
|
|
552
553
|
}
|
|
553
554
|
};
|
|
@@ -3,7 +3,8 @@ import { defineVxeComponent } from '../../ui/src/comp';
|
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { getConfig, getI18n, createEvent, useSize } from '../../ui';
|
|
5
5
|
import { getFuncText } from '../../ui/src/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
7
|
+
const { warnLog } = createComponentLog('textarea');
|
|
7
8
|
let autoTxtElem;
|
|
8
9
|
export default defineVxeComponent({
|
|
9
10
|
name: 'VxeTextarea',
|
package/es/tree/src/tree.js
CHANGED
|
@@ -2,7 +2,7 @@ import { ref, h, reactive, computed, watch, onBeforeUnmount, nextTick, onMounted
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import { VxeUI, createEvent, useSize, globalEvents, globalResize, renderEmptyElement } from '../../ui';
|
|
4
4
|
import { calcTreeLine, enNodeValue, deNodeValue } from './util';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
6
|
import { getCrossTreeDragNodeInfo } from './store';
|
|
7
7
|
import XEUtils from 'xe-utils';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -10,6 +10,7 @@ import { toCssUnit, isScale, getPaddingTopBottomSize, addClass, removeClass, get
|
|
|
10
10
|
import { isEnableConf } from '../../ui/src/utils';
|
|
11
11
|
import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime';
|
|
12
12
|
import VxeLoadingComponent from '../../loading';
|
|
13
|
+
const { errLog } = createComponentLog('tree');
|
|
13
14
|
const { menus, getConfig, getI18n, getIcon } = VxeUI;
|
|
14
15
|
/**
|
|
15
16
|
* 生成节点的唯一主键
|
|
@@ -719,7 +720,7 @@ export default defineVxeComponent({
|
|
|
719
720
|
handleData(true);
|
|
720
721
|
if (sYLoad) {
|
|
721
722
|
if (!(props.height || props.maxHeight)) {
|
|
722
|
-
errLog('vxe.error.reqProp', ['
|
|
723
|
+
errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config.enabled=false']);
|
|
723
724
|
}
|
|
724
725
|
}
|
|
725
726
|
return computeScrollLoad().then(() => {
|
|
@@ -4,12 +4,13 @@ import { getConfig, getI18n, getIcon, globalEvents, createEvent, useSize, render
|
|
|
4
4
|
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
import { deNodeValue } from '../../tree/src/util';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import XEUtils from 'xe-utils';
|
|
9
9
|
import VxeInputComponent from '../../input';
|
|
10
10
|
import VxeButtonComponent from '../../button';
|
|
11
11
|
import VxeTreeComponent from '../../tree';
|
|
12
12
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
13
|
+
const { warnLog, errLog } = createComponentLog('tree-select');
|
|
13
14
|
function getOptUniqueId() {
|
|
14
15
|
return XEUtils.uniqueId('node_');
|
|
15
16
|
}
|
package/es/ui/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VxeUI, setConfig, setIcon } from '@vxe-ui/core';
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
import { warnLog } from './src/log';
|
|
4
|
-
export const version = "4.15.
|
|
4
|
+
export const version = "4.15.3";
|
|
5
5
|
VxeUI.uiVersion = version;
|
|
6
6
|
VxeUI.dynamicApp = dynamicApp;
|
|
7
7
|
export function config(options) {
|