NEZ-2162 feat: 添加 保留打开底部弹窗的状态

This commit is contained in:
zhangyu
2022-09-05 15:35:32 +08:00
parent 3f3ce50513
commit c2ae213235
13 changed files with 110 additions and 18 deletions

View File

@@ -1,5 +1,14 @@
export default {
props: {},
watch: {
detailViewRightObj: {
handler (n) {
if (n) {
this.updatePath(this.$route.query, this.$route.path, 'nzDetailList')
}
}
}
},
data () {
return {
detailType: localStorage.getItem('detail-view-' + this.tableId) || 'list',
@@ -21,6 +30,7 @@ export default {
// this.detailViewRightObj = ''
// }
this.detailType = flag
this.$router.replace({ query: { ...this.$route.query, detailType: flag } }).catch(err => {})
let dataList = ''
localStorage.setItem('detail-view-' + this.tableId, this.detailType)
if (this.detailType === 'view') {