Commit 1e07d73a by Joey

feat(@rbc/bill-runner-query): 记录当前tab,刷新数据时保留tab

parent b2ad6a51
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
v-if="config.name && visible" v-if="config.name && visible"
:extrCondition="extrCondition" :extrCondition="extrCondition"
:tableHeight="tableHeight" :tableHeight="tableHeight"
@tabChange="tabChange"
:defaultGroup="currentTabTitle"
></gms-query> ></gms-query>
<p v-else>没有查询模板定义!</p> <p v-else>没有查询模板定义!</p>
</template> </template>
...@@ -30,6 +32,7 @@ export default { ...@@ -30,6 +32,7 @@ export default {
extrCondition: [], extrCondition: [],
tableHeight: height, tableHeight: height,
visible: true, visible: true,
currentTabTitle: null,
}; };
}, },
mounted() { mounted() {
...@@ -45,6 +48,9 @@ export default { ...@@ -45,6 +48,9 @@ export default {
this.$root.$off('updated', this.refresh) this.$root.$off('updated', this.refresh)
}, },
methods: { methods: {
tabChange(o) {
this.currentTabTitle = o.title
},
refresh(visible) { refresh(visible) {
if (visible == 'show') { if (visible == 'show') {
this.visible = false this.visible = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment