This commit is contained in:
2025-06-13 21:01:19 +08:00
parent e90242f469
commit f27e7f5137
6 changed files with 158 additions and 20 deletions

View File

@@ -1,11 +1,14 @@
<script setup>
import Api from "../../api/index.js";
import {useSystemStore} from "../../pinia/SystemStore/index.js";
const emits = defineEmits(['success']);
const SystemStore = useSystemStore();
const upload = (e) => {
const file = e.target.files[0];
Api.system.uploadFile2(file).then(({data}) => {
const api = SystemStore.isRoot ? Api.system.uploadFile : Api.system.uploadFile2;
api(file).then(({data}) => {
emits('success', data);
});
}