From 8690020df69befd6407b1f210083ce14240e7684 Mon Sep 17 00:00:00 2001 From: 1iyc <5212514+liycone@user.noreply.gitee.com> Date: Thu, 7 Nov 2024 16:18:49 +0800 Subject: [PATCH] v 1.2.2 Signed-off-by: 1iyc <5212514+liycone@user.noreply.gitee.com> --- src/components/TabComponent/index.vue | 6 ++++++ src/components/Table/index.vue | 7 ++----- src/views/gather/pool/index.vue | 14 +++++++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/components/TabComponent/index.vue b/src/components/TabComponent/index.vue index 3204825..303303d 100644 --- a/src/components/TabComponent/index.vue +++ b/src/components/TabComponent/index.vue @@ -124,8 +124,14 @@ export default { }, localIndex(newVal) { this.$emit('update:index', newVal); + this.queryParams.name = this.tabs[newVal].name; + this.handleQuery(); } }, + created() { + this.queryParams.name = this.tabs[this.localIndex].name; + this.handleQuery(); // 在组件创建时触发查询 + }, methods: { onSelect(index) { try { diff --git a/src/components/Table/index.vue b/src/components/Table/index.vue index 438ef45..2d8568d 100644 --- a/src/components/Table/index.vue +++ b/src/components/Table/index.vue @@ -16,6 +16,7 @@ :width="column.width" :sortable="column.sortable" :fixed="column.fixed" + :align="column.align || 'center' " > @@ -60,7 +57,7 @@ export default { props: { columns: { type: Array, - required: true + required: true, }, rows: { type: Array, diff --git a/src/views/gather/pool/index.vue b/src/views/gather/pool/index.vue index e3bc7d0..f5a8ae5 100644 --- a/src/views/gather/pool/index.vue +++ b/src/views/gather/pool/index.vue @@ -62,9 +62,9 @@ export default { placeholder: '请选择', gutter: 2, options: [ - {label: '全部', value: ' '}, - {label: '是', value: '1', default: true}, - {label: '否', value: '0'}, + {label: '全部', value: ' ', default: true}, + {label: '是', value: '1', default: false}, + {label: '否', value: '0', default: false}, ], }, ], @@ -80,10 +80,10 @@ export default { cron: undefined, }, columnFields: [ - {label: 'ID', prop: 'id', width: '100', sortable: true}, - {label: '表名称', prop: 'tableName', sortable: true}, - {label: '表注', prop: 'tableDescription', sortable: true}, - {label: '启用', prop: 'enable', formatter: (value) => (value ? '启用' : '禁用'), sortable: true}, + {label: 'ID', prop: 'id', width: '100'}, + {label: '表名称', prop: 'tableName'}, + {label: '表注', prop: 'tableDescription'}, + {label: '启用', prop: 'enable', formatter: (value) => (value ? '启用' : '禁用')}, {label: '定时', prop: 'cron'}, { label: '操作',