mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-14 06:42:51 +00:00
优化
This commit is contained in:
parent
3c112871c8
commit
795d1a2cc0
@ -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) {
|
||||
|
||||
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user