From e1e01358530ea0cae9bd09aab1b6e2c371f2dd1c Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期一, 11 十一月 2024 15:10:13 +0800 Subject: [PATCH] opcua选择是否更新当前值功能 --- src/views/micro/index.vue | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/views/micro/index.vue b/src/views/micro/index.vue index 3de28f4..1a4669c 100644 --- a/src/views/micro/index.vue +++ b/src/views/micro/index.vue @@ -4,10 +4,19 @@ </div> </template> <script lang="ts" setup> -import { getUrl } from '@/utils/micors' -const router: any = useRouter() -const url = computed(() => getUrl(router.currentRoute.value.name)) -const name = computed(() => router.currentRoute.value.name) +import hostMap from "@/utils/hostMap"; +import wujieVue from "wujie-vue3"; +const route = useRoute() +const url = hostMap("//localhost:90/") + route.params.path +const name = 'fast' +watch(() => "$route.params.path", + () => { + wujieVue.bus.$emit("vue3-router-change", `/${route.params.path}`); + }, + { + immediate: true + } +) </script> <style scoped lang="scss"> .sub-app { -- Gitblit v1.9.3