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

This commit is contained in:
YunaiV
2025-11-22 19:20:29 +08:00
parent da566f87d9
commit b622840240
3 changed files with 6 additions and 5 deletions

View File

@@ -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,

View File

@@ -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>

View File

@@ -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="请输入商品关键字" />