Преглед изворни кода

fix: 【mall】商品详情时,禁止商品描述的编辑

YunaiV пре 2 месеци
родитељ
комит
b622840240

+ 2 - 2
src/views/mall/product/category/CategoryForm.vue

@@ -62,7 +62,7 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
 const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formData = ref({
   id: undefined,
-  parentId: 0, // root parent id
+  parentId: 0,
   name: '',
   picUrl: '',
   sort: 0,
@@ -128,7 +128,7 @@ const submitForm = async () => {
 const resetForm = () => {
   formData.value = {
     id: undefined,
-    parentId: 0, // root parent id
+    parentId: 0,
     name: '',
     picUrl: '',
     sort: 0,

+ 2 - 1
src/views/mall/product/spu/form/DescriptionForm.vue

@@ -3,7 +3,8 @@
   <el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" :disabled="isDetail">
     <!--富文本编辑器组件-->
     <el-form-item label="商品详情" prop="description">
-      <Editor v-model:modelValue="formData.description" />
+      <Editor v-if="!isDetail" v-model:modelValue="formData.description" />
+      <Editor :modelValue="formData.description" readonly />
     </el-form-item>
   </el-form>
 </template>

+ 2 - 2
src/views/mall/product/spu/form/InfoForm.vue

@@ -23,7 +23,7 @@
         filterable
         placeholder="请选择商品分类"
       />
-      <el-button :icon="RefreshRight" @click="refreshCategoryList" />
+      <el-button :icon="RefreshRight" @click="refreshCategoryList" class="ml-1" size="small" />
     </el-form-item>
     <el-form-item label="商品品牌" prop="brandId">
       <el-select v-model="formData.brandId" class="w-80!" placeholder="请选择商品品牌">
@@ -34,7 +34,7 @@
           :value="item.id as number"
         />
       </el-select>
-      <el-button :icon="RefreshRight" @click="refreshBrandList" />
+      <el-button :icon="RefreshRight" @click="refreshBrandList" class="ml-1" size="small" />
     </el-form-item>
     <el-form-item label="商品关键字" prop="keyword">
       <el-input v-model="formData.keyword" class="w-80!" placeholder="请输入商品关键字" />