refactor: standardize keep-alive data refreshing using useKeepAliveRefresh composable across views and dashboards

This commit is contained in:
jxxghp
2026-05-17 10:04:30 +08:00
parent 6900042cf7
commit 5e8489c620
16 changed files with 88 additions and 100 deletions

View File

@@ -6,17 +6,10 @@ import { type PropType } from 'vue'
const elementProps = defineProps({
config: Object as PropType<RenderProps>,
})
// key
const componentKey = ref(0)
onActivated(() => {
componentKey.value++
})
</script>
<template>
<Component
:key="componentKey"
:is="elementProps.config?.component"
v-if="!elementProps.config?.html"
v-bind="elementProps.config?.props"
@@ -34,7 +27,6 @@ onActivated(() => {
/>
</Component>
<Component
:key="componentKey"
:is="elementProps.config?.component"
v-if="elementProps.config?.html"
v-bind="elementProps.config?.props"