vxe-pc-ui 4.6.8 → 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/es/icon/{iconfont.1747192660271.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/es/icon/{iconfont.1747192660271.woff → iconfont.1747279440023.woff} +0 -0
- /package/es/icon/{iconfont.1747192660271.woff2 → iconfont.1747279440023.woff2} +0 -0
- /package/es/{iconfont.1747192660271.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/es/{iconfont.1747192660271.woff → iconfont.1747279440023.woff} +0 -0
- /package/es/{iconfont.1747192660271.woff2 → iconfont.1747279440023.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1747192660271.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1747192660271.woff → iconfont.1747279440023.woff} +0 -0
- /package/lib/icon/style/{iconfont.1747192660271.woff2 → iconfont.1747279440023.woff2} +0 -0
- /package/lib/{iconfont.1747192660271.ttf → iconfont.1747279440023.ttf} +0 -0
- /package/lib/{iconfont.1747192660271.woff → iconfont.1747279440023.woff} +0 -0
- /package/lib/{iconfont.1747192660271.woff2 → iconfont.1747279440023.woff2} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, h, ref, Ref, computed, reactive, nextTick,
|
|
1
|
+
import { defineComponent, h, ref, Ref, computed, reactive, nextTick, PropType, inject } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getConfig, createEvent, useSize } from '../../ui'
|
|
3
|
+
import { getConfig, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { getFuncText } from '../../ui/src/utils'
|
|
5
5
|
|
|
6
6
|
import type { VxeSwitchPropTypes, VxeSwitchConstructor, VxeSwitchEmits, SwitchInternalData, ValueOf, SwitchReactData, SwitchMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
@@ -200,7 +200,7 @@ export default defineComponent({
|
|
|
200
200
|
? h('i', {
|
|
201
201
|
class: ['vxe-switch--label-icon', openIcon]
|
|
202
202
|
})
|
|
203
|
-
:
|
|
203
|
+
: renderEmptyElement($xeSwitch),
|
|
204
204
|
onShowLabel
|
|
205
205
|
]),
|
|
206
206
|
h('span', {
|
|
@@ -210,7 +210,7 @@ export default defineComponent({
|
|
|
210
210
|
? h('i', {
|
|
211
211
|
class: ['vxe-switch--label-icon', closeIcon]
|
|
212
212
|
})
|
|
213
|
-
:
|
|
213
|
+
: renderEmptyElement($xeSwitch),
|
|
214
214
|
offShowLabel
|
|
215
215
|
]),
|
|
216
216
|
h('span', {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, inject, PropType, provide, computed, onUnmounted,
|
|
1
|
+
import { defineComponent, ref, h, reactive, inject, PropType, provide, computed, onUnmounted, watch, nextTick, onMounted } from 'vue'
|
|
2
2
|
import { createEvent, getConfig, getIcon, globalEvents, permission, renderEmptyElement } from '../../ui'
|
|
3
3
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
4
4
|
import { toCssUnit } from '../../ui/src/dom'
|
|
@@ -438,7 +438,7 @@ export default defineComponent({
|
|
|
438
438
|
class: getIcon().TABS_TAB_BUTTON_LEFT
|
|
439
439
|
})
|
|
440
440
|
])
|
|
441
|
-
:
|
|
441
|
+
: renderEmptyElement($xeTabs),
|
|
442
442
|
h('div', {
|
|
443
443
|
class: 'vxe-tabs-header--wrapper'
|
|
444
444
|
}, [
|
|
@@ -482,7 +482,7 @@ export default defineComponent({
|
|
|
482
482
|
class: icon
|
|
483
483
|
})
|
|
484
484
|
])
|
|
485
|
-
:
|
|
485
|
+
: renderEmptyElement($xeTabs),
|
|
486
486
|
h('span', {
|
|
487
487
|
class: 'vxe-tabs-header--item-name'
|
|
488
488
|
}, titleSlot ? callSlot(titleSlot, { name, title }) : `${title}`)
|
|
@@ -498,7 +498,7 @@ export default defineComponent({
|
|
|
498
498
|
class: isLoading ? getIcon().TABS_TAB_REFRESH_LOADING : getIcon().TABS_TAB_REFRESH
|
|
499
499
|
})
|
|
500
500
|
])
|
|
501
|
-
:
|
|
501
|
+
: renderEmptyElement($xeTabs),
|
|
502
502
|
(showClose || (isEnableConf(closeConfig) || closeOpts.enabled)) && (!closeVisibleMethod || closeVisibleMethod(params))
|
|
503
503
|
? h('div', {
|
|
504
504
|
class: 'vxe-tabs-header--close-btn',
|
|
@@ -510,7 +510,7 @@ export default defineComponent({
|
|
|
510
510
|
class: getIcon().TABS_TAB_CLOSE
|
|
511
511
|
})
|
|
512
512
|
])
|
|
513
|
-
:
|
|
513
|
+
: renderEmptyElement($xeTabs)
|
|
514
514
|
])
|
|
515
515
|
])
|
|
516
516
|
}).concat([
|
|
@@ -533,12 +533,12 @@ export default defineComponent({
|
|
|
533
533
|
class: getIcon().TABS_TAB_BUTTON_RIGHT
|
|
534
534
|
})
|
|
535
535
|
])
|
|
536
|
-
:
|
|
536
|
+
: renderEmptyElement($xeTabs),
|
|
537
537
|
extraSlot
|
|
538
538
|
? h('div', {
|
|
539
539
|
class: 'vxe-tabs-header--extra'
|
|
540
540
|
}, getSlotVNs(extraSlot({})))
|
|
541
|
-
:
|
|
541
|
+
: renderEmptyElement($xeTabs)
|
|
542
542
|
])
|
|
543
543
|
}
|
|
544
544
|
|
|
@@ -554,7 +554,7 @@ export default defineComponent({
|
|
|
554
554
|
'has--content': !!defaultSlot
|
|
555
555
|
}]
|
|
556
556
|
}, defaultSlot ? callSlot(defaultSlot, { name }) : [])
|
|
557
|
-
:
|
|
557
|
+
: renderEmptyElement($xeTabs)
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
const renderTabContent = (tabList: VxeTabsPropTypes.Options | VxeTabPaneDefines.TabConfig[]) => {
|
|
@@ -562,7 +562,7 @@ export default defineComponent({
|
|
|
562
562
|
const { activeName } = reactData
|
|
563
563
|
const activeDefaultTab = tabList.find(item => item.name === activeName)
|
|
564
564
|
if (destroyOnClose) {
|
|
565
|
-
return [activeDefaultTab ? renderTabPane(activeDefaultTab) :
|
|
565
|
+
return [activeDefaultTab ? renderTabPane(activeDefaultTab) : renderEmptyElement($xeTabs)]
|
|
566
566
|
}
|
|
567
567
|
return tabList.map((item) => renderTabPane(item))
|
|
568
568
|
}
|
package/packages/tag/src/tag.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, PropType
|
|
1
|
+
import { defineComponent, ref, h, reactive, PropType } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getConfig, createEvent, useSize } from '../../ui'
|
|
3
|
+
import { getConfig, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
5
5
|
|
|
6
6
|
import type { VxeTagPropTypes, TagReactData, TagPrivateRef, VxeTagEmits, VxeTagPrivateComputed, TagMethods, TagPrivateMethods, VxeTagConstructor, VxeTagPrivateMethods, ValueOf } from '../../../types'
|
|
@@ -81,7 +81,7 @@ export default defineComponent({
|
|
|
81
81
|
class: icon
|
|
82
82
|
})
|
|
83
83
|
])
|
|
84
|
-
:
|
|
84
|
+
: renderEmptyElement($xeTag),
|
|
85
85
|
h('span', {
|
|
86
86
|
class: 'vxe-tag--content'
|
|
87
87
|
}, defaultSlot ? defaultSlot({}) : XEUtils.toValueString(content))
|
package/packages/tip/src/tip.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, PropType
|
|
1
|
+
import { defineComponent, ref, h, reactive, PropType } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getConfig, useSize, usePermission, createEvent } from '../../ui'
|
|
3
|
+
import { getConfig, useSize, usePermission, createEvent, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
5
5
|
|
|
6
6
|
import type { VxeTipPropTypes, TipReactData, VxeTipEmits, TipMethods, TipPrivateMethods, TipPrivateRef, VxeTipPrivateComputed, VxeTipConstructor, VxeTipPrivateMethods, ValueOf } from '../../../types'
|
|
@@ -82,7 +82,7 @@ export default defineComponent({
|
|
|
82
82
|
const vSize = computeSize.value
|
|
83
83
|
|
|
84
84
|
if (!permissionInfo.visible) {
|
|
85
|
-
return
|
|
85
|
+
return renderEmptyElement($xeTip)
|
|
86
86
|
}
|
|
87
87
|
return h('div', {
|
|
88
88
|
ref: refElem,
|
|
@@ -102,7 +102,7 @@ export default defineComponent({
|
|
|
102
102
|
class: icon
|
|
103
103
|
})
|
|
104
104
|
])
|
|
105
|
-
:
|
|
105
|
+
: renderEmptyElement($xeTip),
|
|
106
106
|
h('div', {
|
|
107
107
|
class: 'vxe-tip--body'
|
|
108
108
|
}, [
|
|
@@ -110,7 +110,7 @@ export default defineComponent({
|
|
|
110
110
|
? h('div', {
|
|
111
111
|
class: 'vxe-tip--title'
|
|
112
112
|
}, titleSlot ? getSlotVNs(titleSlot({})) : XEUtils.toValueString(title))
|
|
113
|
-
:
|
|
113
|
+
: renderEmptyElement($xeTip),
|
|
114
114
|
h('div', {
|
|
115
115
|
class: 'vxe-tip--content'
|
|
116
116
|
}, defaultSlot ? getSlotVNs(defaultSlot({})) : XEUtils.toValueString(content))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, PropType, computed, VNode,
|
|
2
|
-
import { createEvent, getIcon, getConfig, useSize } from '../../ui'
|
|
1
|
+
import { defineComponent, ref, h, reactive, PropType, computed, VNode, watch, onUnmounted, nextTick } from 'vue'
|
|
2
|
+
import { createEvent, getIcon, getConfig, useSize, renderEmptyElement } from '../../ui'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
5
5
|
import { toCssUnit } from '../../ui/src/dom'
|
|
@@ -1050,7 +1050,7 @@ export default defineComponent({
|
|
|
1050
1050
|
})
|
|
1051
1051
|
])
|
|
1052
1052
|
}
|
|
1053
|
-
return
|
|
1053
|
+
return renderEmptyElement($xeTree)
|
|
1054
1054
|
}
|
|
1055
1055
|
|
|
1056
1056
|
const renderCheckbox = (node: any, nodeid: string, isChecked: boolean) => {
|
|
@@ -1081,7 +1081,7 @@ export default defineComponent({
|
|
|
1081
1081
|
})
|
|
1082
1082
|
])
|
|
1083
1083
|
}
|
|
1084
|
-
return
|
|
1084
|
+
return renderEmptyElement($xeTree)
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
1087
|
const renderNode = (node: any): VNode => {
|
|
@@ -1177,7 +1177,7 @@ export default defineComponent({
|
|
|
1177
1177
|
])
|
|
1178
1178
|
]
|
|
1179
1179
|
: [])
|
|
1180
|
-
:
|
|
1180
|
+
: renderEmptyElement($xeTree),
|
|
1181
1181
|
renderRadio(node, nodeid, isRadioChecked),
|
|
1182
1182
|
renderCheckbox(node, nodeid, isCheckboxChecked),
|
|
1183
1183
|
h('div', {
|
|
@@ -1190,14 +1190,14 @@ export default defineComponent({
|
|
|
1190
1190
|
? h('div', {
|
|
1191
1191
|
class: 'vxe-tree--node-item-extra'
|
|
1192
1192
|
}, getSlotVNs(extraSlot({ node, isExpand })))
|
|
1193
|
-
:
|
|
1193
|
+
: renderEmptyElement($xeTree)
|
|
1194
1194
|
])
|
|
1195
1195
|
]),
|
|
1196
1196
|
hasChild && treeExpandedMaps[nodeid]
|
|
1197
1197
|
? h('div', {
|
|
1198
1198
|
class: 'vxe-tree--node-child-wrapper'
|
|
1199
1199
|
}, childVns)
|
|
1200
|
-
:
|
|
1200
|
+
: renderEmptyElement($xeTree)
|
|
1201
1201
|
])
|
|
1202
1202
|
}
|
|
1203
1203
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, h, reactive, watch, computed, TransitionGroup, PropType, inject,
|
|
1
|
+
import { defineComponent, ref, h, reactive, watch, computed, TransitionGroup, PropType, inject, onUnmounted, onMounted } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI, getConfig, getI18n, getIcon, useSize, createEvent, globalEvents, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -1245,12 +1245,12 @@ export default defineComponent({
|
|
|
1245
1245
|
class: getIcon().UPLOAD_LOADING
|
|
1246
1246
|
})
|
|
1247
1247
|
])
|
|
1248
|
-
:
|
|
1248
|
+
: renderEmptyElement($xeUpload),
|
|
1249
1249
|
showProgress && isLoading && cacheItem
|
|
1250
1250
|
? h('div', {
|
|
1251
1251
|
class: 'vxe-upload--file-item-loading-text'
|
|
1252
1252
|
}, progressText ? XEUtils.toFormatString(`${XEUtils.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n('vxe.upload.uploadProgress', [cacheItem.percent]))
|
|
1253
|
-
:
|
|
1253
|
+
: renderEmptyElement($xeUpload),
|
|
1254
1254
|
showErrorStatus && isError
|
|
1255
1255
|
? h('div', {
|
|
1256
1256
|
class: 'vxe-upload--image-item-error'
|
|
@@ -1265,7 +1265,7 @@ export default defineComponent({
|
|
|
1265
1265
|
}
|
|
1266
1266
|
})
|
|
1267
1267
|
])
|
|
1268
|
-
:
|
|
1268
|
+
: renderEmptyElement($xeUpload),
|
|
1269
1269
|
h('div', {
|
|
1270
1270
|
class: 'vxe-upload--file-item-btn-wrapper'
|
|
1271
1271
|
}, [
|
|
@@ -1273,7 +1273,7 @@ export default defineComponent({
|
|
|
1273
1273
|
? h('div', {
|
|
1274
1274
|
class: 'vxe-upload--file-item-corner'
|
|
1275
1275
|
}, getSlotVNs(cornerSlot({ option: item, isMoreView, readonly: formReadonly })))
|
|
1276
|
-
:
|
|
1276
|
+
: renderEmptyElement($xeUpload),
|
|
1277
1277
|
showDownloadButton && !isLoading
|
|
1278
1278
|
? h('div', {
|
|
1279
1279
|
class: 'vxe-upload--file-item-download-btn',
|
|
@@ -1285,7 +1285,7 @@ export default defineComponent({
|
|
|
1285
1285
|
class: getIcon().UPLOAD_FILE_DOWNLOAD
|
|
1286
1286
|
})
|
|
1287
1287
|
])
|
|
1288
|
-
:
|
|
1288
|
+
: renderEmptyElement($xeUpload),
|
|
1289
1289
|
showRemoveButton && !formReadonly && !isDisabled && !isLoading
|
|
1290
1290
|
? h('div', {
|
|
1291
1291
|
class: 'vxe-upload--file-item-remove-btn',
|
|
@@ -1297,7 +1297,7 @@ export default defineComponent({
|
|
|
1297
1297
|
class: getIcon().UPLOAD_FILE_REMOVE
|
|
1298
1298
|
})
|
|
1299
1299
|
])
|
|
1300
|
-
:
|
|
1300
|
+
: renderEmptyElement($xeUpload)
|
|
1301
1301
|
])
|
|
1302
1302
|
])
|
|
1303
1303
|
})
|
|
@@ -1314,13 +1314,13 @@ export default defineComponent({
|
|
|
1314
1314
|
const tipSlot = slots.tip || slots.hint
|
|
1315
1315
|
|
|
1316
1316
|
if (formReadonly || !showUploadButton) {
|
|
1317
|
-
return
|
|
1317
|
+
return renderEmptyElement($xeUpload)
|
|
1318
1318
|
}
|
|
1319
1319
|
return h('div', {
|
|
1320
1320
|
class: 'vxe-upload--file-action'
|
|
1321
1321
|
}, [
|
|
1322
1322
|
autoHiddenButton && overCount
|
|
1323
|
-
?
|
|
1323
|
+
? renderEmptyElement($xeUpload)
|
|
1324
1324
|
: h('div', {
|
|
1325
1325
|
class: 'vxe-upload--file-action-btn',
|
|
1326
1326
|
onClick: clickEvent
|
|
@@ -1338,7 +1338,7 @@ export default defineComponent({
|
|
|
1338
1338
|
? h('div', {
|
|
1339
1339
|
class: 'vxe-upload--file-action-tip'
|
|
1340
1340
|
}, tipSlot ? getSlotVNs(tipSlot({ $upload: $xeUpload })) : `${defTipText}`)
|
|
1341
|
-
:
|
|
1341
|
+
: renderEmptyElement($xeUpload)
|
|
1342
1342
|
])
|
|
1343
1343
|
}
|
|
1344
1344
|
|
|
@@ -1363,7 +1363,7 @@ export default defineComponent({
|
|
|
1363
1363
|
}, showList
|
|
1364
1364
|
? [
|
|
1365
1365
|
showMoreButton && moreConfig && isHorizontal
|
|
1366
|
-
?
|
|
1366
|
+
? renderEmptyElement($xeUpload)
|
|
1367
1367
|
: renderFileAction(true),
|
|
1368
1368
|
(currList.length || (showMoreButton && isHorizontal))
|
|
1369
1369
|
? h('div', {
|
|
@@ -1385,7 +1385,7 @@ export default defineComponent({
|
|
|
1385
1385
|
class: 'vxe-upload--file-list'
|
|
1386
1386
|
}, renderFileItemList(currList, false))
|
|
1387
1387
|
)
|
|
1388
|
-
:
|
|
1388
|
+
: renderEmptyElement($xeUpload),
|
|
1389
1389
|
showMoreButton && overMaxNum
|
|
1390
1390
|
? h('div', {
|
|
1391
1391
|
class: 'vxe-upload--file-over-more'
|
|
@@ -1397,12 +1397,12 @@ export default defineComponent({
|
|
|
1397
1397
|
onClick: handleMoreEvent
|
|
1398
1398
|
})
|
|
1399
1399
|
])
|
|
1400
|
-
:
|
|
1400
|
+
: renderEmptyElement($xeUpload),
|
|
1401
1401
|
showMoreButton && moreConfig && isHorizontal
|
|
1402
1402
|
? renderFileAction(false)
|
|
1403
|
-
:
|
|
1403
|
+
: renderEmptyElement($xeUpload)
|
|
1404
1404
|
])
|
|
1405
|
-
:
|
|
1405
|
+
: renderEmptyElement($xeUpload)
|
|
1406
1406
|
]
|
|
1407
1407
|
: [
|
|
1408
1408
|
renderFileAction(false)
|
|
@@ -1469,9 +1469,9 @@ export default defineComponent({
|
|
|
1469
1469
|
? h('div', {
|
|
1470
1470
|
class: 'vxe-upload--image-item-loading-text'
|
|
1471
1471
|
}, progressText ? XEUtils.toFormatString(`${XEUtils.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n('vxe.upload.uploadProgress', [cacheItem.percent]))
|
|
1472
|
-
:
|
|
1472
|
+
: renderEmptyElement($xeUpload)
|
|
1473
1473
|
])
|
|
1474
|
-
:
|
|
1474
|
+
: renderEmptyElement($xeUpload),
|
|
1475
1475
|
!isLoading
|
|
1476
1476
|
? (
|
|
1477
1477
|
isError && showErrorStatus
|
|
@@ -1497,7 +1497,7 @@ export default defineComponent({
|
|
|
1497
1497
|
})
|
|
1498
1498
|
])
|
|
1499
1499
|
)
|
|
1500
|
-
:
|
|
1500
|
+
: renderEmptyElement($xeUpload),
|
|
1501
1501
|
h('div', {
|
|
1502
1502
|
class: 'vxe-upload--image-item-btn-wrapper',
|
|
1503
1503
|
onClick (evnt) {
|
|
@@ -1508,7 +1508,7 @@ export default defineComponent({
|
|
|
1508
1508
|
? h('div', {
|
|
1509
1509
|
class: 'vxe-upload--file-item-corner'
|
|
1510
1510
|
}, getSlotVNs(cornerSlot({ option: item, isMoreView, readonly: formReadonly })))
|
|
1511
|
-
:
|
|
1511
|
+
: renderEmptyElement($xeUpload),
|
|
1512
1512
|
showRemoveButton && !formReadonly && !isDisabled && !isLoading
|
|
1513
1513
|
? h('div', {
|
|
1514
1514
|
class: 'vxe-upload--image-item-remove-btn',
|
|
@@ -1521,7 +1521,7 @@ export default defineComponent({
|
|
|
1521
1521
|
class: getIcon().UPLOAD_IMAGE_REMOVE
|
|
1522
1522
|
})
|
|
1523
1523
|
])
|
|
1524
|
-
:
|
|
1524
|
+
: renderEmptyElement($xeUpload)
|
|
1525
1525
|
])
|
|
1526
1526
|
])
|
|
1527
1527
|
])
|
|
@@ -1539,7 +1539,7 @@ export default defineComponent({
|
|
|
1539
1539
|
const tipSlot = slots.tip || slots.hint
|
|
1540
1540
|
|
|
1541
1541
|
if (formReadonly || !showUploadButton || (autoHiddenButton && overCount)) {
|
|
1542
|
-
return
|
|
1542
|
+
return renderEmptyElement($xeUpload)
|
|
1543
1543
|
}
|
|
1544
1544
|
return h('div', {
|
|
1545
1545
|
key: 'action',
|
|
@@ -1563,17 +1563,17 @@ export default defineComponent({
|
|
|
1563
1563
|
class: buttonIcon || getIcon().UPLOAD_IMAGE_ADD
|
|
1564
1564
|
})
|
|
1565
1565
|
])
|
|
1566
|
-
:
|
|
1566
|
+
: renderEmptyElement($xeUpload),
|
|
1567
1567
|
isMoreView || showButtonText
|
|
1568
1568
|
? h('div', {
|
|
1569
1569
|
class: 'vxe-upload--image-action-content'
|
|
1570
1570
|
}, buttonText ? `${XEUtils.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n('vxe.upload.imgBtnText'))
|
|
1571
|
-
:
|
|
1571
|
+
: renderEmptyElement($xeUpload),
|
|
1572
1572
|
showTipText && (defTipText || tipSlot)
|
|
1573
1573
|
? h('div', {
|
|
1574
1574
|
class: 'vxe-upload--image-action-hint'
|
|
1575
1575
|
}, tipSlot ? getSlotVNs(tipSlot({ $upload: $xeUpload })) : `${defTipText}`)
|
|
1576
|
-
:
|
|
1576
|
+
: renderEmptyElement($xeUpload)
|
|
1577
1577
|
])
|
|
1578
1578
|
])
|
|
1579
1579
|
])
|
|
@@ -1616,7 +1616,7 @@ export default defineComponent({
|
|
|
1616
1616
|
onClick: handleMoreEvent
|
|
1617
1617
|
})
|
|
1618
1618
|
])
|
|
1619
|
-
:
|
|
1619
|
+
: renderEmptyElement($xeUpload),
|
|
1620
1620
|
renderImageAction(false)
|
|
1621
1621
|
])
|
|
1622
1622
|
})
|
|
@@ -1634,7 +1634,7 @@ export default defineComponent({
|
|
|
1634
1634
|
onClick: handleMoreEvent
|
|
1635
1635
|
})
|
|
1636
1636
|
])
|
|
1637
|
-
:
|
|
1637
|
+
: renderEmptyElement($xeUpload),
|
|
1638
1638
|
renderImageAction(false)
|
|
1639
1639
|
]))
|
|
1640
1640
|
]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, Ref } from 'vue'
|
|
2
2
|
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
|
|
3
|
+
import { VxeImagePreviewPropTypes } from './image-preview'
|
|
3
4
|
|
|
4
5
|
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
5
6
|
|
|
@@ -33,6 +34,7 @@ export namespace VxeImageGroupPropTypes {
|
|
|
33
34
|
width?: number | string
|
|
34
35
|
height?: number | string
|
|
35
36
|
}
|
|
37
|
+
export type ToolbarConfig = VxeImagePreviewPropTypes.ToolbarConfig
|
|
36
38
|
export type ShowPrintButton = boolean
|
|
37
39
|
export type ShowDownloadButton = boolean
|
|
38
40
|
}
|
|
@@ -42,6 +44,7 @@ export type VxeImageGroupProps = {
|
|
|
42
44
|
showPreview?: VxeImageGroupPropTypes.ShowPreview
|
|
43
45
|
urlList?: VxeImageGroupPropTypes.UrlList
|
|
44
46
|
imageStyle?: VxeImageGroupPropTypes.ImageStyle
|
|
47
|
+
toolbarConfig?: VxeImageGroupPropTypes.ToolbarConfig
|
|
45
48
|
showPrintButton?: VxeImageGroupPropTypes.ShowPrintButton
|
|
46
49
|
showDownloadButton?: VxeImageGroupPropTypes.ShowDownloadButton
|
|
47
50
|
}
|
|
@@ -31,6 +31,35 @@ export namespace VxeImagePreviewPropTypes {
|
|
|
31
31
|
export type MarginSize = string | number
|
|
32
32
|
export type ShowPrintButton = boolean
|
|
33
33
|
export type ShowDownloadButton = boolean
|
|
34
|
+
export interface ToolbarConfig {
|
|
35
|
+
layouts?: ('PageNumber' | 'ZoomOut' | 'ZoomIn' | 'PctFull' | 'Pct11' | 'RotateLeft' | 'RotateRight' | 'Print' | 'Download')[]
|
|
36
|
+
zoomOut?: boolean | {
|
|
37
|
+
icon?: string
|
|
38
|
+
}
|
|
39
|
+
zoomIn?: boolean | {
|
|
40
|
+
icon?: string
|
|
41
|
+
}
|
|
42
|
+
pctFull?: boolean | {
|
|
43
|
+
icon?: string
|
|
44
|
+
}
|
|
45
|
+
pct11?: boolean | {
|
|
46
|
+
icon?: string
|
|
47
|
+
}
|
|
48
|
+
rotateLeft?: boolean | {
|
|
49
|
+
icon?: string
|
|
50
|
+
}
|
|
51
|
+
rotateRight?: boolean | {
|
|
52
|
+
icon?: string
|
|
53
|
+
}
|
|
54
|
+
print?: boolean | {
|
|
55
|
+
icon?: string
|
|
56
|
+
}
|
|
57
|
+
download?: boolean | {
|
|
58
|
+
icon?: string
|
|
59
|
+
beforeDownloadMethod?: BeforeDownloadMethod
|
|
60
|
+
downloadMethod?: DownloadMethod
|
|
61
|
+
}
|
|
62
|
+
}
|
|
34
63
|
export type BeforeDownloadMethod = undefined | ((params: {
|
|
35
64
|
$imagePreview: VxeImagePreviewConstructor
|
|
36
65
|
url: any
|
|
@@ -49,6 +78,7 @@ export type VxeImagePreviewProps = {
|
|
|
49
78
|
urlField?: VxeImagePreviewPropTypes.UrlField
|
|
50
79
|
maskClosable?: VxeImagePreviewPropTypes.MaskClosable
|
|
51
80
|
marginSize?: VxeImagePreviewPropTypes.MarginSize
|
|
81
|
+
toolbarConfig?: VxeImagePreviewPropTypes.ToolbarConfig
|
|
52
82
|
showPrintButton?: VxeImagePreviewPropTypes.ShowPrintButton
|
|
53
83
|
showDownloadButton?: VxeImagePreviewPropTypes.ShowDownloadButton
|
|
54
84
|
downloadMethod?: VxeImagePreviewPropTypes.DownloadMethod
|
|
@@ -91,6 +121,8 @@ export namespace VxeImagePreviewDefines {
|
|
|
91
121
|
$imagePreview: VxeImagePreviewConstructor
|
|
92
122
|
}
|
|
93
123
|
|
|
124
|
+
export type ToolbarCode = 'zoomOut' | 'zoomIn' | 'pctFull' | 'pct11' | 'rotateLeft' | 'rotateRight' | 'print' | 'download'
|
|
125
|
+
|
|
94
126
|
export type ChangeParams = {
|
|
95
127
|
checklist: any[]
|
|
96
128
|
}
|
|
@@ -35,6 +35,7 @@ export namespace VxeImagePropTypes {
|
|
|
35
35
|
export type Height = number | string
|
|
36
36
|
export type Circle = boolean
|
|
37
37
|
export type MaskClosable = boolean
|
|
38
|
+
export type ToolbarConfig = VxeImagePreviewPropTypes.ToolbarConfig
|
|
38
39
|
export type ShowPreview = boolean
|
|
39
40
|
export type ShowPrintButton = boolean
|
|
40
41
|
export type ShowDownloadButton = boolean
|
|
@@ -50,6 +51,7 @@ export interface VxeImageProps {
|
|
|
50
51
|
height?: VxeImagePropTypes.Height
|
|
51
52
|
circle?: VxeImagePropTypes.Circle
|
|
52
53
|
maskClosable?: VxeImagePropTypes.MaskClosable
|
|
54
|
+
toolbarConfig?: VxeImagePropTypes.ToolbarConfig
|
|
53
55
|
showPreview?: VxeImagePropTypes.ShowPreview
|
|
54
56
|
showPrintButton?: VxeImagePropTypes.ShowPrintButton
|
|
55
57
|
showDownloadButton?: VxeImagePropTypes.ShowDownloadButton
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|