更多的示例
Former-commit-id: 833e467a1d8f7fc653b7b4aed549468546e511de [formerly 833e467a1d8f7fc653b7b4aed549468546e511de [formerly 833e467a1d8f7fc653b7b4aed549468546e511de [formerly 833e467a1d8f7fc653b7b4aed549468546e511de [formerly 7627708e75b3d5d504972613c5e733405587cba0 [formerly 1600182f4ba9a437717c6266564618d61a61ad00]]]]] Former-commit-id: a7c7eaa88fd05ee835cee957a05ee8b86b136c13 Former-commit-id: 65ba4e2470e8390eb4e3779cb5f919d8f4f9bec1 Former-commit-id: 06f25a758c78826e23728ac7039f3fda9d4e3544 [formerly 79216eb458399d6e98da4cc976ec8e699e5ab7cd] Former-commit-id: a86a391ffd8f7a2f0027b93f1f87a5576c42eb4e Former-commit-id: c9d6c4bafa92eb9bbb7b1267d3117ae0ff07b4b1 Former-commit-id: 3e01824b941dfb6704c9bb8ddbb310d50f133062 Former-commit-id: 841b0ecb8a4bb24e3de5929b6288771530729d39 Former-commit-id: ea91d01c776ee376bbefb026bc96de2cf25e8417
This commit is contained in:
@@ -4,18 +4,31 @@
|
|||||||
<p class="d2-mt-0">在下面的输入框输入任意字符后,切换到其它页面,再回到此页时输入框文字保留,证明被缓存</p>
|
<p class="d2-mt-0">在下面的输入框输入任意字符后,切换到其它页面,再回到此页时输入框文字保留,证明被缓存</p>
|
||||||
<el-input v-model="value" placeholder="input here"></el-input>
|
<el-input v-model="value" placeholder="input here"></el-input>
|
||||||
<!-- 页签操作 -->
|
<!-- 页签操作 -->
|
||||||
<p>页签操作</p>
|
<p>关闭标签页</p>
|
||||||
<el-button @click="closeCurrent" type="danger">
|
<el-button-group>
|
||||||
<d2-icon name="times"/>
|
<el-button @click="handleCloseCurrent">
|
||||||
关闭当前页
|
<d2-icon name="times"/> 当前
|
||||||
</el-button>
|
</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>
|
<p>刷新</p>
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button @click="cleanCacheAndRefreshCurrent">
|
<el-button @click="handleCleanCacheAndRefreshCurrent">
|
||||||
<d2-icon name="refresh"/>
|
<d2-icon name="refresh"/>
|
||||||
清空当前页缓存并刷新
|
清空当前页缓存并刷新
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="cleanCacheAndRefreshAll">
|
<el-button @click="handleCleanCacheAndRefreshAll">
|
||||||
<d2-icon name="refresh"/>
|
<d2-icon name="refresh"/>
|
||||||
清空所有缓存并刷新
|
清空所有缓存并刷新
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -38,34 +51,53 @@ export default {
|
|||||||
'keepAliveClean'
|
'keepAliveClean'
|
||||||
]),
|
]),
|
||||||
...mapActions('d2admin/page', [
|
...mapActions('d2admin/page', [
|
||||||
'close'
|
'close',
|
||||||
|
'closeLeft',
|
||||||
|
'closeRight',
|
||||||
|
'closeOther',
|
||||||
|
'closeAll'
|
||||||
]),
|
]),
|
||||||
// 关闭当前页
|
// 关闭当前
|
||||||
closeCurrent () {
|
handleCloseCurrent () {
|
||||||
this.close({
|
this.close({
|
||||||
tagName: this.$route.name,
|
tagName: this.$route.name,
|
||||||
vm: this
|
vm: this
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 刷新当前页面
|
// 关闭左侧
|
||||||
refreshCurrent () {
|
handleCloseLeft () {
|
||||||
// const { path, query } = this.$route
|
this.closeLeft({
|
||||||
// this.$router.replace({
|
tagName: this.$route.name,
|
||||||
// path: '/redirect/' + JSON.stringify({ path, query })
|
vm: this
|
||||||
// })
|
|
||||||
this.$router.replace({
|
|
||||||
path: '/refresh'
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 关闭右侧
|
||||||
|
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.keepAliveRemove(this.$route.name)
|
||||||
this.$nextTick(this.refreshCurrent)
|
this.$nextTick(this.$router.replace('/refresh'))
|
||||||
},
|
},
|
||||||
// 清空所有的缓存并刷新此页面
|
// 清空所有的缓存并刷新此页面
|
||||||
cleanCacheAndRefreshAll () {
|
handleCleanCacheAndRefreshAll () {
|
||||||
this.keepAliveClean()
|
this.keepAliveClean()
|
||||||
this.$nextTick(this.refreshCurrent)
|
this.$nextTick(this.$router.replace('/refresh'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user