Merge branch 'develop'
Former-commit-id: 6b5ab38225056b84f98e0375f797bfff02532535 [formerly 6b5ab38225056b84f98e0375f797bfff02532535 [formerly 6b5ab38225056b84f98e0375f797bfff02532535 [formerly 6b5ab38225056b84f98e0375f797bfff02532535 [formerly 4f81d93287e658d4748c43cee653ce2bc21288ff [formerly 0bf5dfaf0e62f689981cab5752a62c1d8b0ee58c]]]]] Former-commit-id: aa83eebc2c6536627980c9c64a96756d87a1ebb3 Former-commit-id: 2f2511c1da2a48d4224b87719873701cb46fcbd2 Former-commit-id: 27305f9caf15cc69d73a853e6cbda21cb1ac7023 [formerly 1ae2ff5a4d66add1d5b1521f4ab57954322588d5] Former-commit-id: 9bad9e9d32de44195453f4e4ad798f90b3df5a68 Former-commit-id: 2cac7fe7c9499c4da4f55c2762fe8bc79ab6da9f Former-commit-id: 688234a45e2df39681158ed05b4b5fb3a4325dbb Former-commit-id: c356ce373c6a6d1d93634163e8a8ab3a70f94dfc Former-commit-id: 1129aa0b33467df3847734fcdaad70e3d3841af3
This commit is contained in:
@@ -4,18 +4,31 @@
|
||||
<p class="d2-mt-0">在下面的输入框输入任意字符后,切换到其它页面,再回到此页时输入框文字保留,证明被缓存</p>
|
||||
<el-input v-model="value" placeholder="input here"></el-input>
|
||||
<!-- 页签操作 -->
|
||||
<p>页签操作</p>
|
||||
<el-button @click="closeCurrent" type="danger">
|
||||
<d2-icon name="times"/>
|
||||
关闭当前页
|
||||
</el-button>
|
||||
<p>关闭标签页</p>
|
||||
<el-button-group>
|
||||
<el-button @click="handleCloseCurrent">
|
||||
<d2-icon name="times"/> 当前
|
||||
</el-button>
|
||||
<el-button @click="handleCloseLeft">
|
||||
<d2-icon name="arrow-left"/> 左侧
|
||||
</el-button>
|
||||
<el-button @click="handleCloseRight">
|
||||
右侧 <d2-icon name="arrow-right"/>
|
||||
</el-button>
|
||||
<el-button @click="handleCloseOther">
|
||||
其它 <d2-icon name="times"/>
|
||||
</el-button>
|
||||
<el-button @click="handleCloseAll">
|
||||
全部 <d2-icon name="times-circle"/>
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<p>刷新</p>
|
||||
<el-button-group>
|
||||
<el-button @click="cleanCacheAndRefreshCurrent">
|
||||
<el-button @click="handleCleanCacheAndRefreshCurrent">
|
||||
<d2-icon name="refresh"/>
|
||||
清空当前页缓存并刷新
|
||||
</el-button>
|
||||
<el-button @click="cleanCacheAndRefreshAll">
|
||||
<el-button @click="handleCleanCacheAndRefreshAll">
|
||||
<d2-icon name="refresh"/>
|
||||
清空所有缓存并刷新
|
||||
</el-button>
|
||||
@@ -38,34 +51,53 @@ export default {
|
||||
'keepAliveClean'
|
||||
]),
|
||||
...mapActions('d2admin/page', [
|
||||
'close'
|
||||
'close',
|
||||
'closeLeft',
|
||||
'closeRight',
|
||||
'closeOther',
|
||||
'closeAll'
|
||||
]),
|
||||
// 关闭当前页
|
||||
closeCurrent () {
|
||||
// 关闭当前
|
||||
handleCloseCurrent () {
|
||||
this.close({
|
||||
tagName: this.$route.name,
|
||||
vm: this
|
||||
})
|
||||
},
|
||||
// 刷新当前页面
|
||||
refreshCurrent () {
|
||||
// const { path, query } = this.$route
|
||||
// this.$router.replace({
|
||||
// path: '/redirect/' + JSON.stringify({ path, query })
|
||||
// })
|
||||
this.$router.replace({
|
||||
path: '/refresh'
|
||||
// 关闭左侧
|
||||
handleCloseLeft () {
|
||||
this.closeLeft({
|
||||
tagName: this.$route.name,
|
||||
vm: this
|
||||
})
|
||||
},
|
||||
// 关闭右侧
|
||||
handleCloseRight () {
|
||||
this.closeRight({
|
||||
tagName: this.$route.name,
|
||||
vm: this
|
||||
})
|
||||
},
|
||||
// 关闭其他
|
||||
handleCloseOther () {
|
||||
this.closeOther({
|
||||
tagName: this.$route.name,
|
||||
vm: this
|
||||
})
|
||||
},
|
||||
// 关闭全部
|
||||
handleCloseAll () {
|
||||
this.closeAll(this)
|
||||
},
|
||||
// 清空当前页缓存并刷新此页面
|
||||
cleanCacheAndRefreshCurrent () {
|
||||
handleCleanCacheAndRefreshCurrent () {
|
||||
this.keepAliveRemove(this.$route.name)
|
||||
this.$nextTick(this.refreshCurrent)
|
||||
this.$nextTick(this.$router.replace('/refresh'))
|
||||
},
|
||||
// 清空所有的缓存并刷新此页面
|
||||
cleanCacheAndRefreshAll () {
|
||||
handleCleanCacheAndRefreshAll () {
|
||||
this.keepAliveClean()
|
||||
this.$nextTick(this.refreshCurrent)
|
||||
this.$nextTick(this.$router.replace('/refresh'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user