This commit is contained in:
2025-04-29 19:43:06 +08:00
parent dfb552b7ed
commit ff17e84aed
26 changed files with 530 additions and 260 deletions

View File

@@ -1,17 +1,21 @@
<script setup>
import Api from "../../api/index.js";
const {size} = defineProps({
const {size, api} = defineProps({
size: {
type: String,
default: '100%'
},
api: {
type: Function,
default: Api.system.uploadFile,
}
});
const emits = defineEmits(['success']);
const files = defineModel('file');
const beforeUpload = (file) => {
Api.system.uploadFile(file).then(({data}) => {
api(file).then(({data}) => {
files.value = data;
emits('success', file);
});