vxe-pc-ui 4.17.23 → 4.17.25
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 +185 -32
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/dynamics/index.js +28 -8
- package/es/icon/style.css +1 -1
- package/es/loading/index.js +4 -2
- package/es/number-input/src/number-input.js +61 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tooltip/index.js +56 -1
- package/es/tooltip/src/tooltip.js +15 -5
- package/es/ui/index.js +6 -1
- package/es/ui/src/log.js +1 -1
- package/es/watermark/index.js +3 -1
- package/lib/dynamics/index.js +22 -6
- package/lib/dynamics/index.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 +180 -16
- package/lib/index.umd.min.js +1 -1
- package/lib/loading/index.js +6 -2
- package/lib/loading/index.min.js +1 -1
- package/lib/number-input/src/number-input.js +69 -1
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tooltip/index.js +58 -1
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +13 -5
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/ui/index.js +6 -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/watermark/index.js +3 -1
- package/lib/watermark/index.min.js +1 -1
- package/package.json +1 -1
- package/packages/dynamics/index.ts +47 -19
- package/packages/loading/index.ts +4 -2
- package/packages/number-input/src/number-input.ts +67 -2
- package/packages/tooltip/index.ts +57 -1
- package/packages/tooltip/src/tooltip.ts +17 -6
- package/packages/ui/index.ts +5 -0
- package/packages/watermark/index.ts +3 -1
- package/types/components/loading.d.ts +2 -2
- package/types/components/number-input.d.ts +16 -0
- package/types/components/tooltip.d.ts +36 -2
- package/types/ui/index.d.ts +2 -0
- /package/es/icon/{iconfont.1788176078548.ttf → iconfont.1788311145245.ttf} +0 -0
- /package/es/icon/{iconfont.1788176078548.woff → iconfont.1788311145245.woff} +0 -0
- /package/es/icon/{iconfont.1788176078548.woff2 → iconfont.1788311145245.woff2} +0 -0
- /package/es/{iconfont.1788176078548.ttf → iconfont.1788311145245.ttf} +0 -0
- /package/es/{iconfont.1788176078548.woff → iconfont.1788311145245.woff} +0 -0
- /package/es/{iconfont.1788176078548.woff2 → iconfont.1788311145245.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1788176078548.ttf → iconfont.1788311145245.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1788176078548.woff → iconfont.1788311145245.woff} +0 -0
- /package/lib/icon/style/{iconfont.1788176078548.woff2 → iconfont.1788311145245.woff2} +0 -0
- /package/lib/{iconfont.1788176078548.ttf → iconfont.1788311145245.ttf} +0 -0
- /package/lib/{iconfont.1788176078548.woff → iconfont.1788311145245.woff} +0 -0
- /package/lib/{iconfont.1788176078548.woff2 → iconfont.1788311145245.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as core from '@vxe-ui/core';
|
|
2
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
|
-
import { defineComponent, reactive, h, createCommentVNode, createApp,
|
|
4
|
+
import { defineComponent, ref, reactive, h, createCommentVNode, createApp, inject, computed, watch, onMounted, onUnmounted, provide, nextTick, onBeforeUnmount, resolveComponent, Teleport, onActivated, onDeactivated, TransitionGroup } from 'vue';
|
|
5
5
|
import XEUtils from 'xe-utils';
|
|
6
6
|
import DomZIndex from 'dom-zindex';
|
|
7
7
|
|
|
8
8
|
const defineVxeComponent = defineComponent;
|
|
9
9
|
|
|
10
10
|
let dynamicContainerElem;
|
|
11
|
+
const refTooltip = ref();
|
|
11
12
|
const dynamicStore = reactive({
|
|
12
13
|
modals: [],
|
|
13
14
|
drawers: [],
|
|
14
15
|
globalLoading: null,
|
|
15
16
|
globalWatermark: null,
|
|
16
|
-
globalContextMenu: null
|
|
17
|
+
globalContextMenu: null,
|
|
18
|
+
globalTooltip: null,
|
|
19
|
+
isTipInit: false
|
|
17
20
|
});
|
|
18
21
|
/**
|
|
19
22
|
* 动态组件
|
|
@@ -25,13 +28,15 @@ const VxeDynamics = defineVxeComponent({
|
|
|
25
28
|
const VxeUILoadingComponent = VxeUI.getComponent('vxe-loading');
|
|
26
29
|
const VxeUIWatermarkComponent = VxeUI.getComponent('vxe-watermark');
|
|
27
30
|
const VxeUIContextMenuComponent = VxeUI.getComponent('vxe-context-menu');
|
|
31
|
+
const VxeUITooltipComponent = VxeUI.getComponent('vxe-tooltip');
|
|
28
32
|
return () => {
|
|
29
|
-
const { modals, drawers, globalWatermark, globalLoading, globalContextMenu } = dynamicStore;
|
|
33
|
+
const { modals, drawers, globalWatermark, globalLoading, globalContextMenu, globalTooltip } = dynamicStore;
|
|
30
34
|
let cmOpts = globalContextMenu;
|
|
31
35
|
if (globalContextMenu) {
|
|
32
36
|
const events = globalContextMenu.events || {};
|
|
33
37
|
const { optionClick, show, hide } = events;
|
|
34
38
|
cmOpts = Object.assign({}, globalContextMenu, {
|
|
39
|
+
key: 'cm',
|
|
35
40
|
onShow(params) {
|
|
36
41
|
if (show) {
|
|
37
42
|
show(params);
|
|
@@ -50,22 +55,37 @@ const VxeDynamics = defineVxeComponent({
|
|
|
50
55
|
}
|
|
51
56
|
}, { events: undefined });
|
|
52
57
|
}
|
|
58
|
+
let tpOpts = globalTooltip || {};
|
|
59
|
+
if (globalTooltip) {
|
|
60
|
+
tpOpts = Object.assign({}, globalTooltip, {
|
|
61
|
+
'onUpdate:modelValue'(value) {
|
|
62
|
+
globalTooltip.modelValue = value;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
53
66
|
return [
|
|
54
67
|
modals.length
|
|
55
68
|
? h('div', {
|
|
56
|
-
key:
|
|
69
|
+
key: 'ml',
|
|
57
70
|
class: 'vxe-dynamics--modal'
|
|
58
71
|
}, modals.map((item) => h(VxeUIModalComponent, item)))
|
|
59
72
|
: createCommentVNode(),
|
|
60
73
|
drawers.length
|
|
61
74
|
? h('div', {
|
|
62
|
-
key:
|
|
75
|
+
key: 'dr',
|
|
63
76
|
class: 'vxe-dynamics--drawer'
|
|
64
77
|
}, drawers.map((item) => h(VxeUIDrawerComponent, item)))
|
|
65
78
|
: createCommentVNode(),
|
|
66
|
-
globalWatermark
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
globalWatermark
|
|
80
|
+
? h(VxeUIWatermarkComponent, globalWatermark)
|
|
81
|
+
: createCommentVNode(),
|
|
82
|
+
globalLoading
|
|
83
|
+
? h(VxeUILoadingComponent, globalLoading)
|
|
84
|
+
: createCommentVNode(),
|
|
85
|
+
globalContextMenu ? h(VxeUIContextMenuComponent, cmOpts) : createCommentVNode(),
|
|
86
|
+
dynamicStore.isTipInit
|
|
87
|
+
? h(VxeUITooltipComponent, Object.assign({ ref: refTooltip }, tpOpts))
|
|
88
|
+
: createCommentVNode()
|
|
69
89
|
];
|
|
70
90
|
};
|
|
71
91
|
}
|
|
@@ -81,7 +101,7 @@ function checkDynamic() {
|
|
|
81
101
|
}
|
|
82
102
|
|
|
83
103
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.17.
|
|
104
|
+
const uiVersion = `ui v${"4.17.25"}`;
|
|
85
105
|
function createComponentLog(name) {
|
|
86
106
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
107
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -95,7 +115,7 @@ function createComponentLog(name) {
|
|
|
95
115
|
const warnLog$i = log.create('warn', uiVersion);
|
|
96
116
|
log.create('error', uiVersion);
|
|
97
117
|
|
|
98
|
-
const version = "4.17.
|
|
118
|
+
const version = "4.17.25";
|
|
99
119
|
VxeUI.uiVersion = version;
|
|
100
120
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
121
|
function config(options) {
|
|
@@ -389,6 +409,11 @@ setConfig$1({
|
|
|
389
409
|
showButton: true,
|
|
390
410
|
isWheel: true,
|
|
391
411
|
isArrow: true
|
|
412
|
+
},
|
|
413
|
+
tooltipConfig: {
|
|
414
|
+
minWidth: 60,
|
|
415
|
+
enterable: true,
|
|
416
|
+
enterDelay: 0
|
|
392
417
|
}
|
|
393
418
|
},
|
|
394
419
|
optgroup: {},
|
|
@@ -2667,7 +2692,7 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2667
2692
|
type: String,
|
|
2668
2693
|
default: () => getConfig$3().tooltip.size || getConfig$3().size
|
|
2669
2694
|
},
|
|
2670
|
-
selector: String,
|
|
2695
|
+
selector: [String, Element],
|
|
2671
2696
|
trigger: {
|
|
2672
2697
|
type: String,
|
|
2673
2698
|
default: () => getConfig$3().tooltip.trigger || 'hover'
|
|
@@ -2745,7 +2770,9 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2745
2770
|
}
|
|
2746
2771
|
},
|
|
2747
2772
|
emits: [
|
|
2748
|
-
'update:modelValue'
|
|
2773
|
+
'update:modelValue',
|
|
2774
|
+
'show',
|
|
2775
|
+
'hide'
|
|
2749
2776
|
],
|
|
2750
2777
|
setup(props, context) {
|
|
2751
2778
|
const { slots, emit } = context;
|
|
@@ -2900,9 +2927,12 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2900
2927
|
if (showDelayTip) {
|
|
2901
2928
|
showDelayTip();
|
|
2902
2929
|
}
|
|
2930
|
+
dispatchEvent('show', {}, evnt || null);
|
|
2903
2931
|
}
|
|
2904
2932
|
else {
|
|
2905
|
-
|
|
2933
|
+
const rest = showTip();
|
|
2934
|
+
dispatchEvent('show', {}, evnt || null);
|
|
2935
|
+
return rest;
|
|
2906
2936
|
}
|
|
2907
2937
|
}
|
|
2908
2938
|
return nextTick();
|
|
@@ -2951,6 +2981,7 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2951
2981
|
defaultLeft: left,
|
|
2952
2982
|
placement: placement,
|
|
2953
2983
|
defaultPlacement: defaultPlacement,
|
|
2984
|
+
isMinWidth: false,
|
|
2954
2985
|
teleportTo: true
|
|
2955
2986
|
});
|
|
2956
2987
|
const panelStyle = Object.assign(ppObj.style, {
|
|
@@ -2958,7 +2989,7 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2958
2989
|
});
|
|
2959
2990
|
tipStore.placement = ppObj.placement;
|
|
2960
2991
|
tipStore.style = panelStyle;
|
|
2961
|
-
tipStore.arrowStyle.left = `${ppObj.arrowLeft}px
|
|
2992
|
+
tipStore.arrowStyle.left = ppObj.arrowLeft ? `${ppObj.arrowLeft}px` : '';
|
|
2962
2993
|
};
|
|
2963
2994
|
const tooltipMethods = {
|
|
2964
2995
|
dispatchEvent,
|
|
@@ -2978,6 +3009,7 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2978
3009
|
arrowStyle: null
|
|
2979
3010
|
});
|
|
2980
3011
|
updateValue(false);
|
|
3012
|
+
dispatchEvent('hide', {}, null);
|
|
2981
3013
|
return nextTick();
|
|
2982
3014
|
},
|
|
2983
3015
|
toVisible(target, content) {
|
|
@@ -2997,7 +3029,10 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2997
3029
|
const wheelEvent = (evnt) => {
|
|
2998
3030
|
evnt.stopPropagation();
|
|
2999
3031
|
};
|
|
3000
|
-
|
|
3032
|
+
const tooltipPrivateMethods = {
|
|
3033
|
+
handleCloseEvent: targetMouseleaveEvent
|
|
3034
|
+
};
|
|
3035
|
+
Object.assign($xeTooltip, tooltipMethods, tooltipPrivateMethods);
|
|
3001
3036
|
const renderContent = () => {
|
|
3002
3037
|
const { useHtml, useHTML } = props;
|
|
3003
3038
|
const { tipContent } = reactData;
|
|
@@ -3153,8 +3188,63 @@ const VxeTooltip = Object.assign({}, VxeTooltipComponent, {
|
|
|
3153
3188
|
app.component(VxeTooltipComponent.name, VxeTooltipComponent);
|
|
3154
3189
|
}
|
|
3155
3190
|
});
|
|
3191
|
+
const TooltipController = {
|
|
3192
|
+
open(target, options) {
|
|
3193
|
+
const opts = Object.assign({}, options, {
|
|
3194
|
+
key: 'tip',
|
|
3195
|
+
modelValue: true,
|
|
3196
|
+
trigger: 'hover',
|
|
3197
|
+
selector: target,
|
|
3198
|
+
appendTo: null
|
|
3199
|
+
});
|
|
3200
|
+
const $tooltip = refTooltip.value;
|
|
3201
|
+
dynamicStore.globalTooltip = opts;
|
|
3202
|
+
if ($tooltip) {
|
|
3203
|
+
$tooltip.open(target, opts.content);
|
|
3204
|
+
}
|
|
3205
|
+
else {
|
|
3206
|
+
dynamicStore.isTipInit = true;
|
|
3207
|
+
checkDynamic();
|
|
3208
|
+
}
|
|
3209
|
+
return Promise.resolve();
|
|
3210
|
+
},
|
|
3211
|
+
close() {
|
|
3212
|
+
const { globalTooltip } = dynamicStore;
|
|
3213
|
+
if (!globalTooltip || !globalTooltip.modelValue) {
|
|
3214
|
+
return Promise.resolve();
|
|
3215
|
+
}
|
|
3216
|
+
const $tooltip = refTooltip.value;
|
|
3217
|
+
if ($tooltip) {
|
|
3218
|
+
$tooltip.handleCloseEvent();
|
|
3219
|
+
}
|
|
3220
|
+
else {
|
|
3221
|
+
if (globalTooltip) {
|
|
3222
|
+
globalTooltip.modelValue = false;
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
return Promise.resolve();
|
|
3226
|
+
},
|
|
3227
|
+
destroy() {
|
|
3228
|
+
const { globalTooltip } = dynamicStore;
|
|
3229
|
+
if (!globalTooltip || !globalTooltip.modelValue) {
|
|
3230
|
+
return Promise.resolve();
|
|
3231
|
+
}
|
|
3232
|
+
const $tooltip = refTooltip.value;
|
|
3233
|
+
if ($tooltip) {
|
|
3234
|
+
return $tooltip.close().then(() => {
|
|
3235
|
+
dynamicStore.globalTooltip = null;
|
|
3236
|
+
dynamicStore.isTipInit = false;
|
|
3237
|
+
});
|
|
3238
|
+
}
|
|
3239
|
+
if (globalTooltip) {
|
|
3240
|
+
globalTooltip.modelValue = false;
|
|
3241
|
+
}
|
|
3242
|
+
return Promise.resolve();
|
|
3243
|
+
}
|
|
3244
|
+
};
|
|
3156
3245
|
dynamicApp.use(VxeTooltip);
|
|
3157
3246
|
VxeUI.component(VxeTooltipComponent);
|
|
3247
|
+
VxeUI.tooltip = TooltipController;
|
|
3158
3248
|
const Tooltip = VxeTooltip;
|
|
3159
3249
|
|
|
3160
3250
|
const { warnLog: warnLog$h } = createComponentLog('button');
|
|
@@ -3904,7 +3994,7 @@ dynamicApp.use(VxeButton);
|
|
|
3904
3994
|
VxeUI.component(VxeButtonComponent);
|
|
3905
3995
|
const Button = VxeButton;
|
|
3906
3996
|
|
|
3907
|
-
const { errLog: errLog$
|
|
3997
|
+
const { errLog: errLog$k } = createComponentLog('backtop');
|
|
3908
3998
|
function createInternalData$l() {
|
|
3909
3999
|
return {
|
|
3910
4000
|
targetEl: null
|
|
@@ -4082,7 +4172,7 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
4082
4172
|
const { target } = props;
|
|
4083
4173
|
if (!target) {
|
|
4084
4174
|
removeScrollEvent();
|
|
4085
|
-
errLog$
|
|
4175
|
+
errLog$k('vxe.error.reqProp', ['target']);
|
|
4086
4176
|
return;
|
|
4087
4177
|
}
|
|
4088
4178
|
if (XEUtils.isString(target)) {
|
|
@@ -4823,7 +4913,7 @@ const getNextMonth = (date) => {
|
|
|
4823
4913
|
return date;
|
|
4824
4914
|
};
|
|
4825
4915
|
|
|
4826
|
-
const { errLog: errLog$
|
|
4916
|
+
const { errLog: errLog$j } = createComponentLog('calendar');
|
|
4827
4917
|
const { menus: menus$2, getConfig: getConfig$2, getI18n: getI18n$1 } = VxeUI;
|
|
4828
4918
|
var VxeCalendarComponent = defineVxeComponent({
|
|
4829
4919
|
name: 'VxeCalendar',
|
|
@@ -6091,7 +6181,7 @@ var VxeCalendarComponent = defineVxeComponent({
|
|
|
6091
6181
|
const { menuConfig } = props;
|
|
6092
6182
|
const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
|
|
6093
6183
|
if (menuConfig && !VxeUIContextMenu) {
|
|
6094
|
-
errLog$
|
|
6184
|
+
errLog$j('vxe.error.reqComp', ['vxe-context-menu']);
|
|
6095
6185
|
}
|
|
6096
6186
|
dateOpenPanel();
|
|
6097
6187
|
});
|
|
@@ -6913,7 +7003,7 @@ function getItemCacheObj$1(item) {
|
|
|
6913
7003
|
};
|
|
6914
7004
|
}
|
|
6915
7005
|
|
|
6916
|
-
const { warnLog: warnLog$g, errLog: errLog$
|
|
7006
|
+
const { warnLog: warnLog$g, errLog: errLog$i } = createComponentLog('tree');
|
|
6917
7007
|
function getRowKeyByField(row, keyField) {
|
|
6918
7008
|
return row ? ('' + (row[keyField] || '')) : '';
|
|
6919
7009
|
}
|
|
@@ -8168,7 +8258,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8168
8258
|
const { fullData, rowMaps, removeRowMaps, insertRowMaps } = internalData;
|
|
8169
8259
|
const keyField = computeKeyField.value;
|
|
8170
8260
|
if (!keyField) {
|
|
8171
|
-
errLog$
|
|
8261
|
+
errLog$i('vxe.error.reqSupportProp', ['insert() | insertAt() | insertNextAt()', 'row-config.keyField']);
|
|
8172
8262
|
return Promise.resolve({ row: null, rows: [] });
|
|
8173
8263
|
}
|
|
8174
8264
|
if (!XEUtils.isArray(records)) {
|
|
@@ -8355,7 +8445,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8355
8445
|
const { fullData, insertRowMaps, removeRowMaps } = internalData;
|
|
8356
8446
|
const keyField = computeKeyField.value;
|
|
8357
8447
|
if (!keyField) {
|
|
8358
|
-
errLog$
|
|
8448
|
+
errLog$i('vxe.error.reqSupportProp', ['insert() | insertAt() | insertNextAt()', 'row-config.keyField']);
|
|
8359
8449
|
return Promise.resolve({ row: null, rows: [] });
|
|
8360
8450
|
}
|
|
8361
8451
|
let delList = [];
|
|
@@ -8965,20 +9055,20 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8965
9055
|
const keyField = computeKeyField.value;
|
|
8966
9056
|
if (!keyField) {
|
|
8967
9057
|
if (showSeq) {
|
|
8968
|
-
errLog$
|
|
9058
|
+
errLog$i('vxe.error.reqSupportProp', ['show-seq', 'row-config.keyField']);
|
|
8969
9059
|
}
|
|
8970
9060
|
if (showRadio) {
|
|
8971
|
-
errLog$
|
|
9061
|
+
errLog$i('vxe.error.reqSupportProp', ['show-radio', 'row-config.keyField']);
|
|
8972
9062
|
}
|
|
8973
9063
|
if (showCheckbox) {
|
|
8974
|
-
errLog$
|
|
9064
|
+
errLog$i('vxe.error.reqSupportProp', ['show-checkbox', 'row-config.keyField']);
|
|
8975
9065
|
}
|
|
8976
9066
|
if (isDrag) {
|
|
8977
|
-
errLog$
|
|
9067
|
+
errLog$i('vxe.error.reqSupportProp', ['drag-config', 'row-config.keyField']);
|
|
8978
9068
|
}
|
|
8979
9069
|
}
|
|
8980
9070
|
if (useKey && !keyField) {
|
|
8981
|
-
errLog$
|
|
9071
|
+
errLog$i('vxe.error.reqSupportProp', ['row-config.useKey', 'row-config.keyField']);
|
|
8982
9072
|
}
|
|
8983
9073
|
if (props.autoResize) {
|
|
8984
9074
|
const el = refElem.value;
|
|
@@ -15167,6 +15257,7 @@ function hexToRgb(str) {
|
|
|
15167
15257
|
return null;
|
|
15168
15258
|
}
|
|
15169
15259
|
|
|
15260
|
+
const { errLog: errLog$h } = createComponentLog('number-input');
|
|
15170
15261
|
var VxeNumberInputComponent = defineVxeComponent({
|
|
15171
15262
|
name: 'VxeNumberInput',
|
|
15172
15263
|
props: {
|
|
@@ -15266,6 +15357,11 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15266
15357
|
prefixConfig: Object,
|
|
15267
15358
|
suffixIcon: String,
|
|
15268
15359
|
suffixConfig: Object,
|
|
15360
|
+
showTooltip: {
|
|
15361
|
+
type: Boolean,
|
|
15362
|
+
default: () => getConfig$3().numberInput.showTooltip
|
|
15363
|
+
},
|
|
15364
|
+
tooltipConfig: Object,
|
|
15269
15365
|
// 已废弃
|
|
15270
15366
|
controls: {
|
|
15271
15367
|
type: Boolean,
|
|
@@ -15358,6 +15454,9 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15358
15454
|
const computeSuffixOpts = computed(() => {
|
|
15359
15455
|
return Object.assign({}, getConfig$3().numberInput.suffixConfig, props.suffixConfig);
|
|
15360
15456
|
});
|
|
15457
|
+
const computeTooltipOpts = computed(() => {
|
|
15458
|
+
return Object.assign({}, getConfig$3().numberInput.tooltipConfig, props.tooltipConfig);
|
|
15459
|
+
});
|
|
15361
15460
|
const computeDecimalsType = computed(() => {
|
|
15362
15461
|
const { type } = props;
|
|
15363
15462
|
return type === 'float' || type === 'amount';
|
|
@@ -15575,6 +15674,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15575
15674
|
reactData.inputValue = eqEmptyValue(inputValue) ? '' : `${XEUtils.toNumber(inputValue)}`;
|
|
15576
15675
|
reactData.isFocus = true;
|
|
15577
15676
|
reactData.isActivated = true;
|
|
15677
|
+
handleShowTip();
|
|
15578
15678
|
triggerEvent(evnt);
|
|
15579
15679
|
}
|
|
15580
15680
|
};
|
|
@@ -15590,6 +15690,9 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15590
15690
|
handleChange(null, '', evnt);
|
|
15591
15691
|
dispatchEvent('clear', { value }, evnt);
|
|
15592
15692
|
dispatchEvent('lazy-change', { value }, evnt);
|
|
15693
|
+
nextTick(() => {
|
|
15694
|
+
handleShowTip();
|
|
15695
|
+
});
|
|
15593
15696
|
};
|
|
15594
15697
|
const clickSuffixEvent = (evnt) => {
|
|
15595
15698
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -15710,6 +15813,14 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15710
15813
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
15711
15814
|
}
|
|
15712
15815
|
};
|
|
15816
|
+
const mouseleaveEvent = () => {
|
|
15817
|
+
const { showTooltip } = props;
|
|
15818
|
+
if (showTooltip) {
|
|
15819
|
+
if (VxeUI.tooltip) {
|
|
15820
|
+
VxeUI.tooltip.close();
|
|
15821
|
+
}
|
|
15822
|
+
}
|
|
15823
|
+
};
|
|
15713
15824
|
// 数值
|
|
15714
15825
|
const numberChange = (isPlus, evnt) => {
|
|
15715
15826
|
const { min, max, type } = props;
|
|
@@ -15737,6 +15848,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15737
15848
|
numberChange(true, evnt);
|
|
15738
15849
|
}
|
|
15739
15850
|
reactData.isActivated = true;
|
|
15851
|
+
handleShowTip();
|
|
15740
15852
|
dispatchEvent('plus-number', { value: reactData.inputValue }, evnt);
|
|
15741
15853
|
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
15742
15854
|
// 已废弃
|
|
@@ -15750,6 +15862,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15750
15862
|
numberChange(false, evnt);
|
|
15751
15863
|
}
|
|
15752
15864
|
reactData.isActivated = true;
|
|
15865
|
+
handleShowTip();
|
|
15753
15866
|
dispatchEvent('minus-number', { value: reactData.inputValue }, evnt);
|
|
15754
15867
|
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
15755
15868
|
// 已废弃
|
|
@@ -15768,6 +15881,33 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15768
15881
|
}
|
|
15769
15882
|
}
|
|
15770
15883
|
};
|
|
15884
|
+
const handleShowTip = () => {
|
|
15885
|
+
const { showTooltip } = props;
|
|
15886
|
+
const { inputValue } = reactData;
|
|
15887
|
+
if (showTooltip) {
|
|
15888
|
+
if (VxeUI.tooltip) {
|
|
15889
|
+
const numLabel = computeNumLabel.value;
|
|
15890
|
+
const tooltipOpts = computeTooltipOpts.value;
|
|
15891
|
+
const { contentMethod } = tooltipOpts;
|
|
15892
|
+
const inputElem = refInputTarget.value;
|
|
15893
|
+
const content = getText(contentMethod
|
|
15894
|
+
? contentMethod({
|
|
15895
|
+
inputValue: inputElem.value,
|
|
15896
|
+
value: inputValue || '',
|
|
15897
|
+
label: numLabel
|
|
15898
|
+
})
|
|
15899
|
+
: numLabel);
|
|
15900
|
+
if (content) {
|
|
15901
|
+
VxeUI.tooltip.open(inputElem, Object.assign({}, Object.assign(Object.assign({}, tooltipOpts), { content }), {
|
|
15902
|
+
contentMethod: undefined
|
|
15903
|
+
}));
|
|
15904
|
+
}
|
|
15905
|
+
else {
|
|
15906
|
+
VxeUI.tooltip.close();
|
|
15907
|
+
}
|
|
15908
|
+
}
|
|
15909
|
+
}
|
|
15910
|
+
};
|
|
15771
15911
|
const keydownEvent = (evnt) => {
|
|
15772
15912
|
const { type, negative, exponential, controls } = props;
|
|
15773
15913
|
const controlOpts = computeControlOpts.value;
|
|
@@ -15802,6 +15942,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15802
15942
|
triggerEvent(evnt);
|
|
15803
15943
|
};
|
|
15804
15944
|
const keyupEvent = (evnt) => {
|
|
15945
|
+
handleShowTip();
|
|
15805
15946
|
triggerEvent(evnt);
|
|
15806
15947
|
};
|
|
15807
15948
|
// 数值
|
|
@@ -15896,6 +16037,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15896
16037
|
triggerEvent(evnt);
|
|
15897
16038
|
};
|
|
15898
16039
|
const clickEvent = (evnt) => {
|
|
16040
|
+
handleShowTip();
|
|
15899
16041
|
triggerEvent(evnt);
|
|
15900
16042
|
};
|
|
15901
16043
|
// 全局事件
|
|
@@ -16175,7 +16317,8 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
16175
16317
|
'is--active': isActivated,
|
|
16176
16318
|
'show--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
|
|
16177
16319
|
}],
|
|
16178
|
-
spellcheck: false
|
|
16320
|
+
spellcheck: false,
|
|
16321
|
+
onMouseleave: mouseleaveEvent
|
|
16179
16322
|
}, isControls
|
|
16180
16323
|
? (layout === 'right'
|
|
16181
16324
|
? [
|
|
@@ -16215,6 +16358,11 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
16215
16358
|
initValue();
|
|
16216
16359
|
});
|
|
16217
16360
|
onMounted(() => {
|
|
16361
|
+
if (props.showTooltip) {
|
|
16362
|
+
if (!VxeUI.tooltip) {
|
|
16363
|
+
errLog$h('vxe.error.reqComp', ['vxe-tooltip']);
|
|
16364
|
+
}
|
|
16365
|
+
}
|
|
16218
16366
|
updateModel(props.modelValue);
|
|
16219
16367
|
const targetElem = refInputTarget.value;
|
|
16220
16368
|
if (targetElem) {
|
|
@@ -23391,15 +23539,17 @@ const VxeLoading = Object.assign({}, VxeLoadingComponent, {
|
|
|
23391
23539
|
const LoadingController = {
|
|
23392
23540
|
open(options) {
|
|
23393
23541
|
const opts = Object.assign({}, options);
|
|
23394
|
-
dynamicStore.globalLoading = {
|
|
23542
|
+
dynamicStore.globalLoading = Object.assign({
|
|
23395
23543
|
modelValue: true,
|
|
23396
23544
|
text: opts.text,
|
|
23397
23545
|
icon: opts.icon
|
|
23398
|
-
};
|
|
23546
|
+
}, { key: 'gl' });
|
|
23399
23547
|
checkDynamic();
|
|
23548
|
+
return Promise.resolve();
|
|
23400
23549
|
},
|
|
23401
23550
|
close() {
|
|
23402
23551
|
dynamicStore.globalLoading = null;
|
|
23552
|
+
return Promise.resolve();
|
|
23403
23553
|
}
|
|
23404
23554
|
};
|
|
23405
23555
|
dynamicApp.use(VxeLoading);
|
|
@@ -48342,7 +48492,9 @@ VxeUI.component(VxeWatermarkComponent);
|
|
|
48342
48492
|
const WatermarkController = {
|
|
48343
48493
|
load(options) {
|
|
48344
48494
|
checkDynamic();
|
|
48345
|
-
dynamicStore.globalWatermark = Object.assign({}, options
|
|
48495
|
+
dynamicStore.globalWatermark = Object.assign({}, options, {
|
|
48496
|
+
key: 'gw'
|
|
48497
|
+
});
|
|
48346
48498
|
return Promise.resolve();
|
|
48347
48499
|
},
|
|
48348
48500
|
clear() {
|
|
@@ -48586,6 +48738,7 @@ var VxeUIExport = /*#__PURE__*/Object.freeze({
|
|
|
48586
48738
|
Tip: Tip,
|
|
48587
48739
|
Tips: Tips,
|
|
48588
48740
|
Tooltip: Tooltip,
|
|
48741
|
+
TooltipController: TooltipController,
|
|
48589
48742
|
Tour: Tour,
|
|
48590
48743
|
Transfer: Transfer,
|
|
48591
48744
|
Tree: Tree,
|
|
@@ -48698,4 +48851,4 @@ var VxeUIExport = /*#__PURE__*/Object.freeze({
|
|
|
48698
48851
|
watermark: watermark
|
|
48699
48852
|
});
|
|
48700
48853
|
|
|
48701
|
-
export { Alert, Anchor, AnchorLink, Avatar, Backtop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, CheckboxGroup, Col, Collapse, CollapsePane, ColorPicker, ContextMenu, ContextMenuController, Countdown, DatePanel, DatePicker, DateRangePicker, Drawer, DrawerController, Empty, Form, FormGather, FormGroup, FormItem, Icon, IconPicker, Image$1 as Image, ImageGroup, ImagePreview, Input, LayoutAside, LayoutBody, LayoutContainer, LayoutFooter, LayoutHeader, Link, List, Loading, LoadingController, Menu, Modal, ModalController, NoticeBar, NumberInput, Optgroup, Option, Pager, PasswordInput, Print, PrintPageBreak, Pulldown, Radio, RadioButton, RadioGroup, Rate, Result, Row, Segmented, Select, Slider, Space, Split, SplitPane, Splitter, SplitterPanel, Steps, Switch, TabPane, TableSelect, TableTransfer, Tabs, Tag, Text, TextEllipsis, Textarea, Timeline, TimelineItem, Tip, Tips, Tooltip, Tour, Transfer, Tree, TreeSelect, Upload, VxeAlert, VxeAnchor, VxeAnchorLink, VxeAvatar, VxeBacktop, VxeBadge, VxeBreadcrumb, VxeBreadcrumbItem, VxeButton, VxeButtonGroup, VxeCalendar, VxeCard, VxeCarousel, VxeCarouselItem, VxeCascader, VxeCheckbox, VxeCheckboxButton, VxeCheckboxGroup, VxeCol, VxeCollapse, VxeCollapsePane, VxeColorPicker, VxeContextMenu, VxeCountdown, VxeDatePanel, VxeDatePicker, VxeDateRangePicker, VxeDrawer, VxeEmpty, VxeForm, VxeFormGather, VxeFormGroup, VxeFormItem, VxeIcon, VxeIconPicker, VxeImage, VxeImageGroup, VxeImagePreview, VxeInput, VxeLayoutAside, VxeLayoutBody, VxeLayoutContainer, VxeLayoutFooter, VxeLayoutHeader, VxeLink, VxeList, VxeLoading, VxeMenu, VxeModal, VxeNoticeBar, VxeNumberInput, VxeOptgroup, VxeOption, VxePager, VxePasswordInput, VxePrint, VxePrintPageBreak, VxePulldown, VxeRadio, VxeRadioButton, VxeRadioGroup, VxeRate, VxeResult, VxeRow, VxeSegmented, VxeSelect, VxeSlider, VxeSpace, VxeSplit, VxeSplitPane, VxeSplitter, VxeSplitterPanel, VxeSteps, VxeSwitch, VxeTabPane, VxeTableSelect, VxeTableTransfer, VxeTabs, VxeTag, VxeText, VxeTextEllipsis, VxeTextarea, VxeTimeline, VxeTimelineItem, VxeTip, VxeTooltip, VxeTour, VxeTransfer, VxeTree, VxeTreeSelect, VxeUpload, VxeWatermark, Watermark, WatermarkController, config, VxeUIExport as default, drawer, install, loading, modal, print, readFile, saveFile, setup, version, watermark };
|
|
48854
|
+
export { Alert, Anchor, AnchorLink, Avatar, Backtop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, CheckboxGroup, Col, Collapse, CollapsePane, ColorPicker, ContextMenu, ContextMenuController, Countdown, DatePanel, DatePicker, DateRangePicker, Drawer, DrawerController, Empty, Form, FormGather, FormGroup, FormItem, Icon, IconPicker, Image$1 as Image, ImageGroup, ImagePreview, Input, LayoutAside, LayoutBody, LayoutContainer, LayoutFooter, LayoutHeader, Link, List, Loading, LoadingController, Menu, Modal, ModalController, NoticeBar, NumberInput, Optgroup, Option, Pager, PasswordInput, Print, PrintPageBreak, Pulldown, Radio, RadioButton, RadioGroup, Rate, Result, Row, Segmented, Select, Slider, Space, Split, SplitPane, Splitter, SplitterPanel, Steps, Switch, TabPane, TableSelect, TableTransfer, Tabs, Tag, Text, TextEllipsis, Textarea, Timeline, TimelineItem, Tip, Tips, Tooltip, TooltipController, Tour, Transfer, Tree, TreeSelect, Upload, VxeAlert, VxeAnchor, VxeAnchorLink, VxeAvatar, VxeBacktop, VxeBadge, VxeBreadcrumb, VxeBreadcrumbItem, VxeButton, VxeButtonGroup, VxeCalendar, VxeCard, VxeCarousel, VxeCarouselItem, VxeCascader, VxeCheckbox, VxeCheckboxButton, VxeCheckboxGroup, VxeCol, VxeCollapse, VxeCollapsePane, VxeColorPicker, VxeContextMenu, VxeCountdown, VxeDatePanel, VxeDatePicker, VxeDateRangePicker, VxeDrawer, VxeEmpty, VxeForm, VxeFormGather, VxeFormGroup, VxeFormItem, VxeIcon, VxeIconPicker, VxeImage, VxeImageGroup, VxeImagePreview, VxeInput, VxeLayoutAside, VxeLayoutBody, VxeLayoutContainer, VxeLayoutFooter, VxeLayoutHeader, VxeLink, VxeList, VxeLoading, VxeMenu, VxeModal, VxeNoticeBar, VxeNumberInput, VxeOptgroup, VxeOption, VxePager, VxePasswordInput, VxePrint, VxePrintPageBreak, VxePulldown, VxeRadio, VxeRadioButton, VxeRadioGroup, VxeRate, VxeResult, VxeRow, VxeSegmented, VxeSelect, VxeSlider, VxeSpace, VxeSplit, VxeSplitPane, VxeSplitter, VxeSplitterPanel, VxeSteps, VxeSwitch, VxeTabPane, VxeTableSelect, VxeTableTransfer, VxeTabs, VxeTag, VxeText, VxeTextEllipsis, VxeTextarea, VxeTimeline, VxeTimelineItem, VxeTip, VxeTooltip, VxeTour, VxeTransfer, VxeTree, VxeTreeSelect, VxeUpload, VxeWatermark, Watermark, WatermarkController, config, VxeUIExport as default, drawer, install, loading, modal, print, readFile, saveFile, setup, version, watermark };
|