Browse Source

chore: 清理代码

喵你个旺呀 1 year ago
parent
commit
d92350c0c3
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Web/src/components/table/dictLabel.vue

+ 1 - 3
Web/src/components/table/dictLabel.vue

@@ -29,12 +29,10 @@ const state = reactive({
 });
 });
 
 
 onMounted(() => {
 onMounted(() => {
-	const dictList = useUserInfo().getDictDataByCode(props.code as string);
-	const dict = dictList?.find((x: any) => x[props.propValue] == props.value) ?? {};
+	const dict = useUserInfo().dictList[props.code]?.find(x => x[props.propValue] == props.value);
 	if (dict) {
 	if (dict) {
 		state.label = dict[props.propLabel] || props.defaultValue;
 		state.label = dict[props.propLabel] || props.defaultValue;
 		state.tagType = dict.tagType;
 		state.tagType = dict.tagType;
 	}
 	}
-  console.log(props)
 })
 })
 </script>
 </script>