mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-07 09:28:53 +08:00
feat(member): 优化等级权益管理与买家展示
- 优化客户权益配置、编辑表单及独立发放明细页面 - 完善客户等级图标、背景配置提示与 PC 权益展示 - 复用图片选择器并补齐素材元数据回传
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
|
||||
<el-dialog
|
||||
v-model="showOssManager"
|
||||
title="选择图片"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:z-index="3600"
|
||||
@@ -94,6 +95,7 @@ import { Message } from "@/utils/message";
|
||||
import OssManage from "@/views/sys/oss-manage/ossManage.vue";
|
||||
|
||||
defineOptions({ name: "upload-image" });
|
||||
const props = defineProps({ useImagePicker: { type: Boolean, default: false } });
|
||||
|
||||
const emit = defineEmits(["callback"]);
|
||||
|
||||
@@ -120,6 +122,10 @@ function draggableItemKey(item) {
|
||||
return item?.url || item;
|
||||
}
|
||||
function handleClickUploadImage() {
|
||||
if (props.useImagePicker) {
|
||||
importOSS();
|
||||
return;
|
||||
}
|
||||
show.value = true;
|
||||
}
|
||||
function handleView(url) {
|
||||
@@ -158,7 +164,16 @@ function handleUploadError(err) {
|
||||
Message.error(err?.message || String(err));
|
||||
}
|
||||
function confirmUrls() {
|
||||
applySelectedImages();
|
||||
if (props.useImagePicker) {
|
||||
const urls = [...new Set(selectedImage.value.map(parseOssSelectionUrl).filter(Boolean))];
|
||||
if (!urls.length) {
|
||||
Message.warning("请选择图片");
|
||||
return;
|
||||
}
|
||||
emit("callback", urls);
|
||||
} else {
|
||||
applySelectedImages();
|
||||
}
|
||||
showOssManager.value = false;
|
||||
}
|
||||
function cancelOssImport() {
|
||||
|
||||
Reference in New Issue
Block a user