feat:修改 catch form 组件默认
This commit is contained in:
@@ -18,7 +18,7 @@ import { $global} from '/admin/components/catchForm/config/symbol'
|
|||||||
const tree = ref()
|
const tree = ref()
|
||||||
const modelValue = defineModel()
|
const modelValue = defineModel()
|
||||||
const currentCheckedKeys = ref<Array<number>|Array<string>|string|number>([])
|
const currentCheckedKeys = ref<Array<number>|Array<string>|string|number>([])
|
||||||
const data = ref([])
|
const data = ref<any>([])
|
||||||
const { http } = inject($global)
|
const { http } = inject($global)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -49,7 +49,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (props.api) {
|
if (props.api) {
|
||||||
http.get(props.api).then(r => {
|
http.get(props.api).then((r:any) => {
|
||||||
data.value = r.data.data
|
data.value = r.data.data
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@@ -3,8 +3,7 @@ import { watch } from 'vue'
|
|||||||
import { uploadFile } from '/admin/composables/upload'
|
import { uploadFile } from '/admin/composables/upload'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
action: {
|
action: {
|
||||||
type: String,
|
type: String
|
||||||
required: true
|
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -29,7 +28,9 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
ext: {
|
ext: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
default: () => {
|
||||||
|
return ['docx', 'pdf', 'txt', 'html', 'zip', 'tar', 'doc', 'css', 'csv', 'ppt', 'xlsx', 'xls', 'xml']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -32,7 +32,9 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
ext: {
|
ext: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
default: () => {
|
||||||
|
return ['docx', 'pdf', 'txt', 'html', 'zip', 'tar', 'doc', 'css', 'csv', 'ppt', 'xlsx', 'xls', 'xml']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -26,8 +26,7 @@ import { Plus } from '@element-plus/icons-vue'
|
|||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
action: {
|
action: {
|
||||||
type: String,
|
type: String
|
||||||
required: true
|
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -47,12 +46,11 @@ const props = defineProps({
|
|||||||
default: 'Dashboard'
|
default: 'Dashboard'
|
||||||
},
|
},
|
||||||
token:{
|
token:{
|
||||||
type: String,
|
type: String
|
||||||
required: true
|
|
||||||
},
|
},
|
||||||
ext: {
|
ext: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
default: () => ['jpg', 'jpeg', 'png', 'bmp', 'gif']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
ext: {
|
ext: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
default: () => ['jpg', 'jpeg', 'png', 'bmp', 'gif']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user