This commit is contained in:
20
library/components/VabRefresh/index.vue
Normal file
20
library/components/VabRefresh/index.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts" setup>
|
||||
import { useSettingsStore } from '@/store/modules/settings'
|
||||
|
||||
const $pub: any = inject('$pub')
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const { theme } = storeToRefs(settingsStore)
|
||||
|
||||
const refreshRoute = () => {
|
||||
$pub('reload-router-view')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<vab-icon
|
||||
v-if="theme.showRefresh"
|
||||
icon="refresh-line"
|
||||
@click="refreshRoute"
|
||||
/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user