feat(admin): 增加启动与导航反馈并保护工作标签状态
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<div class="refresh cursor-pointer h-full flex items-center px-2" @click="refreshView">
|
||||
<button type="button" class="refresh cursor-pointer h-full flex items-center px-2"
|
||||
aria-label="刷新当前页面" title="刷新当前页面" @click="refreshView">
|
||||
<icon name="el-icon-RefreshRight" :size="18" />
|
||||
</div>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import useAppStore from '@/stores/modules/app'
|
||||
import useTabsStore from '@/stores/modules/multipleTabs'
|
||||
|
||||
const appStore = useAppStore()
|
||||
// 刷新页面
|
||||
const tabs = useTabsStore()
|
||||
const route = useRoute()
|
||||
const refreshView = () => {
|
||||
appStore.refreshView()
|
||||
if (!tabs.refreshCachedTab(route.fullPath)) appStore.refreshView()
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user