Commit 781ac579 authored by chenqikuai's avatar chenqikuai

1

parent 119c1493
......@@ -40,7 +40,7 @@
class="mr-2"
alt=""
/>
{{ modelValue.name }}
{{ modelValue && name }}
<div class="flex-grow"></div>
<Icon
iconName="iconhuishouzhan1"
......@@ -70,12 +70,14 @@ const loading = ref(false);
const { formItem } = useFormItem();
const emit = defineEmits(["update:modelValue"]);
const name = ref("");
const handleChange = async (e: Event) => {
const target = e.target as HTMLInputElement;
const file = target.files && target.files[0];
loading.value = true;
const res = await copyrightUploadFile(file!);
name.value = file?.name!;
if (res && res.code === 200) {
emit("update:modelValue", {
...res.data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment