| | |
| | | :label="item.label" |
| | | :prop="item.prop" :show-overflow-tooltip="true" |
| | | :sortable="item.sortable" |
| | | :width="item.label.length >= 4 ? '150' : item.label.length == 3 ? '120' : '90'" |
| | | :width="item.width" |
| | | align="center"> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | activated() { |
| | | // this.doLayout(); |
| | | this.$nextTick(() => { |
| | | this.$refs.dataTable.doLayout() |
| | | }) |
| | | this.doLayout() |
| | | }, |
| | | updated() { |
| | | this.doLayout() |
| | | }, |
| | | watch: { |
| | | tableHeadDataFateher: { |
| | |
| | | handler(newval, oldval) { |
| | | this.tableData = newval; |
| | | this.searchResults = newval |
| | | this.doLayout() |
| | | }, |
| | | }, |
| | | tableHeadFindData: { |
| | |
| | | saveRow() { |
| | | this.editingRow = null; |
| | | }, |
| | | //表格错行问题 |
| | | doLayout() { |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.doLayout(); |
| | | }); |
| | | if (this.$refs.dataTable && this.$refs.dataTable.doLayout) { |
| | | this.$refs.dataTable.doLayout(); |
| | | } |
| | | }) |
| | | }, |
| | | //表格头渲染 |
| | | CrudHeaderRend() { |
| | |
| | | limit: this.page.pageSize, |
| | | }).then((res) => { |
| | | this.tableData = res.data.data; |
| | | this.doLayout() |
| | | }); |
| | | }, |
| | | //多选 |