vxe-pc-ui 4.12.4 → 4.12.5
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/backtop/src/backtop.js +11 -1
- package/es/icon/style.css +1 -1
- package/es/list/src/list.js +15 -11
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tree-select/src/tree-select.js +18 -14
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +26 -18
- package/lib/backtop/src/backtop.js +13 -1
- package/lib/backtop/src/backtop.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 +71 -43
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +14 -10
- package/lib/list/src/list.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tree-select/src/tree-select.js +17 -13
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +25 -17
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/backtop/src/backtop.ts +13 -1
- package/packages/list/src/list.ts +16 -11
- package/packages/tree-select/src/tree-select.ts +19 -14
- package/packages/upload/src/upload.ts +28 -18
- package/types/components/table.d.ts +13 -0
- /package/es/icon/{iconfont.1768554558299.ttf → iconfont.1768625343222.ttf} +0 -0
- /package/es/icon/{iconfont.1768554558299.woff → iconfont.1768625343222.woff} +0 -0
- /package/es/icon/{iconfont.1768554558299.woff2 → iconfont.1768625343222.woff2} +0 -0
- /package/es/{iconfont.1768554558299.ttf → iconfont.1768625343222.ttf} +0 -0
- /package/es/{iconfont.1768554558299.woff → iconfont.1768625343222.woff} +0 -0
- /package/es/{iconfont.1768554558299.woff2 → iconfont.1768625343222.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1768554558299.ttf → iconfont.1768625343222.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1768554558299.woff → iconfont.1768625343222.woff} +0 -0
- /package/lib/icon/style/{iconfont.1768554558299.woff2 → iconfont.1768625343222.woff2} +0 -0
- /package/lib/{iconfont.1768554558299.ttf → iconfont.1768625343222.ttf} +0 -0
- /package/lib/{iconfont.1768554558299.woff → iconfont.1768625343222.woff} +0 -0
- /package/lib/{iconfont.1768554558299.woff2 → iconfont.1768625343222.woff2} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, h, reactive, watch, computed, TransitionGroup, PropType, inject,
|
|
1
|
+
import { ref, h, reactive, watch, computed, TransitionGroup, PropType, inject, onBeforeUnmount, onMounted, nextTick } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI, getConfig, getI18n, getIcon, useSize, createEvent, globalEvents, renderEmptyElement } from '../../ui'
|
|
@@ -11,6 +11,28 @@ import VxeButtonComponent from '../../button/src/button'
|
|
|
11
11
|
import type { VxeUploadDefines, VxeUploadPropTypes, UploadReactData, UploadInternalData, UploadPrivateMethods, UploadMethods, VxeUploadEmits, UploadPrivateRef, VxeUploadPrivateComputed, VxeUploadConstructor, VxeUploadPrivateMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, ValueOf, VxeComponentEventParams } from '../../../types'
|
|
12
12
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
13
13
|
|
|
14
|
+
function createReactData (): UploadReactData {
|
|
15
|
+
return {
|
|
16
|
+
isDragUploadStatus: false,
|
|
17
|
+
showMorePopup: false,
|
|
18
|
+
isActivated: false,
|
|
19
|
+
fileList: [],
|
|
20
|
+
fileCacheMaps: {},
|
|
21
|
+
isDragMove: false,
|
|
22
|
+
dragIndex: -1,
|
|
23
|
+
dragTipText: ''
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function createInternalData (): UploadInternalData {
|
|
28
|
+
return {
|
|
29
|
+
moreId: XEUtils.uniqueId('upload'),
|
|
30
|
+
imagePreviewTypes: ['jpg', 'jpeg', 'png', 'gif'],
|
|
31
|
+
prevDragIndex: -1
|
|
32
|
+
// prevDragPos: ''
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
14
36
|
export default defineVxeComponent({
|
|
15
37
|
name: 'VxeUpload',
|
|
16
38
|
props: {
|
|
@@ -217,23 +239,9 @@ export default defineVxeComponent({
|
|
|
217
239
|
const refDragLineElem = ref<HTMLDivElement>()
|
|
218
240
|
const refModalDragLineElem = ref<HTMLDivElement>()
|
|
219
241
|
|
|
220
|
-
const reactData = reactive
|
|
221
|
-
isDragUploadStatus: false,
|
|
222
|
-
showMorePopup: false,
|
|
223
|
-
isActivated: false,
|
|
224
|
-
fileList: [],
|
|
225
|
-
fileCacheMaps: {},
|
|
226
|
-
isDragMove: false,
|
|
227
|
-
dragIndex: -1,
|
|
228
|
-
dragTipText: ''
|
|
229
|
-
})
|
|
242
|
+
const reactData = reactive(createReactData())
|
|
230
243
|
|
|
231
|
-
const internalData
|
|
232
|
-
moreId: XEUtils.uniqueId('upload'),
|
|
233
|
-
imagePreviewTypes: ['jpg', 'jpeg', 'png', 'gif'],
|
|
234
|
-
prevDragIndex: -1
|
|
235
|
-
// prevDragPos: ''
|
|
236
|
-
}
|
|
244
|
+
const internalData = createInternalData()
|
|
237
245
|
|
|
238
246
|
const refMaps: UploadPrivateRef = {
|
|
239
247
|
refElem
|
|
@@ -1854,11 +1862,13 @@ export default defineVxeComponent({
|
|
|
1854
1862
|
globalEvents.on($xeUpload, 'blur', handleGlobalBlurEvent)
|
|
1855
1863
|
})
|
|
1856
1864
|
|
|
1857
|
-
|
|
1865
|
+
onBeforeUnmount(() => {
|
|
1858
1866
|
reactData.isDragUploadStatus = false
|
|
1859
1867
|
globalEvents.off($xeUpload, 'paste')
|
|
1860
1868
|
globalEvents.off($xeUpload, 'mousedown')
|
|
1861
1869
|
globalEvents.off($xeUpload, 'blur')
|
|
1870
|
+
XEUtils.assign(reactData, createReactData())
|
|
1871
|
+
XEUtils.assign(internalData, createInternalData())
|
|
1862
1872
|
})
|
|
1863
1873
|
|
|
1864
1874
|
updateFileList()
|
|
@@ -1274,9 +1274,22 @@ export namespace VxeTablePropTypes {
|
|
|
1274
1274
|
transfer?: boolean
|
|
1275
1275
|
iconNone?: string
|
|
1276
1276
|
iconMatch?: string
|
|
1277
|
+
/**
|
|
1278
|
+
* 弹出层在关闭时是否销毁
|
|
1279
|
+
*/
|
|
1277
1280
|
destroyOnClose?: boolean
|
|
1281
|
+
/**
|
|
1282
|
+
* 自定义确认按钮内容
|
|
1283
|
+
*/
|
|
1278
1284
|
confirmButtonText?: string
|
|
1285
|
+
/**
|
|
1286
|
+
* 自定义重置按钮内容
|
|
1287
|
+
*/
|
|
1279
1288
|
resetButtonText?: string
|
|
1289
|
+
/**
|
|
1290
|
+
* 是否显示底部按钮
|
|
1291
|
+
*/
|
|
1292
|
+
showFooter?: boolean
|
|
1280
1293
|
}
|
|
1281
1294
|
export interface FilterOpts<D = VxeTablePropTypes.Row> extends FilterConfig<D> { }
|
|
1282
1295
|
|
|
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
|