Sfoglia il codice sorgente

fix(web): HealthEnergyConfig.vue 全角括号导致前端构建失败

Sisyphus 2 mesi fa
parent
commit
ced96e4425

+ 1 - 1
cfc-web/src/views/admin/HealthEnergyConfig.vue

@@ -27,7 +27,7 @@
 
         <el-alert
           v-if="weightSum !== 100"
-          :title="'权重总和不等于 100%(当前: ' + weightSum + '%')'"
+          :title="'权重总和不等于 100%(当前: ' + weightSum + '%)'"
           type="warning"
           :closable="false"
           style="margin-bottom: 20px;"

+ 17 - 4
cfc-web/src/views/admin/ProductEdit.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="product-edit">
-    <el-card>
+    <el-card v-loading="pageLoading">
       <div slot="header">
         <span>{{ isEdit ? '编辑商品' : '新增商品' }}</span>
         <el-button style="float: right;" size="mini" @click="$router.back()">返回</el-button>
@@ -24,7 +24,9 @@
         </el-form-item>
 
         <el-form-item label="商品描述" prop="description">
-          <Editor v-model="form.description" :config="editorConfig" style="min-height: 300px;" />
+          <div class="rich-editor">
+            <Editor v-model="form.description" :config="editorConfig" style="min-height: 300px;" />
+          </div>
         </el-form-item>
 
         <el-form-item label="封面图片" prop="coverImage">
@@ -156,6 +158,7 @@ export default {
         stock: [{ required: true, message: '请输入库存', trigger: 'blur' }]
       },
       saving: false,
+      pageLoading: false,
       editorConfig: {
         MENU_CONF: {
           uploadImage: {
@@ -199,6 +202,7 @@ export default {
   },
   methods: {
     async loadProduct(id) {
+      this.pageLoading = true
       try {
         const res = await getProduct(id)
         if (res.code === 200 && res.data) {
@@ -238,6 +242,8 @@ export default {
         }
       } catch (e) {
         this.$message.error('加载商品失败')
+      } finally {
+        this.pageLoading = false
       }
     },
     async loadDimensionWeights(productId) {
@@ -346,7 +352,6 @@ export default {
 <style scoped>
 .product-edit {
   padding: 20px;
-  max-width: 900px;
 }
 .cover-uploader {
   display: flex;
@@ -427,12 +432,20 @@ export default {
   border-color: #409eff;
   color: #409eff;
 }
+.product-edit .el-card {
+  width: 100%;
+}
+.product-edit .el-form {
+  width: 100%;
+}
 .rich-editor {
   border: 1px solid #dcdfe6;
   border-radius: 4px;
-  min-height: 300px;
 }
 .rich-editor /deep/ .w-e-toolbar {
   flex-wrap: wrap;
 }
+.rich-editor /deep/ .w-e-text-container {
+  min-height: 300px;
+}
 </style>