Browse Source

工作台初始化循环监听字典值刷新

CzRger 9 months ago
parent
commit
899f666290
1 changed files with 8 additions and 0 deletions
  1. 8 0
      snowy-admin-web/src/views/auth/portal/index.vue

+ 8 - 0
snowy-admin-web/src/views/auth/portal/index.vue

@@ -24,6 +24,14 @@
 		3: icon3,
 	}
 	const portalLinkOptions = ref(tool.dictList('portal_link'))
+	let timer = setInterval(() => {
+		if (portalLinkOptions.value.length === 0) {
+			portalLinkOptions.value = tool.dictList('portal_link')
+		} else {
+			clearInterval(timer)
+		}
+	}, 500)
+
 	const toLink = (item) => {
 		window.open(item.value)
 	}