refactor(xumu): 优化字典数据加载和组件结构
- 移动字典数据加载到父组件 AppDeathManage - 修复死亡日期和死亡原因的验证规则 - 优化死亡原因的显示逻辑 - 移除子组件中的重复字典数据加载
This commit is contained in:
		| @@ -12,19 +12,19 @@ export default { | ||||
|   }, | ||||
|   computed: { | ||||
|     currentPage() { | ||||
|       let {hash} = this.$route | ||||
|       let { hash } = this.$route | ||||
|       return hash == "#add" ? add : list | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return {} | ||||
|   created() { | ||||
|     this.dict.load("yesOrNo", "category", "variety", "deathReason", "auditStatus") | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <template> | ||||
|   <section class="AppDeathManage"> | ||||
|     <component :is="currentPage" v-bind="$props"/> | ||||
|     <component :is="currentPage" v-bind="$props" /> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user