فهرست منبع

chore: 优化代码

喵你个旺呀 1 سال پیش
والد
کامیت
e94e51ded7
1فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  1. 1 5
      Web/src/components/table/dictLabel.vue

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

@@ -24,7 +24,7 @@ const props = defineProps({
 });
 
 const state = reactive({
-	label: '' as string,
+	label: props.defaultValue as string,
 	tagType: "primary" as "success" | "warning" | "info" | "primary" | "danger"
 });
 
@@ -43,9 +43,5 @@ const setDictValue = (value: any) => {
     state.label = dict[props.propLabel] || props.defaultValue;
     state.tagType = dict.tagType ?? "primary";
   }
-  else {
-	state.label = props.defaultValue;
-    state.tagType = "info";
-  }
 }
 </script>