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