update 表格的doLayout
This commit is contained in:
parent
d4926584fe
commit
839a6f6d52
@ -100,6 +100,10 @@ export default {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
refreshLayoutKey: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
inject: ["urls"],
|
||||
data() {
|
||||
@ -108,12 +112,9 @@ export default {
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 'props.tableData': {
|
||||
// handler: () => {
|
||||
// this.$refs['base-list-table'].doLayout();
|
||||
// },
|
||||
// immediate: true,
|
||||
// },
|
||||
refreshLayoutKey(val) {
|
||||
this.$refs["base-list-table"].doLayout();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleSubEmitData(payload) {
|
||||
|
@ -114,11 +114,22 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div v-if="dataForm.id && tab.key === 'attr'">
|
||||
<BaseListTable :table-config="null" :column-config="filteredTableProps" :table-data="subList" @operate-event="handleTableRowOperate" />
|
||||
<div v-show="dataForm.id && tab.key === 'attr'" key="attr-list">
|
||||
<BaseListTable
|
||||
:table-config="null"
|
||||
:column-config="filteredTableProps"
|
||||
:table-data="subList"
|
||||
@operate-event="handleTableRowOperate"
|
||||
:current-page="attrPage"
|
||||
:current-size="attrSize"
|
||||
:refresh-layout-key="Math.random()"
|
||||
/>
|
||||
<!-- paginator -->
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
class=""
|
||||
style="text-align: left"
|
||||
background
|
||||
hide-on-single-page
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
:current-page.sync="attrPage"
|
||||
@ -129,7 +140,7 @@
|
||||
></el-pagination>
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper" -->
|
||||
</div>
|
||||
<div v-if="dataForm.id && tab.key === 'attachment'">附件</div>
|
||||
<div v-show="dataForm.id && tab.key === 'attachment'" key="attachment">附件</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@ -499,10 +510,10 @@ export default {
|
||||
if (res.code === 0 && res.data?.list) {
|
||||
// 有数据
|
||||
this.subList = res.data.list;
|
||||
this.attrTotal = res.data.total
|
||||
this.attrTotal = res.data.total;
|
||||
} else {
|
||||
this.subList.splice(0);
|
||||
this.attrTotal = 0
|
||||
this.attrTotal = 0;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user