af-mobile-client-vue3 1.1.11 → 1.1.13
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/package.json +1 -1
- package/src/components/core/Uploader/index.vue +11 -16
- package/src/components/data/XCellList/index.vue +807 -763
- package/src/components/data/XCellListFilter/index.vue +50 -3
- package/src/components/data/XFormItem/index.vue +2 -0
- package/src/router/index.ts +2 -2
- package/src/stores/modules/user.ts +4 -0
- package/src/views/component/XCellListView/index.vue +53 -19
- package/src/views/user/login/LoginForm.vue +7 -2
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Button as vanButton,
|
|
5
5
|
Uploader as vanUploader,
|
|
6
6
|
} from 'vant'
|
|
7
|
-
import {
|
|
7
|
+
import { ref, watch } from 'vue'
|
|
8
8
|
|
|
9
9
|
const props = defineProps({
|
|
10
10
|
imageList: Array<any>,
|
|
@@ -14,7 +14,16 @@ const props = defineProps({
|
|
|
14
14
|
})
|
|
15
15
|
const emit = defineEmits(['updateFileList'])
|
|
16
16
|
|
|
17
|
-
const imageList = ref(
|
|
17
|
+
const imageList = ref(props.imageList)
|
|
18
|
+
|
|
19
|
+
// 监听 props.imageList 的变化
|
|
20
|
+
watch(() => props.imageList, (newVal) => {
|
|
21
|
+
if (newVal?.length > 0) {
|
|
22
|
+
imageList.value = newVal.map((item) => {
|
|
23
|
+
return { id: item.id, name: item.f_filename, url: item.f_downloadpath }
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
}, { immediate: true, deep: true })
|
|
18
27
|
|
|
19
28
|
// 上传图片
|
|
20
29
|
function fileUpload(file: any): void {
|
|
@@ -75,20 +84,6 @@ function deleteFileFunction(file: any) {
|
|
|
75
84
|
})
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
|
-
|
|
79
|
-
// ------------------------- 初始化 -------------------------
|
|
80
|
-
|
|
81
|
-
function initComponent() {
|
|
82
|
-
if (props?.imageList?.length > 0) {
|
|
83
|
-
imageList.value = props?.imageList.map((item) => {
|
|
84
|
-
return { id: item.id, name: item.f_filename, url: item.f_downloadpath }
|
|
85
|
-
})
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
onMounted(() => {
|
|
90
|
-
initComponent()
|
|
91
|
-
})
|
|
92
87
|
</script>
|
|
93
88
|
|
|
94
89
|
<template>
|