feat:修改 catch form 组件默认

This commit is contained in:
JaguarJack
2024-04-24 22:12:08 +08:00
parent 72c68507e5
commit dad0bf4444
5 changed files with 13 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ import { $global} from '/admin/components/catchForm/config/symbol'
const tree = ref()
const modelValue = defineModel()
const currentCheckedKeys = ref<Array<number>|Array<string>|string|number>([])
const data = ref([])
const data = ref<any>([])
const { http } = inject($global)
const props = defineProps({
@@ -49,7 +49,7 @@ const props = defineProps({
})
if (props.api) {
http.get(props.api).then(r => {
http.get(props.api).then((r:any) => {
data.value = r.data.data
})
} else {

View File

@@ -3,8 +3,7 @@ import { watch } from 'vue'
import { uploadFile } from '/admin/composables/upload'
const props = defineProps({
action: {
type: String,
required: true
type: String
},
name: {
type: String,
@@ -29,7 +28,9 @@ const props = defineProps({
},
ext: {
type: Array,
required: true
default: () => {
return ['docx', 'pdf', 'txt', 'html', 'zip', 'tar', 'doc', 'css', 'csv', 'ppt', 'xlsx', 'xls', 'xml']
}
}
})

View File

@@ -32,7 +32,9 @@ const props = defineProps({
},
ext: {
type: Array,
required: true
default: () => {
return ['docx', 'pdf', 'txt', 'html', 'zip', 'tar', 'doc', 'css', 'csv', 'ppt', 'xlsx', 'xls', 'xml']
}
}
})

View File

@@ -26,8 +26,7 @@ import { Plus } from '@element-plus/icons-vue'
const props = defineProps({
action: {
type: String,
required: true
type: String
},
name: {
type: String,
@@ -47,12 +46,11 @@ const props = defineProps({
default: 'Dashboard'
},
token:{
type: String,
required: true
type: String
},
ext: {
type: Array,
required: true
default: () => ['jpg', 'jpeg', 'png', 'bmp', 'gif']
}
})

View File

@@ -64,7 +64,7 @@ const props = defineProps({
},
ext: {
type: Array,
required: true
default: () => ['jpg', 'jpeg', 'png', 'bmp', 'gif']
}
})