yangfeng
2023-09-22 fbdb1d15b6cf692d27598806eee6be6f16e1f36d
src/views/productManage/product/index.vue
@@ -31,7 +31,12 @@
      <div v-if="isIconIndex === '1'" class="product-view">
        <div class="product-box" v-for="item in tableList.tableInfomation" :key="item.id" @click="tableRowClick(item)">
          <div class="left">
            <el-image style="width: 60px; height: 80px" :src="url"></el-image>
            <!-- <el-image style="width: 60px; height: 80px" :src="url"></el-image> -->
            <el-image class="img-view">
              <div slot="error" class="image-slot">
                <i class="el-icon-picture-outline"></i>
              </div>
            </el-image>
          </div>
          <div class="right">
            <div class="label">
@@ -100,7 +105,8 @@
      },
      isIconIndex: "1", // 1 图标 2 列表
      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
      pageSizes: [15, 30]
      pageSizes: [15, 30],
      keyWord: ""
    }
  },
  created() {
@@ -212,9 +218,9 @@
      this.tableList.tableColumn = this.setTableColumn(val)
    },
    // 请求数据
    async getData(val) {
    async getData() {
      await getProductList({
        keyWord: val,
        keyWord: this.keyWord,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
@@ -232,8 +238,9 @@
    // 搜索
    searchClick(val) {
      console.log(val)
      this.keyWord = val
      this.pagerOptions.currPage = 1
      this.getData(val)
      this.getData()
    },
    // 新建
    addBtnClick() {
@@ -318,6 +325,14 @@
    .left {
      width: 60px;
      text-align: center;
      .img-view {
        width: 60px;
        height: 80px;
        line-height: 80px;
        border: 1px solid #dee2e6;
        font-size: 22px;
        color: #b8babb;
      }
    }
    .right {
      flex: 1;