19 lines
595 B
Vue
Executable File
19 lines
595 B
Vue
Executable File
<template>
|
|
<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" />
|
|
</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 = () => {
|
|
if (!tabs.refreshCachedTab(route.fullPath)) appStore.refreshView()
|
|
}
|
|
</script>
|