{"remainingRequest":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\artfess-module\\src\\demo\\Table.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\artfess-module\\src\\demo\\Table.vue","mtime":1675232038699},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\artfess-module\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport TableCode from \"@/demo/TableCode.vue\";\r\nimport MdView from \"@/views/MdView.vue\";\r\n\r\nexport default {\r\n  name: \"my-table\",\r\n  components: { TableCode, MdView },\r\n  data() {\r\n    return {\r\n      curTab: \"demo\",\r\n      code: `\r\n<template>\r\n  <ht-table\r\n    @load=\"loadData\"\r\n    :data=\"data\"\r\n    :page-result=\"pageResult\"\r\n    ref=\"htTable\"\r\n    quick-search-props=\"account,name,mobile\"\r\n    :default-sorter=\"[{ direction: 'DESC', property: 'name' }]\"\r\n    @select=\"select\"\r\n    @row-dblclick=\"dbclick\"\r\n    :filterSelectable=\"filterSelectable\"\r\n  >\r\n    <template v-slot:toolbar>\r\n      <el-button size=\"small\">添加</el-button>\r\n      <el-button size=\"small\">删除</el-button>\r\n      <el-button size=\"small\" type=\"primary\" @click=\"showSelect\"\r\n        >显示所选数据</el-button\r\n      >\r\n    </template>\r\n    <template v-slot:search>\r\n      <ht-table-search-panel :divide=\"3\">\r\n        <ht-table-search-field label=\"姓名\" prop=\"name\" />\r\n        <ht-table-search-field label=\"账号\" prop=\"account\" />\r\n        <ht-table-search-field label=\"邮箱\" prop=\"email\" />\r\n        <ht-table-search-field label=\"电话\" prop=\"mobile\" type=\"date\" />\r\n        <ht-table-search-field\r\n          label=\"状态\"\r\n          prop=\"status\"\r\n          type=\"select\"\r\n          :options=\"[\r\n            { value: '男士', key: '0' },\r\n            { value: '女士', key: '1' }\r\n          ]\"\r\n        />\r\n      </ht-table-search-panel>\r\n    </template>\r\n    <template>\r\n      <ht-table-column type=\"index\" width=\"50\" align=\"center\" label=\"序号\" />\r\n      <ht-table-column\r\n        prop=\"name\"\r\n        label=\"名称\"\r\n        width=\"300\"\r\n        :sortable=\"true\"\r\n        :show-overflow-tooltip=\"true\"\r\n      />\r\n      <ht-table-column\r\n        prop=\"account\"\r\n        label=\"账号\"\r\n        :sortable=\"true\"\r\n        minWidth=\"100\"\r\n      />\r\n      <ht-table-column prop=\"email\" label=\"邮箱\" hidden />\r\n      <ht-table-column prop=\"mobile\" label=\"电话\" sortable :hidden=\"true\" />\r\n      <ht-table-column\r\n        hidden\r\n        prop=\"sex\"\r\n        label=\"性别\"\r\n        width=\"80\"\r\n        :filters=\"[\r\n          { text: '男士', value: '0' },\r\n          { text: '女士', value: '1' }\r\n        ]\"\r\n      >\r\n        <template v-slot=\"{ row }\">\r\n          <el-tag v-if=\"row.sex == 0\">男士</el-tag>\r\n          <el-tag type=\"danger\" v-if=\"row.sex == 1\">女士</el-tag>\r\n        </template>\r\n      </ht-table-column>\r\n      <ht-table-column\r\n        prop=\"status\"\r\n        label=\"状态\"\r\n        width=\"500\"\r\n        :filters=\"[\r\n          { text: '正常', value: '0' },\r\n          { text: '锁定', value: '1' },\r\n          { text: '已删除', value: true }\r\n        ]\"\r\n      >\r\n        <template v-slot=\"{ row }\">\r\n          <el-tag v-if=\"row.status == 0\">正常</el-tag>\r\n          <el-tag type=\"warning\" v-if=\"row.status == 1\">锁定</el-tag>\r\n          <el-tag type=\"danger\" v-if=\"row.status == 2\">已删除</el-tag>\r\n        </template>\r\n      </ht-table-column>\r\n      <ht-table-column label=\"操作\" fixed=\"right\" min-width=\"200\">\r\n        <template v-slot=\"{ row }\">\r\n          <el-button type=\"text\" @click=\"() => console.log(row.id)\"\r\n            >编辑</el-button\r\n          >\r\n        </template>\r\n      </ht-table-column>\r\n    </template>\r\n  </ht-table>\r\n</template>\r\n<script>\r\nimport user from \"@/api/user.js\";\r\n\r\nexport default {\r\n  name: \"table-code\",\r\n  data() {\r\n    return {\r\n      data: [],\r\n      pageResult: {\r\n        page: 1,\r\n        pageSize: 20,\r\n        total: 0\r\n      },\r\n      filterSelectable(row, index) {\r\n        if (row.status == 1 || row.status == 2) {\r\n          return false;\r\n        } else {\r\n          return true;\r\n        }\r\n      }\r\n    };\r\n  },\r\n  mounted() {},\r\n  methods: {\r\n    loadData(param, cb) {\r\n      user\r\n        .getUsers(param)\r\n        .then(response => {\r\n          this.data = response.rows;\r\n\r\n          this.pageResult = {\r\n            page: response.page,\r\n            pageSize: response.pageSize,\r\n            total: response.total\r\n          };\r\n        })\r\n        .finally(() => cb());\r\n    },\r\n    dbclick(row, column, event) {\r\n      console.log(row, column, event);\r\n    },\r\n    select(selection, row) {},\r\n    showSelect() {\r\n      this.$refs.htTable.selection;\r\n    }\r\n  }\r\n};\r\n<\\/script>`\r\n    };\r\n  }\r\n};\r\n",null]}