菜谱下的商品列表,封面图显示为图片

This commit is contained in:
ctw committed 2024-12-25 14:05:23 +08:00
1 parent 3897fc066c
commit 7562135ee0
3 files changed
+124 -115

No files matched your search

+2 -1
View File
@@ -69,6 +69,7 @@ const dialogVisible = ref(false);
const elUploadRef = ref();
// 获取 el-form 组件上下文
const formContext = inject(formContextKey, void 0);
const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH;
// 上传
const handleHttpUpload = async (options: UploadRequestOptions) => {
@@ -99,7 +100,7 @@ const handleRemove = (uploadFile: any, uploadFiles: any[]) => {
// 预览
const handlePictureCardPreview = (uploadFile: any) => {
dialogImageUrl.value = 'http://123.156.230.15:8089/api' + uploadFile.response.data.url;
dialogImageUrl.value = imageBaseUrl + uploadFile.response.data.url;
dialogVisible.value = true;
};