songshankun
2023-10-18 c4926e25f0d61c621e781c54659b76bd9e6f54ab
src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -88,7 +88,7 @@
                    style="width: 85%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in productCategoryList" :key="item.id" :label="item.name" :value="item.id">
                    <el-option v-for="item in productCategoryListWithDefault" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
@@ -195,7 +195,12 @@
    }
  },
  components: {},
  computed: {},
  computed: {
    productCategoryListWithDefault(){
      console.log(this.productCategoryList)
      return [{id:0,name:'请选择'},...(this.productCategoryList?? [])]
    }
  },
  data() {
    return {
      dialogWidth: "50%",