vxe-pc-ui 4.17.25 → 4.17.27
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 +134 -57
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/input/src/input.js +12 -8
- package/es/input/style.css +13 -2
- package/es/input/style.min.css +1 -1
- package/es/modal/src/modal.js +56 -14
- package/es/modal/style.css +22 -5
- package/es/modal/style.min.css +1 -1
- package/es/number-input/src/number-input.js +29 -19
- package/es/number-input/style.css +13 -3
- package/es/number-input/style.min.css +1 -1
- package/es/password-input/src/password-input.js +13 -9
- package/es/password-input/style.css +13 -2
- package/es/password-input/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tooltip/src/tooltip.js +15 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-input/style.css +13 -2
- package/es/vxe-input/style.min.css +1 -1
- package/es/vxe-modal/style.css +22 -5
- package/es/vxe-modal/style.min.css +1 -1
- package/es/vxe-number-input/style.css +13 -3
- package/es/vxe-number-input/style.min.css +1 -1
- package/es/vxe-password-input/style.css +13 -2
- package/es/vxe-password-input/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +136 -49
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +9 -4
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +13 -2
- package/lib/input/style/style.min.css +1 -1
- package/lib/modal/src/modal.js +65 -21
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +22 -5
- package/lib/modal/style/style.min.css +1 -1
- package/lib/number-input/src/number-input.js +29 -13
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/number-input/style/style.css +13 -3
- package/lib/number-input/style/style.min.css +1 -1
- package/lib/password-input/src/password-input.js +9 -4
- package/lib/password-input/src/password-input.min.js +1 -1
- package/lib/password-input/style/style.css +13 -2
- package/lib/password-input/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tooltip/src/tooltip.js +13 -3
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +10 -2
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-input/style/style.css +13 -2
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-modal/style/style.css +22 -5
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-number-input/style/style.css +13 -3
- package/lib/vxe-number-input/style/style.min.css +1 -1
- package/lib/vxe-password-input/style/style.css +13 -2
- package/lib/vxe-password-input/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/input/src/input.ts +12 -8
- package/packages/modal/src/modal.ts +56 -14
- package/packages/number-input/src/number-input.ts +31 -19
- package/packages/password-input/src/password-input.ts +13 -9
- package/packages/tooltip/src/tooltip.ts +17 -6
- package/packages/ui/src/dom.ts +10 -2
- package/styles/components/input.scss +20 -2
- package/styles/components/modal.scss +36 -5
- package/styles/components/number-input.scss +20 -3
- package/styles/components/password-input.scss +20 -2
- package/types/components/input.d.ts +2 -0
- package/types/components/modal.d.ts +5 -0
- package/types/components/number-input.d.ts +6 -2
- package/types/components/password-input.d.ts +3 -1
- /package/es/icon/{iconfont.1788311145245.ttf → iconfont.1788342346304.ttf} +0 -0
- /package/es/icon/{iconfont.1788311145245.woff → iconfont.1788342346304.woff} +0 -0
- /package/es/icon/{iconfont.1788311145245.woff2 → iconfont.1788342346304.woff2} +0 -0
- /package/es/{iconfont.1788311145245.ttf → iconfont.1788342346304.ttf} +0 -0
- /package/es/{iconfont.1788311145245.woff → iconfont.1788342346304.woff} +0 -0
- /package/es/{iconfont.1788311145245.woff2 → iconfont.1788342346304.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1788311145245.ttf → iconfont.1788342346304.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1788311145245.woff → iconfont.1788342346304.woff} +0 -0
- /package/lib/icon/style/{iconfont.1788311145245.woff2 → iconfont.1788342346304.woff2} +0 -0
- /package/lib/{iconfont.1788311145245.ttf → iconfont.1788342346304.ttf} +0 -0
- /package/lib/{iconfont.1788311145245.woff → iconfont.1788342346304.woff} +0 -0
- /package/lib/{iconfont.1788311145245.woff2 → iconfont.1788342346304.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,
|
|
2
|
+
import { VxeUI, setConfig as setConfig$1, setIcon, getConfig as getConfig$3, createEvent, getIcon as getIcon$2, renderEmptyElement, useSize, globalEvents, usePermission, permission, 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, 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';
|
|
@@ -101,7 +101,7 @@ function checkDynamic() {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
const { log } = VxeUI;
|
|
104
|
-
const uiVersion = `ui v${"4.17.
|
|
104
|
+
const uiVersion = `ui v${"4.17.27"}`;
|
|
105
105
|
function createComponentLog(name) {
|
|
106
106
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
107
107
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -115,7 +115,7 @@ function createComponentLog(name) {
|
|
|
115
115
|
const warnLog$i = log.create('warn', uiVersion);
|
|
116
116
|
log.create('error', uiVersion);
|
|
117
117
|
|
|
118
|
-
const version = "4.17.
|
|
118
|
+
const version = "4.17.27";
|
|
119
119
|
VxeUI.uiVersion = version;
|
|
120
120
|
VxeUI.dynamicApp = dynamicApp;
|
|
121
121
|
function config(options) {
|
|
@@ -2014,8 +2014,7 @@ function updatePanelPlacement(targetElem, panelElem, options) {
|
|
|
2014
2014
|
const stys = {};
|
|
2015
2015
|
if (panelElem && targetElem) {
|
|
2016
2016
|
const bodyEl = document.body;
|
|
2017
|
-
const
|
|
2018
|
-
const parentWrapperEl = parentEl === bodyEl ? document.documentElement : parentEl;
|
|
2017
|
+
const parentWrapperEl = getPopupWrapperElement(panelElem);
|
|
2019
2018
|
if (parentWrapperEl) {
|
|
2020
2019
|
const targetWidth = targetElem.offsetWidth;
|
|
2021
2020
|
const targetHeight = targetElem.offsetHeight;
|
|
@@ -2139,6 +2138,14 @@ function updatePanelPlacement(targetElem, panelElem, options) {
|
|
|
2139
2138
|
placement: panelPlacement
|
|
2140
2139
|
};
|
|
2141
2140
|
}
|
|
2141
|
+
function getPopupWrapperElement(panelElem) {
|
|
2142
|
+
if (!panelElem) {
|
|
2143
|
+
return null;
|
|
2144
|
+
}
|
|
2145
|
+
const bodyEl = document.body;
|
|
2146
|
+
const parentEl = panelElem.parentElement;
|
|
2147
|
+
return (parentEl === bodyEl ? document.documentElement : parentEl) || null;
|
|
2148
|
+
}
|
|
2142
2149
|
function getPopupContainer(appendTo) {
|
|
2143
2150
|
const selectElem = appendTo && XEUtils.isFunction(appendTo) ? appendTo({}) : appendTo;
|
|
2144
2151
|
return selectElem || 'body';
|
|
@@ -2889,7 +2896,7 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
2889
2896
|
tipStore.placement = 'top';
|
|
2890
2897
|
tipStore.style = { width: 'auto', left: 0, top: 0, zIndex: props.zIndex || reactData.tipZindex };
|
|
2891
2898
|
tipStore.arrowStyle = { left: '50%' };
|
|
2892
|
-
return
|
|
2899
|
+
return $xeTooltip.updatePlacement();
|
|
2893
2900
|
};
|
|
2894
2901
|
const handleDelayFn = () => {
|
|
2895
2902
|
internalData.showDelayTip = XEUtils.debounce(() => {
|
|
@@ -3029,6 +3036,14 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
3029
3036
|
const wheelEvent = (evnt) => {
|
|
3030
3037
|
evnt.stopPropagation();
|
|
3031
3038
|
};
|
|
3039
|
+
const handleGlobalScrollEvent = () => {
|
|
3040
|
+
if (reactData.visible) {
|
|
3041
|
+
$xeTooltip.updatePlacement();
|
|
3042
|
+
}
|
|
3043
|
+
};
|
|
3044
|
+
const handleGlobalBlurEvent = () => {
|
|
3045
|
+
$xeTooltip.close();
|
|
3046
|
+
};
|
|
3032
3047
|
const tooltipPrivateMethods = {
|
|
3033
3048
|
handleCloseEvent: targetMouseleaveEvent
|
|
3034
3049
|
};
|
|
@@ -3151,6 +3166,8 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
3151
3166
|
}
|
|
3152
3167
|
}
|
|
3153
3168
|
});
|
|
3169
|
+
globalEvents.on($xeTooltip, 'blur', handleGlobalBlurEvent);
|
|
3170
|
+
globalEvents.on($xeTooltip, 'scroll', handleGlobalScrollEvent);
|
|
3154
3171
|
});
|
|
3155
3172
|
onBeforeUnmount(() => {
|
|
3156
3173
|
const { target } = reactData;
|
|
@@ -3170,8 +3187,8 @@ var VxeTooltipComponent = defineVxeComponent({
|
|
|
3170
3187
|
parentNode.removeChild(panelElem);
|
|
3171
3188
|
}
|
|
3172
3189
|
}
|
|
3173
|
-
|
|
3174
|
-
|
|
3190
|
+
globalEvents.off($xeTooltip, 'blur');
|
|
3191
|
+
globalEvents.off($xeTooltip, 'scroll');
|
|
3175
3192
|
XEUtils.assign(reactData, createReactData$n());
|
|
3176
3193
|
XEUtils.assign(internalData, createInternalData$m());
|
|
3177
3194
|
});
|
|
@@ -9172,6 +9189,10 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9172
9189
|
type: String,
|
|
9173
9190
|
default: () => getConfig$3().input.floatContent
|
|
9174
9191
|
},
|
|
9192
|
+
floatAlign: {
|
|
9193
|
+
type: String,
|
|
9194
|
+
default: () => getConfig$3().input.floatAlign
|
|
9195
|
+
},
|
|
9175
9196
|
maxLength: {
|
|
9176
9197
|
type: [String, Number],
|
|
9177
9198
|
default: () => getConfig$3().input.maxLength
|
|
@@ -11701,7 +11722,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11701
11722
|
return createCommentVNode();
|
|
11702
11723
|
};
|
|
11703
11724
|
const renderVN = () => {
|
|
11704
|
-
const { className, inputClassName, controls, type, title, floatContent, align, showWordCount, countMethod, name, autoComplete, autocomplete } = props;
|
|
11725
|
+
const { className, inputClassName, controls, type, title, floatContent, align, showWordCount, countMethod, name, autoComplete, autocomplete, floatAlign } = props;
|
|
11705
11726
|
const { inputValue, visiblePanel, isActivated } = reactData;
|
|
11706
11727
|
const vSize = computeSize.value;
|
|
11707
11728
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -11725,7 +11746,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11725
11746
|
const floatSlot = slots.float;
|
|
11726
11747
|
return h('div', {
|
|
11727
11748
|
ref: refElem,
|
|
11728
|
-
class: ['vxe-input', `type--${type}`, className, {
|
|
11749
|
+
class: ['vxe-input', `type--${type}`, floatContent ? (`fla--${floatAlign || 'center'}`) : '', className, {
|
|
11729
11750
|
[`size--${vSize}`]: vSize,
|
|
11730
11751
|
[`is--${align}`]: align,
|
|
11731
11752
|
'is--controls': controls,
|
|
@@ -11762,14 +11783,14 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11762
11783
|
onChange: changeEvent,
|
|
11763
11784
|
onFocus: focusEvent,
|
|
11764
11785
|
onBlur: blurEvent
|
|
11765
|
-
})
|
|
11786
|
+
}),
|
|
11787
|
+
floatContent || floatSlot
|
|
11788
|
+
? h('span', {
|
|
11789
|
+
class: 'vxe-input--float-wrapper'
|
|
11790
|
+
}, floatSlot ? floatSlot({}) : getText(floatContent))
|
|
11791
|
+
: renderEmptyElement($xeInput)
|
|
11766
11792
|
]),
|
|
11767
11793
|
suffix || createCommentVNode(),
|
|
11768
|
-
floatContent || floatSlot
|
|
11769
|
-
? h('span', {
|
|
11770
|
-
class: 'vxe-input--float-wrapper'
|
|
11771
|
-
}, floatSlot ? floatSlot({}) : getText(floatContent))
|
|
11772
|
-
: renderEmptyElement($xeInput),
|
|
11773
11794
|
// 下拉面板
|
|
11774
11795
|
renderPanel(),
|
|
11775
11796
|
// 字数统计
|
|
@@ -15288,6 +15309,10 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15288
15309
|
type: String,
|
|
15289
15310
|
default: () => getConfig$3().numberInput.floatContent
|
|
15290
15311
|
},
|
|
15312
|
+
floatAlign: {
|
|
15313
|
+
type: String,
|
|
15314
|
+
default: () => getConfig$3().numberInput.floatAlign
|
|
15315
|
+
},
|
|
15291
15316
|
maxLength: {
|
|
15292
15317
|
type: [String, Number],
|
|
15293
15318
|
default: () => getConfig$3().numberInput.maxLength
|
|
@@ -15674,7 +15699,6 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15674
15699
|
reactData.inputValue = eqEmptyValue(inputValue) ? '' : `${XEUtils.toNumber(inputValue)}`;
|
|
15675
15700
|
reactData.isFocus = true;
|
|
15676
15701
|
reactData.isActivated = true;
|
|
15677
|
-
handleShowTip();
|
|
15678
15702
|
triggerEvent(evnt);
|
|
15679
15703
|
}
|
|
15680
15704
|
};
|
|
@@ -15813,13 +15837,11 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15813
15837
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
15814
15838
|
}
|
|
15815
15839
|
};
|
|
15840
|
+
const mouseenterEvent = () => {
|
|
15841
|
+
handleShowTip();
|
|
15842
|
+
};
|
|
15816
15843
|
const mouseleaveEvent = () => {
|
|
15817
|
-
|
|
15818
|
-
if (showTooltip) {
|
|
15819
|
-
if (VxeUI.tooltip) {
|
|
15820
|
-
VxeUI.tooltip.close();
|
|
15821
|
-
}
|
|
15822
|
-
}
|
|
15844
|
+
handleHideTip();
|
|
15823
15845
|
};
|
|
15824
15846
|
// 数值
|
|
15825
15847
|
const numberChange = (isPlus, evnt) => {
|
|
@@ -15882,7 +15904,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15882
15904
|
}
|
|
15883
15905
|
};
|
|
15884
15906
|
const handleShowTip = () => {
|
|
15885
|
-
const { showTooltip } = props;
|
|
15907
|
+
const { type, showTooltip } = props;
|
|
15886
15908
|
const { inputValue } = reactData;
|
|
15887
15909
|
if (showTooltip) {
|
|
15888
15910
|
if (VxeUI.tooltip) {
|
|
@@ -15892,6 +15914,8 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15892
15914
|
const inputElem = refInputTarget.value;
|
|
15893
15915
|
const content = getText(contentMethod
|
|
15894
15916
|
? contentMethod({
|
|
15917
|
+
$mumberInput: $xeNumberInput,
|
|
15918
|
+
type,
|
|
15895
15919
|
inputValue: inputElem.value,
|
|
15896
15920
|
value: inputValue || '',
|
|
15897
15921
|
label: numLabel
|
|
@@ -15908,6 +15932,14 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15908
15932
|
}
|
|
15909
15933
|
}
|
|
15910
15934
|
};
|
|
15935
|
+
const handleHideTip = () => {
|
|
15936
|
+
const { showTooltip } = props;
|
|
15937
|
+
if (showTooltip) {
|
|
15938
|
+
if (VxeUI.tooltip) {
|
|
15939
|
+
VxeUI.tooltip.close();
|
|
15940
|
+
}
|
|
15941
|
+
}
|
|
15942
|
+
};
|
|
15911
15943
|
const keydownEvent = (evnt) => {
|
|
15912
15944
|
const { type, negative, exponential, controls } = props;
|
|
15913
15945
|
const controlOpts = computeControlOpts.value;
|
|
@@ -16057,6 +16089,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
16057
16089
|
handleChange(value, handleNumberString(inputValue), evnt);
|
|
16058
16090
|
}
|
|
16059
16091
|
afterCheckValue();
|
|
16092
|
+
handleHideTip();
|
|
16060
16093
|
}
|
|
16061
16094
|
}
|
|
16062
16095
|
};
|
|
@@ -16223,7 +16256,8 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
16223
16256
|
onChange: changeEvent,
|
|
16224
16257
|
onFocus: focusEvent,
|
|
16225
16258
|
onBlur: blurEvent
|
|
16226
|
-
})
|
|
16259
|
+
}),
|
|
16260
|
+
renderFloat()
|
|
16227
16261
|
]),
|
|
16228
16262
|
renderSuffixIcon()
|
|
16229
16263
|
]);
|
|
@@ -16286,7 +16320,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
16286
16320
|
return renderEmptyElement($xeNumberInput);
|
|
16287
16321
|
};
|
|
16288
16322
|
const renderVN = () => {
|
|
16289
|
-
const { className, controls, type, align, prefixIcon, suffixIcon } = props;
|
|
16323
|
+
const { className, controls, type, align, prefixIcon, suffixIcon, floatContent, floatAlign } = props;
|
|
16290
16324
|
const { inputValue, isActivated } = reactData;
|
|
16291
16325
|
const vSize = computeSize.value;
|
|
16292
16326
|
const controlOpts = computeControlOpts.value;
|
|
@@ -16307,7 +16341,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
16307
16341
|
const isControls = isEnableConf(controlOpts) && (controls === false ? controls : showButton);
|
|
16308
16342
|
return h('div', {
|
|
16309
16343
|
ref: refElem,
|
|
16310
|
-
class: ['vxe-number-input', `type--${type}`, isControls ? (`ctl--${layout === 'right' || layout === 'left' ? layout : 'default'}`) : '', className, {
|
|
16344
|
+
class: ['vxe-number-input', `type--${type}`, isControls ? (`ctl--${layout === 'right' || layout === 'left' ? layout : 'default'}`) : '', floatContent ? (`fla--${floatAlign || 'center'}`) : '', className, {
|
|
16311
16345
|
[`size--${vSize}`]: vSize,
|
|
16312
16346
|
[`is--${align}`]: align,
|
|
16313
16347
|
'is--controls': isControls && !inputReadonly,
|
|
@@ -16318,29 +16352,26 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
16318
16352
|
'show--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
|
|
16319
16353
|
}],
|
|
16320
16354
|
spellcheck: false,
|
|
16355
|
+
onMouseenter: mouseenterEvent,
|
|
16321
16356
|
onMouseleave: mouseleaveEvent
|
|
16322
16357
|
}, isControls
|
|
16323
16358
|
? (layout === 'right'
|
|
16324
16359
|
? [
|
|
16325
16360
|
renderInput(),
|
|
16326
|
-
renderSideControl()
|
|
16327
|
-
renderFloat()
|
|
16361
|
+
renderSideControl()
|
|
16328
16362
|
]
|
|
16329
16363
|
: (layout === 'left'
|
|
16330
16364
|
? [
|
|
16331
16365
|
renderSideControl(),
|
|
16332
|
-
renderInput()
|
|
16333
|
-
renderFloat()
|
|
16366
|
+
renderInput()
|
|
16334
16367
|
]
|
|
16335
16368
|
: [
|
|
16336
16369
|
renderMinusBtn(),
|
|
16337
16370
|
renderInput(),
|
|
16338
|
-
renderPlusBtn()
|
|
16339
|
-
renderFloat()
|
|
16371
|
+
renderPlusBtn()
|
|
16340
16372
|
]))
|
|
16341
16373
|
: [
|
|
16342
|
-
renderInput()
|
|
16343
|
-
renderFloat()
|
|
16374
|
+
renderInput()
|
|
16344
16375
|
]);
|
|
16345
16376
|
};
|
|
16346
16377
|
$xeNumberInput.renderVN = renderVN;
|
|
@@ -29892,6 +29923,10 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
29892
29923
|
type: [String, Function],
|
|
29893
29924
|
default: () => getConfig$3().modal.appendTo
|
|
29894
29925
|
},
|
|
29926
|
+
isWithinAppendTo: {
|
|
29927
|
+
type: Boolean,
|
|
29928
|
+
default: () => getConfig$3().modal.isWithinAppendTo
|
|
29929
|
+
},
|
|
29895
29930
|
storage: {
|
|
29896
29931
|
type: Boolean,
|
|
29897
29932
|
default: () => getConfig$3().modal.storage
|
|
@@ -30046,14 +30081,20 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30046
30081
|
};
|
|
30047
30082
|
const updatePosition = () => {
|
|
30048
30083
|
return nextTick().then(() => {
|
|
30049
|
-
const { position } = props;
|
|
30050
|
-
const
|
|
30084
|
+
const { position, isWithinAppendTo } = props;
|
|
30085
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
30086
|
+
const el = refElem.value;
|
|
30051
30087
|
const boxElem = getBox();
|
|
30052
30088
|
if (!boxElem) {
|
|
30053
30089
|
return;
|
|
30054
30090
|
}
|
|
30055
|
-
const
|
|
30056
|
-
|
|
30091
|
+
const parentWrapperEl = getPopupWrapperElement(isWithinAppendTo && btnTransfer ? el : document.body);
|
|
30092
|
+
if (!parentWrapperEl) {
|
|
30093
|
+
return;
|
|
30094
|
+
}
|
|
30095
|
+
const clientVisibleWidth = parentWrapperEl.clientWidth;
|
|
30096
|
+
const clientVisibleHeight = parentWrapperEl.clientHeight;
|
|
30097
|
+
const marginSize = XEUtils.toNumber(props.marginSize);
|
|
30057
30098
|
const isPosCenter = position === 'center';
|
|
30058
30099
|
const { top, left } = XEUtils.isString(position) ? { top: position, left: position } : Object.assign({}, position);
|
|
30059
30100
|
const topCenter = isPosCenter || top === 'center';
|
|
@@ -30232,6 +30273,8 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30232
30273
|
}
|
|
30233
30274
|
};
|
|
30234
30275
|
const handleMinimize = () => {
|
|
30276
|
+
const { isWithinAppendTo } = props;
|
|
30277
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
30235
30278
|
const zoomOpts = computeZoomOpts.value;
|
|
30236
30279
|
const { minimizeLayout, minimizeMaxSize, minimizeHorizontalOffset, minimizeVerticalOffset, minimizeOffsetMethod } = zoomOpts;
|
|
30237
30280
|
const isHorizontalLayout = minimizeLayout === 'horizontal';
|
|
@@ -30265,6 +30308,7 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30265
30308
|
reactData.prevZoomStatus = prevZoomStatus;
|
|
30266
30309
|
reactData.zoomStatus = 'minimize';
|
|
30267
30310
|
return nextTick().then(() => {
|
|
30311
|
+
const el = refElem.value;
|
|
30268
30312
|
const boxElem = getBox();
|
|
30269
30313
|
if (!boxElem) {
|
|
30270
30314
|
return {
|
|
@@ -30277,7 +30321,13 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30277
30321
|
status: false
|
|
30278
30322
|
};
|
|
30279
30323
|
}
|
|
30280
|
-
const
|
|
30324
|
+
const parentWrapperEl = getPopupWrapperElement(isWithinAppendTo && btnTransfer ? el : document.body);
|
|
30325
|
+
if (!parentWrapperEl) {
|
|
30326
|
+
return {
|
|
30327
|
+
status: false
|
|
30328
|
+
};
|
|
30329
|
+
}
|
|
30330
|
+
const visibleHeight = parentWrapperEl.clientHeight;
|
|
30281
30331
|
// 如果当前处于复原状态
|
|
30282
30332
|
if (!prevZoomStatus) {
|
|
30283
30333
|
reactData.revertLocat = {
|
|
@@ -30333,6 +30383,8 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30333
30383
|
});
|
|
30334
30384
|
};
|
|
30335
30385
|
const handleMaximize = () => {
|
|
30386
|
+
const { isWithinAppendTo } = props;
|
|
30387
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
30336
30388
|
const prevZoomStatus = reactData.zoomStatus;
|
|
30337
30389
|
reactData.prevZoomStatus = prevZoomStatus;
|
|
30338
30390
|
reactData.zoomStatus = 'maximize';
|
|
@@ -30341,9 +30393,16 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30341
30393
|
if (boxElem) {
|
|
30342
30394
|
// 如果当前处于复原状态
|
|
30343
30395
|
if (!prevZoomStatus) {
|
|
30396
|
+
const el = refElem.value;
|
|
30397
|
+
const parentWrapperEl = getPopupWrapperElement(isWithinAppendTo && btnTransfer ? el : document.body);
|
|
30398
|
+
if (!parentWrapperEl) {
|
|
30399
|
+
return {
|
|
30400
|
+
status: false
|
|
30401
|
+
};
|
|
30402
|
+
}
|
|
30403
|
+
const clientVisibleWidth = parentWrapperEl.clientWidth;
|
|
30404
|
+
const clientVisibleHeight = parentWrapperEl.clientHeight;
|
|
30344
30405
|
const marginSize = XEUtils.toNumber(props.marginSize);
|
|
30345
|
-
const clientVisibleWidth = document.documentElement.clientWidth || document.body.clientWidth;
|
|
30346
|
-
const clientVisibleHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
30347
30406
|
reactData.revertLocat = {
|
|
30348
30407
|
top: Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2),
|
|
30349
30408
|
left: Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2),
|
|
@@ -30616,8 +30675,9 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30616
30675
|
}
|
|
30617
30676
|
};
|
|
30618
30677
|
const mousedownEvent = (evnt) => {
|
|
30619
|
-
const { storage } = props;
|
|
30678
|
+
const { resize, storage, isWithinAppendTo } = props;
|
|
30620
30679
|
const { zoomStatus } = reactData;
|
|
30680
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
30621
30681
|
const marginSize = XEUtils.toNumber(props.marginSize);
|
|
30622
30682
|
const boxElem = getBox();
|
|
30623
30683
|
if (!boxElem) {
|
|
@@ -30625,9 +30685,15 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30625
30685
|
}
|
|
30626
30686
|
if (zoomStatus !== 'maximize' && evnt.button === 0 && !getEventTargetNode(evnt, boxElem, 'trigger--btn').flag) {
|
|
30627
30687
|
evnt.preventDefault();
|
|
30688
|
+
const el = refElem.value;
|
|
30689
|
+
const parentWrapperEl = getPopupWrapperElement(isWithinAppendTo && btnTransfer ? el : document.body);
|
|
30690
|
+
if (!parentWrapperEl) {
|
|
30691
|
+
return;
|
|
30692
|
+
}
|
|
30693
|
+
const visibleWidth = parentWrapperEl.clientWidth - (resize && isWithinAppendTo ? 8 : 0);
|
|
30694
|
+
const visibleHeight = parentWrapperEl.clientHeight - (resize && isWithinAppendTo ? 8 : 0);
|
|
30628
30695
|
const disX = evnt.clientX - boxElem.offsetLeft;
|
|
30629
30696
|
const disY = evnt.clientY - boxElem.offsetTop;
|
|
30630
|
-
const { visibleHeight, visibleWidth } = getDomNode();
|
|
30631
30697
|
document.onmousemove = evnt => {
|
|
30632
30698
|
evnt.preventDefault();
|
|
30633
30699
|
const offsetWidth = boxElem.offsetWidth;
|
|
@@ -30673,8 +30739,15 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30673
30739
|
};
|
|
30674
30740
|
const dragEvent = (evnt) => {
|
|
30675
30741
|
evnt.preventDefault();
|
|
30676
|
-
const { storage } = props;
|
|
30677
|
-
const
|
|
30742
|
+
const { resize, storage, isWithinAppendTo } = props;
|
|
30743
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
30744
|
+
const el = refElem.value;
|
|
30745
|
+
const parentWrapperEl = getPopupWrapperElement(isWithinAppendTo && btnTransfer ? el : document.body);
|
|
30746
|
+
if (!parentWrapperEl) {
|
|
30747
|
+
return;
|
|
30748
|
+
}
|
|
30749
|
+
const visibleWidth = parentWrapperEl.clientWidth - (resize && isWithinAppendTo ? 8 : 0);
|
|
30750
|
+
const visibleHeight = parentWrapperEl.clientHeight - (resize && isWithinAppendTo ? 8 : 0);
|
|
30678
30751
|
const marginSize = XEUtils.toNumber(props.marginSize);
|
|
30679
30752
|
const targetElem = evnt.target;
|
|
30680
30753
|
const type = targetElem.getAttribute('data-type');
|
|
@@ -31039,7 +31112,7 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
31039
31112
|
return renderEmptyElement($xeModal);
|
|
31040
31113
|
};
|
|
31041
31114
|
const renderVN = () => {
|
|
31042
|
-
const { slots: propSlots = {}, className, type, animat, draggable, iconStatus, position, loading, destroyOnClose, status, lockScroll, padding, lockView, mask, resize, appendTo } = props;
|
|
31115
|
+
const { slots: propSlots = {}, className, type, animat, draggable, iconStatus, position, loading, destroyOnClose, status, lockScroll, padding, lockView, mask, resize, appendTo, isWithinAppendTo } = props;
|
|
31043
31116
|
const { initialized, modalTop, contentVisible, visible, zoomStatus } = reactData;
|
|
31044
31117
|
const asideSlot = slots.aside || propSlots.aside;
|
|
31045
31118
|
const vSize = computeSize.value;
|
|
@@ -31055,7 +31128,7 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
31055
31128
|
to: getPopupContainer(appendTo),
|
|
31056
31129
|
disabled: btnTransfer ? !initialized : true
|
|
31057
31130
|
}, [
|
|
31058
|
-
h('div', Object.assign({ ref: refElem, class: ['vxe-modal--wrapper', `type--${type}`, `zoom--${zoomStatus || 'revert'}`, className || '', position ? `pos--${position}` : '', {
|
|
31131
|
+
h('div', Object.assign({ ref: refElem, class: ['vxe-modal--wrapper', `type--${type}`, `zoom--${zoomStatus || 'revert'}`, className || '', position ? `pos--${position}` : '', isWithinAppendTo ? 'ctx--within' : 'ctx--free', {
|
|
31059
31132
|
[`size--${vSize}`]: vSize,
|
|
31060
31133
|
[`status--${status}`]: status,
|
|
31061
31134
|
'is--padding': padding,
|
|
@@ -34068,6 +34141,10 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34068
34141
|
type: String,
|
|
34069
34142
|
default: () => getConfig$3().passwordInput.floatContent
|
|
34070
34143
|
},
|
|
34144
|
+
floatAlign: {
|
|
34145
|
+
type: String,
|
|
34146
|
+
default: () => getConfig$3().passwordInput.floatAlign
|
|
34147
|
+
},
|
|
34071
34148
|
autoComplete: {
|
|
34072
34149
|
type: String,
|
|
34073
34150
|
default: 'off'
|
|
@@ -34378,7 +34455,7 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34378
34455
|
: null;
|
|
34379
34456
|
};
|
|
34380
34457
|
const renderVN = () => {
|
|
34381
|
-
const { className, inputClassName, name, readonly, floatContent, autocomplete, autoComplete, maxLength } = props;
|
|
34458
|
+
const { className, inputClassName, name, readonly, floatContent, autocomplete, autoComplete, maxLength, floatAlign } = props;
|
|
34382
34459
|
const { inputValue, isActivated } = reactData;
|
|
34383
34460
|
const isDisabled = computeIsDisabled.value;
|
|
34384
34461
|
const formReadonly = computeFormReadonly.value;
|
|
@@ -34398,7 +34475,7 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34398
34475
|
const floatSlot = slots.float;
|
|
34399
34476
|
return h('div', {
|
|
34400
34477
|
ref: refElem,
|
|
34401
|
-
class: ['vxe-password-input', className, {
|
|
34478
|
+
class: ['vxe-password-input', floatContent ? (`fla--${floatAlign || 'center'}`) : '', className, {
|
|
34402
34479
|
[`size--${vSize}`]: vSize,
|
|
34403
34480
|
'is--prefix': !!prefix,
|
|
34404
34481
|
'is--suffix': !!suffix,
|
|
@@ -34428,14 +34505,14 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34428
34505
|
onChange: changeEvent,
|
|
34429
34506
|
onFocus: focusEvent,
|
|
34430
34507
|
onBlur: blurEvent
|
|
34431
|
-
})
|
|
34508
|
+
}),
|
|
34509
|
+
floatContent || floatSlot
|
|
34510
|
+
? h('span', {
|
|
34511
|
+
class: 'vxe-password-input--float-wrapper'
|
|
34512
|
+
}, floatSlot ? floatSlot({}) : getText(floatContent))
|
|
34513
|
+
: renderEmptyElement($xePasswordInput)
|
|
34432
34514
|
]),
|
|
34433
|
-
suffix || renderEmptyElement($xePasswordInput)
|
|
34434
|
-
floatContent || floatSlot
|
|
34435
|
-
? h('span', {
|
|
34436
|
-
class: 'vxe-password-input--float-wrapper'
|
|
34437
|
-
}, floatSlot ? floatSlot({}) : getText(floatContent))
|
|
34438
|
-
: renderEmptyElement($xePasswordInput)
|
|
34515
|
+
suffix || renderEmptyElement($xePasswordInput)
|
|
34439
34516
|
]);
|
|
34440
34517
|
};
|
|
34441
34518
|
watch(() => props.modelValue, (val) => {
|