Signed-off-by: 1iyc <5212514+liycone@user.noreply.gitee.com>
main
1iyc 17 hours ago
parent 03a67e3c87
commit 8690020df6

@ -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 {

@ -16,6 +16,7 @@
:width="column.width"
:sortable="column.sortable"
:fixed="column.fixed"
:align="column.align || 'center' "
>
<template slot-scope="scope">
<span v-if="column.formatter">{{ column.formatter(scope.row[column.prop]) }}</span>
@ -48,10 +49,6 @@
style="margin-top: 20px"
/>
<!-- 如果数据为空显示提示信息 -->
<div v-if="rows.length === 0" style="text-align: center; margin-top: 20px;">
暂无数据
</div>
</div>
</template>
@ -60,7 +57,7 @@ export default {
props: {
columns: {
type: Array,
required: true
required: true,
},
rows: {
type: Array,

@ -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: '操作',

Loading…
Cancel
Save