代客下单修改,增加线上店铺装修页面

This commit is contained in:
2025-02-22 10:00:04 +08:00
parent e0ae1cca67
commit 504aa80c9e
16 changed files with 1371 additions and 45 deletions

View File

@@ -1,8 +1,17 @@
<!-- 单图上传组件 -->
<template>
<el-upload v-model="modelValue" class="single-upload" list-type="picture-card" :show-file-list="false"
:accept="props.accept" :before-upload="handleBeforeUpload" :http-request="handleUpload" :on-success="onSuccess"
:on-error="onError" multiple>
<el-upload
v-model="modelValue"
class="single-upload"
list-type="picture-card"
:show-file-list="false"
:accept="props.accept"
:before-upload="handleBeforeUpload"
:http-request="handleUpload"
:on-success="onSuccess"
:on-error="onError"
multiple
>
<template #default>
<el-image v-if="modelValue" :src="modelValue" />
<el-icon v-if="modelValue" class="single-upload__delete-btn" @click.stop="handleDelete">
@@ -138,6 +147,7 @@ function handleDelete() {
modelValue.value = "";
}
const emits = defineEmits(["onSuccess"]);
/**
* 上传成功回调
*
@@ -146,6 +156,7 @@ function handleDelete() {
const onSuccess = (fileInfo: string) => {
ElMessage.success("上传成功");
modelValue.value = fileInfo;
emits("onSuccess", fileInfo);
};
/**