feat: 新增重置控制端的功能;前端可以显示提交记录 fix: 修复资源数据库sha256计算问题;修复资源数据库无法上传的问题
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useRequiredInjection } from "@/utils/Common";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { File, UploadIcon, XIcon } from "lucide-vue-next";
|
||||
import { isNull } from "mathjs";
|
||||
import { useSlots } from "vue";
|
||||
import { useAlertStore } from "./Alert";
|
||||
|
||||
const alert = useRequiredInjection(useAlertStore);
|
||||
const slots = useSlots();
|
||||
|
||||
interface Props {
|
||||
@@ -17,6 +20,10 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
closeAfterUpload: false,
|
||||
});
|
||||
|
||||
const emits = defineEmits<{
|
||||
finishedUpload: [];
|
||||
}>();
|
||||
|
||||
const inputFiles = defineModel<File[] | null>("inputFiles", { default: null });
|
||||
const isShowModal = defineModel<boolean>("isShowModal", { default: false });
|
||||
|
||||
@@ -42,6 +49,8 @@ function handleUpload() {
|
||||
if (!inputFiles.value) return;
|
||||
props.callback(inputFiles.value);
|
||||
if (props.closeAfterUpload) close();
|
||||
alert.info("上传成功");
|
||||
emits("finishedUpload");
|
||||
}
|
||||
|
||||
function show() {
|
||||
|
||||
Reference in New Issue
Block a user