vxe-pc-ui 4.6.7 → 4.6.9
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/es/alert/src/alert.js +5 -5
- package/es/anchor/src/anchor-link.js +3 -2
- package/es/anchor/src/anchor.js +3 -3
- package/es/breadcrumb/src/breadcrumb-item.js +3 -2
- package/es/button/src/button-group.js +3 -3
- package/es/button/src/button.js +5 -4
- package/es/card/src/card.js +7 -7
- package/es/carousel/src/carousel.js +3 -3
- package/es/countdown/src/countdown.js +4 -4
- package/es/form/src/form-group.js +5 -3
- package/es/form/src/form-item.js +6 -4
- package/es/form-design/src/default-setting-form.js +1 -1
- package/es/form-design/src/form-view.js +6 -6
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +4 -4
- package/es/image/src/group.js +3 -1
- package/es/image/src/image.js +3 -1
- package/es/image/src/preview.js +33 -19
- package/es/image/src/util.js +1 -0
- package/es/list-design/src/list-view.js +3 -3
- package/es/loading/src/loading.js +3 -3
- package/es/menu/src/menu.js +9 -9
- package/es/modal/src/modal.js +14 -14
- package/es/password-input/src/password-input.js +7 -7
- package/es/print/src/print.js +6 -6
- package/es/pulldown/src/pulldown.js +4 -4
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/src/switch.js +4 -4
- package/es/tabs/src/tabs.js +9 -9
- package/es/tag/src/tag.js +3 -3
- package/es/tip/src/tip.js +5 -5
- package/es/tree/src/tree.js +7 -7
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +26 -26
- package/lib/alert/src/alert.js +3 -3
- package/lib/alert/src/alert.min.js +1 -1
- package/lib/anchor/src/anchor-link.js +2 -1
- package/lib/anchor/src/anchor-link.min.js +1 -1
- package/lib/anchor/src/anchor.js +3 -3
- package/lib/anchor/src/anchor.min.js +1 -1
- package/lib/breadcrumb/src/breadcrumb-item.js +2 -1
- package/lib/breadcrumb/src/breadcrumb-item.min.js +1 -1
- package/lib/button/src/button-group.js +6 -6
- package/lib/button/src/button-group.min.js +1 -1
- package/lib/button/src/button.js +2 -2
- package/lib/button/src/button.min.js +1 -1
- package/lib/card/src/card.js +4 -4
- package/lib/card/src/card.min.js +1 -1
- package/lib/carousel/src/carousel.js +1 -1
- package/lib/carousel/src/carousel.min.js +1 -1
- package/lib/countdown/src/countdown.js +2 -2
- package/lib/countdown/src/countdown.min.js +1 -1
- package/lib/form/src/form-group.js +3 -1
- package/lib/form/src/form-group.min.js +1 -1
- package/lib/form/src/form-item.js +4 -2
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form-design/src/default-setting-form.js +12 -12
- package/lib/form-design/src/default-setting-form.min.js +1 -1
- package/lib/form-design/src/form-view.js +4 -4
- package/lib/form-design/src/form-view.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +2 -2
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/image/src/group.js +3 -0
- package/lib/image/src/group.min.js +1 -1
- package/lib/image/src/image.js +3 -0
- package/lib/image/src/image.min.js +1 -1
- package/lib/image/src/preview.js +20 -8
- package/lib/image/src/preview.min.js +1 -1
- package/lib/image/src/util.js +1 -0
- package/lib/image/src/util.min.js +1 -1
- package/lib/index.umd.js +129 -104
- package/lib/index.umd.min.js +1 -1
- package/lib/list-design/src/list-view.js +1 -1
- package/lib/list-design/src/list-view.min.js +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/menu/src/menu.js +6 -6
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +10 -10
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/password-input/src/password-input.js +4 -4
- package/lib/password-input/src/password-input.min.js +1 -1
- package/lib/print/src/print.js +4 -4
- package/lib/print/src/print.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +2 -2
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/src/switch.js +2 -2
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/tabs/src/tabs.js +8 -8
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tag/src/tag.js +1 -1
- package/lib/tag/src/tag.min.js +1 -1
- package/lib/tip/src/tip.js +3 -3
- package/lib/tip/src/tip.min.js +1 -1
- package/lib/tree/src/tree.js +5 -5
- package/lib/tree/src/tree.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 +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +22 -22
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/alert/src/alert.ts +5 -5
- package/packages/anchor/src/anchor-link.ts +3 -2
- package/packages/anchor/src/anchor.ts +3 -3
- package/packages/breadcrumb/src/breadcrumb-item.ts +3 -2
- package/packages/button/src/button-group.ts +3 -3
- package/packages/button/src/button.ts +5 -4
- package/packages/card/src/card.ts +7 -7
- package/packages/carousel/src/carousel.ts +3 -3
- package/packages/countdown/src/countdown.ts +4 -4
- package/packages/form/src/form-group.ts +7 -3
- package/packages/form/src/form-item.ts +7 -4
- package/packages/form-design/src/default-setting-form.ts +1 -1
- package/packages/form-design/src/form-view.ts +6 -6
- package/packages/icon-picker/src/icon-picker.ts +4 -4
- package/packages/image/src/group.ts +3 -1
- package/packages/image/src/image.ts +3 -1
- package/packages/image/src/preview.ts +37 -22
- package/packages/image/src/util.ts +1 -0
- package/packages/list-design/src/list-view.ts +3 -3
- package/packages/loading/src/loading.ts +3 -3
- package/packages/menu/src/menu.ts +9 -9
- package/packages/modal/src/modal.ts +14 -14
- package/packages/password-input/src/password-input.ts +7 -7
- package/packages/print/src/print.ts +6 -6
- package/packages/pulldown/src/pulldown.ts +5 -5
- package/packages/switch/src/switch.ts +4 -4
- package/packages/tabs/src/tabs.ts +9 -9
- package/packages/tag/src/tag.ts +3 -3
- package/packages/tip/src/tip.ts +5 -5
- package/packages/tree/src/tree.ts +7 -7
- package/packages/upload/src/upload.ts +26 -26
- package/types/components/button.d.ts +2 -1
- package/types/components/image-group.d.ts +3 -0
- package/types/components/image-preview.d.ts +32 -0
- package/types/components/image.d.ts +2 -0
- package/types/components/table-module/filter.d.ts +2 -7
- package/types/components/table.d.ts +10 -5
- /package/es/icon/{iconfont.1747176327959.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/es/icon/{iconfont.1747176327959.woff → iconfont.1747279440023.woff} +0 -0
- /package/es/icon/{iconfont.1747176327959.woff2 → iconfont.1747279440023.woff2} +0 -0
- /package/es/{iconfont.1747176327959.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/es/{iconfont.1747176327959.woff → iconfont.1747279440023.woff} +0 -0
- /package/es/{iconfont.1747176327959.woff2 → iconfont.1747279440023.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1747176327959.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1747176327959.woff → iconfont.1747279440023.woff} +0 -0
- /package/lib/icon/style/{iconfont.1747176327959.woff2 → iconfont.1747279440023.woff2} +0 -0
- /package/lib/{iconfont.1747176327959.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/lib/{iconfont.1747176327959.woff → iconfont.1747279440023.woff} +0 -0
- /package/lib/{iconfont.1747176327959.woff2 → iconfont.1747279440023.woff2} +0 -0
package/es/image/src/preview.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, h, provide, ref, reactive, computed, watch, onMounted, onUnmounted,
|
|
2
|
-
import { VxeUI, getConfig, createEvent, getIcon, globalEvents, GLOBAL_EVENT_KEYS, getI18n } from '../../ui';
|
|
1
|
+
import { defineComponent, h, provide, ref, reactive, computed, watch, onMounted, onUnmounted, onBeforeUnmount } from 'vue';
|
|
2
|
+
import { VxeUI, getConfig, createEvent, getIcon, globalEvents, GLOBAL_EVENT_KEYS, getI18n, renderEmptyElement } from '../../ui';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { getDomNode, addClass, removeClass, hasControlKey } from '../../ui/src/dom';
|
|
5
5
|
export default defineComponent({
|
|
@@ -27,6 +27,7 @@ export default defineComponent({
|
|
|
27
27
|
type: Boolean,
|
|
28
28
|
default: () => getConfig().imagePreview.showDownloadButton
|
|
29
29
|
},
|
|
30
|
+
toolbarConfig: Object,
|
|
30
31
|
beforeDownloadMethod: Function,
|
|
31
32
|
downloadMethod: Function
|
|
32
33
|
},
|
|
@@ -58,6 +59,9 @@ export default defineComponent({
|
|
|
58
59
|
const computeMarginSize = computed(() => {
|
|
59
60
|
return XEUtils.toNumber(props.marginSize || 0) || 16;
|
|
60
61
|
});
|
|
62
|
+
const computeToolbarOpts = computed(() => {
|
|
63
|
+
return Object.assign({}, getConfig().imagePreview.toolbarConfig, props.toolbarConfig);
|
|
64
|
+
});
|
|
61
65
|
const computeRotateText = computed(() => {
|
|
62
66
|
const { offsetRotate } = reactData;
|
|
63
67
|
if (offsetRotate) {
|
|
@@ -287,10 +291,13 @@ export default defineComponent({
|
|
|
287
291
|
};
|
|
288
292
|
const handleDownloadImg = (evnt) => {
|
|
289
293
|
const { activeIndex } = reactData;
|
|
294
|
+
const toolbarOpts = computeToolbarOpts.value;
|
|
295
|
+
const btnConf = toolbarOpts.download;
|
|
296
|
+
const btnOpts = XEUtils.isBoolean(btnConf) ? {} : (btnConf ? Object.assign({}, btnConf) : {});
|
|
290
297
|
const imgList = computeImgList.value;
|
|
291
298
|
const imgUrl = imgList[activeIndex || 0];
|
|
292
|
-
const beforeDownloadFn = props.beforeDownloadMethod || getConfig().imagePreview.beforeDownloadMethod;
|
|
293
|
-
const downloadFn = props.downloadMethod || getConfig().imagePreview.downloadMethod;
|
|
299
|
+
const beforeDownloadFn = props.beforeDownloadMethod || btnOpts.beforeDownloadMethod || getConfig().imagePreview.beforeDownloadMethod;
|
|
300
|
+
const downloadFn = props.downloadMethod || btnOpts.downloadMethod || getConfig().imagePreview.downloadMethod;
|
|
294
301
|
Promise.resolve(beforeDownloadFn
|
|
295
302
|
? beforeDownloadFn({
|
|
296
303
|
$imagePreview: $xeImagePreview,
|
|
@@ -475,17 +482,23 @@ export default defineComponent({
|
|
|
475
482
|
}));
|
|
476
483
|
};
|
|
477
484
|
const renderOperationBtn = (code, icon) => {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
485
|
+
const toolbarOpts = computeToolbarOpts.value;
|
|
486
|
+
const btnConf = toolbarOpts[code];
|
|
487
|
+
const btnOpts = XEUtils.isBoolean(btnConf) ? {} : (btnConf ? Object.assign({}, btnConf) : {});
|
|
488
|
+
const showBtn = btnConf !== false;
|
|
489
|
+
return showBtn
|
|
490
|
+
? h('div', {
|
|
491
|
+
class: 'vxe-image-preview--operation-btn',
|
|
492
|
+
title: getI18n(`vxe.imagePreview.operBtn.${code}`),
|
|
493
|
+
onClick(evnt) {
|
|
494
|
+
handleOperationBtn(evnt, code);
|
|
495
|
+
}
|
|
496
|
+
}, [
|
|
497
|
+
h('i', {
|
|
498
|
+
class: btnOpts.icon || getIcon()[icon]
|
|
499
|
+
})
|
|
500
|
+
])
|
|
501
|
+
: renderEmptyElement($xeImagePreview);
|
|
489
502
|
};
|
|
490
503
|
const renderBtnWrapper = () => {
|
|
491
504
|
const { showPrintButton, showDownloadButton } = props;
|
|
@@ -493,6 +506,7 @@ export default defineComponent({
|
|
|
493
506
|
const imgList = computeImgList.value;
|
|
494
507
|
const rotateText = computeRotateText.value;
|
|
495
508
|
const scaleText = computeScaleText.value;
|
|
509
|
+
const toolbarOpts = computeToolbarOpts.value;
|
|
496
510
|
return h('div', {
|
|
497
511
|
class: 'vxe-image-preview--btn-wrapper'
|
|
498
512
|
}, [
|
|
@@ -522,7 +536,7 @@ export default defineComponent({
|
|
|
522
536
|
class: getIcon().IMAGE_PREVIEW_PREVIOUS
|
|
523
537
|
})
|
|
524
538
|
])
|
|
525
|
-
:
|
|
539
|
+
: renderEmptyElement($xeImagePreview),
|
|
526
540
|
imgList.length > 1
|
|
527
541
|
? h('div', {
|
|
528
542
|
class: 'vxe-image-preview--next-btn',
|
|
@@ -534,7 +548,7 @@ export default defineComponent({
|
|
|
534
548
|
class: getIcon().IMAGE_PREVIEW_NEXT
|
|
535
549
|
})
|
|
536
550
|
])
|
|
537
|
-
:
|
|
551
|
+
: renderEmptyElement($xeImagePreview),
|
|
538
552
|
h('div', {
|
|
539
553
|
class: 'vxe-image-preview--operation-info'
|
|
540
554
|
}, [
|
|
@@ -564,8 +578,8 @@ export default defineComponent({
|
|
|
564
578
|
renderOperationBtn('pct11', 'IMAGE_PREVIEW_PCT_1_1'),
|
|
565
579
|
renderOperationBtn('rotateLeft', 'IMAGE_PREVIEW_ROTATE_LEFT'),
|
|
566
580
|
renderOperationBtn('rotateRight', 'IMAGE_PREVIEW_ROTATE_RIGHT'),
|
|
567
|
-
showPrintButton ? renderOperationBtn('print', 'IMAGE_PREVIEW_PRINT') :
|
|
568
|
-
showDownloadButton ? renderOperationBtn('download', 'IMAGE_PREVIEW_DOWNLOAD') :
|
|
581
|
+
showPrintButton || toolbarOpts.print ? renderOperationBtn('print', 'IMAGE_PREVIEW_PRINT') : renderEmptyElement($xeImagePreview),
|
|
582
|
+
showDownloadButton || toolbarOpts.download ? renderOperationBtn('download', 'IMAGE_PREVIEW_DOWNLOAD') : renderEmptyElement($xeImagePreview)
|
|
569
583
|
])
|
|
570
584
|
]);
|
|
571
585
|
};
|
package/es/image/src/util.js
CHANGED
|
@@ -27,6 +27,7 @@ export const openPreviewImage = (options) => {
|
|
|
27
27
|
urlField: opts.urlField,
|
|
28
28
|
marginSize: opts.marginSize,
|
|
29
29
|
maskClosable: opts.maskClosable,
|
|
30
|
+
toolbarConfig: opts.toolbarConfig,
|
|
30
31
|
showPrintButton: opts.showPrintButton,
|
|
31
32
|
showDownloadButton: opts.showDownloadButton,
|
|
32
33
|
beforeDownloadMethod: opts.beforeDownloadMethod,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, provide, watch, nextTick, computed
|
|
2
|
-
import { VxeUI, getConfig, createEvent, getI18n, renderer, useSize } from '../../ui';
|
|
1
|
+
import { defineComponent, ref, h, reactive, provide, watch, nextTick, computed } from 'vue';
|
|
2
|
+
import { VxeUI, getConfig, createEvent, getI18n, renderer, useSize, renderEmptyElement } from '../../ui';
|
|
3
3
|
import { errLog } from '../../ui/src/log';
|
|
4
4
|
import { toCssUnit } from '../../ui/src/dom';
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -403,7 +403,7 @@ export default defineComponent({
|
|
|
403
403
|
}), Object.assign({}, slots, {
|
|
404
404
|
default: undefined
|
|
405
405
|
}))
|
|
406
|
-
:
|
|
406
|
+
: renderEmptyElement($xeListView))
|
|
407
407
|
]),
|
|
408
408
|
/**
|
|
409
409
|
* 加载中
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive, defineComponent, h, computed, watch
|
|
2
|
-
import { getConfig, getIcon, getI18n, createEvent, useSize } from '../../ui';
|
|
1
|
+
import { reactive, defineComponent, h, computed, watch } from 'vue';
|
|
2
|
+
import { getConfig, getIcon, getI18n, createEvent, useSize, renderEmptyElement } from '../../ui';
|
|
3
3
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
4
4
|
import XEUtils from 'xe-utils';
|
|
5
5
|
export default defineComponent({
|
|
@@ -75,7 +75,7 @@ export default defineComponent({
|
|
|
75
75
|
const loadingIcon = computeLoadingIcon.value;
|
|
76
76
|
const loadingText = computeLoadingText.value;
|
|
77
77
|
if (!initialized && !modelValue) {
|
|
78
|
-
return
|
|
78
|
+
return renderEmptyElement($xeLoading);
|
|
79
79
|
}
|
|
80
80
|
return h('div', {
|
|
81
81
|
class: ['vxe-loading', {
|
package/es/menu/src/menu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, inject, resolveComponent,
|
|
1
|
+
import { defineComponent, ref, h, reactive, inject, resolveComponent, watch, computed, nextTick, onBeforeUnmount, onMounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, getIcon, createEvent, permission, useSize, globalEvents } from '../../ui';
|
|
3
|
+
import { getConfig, getIcon, createEvent, permission, useSize, globalEvents, renderEmptyElement } from '../../ui';
|
|
4
4
|
import { toCssUnit } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -263,7 +263,7 @@ export default defineComponent({
|
|
|
263
263
|
class: isExpand ? getIcon().MENU_ITEM_EXPAND_OPEN : getIcon().MENU_ITEM_EXPAND_CLOSE
|
|
264
264
|
})
|
|
265
265
|
])
|
|
266
|
-
:
|
|
266
|
+
: renderEmptyElement($xeMenu)
|
|
267
267
|
];
|
|
268
268
|
};
|
|
269
269
|
const renderDefaultChildren = (item) => {
|
|
@@ -272,7 +272,7 @@ export default defineComponent({
|
|
|
272
272
|
const isCollapsed = computeIsCollapsed.value;
|
|
273
273
|
if (item.permissionCode) {
|
|
274
274
|
if (!permission.checkVisible(item.permissionCode)) {
|
|
275
|
-
return
|
|
275
|
+
return renderEmptyElement($xeMenu);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
return h('div', {
|
|
@@ -303,14 +303,14 @@ export default defineComponent({
|
|
|
303
303
|
? h('div', {
|
|
304
304
|
class: 'vxe-menu--item-group'
|
|
305
305
|
}, childList.map(child => renderDefaultChildren(child)))
|
|
306
|
-
:
|
|
306
|
+
: renderEmptyElement($xeMenu)
|
|
307
307
|
]);
|
|
308
308
|
};
|
|
309
309
|
const renderCollapseChildren = (item) => {
|
|
310
310
|
const { itemKey, level, hasChild, isActive, isExactActive, routerLink, childList } = item;
|
|
311
311
|
if (item.permissionCode) {
|
|
312
312
|
if (!permission.checkVisible(item.permissionCode)) {
|
|
313
|
-
return
|
|
313
|
+
return renderEmptyElement($xeMenu);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
return h('div', {
|
|
@@ -340,7 +340,7 @@ export default defineComponent({
|
|
|
340
340
|
? h('div', {
|
|
341
341
|
class: 'vxe-menu--item-group'
|
|
342
342
|
}, childList.map(child => renderDefaultChildren(child)))
|
|
343
|
-
:
|
|
343
|
+
: renderEmptyElement($xeMenu)
|
|
344
344
|
]);
|
|
345
345
|
};
|
|
346
346
|
const renderVN = () => {
|
|
@@ -376,9 +376,9 @@ export default defineComponent({
|
|
|
376
376
|
? h('div', {
|
|
377
377
|
class: 'vxe-menu--item-list'
|
|
378
378
|
}, menuList.map(child => renderDefaultChildren(child)))
|
|
379
|
-
:
|
|
379
|
+
: renderEmptyElement($xeMenu)
|
|
380
380
|
])
|
|
381
|
-
:
|
|
381
|
+
: renderEmptyElement($xeMenu),
|
|
382
382
|
/**
|
|
383
383
|
* 加载中
|
|
384
384
|
*/
|
package/es/modal/src/modal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent, h, Teleport, ref, inject, computed, reactive, provide, nextTick, watch, onMounted, onUnmounted
|
|
1
|
+
import { defineComponent, h, Teleport, ref, inject, computed, reactive, provide, nextTick, watch, onMounted, onUnmounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getDomNode, getEventTargetNode, toCssUnit } from '../../ui/src/dom';
|
|
4
4
|
import { getLastZIndex, nextZIndex, getFuncText, handleBooleanDefaultValue } from '../../ui/src/utils';
|
|
5
|
-
import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize } from '../../ui';
|
|
5
|
+
import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize, renderEmptyElement } from '../../ui';
|
|
6
6
|
import VxeButtonComponent from '../../button/src/button';
|
|
7
7
|
import VxeLoadingComponent from '../../loading/index';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -1112,7 +1112,7 @@ export default defineComponent({
|
|
|
1112
1112
|
? h('div', {
|
|
1113
1113
|
class: 'vxe-modal--corner-wrapper'
|
|
1114
1114
|
}, getSlotVNs(cornerSlot({ $modal: $xeModal })))
|
|
1115
|
-
:
|
|
1115
|
+
: renderEmptyElement($xeModal),
|
|
1116
1116
|
(XEUtils.isBoolean(showMinimize) ? showMinimize : showZoom)
|
|
1117
1117
|
? h('div', {
|
|
1118
1118
|
class: ['vxe-modal--zoom-btn', 'trigger--btn'],
|
|
@@ -1123,7 +1123,7 @@ export default defineComponent({
|
|
|
1123
1123
|
class: zoomStatus === 'minimize' ? getIcon().MODAL_ZOOM_REVERT : getIcon().MODAL_ZOOM_MIN
|
|
1124
1124
|
})
|
|
1125
1125
|
])
|
|
1126
|
-
:
|
|
1126
|
+
: renderEmptyElement($xeModal),
|
|
1127
1127
|
(XEUtils.isBoolean(showMaximize) ? showMaximize : showZoom) && zoomStatus !== 'minimize'
|
|
1128
1128
|
? h('div', {
|
|
1129
1129
|
class: ['vxe-modal--zoom-btn', 'trigger--btn'],
|
|
@@ -1134,7 +1134,7 @@ export default defineComponent({
|
|
|
1134
1134
|
class: zoomStatus === 'maximize' ? getIcon().MODAL_ZOOM_OUT : getIcon().MODAL_ZOOM_IN
|
|
1135
1135
|
})
|
|
1136
1136
|
])
|
|
1137
|
-
:
|
|
1137
|
+
: renderEmptyElement($xeModal),
|
|
1138
1138
|
showClose
|
|
1139
1139
|
? h('div', {
|
|
1140
1140
|
class: ['vxe-modal--close-btn', 'trigger--btn'],
|
|
@@ -1145,7 +1145,7 @@ export default defineComponent({
|
|
|
1145
1145
|
class: getIcon().MODAL_CLOSE
|
|
1146
1146
|
})
|
|
1147
1147
|
])
|
|
1148
|
-
:
|
|
1148
|
+
: renderEmptyElement($xeModal)
|
|
1149
1149
|
])
|
|
1150
1150
|
];
|
|
1151
1151
|
};
|
|
@@ -1164,7 +1164,7 @@ export default defineComponent({
|
|
|
1164
1164
|
'is--ellipsis': props.showTitleOverflow
|
|
1165
1165
|
}] }, headerOns), headerSlot ? getSlotVNs(headerSlot({ $modal: $xeModal })) : renderTitles());
|
|
1166
1166
|
}
|
|
1167
|
-
return
|
|
1167
|
+
return renderEmptyElement($xeModal);
|
|
1168
1168
|
};
|
|
1169
1169
|
const renderBody = () => {
|
|
1170
1170
|
const { slots: propSlots = {}, status, message, iconStatus } = props;
|
|
@@ -1193,7 +1193,7 @@ export default defineComponent({
|
|
|
1193
1193
|
? h('div', {
|
|
1194
1194
|
class: 'vxe-modal--body-left'
|
|
1195
1195
|
}, getSlotVNs(leftSlot({ $modal: $xeModal })))
|
|
1196
|
-
:
|
|
1196
|
+
: renderEmptyElement($xeModal),
|
|
1197
1197
|
h('div', {
|
|
1198
1198
|
class: 'vxe-modal--body-default'
|
|
1199
1199
|
}, contVNs),
|
|
@@ -1201,9 +1201,9 @@ export default defineComponent({
|
|
|
1201
1201
|
? h('div', {
|
|
1202
1202
|
class: 'vxe-modal--body-right'
|
|
1203
1203
|
}, getSlotVNs(rightSlot({ $modal: $xeModal })))
|
|
1204
|
-
:
|
|
1204
|
+
: renderEmptyElement($xeModal),
|
|
1205
1205
|
isMsg
|
|
1206
|
-
?
|
|
1206
|
+
? renderEmptyElement($xeModal)
|
|
1207
1207
|
: h(VxeLoadingComponent, {
|
|
1208
1208
|
class: 'vxe-modal--loading',
|
|
1209
1209
|
modelValue: props.loading
|
|
@@ -1252,7 +1252,7 @@ export default defineComponent({
|
|
|
1252
1252
|
class: 'vxe-modal--footer'
|
|
1253
1253
|
}, footerSlot ? getSlotVNs(footerSlot({ $modal: $xeModal })) : [renderDefaultFooter()]);
|
|
1254
1254
|
}
|
|
1255
|
-
return
|
|
1255
|
+
return renderEmptyElement($xeModal);
|
|
1256
1256
|
};
|
|
1257
1257
|
const renderVN = () => {
|
|
1258
1258
|
const { slots: propSlots = {}, className, type, animat, draggable, iconStatus, position, loading, destroyOnClose, status, lockScroll, padding, lockView, mask, resize } = props;
|
|
@@ -1307,9 +1307,9 @@ export default defineComponent({
|
|
|
1307
1307
|
class: ['vxe-modal--status-icon', iconStatus || getIcon()[`MODAL_${status}`.toLocaleUpperCase()]]
|
|
1308
1308
|
})
|
|
1309
1309
|
])
|
|
1310
|
-
:
|
|
1310
|
+
: renderEmptyElement($xeModal)
|
|
1311
1311
|
])
|
|
1312
|
-
:
|
|
1312
|
+
: renderEmptyElement($xeModal),
|
|
1313
1313
|
h('div', {
|
|
1314
1314
|
class: 'vxe-modal--container'
|
|
1315
1315
|
}, !reactData.initialized || (destroyOnClose && !reactData.visible)
|
|
@@ -1328,7 +1328,7 @@ export default defineComponent({
|
|
|
1328
1328
|
onMousedown: dragEvent
|
|
1329
1329
|
});
|
|
1330
1330
|
}))
|
|
1331
|
-
:
|
|
1331
|
+
: renderEmptyElement($xeModal)
|
|
1332
1332
|
])
|
|
1333
1333
|
])
|
|
1334
1334
|
])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, h, ref, computed, reactive, inject, nextTick, watch
|
|
1
|
+
import { defineComponent, h, ref, computed, reactive, inject, nextTick, watch } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, getIcon, getI18n, createEvent, useSize } from '../../ui';
|
|
3
|
+
import { getConfig, getIcon, getI18n, createEvent, useSize, renderEmptyElement } from '../../ui';
|
|
4
4
|
import { getFuncText } from '../../ui/src/utils';
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
6
6
|
export default defineComponent({
|
|
@@ -237,8 +237,8 @@ export default defineComponent({
|
|
|
237
237
|
class: getIcon().INPUT_CLEAR
|
|
238
238
|
})
|
|
239
239
|
])
|
|
240
|
-
:
|
|
241
|
-
controls ? renderPasswordIcon() :
|
|
240
|
+
: renderEmptyElement($xePasswordInput),
|
|
241
|
+
controls ? renderPasswordIcon() : renderEmptyElement($xePasswordInput),
|
|
242
242
|
suffixSlot || suffixIcon
|
|
243
243
|
? h('div', {
|
|
244
244
|
class: 'vxe-password-input--suffix-icon',
|
|
@@ -250,7 +250,7 @@ export default defineComponent({
|
|
|
250
250
|
class: suffixIcon
|
|
251
251
|
})
|
|
252
252
|
])
|
|
253
|
-
:
|
|
253
|
+
: renderEmptyElement($xePasswordInput)
|
|
254
254
|
])
|
|
255
255
|
: null;
|
|
256
256
|
};
|
|
@@ -304,7 +304,7 @@ export default defineComponent({
|
|
|
304
304
|
}],
|
|
305
305
|
spellcheck: false
|
|
306
306
|
}, [
|
|
307
|
-
prefix ||
|
|
307
|
+
prefix || renderEmptyElement($xePasswordInput),
|
|
308
308
|
h('div', {
|
|
309
309
|
class: 'vxe-password-input--wrapper'
|
|
310
310
|
}, [
|
|
@@ -326,7 +326,7 @@ export default defineComponent({
|
|
|
326
326
|
onBlur: blurEvent
|
|
327
327
|
})
|
|
328
328
|
]),
|
|
329
|
-
suffix ||
|
|
329
|
+
suffix || renderEmptyElement($xePasswordInput)
|
|
330
330
|
]);
|
|
331
331
|
};
|
|
332
332
|
$xePasswordInput.renderVN = renderVN;
|
package/es/print/src/print.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, provide
|
|
1
|
+
import { defineComponent, ref, h, reactive, provide } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, createEvent } from '../../ui';
|
|
3
|
+
import { getConfig, createEvent, renderEmptyElement } from '../../ui';
|
|
4
4
|
import { printHtml, trimHtml } from './util';
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
6
6
|
export default defineComponent({
|
|
@@ -107,7 +107,7 @@ export default defineComponent({
|
|
|
107
107
|
? h('div', {
|
|
108
108
|
class: 'vxe-print-page-break--header-title'
|
|
109
109
|
}, `${title || ''}`)
|
|
110
|
-
:
|
|
110
|
+
: renderEmptyElement($xePrint)
|
|
111
111
|
]),
|
|
112
112
|
h('div', {
|
|
113
113
|
class: 'vxe-print-page-break--body'
|
|
@@ -131,7 +131,7 @@ export default defineComponent({
|
|
|
131
131
|
? h('div', {
|
|
132
132
|
class: 'vxe-print-page-break--footer-page-number'
|
|
133
133
|
}, `${currentPage}/${pageCount}`)
|
|
134
|
-
:
|
|
134
|
+
: renderEmptyElement($xePrint)
|
|
135
135
|
])
|
|
136
136
|
]);
|
|
137
137
|
});
|
|
@@ -164,7 +164,7 @@ export default defineComponent({
|
|
|
164
164
|
? h('div', {
|
|
165
165
|
class: 'vxe-print-page-break--header-title'
|
|
166
166
|
}, `${title || ''}`)
|
|
167
|
-
:
|
|
167
|
+
: renderEmptyElement($xePrint)
|
|
168
168
|
]),
|
|
169
169
|
h('div', {
|
|
170
170
|
class: 'vxe-print-page-break--body'
|
|
@@ -188,7 +188,7 @@ export default defineComponent({
|
|
|
188
188
|
? h('div', {
|
|
189
189
|
class: 'vxe-print-page-break--footer-page-number'
|
|
190
190
|
}, `${currentPage}/${pageCount}`)
|
|
191
|
-
:
|
|
191
|
+
: renderEmptyElement($xePrint)
|
|
192
192
|
])
|
|
193
193
|
]);
|
|
194
194
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, h, Teleport, ref, onUnmounted, reactive, inject, computed, nextTick, watch
|
|
1
|
+
import { defineComponent, h, Teleport, ref, onUnmounted, reactive, inject, computed, nextTick, watch } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, globalEvents, createEvent, useSize } from '../../ui';
|
|
3
|
+
import { getConfig, globalEvents, createEvent, useSize, renderEmptyElement } from '../../ui';
|
|
4
4
|
import { getEventTargetNode, updatePanelPlacement } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
export default defineComponent({
|
|
@@ -335,7 +335,7 @@ export default defineComponent({
|
|
|
335
335
|
? h('div', {
|
|
336
336
|
class: 'vxe-pulldown--panel-header'
|
|
337
337
|
}, headerSlot({ $pulldown: $xePulldown }))
|
|
338
|
-
:
|
|
338
|
+
: renderEmptyElement($xePulldown),
|
|
339
339
|
h('div', {
|
|
340
340
|
class: 'vxe-pulldown--panel-body'
|
|
341
341
|
}, dropdownSlot
|
|
@@ -347,7 +347,7 @@ export default defineComponent({
|
|
|
347
347
|
? h('div', {
|
|
348
348
|
class: 'vxe-pulldown--panel-footer'
|
|
349
349
|
}, footerSlot({ $pulldown: $xePulldown }))
|
|
350
|
-
:
|
|
350
|
+
: renderEmptyElement($xePulldown)
|
|
351
351
|
]
|
|
352
352
|
: [])
|
|
353
353
|
])
|