This commit is contained in:
神仙都没用 2024-07-09 10:28:26 +08:00
parent 3c112871c8
commit 795d1a2cc0
2 changed files with 6 additions and 3 deletions

View File

@ -209,7 +209,7 @@ const props = defineProps({
isDisabled: Boolean
});
const emit = defineEmits(["update:modelValue", "upload", "success", "error", "progress"]);
const emit = defineEmits(["update:modelValue", "change", "upload", "success", "error", "progress"]);
const { refs, setRefs } = useCool();
const { user } = useBase();
@ -402,8 +402,11 @@ function update() {
if (!check()) {
const urls = getUrls(list.value);
const val = props.multiple ? getUrls(list.value) : urls[0] || "";
//
emit("update:modelValue", props.multiple ? getUrls(list.value) : urls[0] || "");
emit("update:modelValue", val);
emit("change", val);
nextTick(() => {
if (props.prop) {

View File

@ -1,7 +1,7 @@
import { last } from "lodash-es";
import { filename, extname } from "/@/cool/utils";
import { module } from "/@/cool";
import { Upload } from "../types";
import type { Upload } from "../types";
// 模块参数
const { options } = module.get("upload");