haoyahui
2023-11-11 332c012e7336f2996c4fe5c8c110d00713c1bde2
admin-web/src/views/foundation/classification/edit.vue
@@ -1,7 +1,7 @@
<template>
  <win-sm :title="setting.title" @close="close" :width="'800px'">
    <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px">
      <el-form-item label="上级分类" prop="fatherCategoryName" :key="key">
      <el-form-item v-if="setting.pid" label="上级分类" prop="fatherCategoryName" :key="key">
        <el-input
          v-model="formData.fatherCategoryName"
          clearable
@@ -100,6 +100,7 @@
    getEditInfo(id) {},
    // 分类名称获取
    getCategoryName() {
      if(!this.formData.fatherCategoryId) return
      getCategoryDetail({ id: this.formData.fatherCategoryId }).then((res) => {
        this.formData.fatherCategoryName = res.categoryName;
        this.key = Math.random();