fix: 🐛 修复字典类型切换时,因页面缓存导致字典数据无法更新的问题
This commit is contained in:
@@ -129,11 +129,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineOptions({
|
|
||||||
name: "DictItem",
|
|
||||||
inherititems: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
import DictAPI, { DictItemPageQuery, DictItemPageVO, DictItemForm } from "@/api/system/dict.api";
|
import DictAPI, { DictItemPageQuery, DictItemPageVO, DictItemForm } from "@/api/system/dict.api";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -276,10 +271,4 @@ function handleDelete(id?: number) {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
handleQuery();
|
handleQuery();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 同一路由参数变化时更新数据
|
|
||||||
onBeforeRouteUpdate((to) => {
|
|
||||||
queryParams.dictCode = to.query.dictCode as string;
|
|
||||||
handleQuery();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user