diff --git a/src/views/device/components/Metadata/Cat/index.vue b/src/views/device/components/Metadata/Cat/index.vue
index 5936eb0d..e0292159 100644
--- a/src/views/device/components/Metadata/Cat/index.vue
+++ b/src/views/device/components/Metadata/Cat/index.vue
@@ -16,9 +16,10 @@
-
+
+ {{ value }}
@@ -120,25 +121,29 @@ watch(
{ immediate: true }
)
-watchEffect(() => {
- if (props.visible) {
- loading.value = true
- const { id } = route.params
- if (props.type === 'device') {
- detail(id as string).then((resp) => {
- loading.value = false
- instanceStore.setCurrent(resp.result)
- value.value = resp.result.metadata
- });
- } else {
- productDetail(id as string).then((resp) => {
- loading.value = false
- // productStore.setCurrent(resp.result)
- value.value = resp.result.metadata
- });
+watch(
+ [props.visible, props.type],
+ () => {
+ if (props.visible) {
+ loading.value = true
+ const { id } = route.params
+ if (props.type === 'device') {
+ detail(id as string).then((resp) => {
+ loading.value = false
+ instanceStore.setCurrent(resp.result)
+ value.value = resp.result.metadata
+ });
+ } else {
+ productDetail(id as string).then((resp) => {
+ loading.value = false
+ // productStore.setCurrent(resp.result)
+ value.value = resp.result.metadata
+ });
+ }
}
- }
-})
+ },
+ { immediate: true }
+)