haoxuan
2023-10-19 f73080c69548aba58d6a58e7e049d8eb79f9f7ed
src/views/productManage/productCategory/index.vue
@@ -15,8 +15,20 @@
          ref="tableListRef"
          :table-list="tableList"
          :show-checkcol="false"
          @tableRowClick="tableRowClick"
        ></TableCommonView>
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="90" align="center">
              <template slot-scope="scope">
                <span @click.stop="showDetail(scope.row)" class="cursor_pointer" style="margin-right: 10px">
                  <span style="color: #2a78fb">查看</span>
                </span>
                <span @click.stop="editRow(scope.row)" class="cursor_pointer">
                  <span style="color: #2a78fb">编辑</span>
                </span>
              </template>
            </el-table-column>
          </template>
        </TableCommonView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -45,7 +57,8 @@
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
        infomation: {},
        autoEdit: false
      }
    }
  },
@@ -93,8 +106,16 @@
      this.pagerOptions.currPage=1
      this.getData()
    },
    // 行点击
    tableRowClick(row) {
    // 查看
    showDetail(row) {
      this.editConfig.autoEdit = false
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.visible = true
    },
    // 编辑
    editRow(row){
      this.editConfig.autoEdit = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.visible = true