refactor(xumu): 重构 AppAuthManage 组件
- 移除 certificates 常量的单独定义 - 将 certificates 数据移至 data 函数内部 -优化代码结构,提高组件的可维护性
This commit is contained in:
		| @@ -1,14 +1,6 @@ | |||||||
| <script> | <script> | ||||||
| import authAdd from "./authAdd.vue"; | import authAdd from "./authAdd.vue"; | ||||||
| import authList from "./authList.vue"; | import authList from "./authList.vue"; | ||||||
| const certificates = [ |  | ||||||
|   {label: "身份证(正面)", prop: "frontCard"}, |  | ||||||
|   {label: "身份证(反面)", prop: "reverseCard"}, |  | ||||||
|   {label: "营业执照", prop: "businessPic", permit: ["breed"]}, |  | ||||||
|   {label: "畜禽经营许可证", prop: "breedPic", permit: ["breed"]}, |  | ||||||
|   {label: "动物防疫条件许可证", prop: "prevention", permit: ["breed"]}, |  | ||||||
|   {label: "组织机构证明", prop: "orgPic", permit: ["bank", "insurance"]}, |  | ||||||
| ] |  | ||||||
| export default { | export default { | ||||||
|   name: "AppAuthManage", |   name: "AppAuthManage", | ||||||
|   label: "认证审核", |   label: "认证审核", | ||||||
| @@ -25,7 +17,14 @@ export default { | |||||||
|   }, |   }, | ||||||
|   data(){ |   data(){ | ||||||
|     return { |     return { | ||||||
|       certificates |       certificates:[ | ||||||
|  |         {label: "身份证(正面)", prop: "frontCard"}, | ||||||
|  |         {label: "身份证(反面)", prop: "reverseCard"}, | ||||||
|  |         {label: "营业执照", prop: "businessPic", permit: ["breed"]}, | ||||||
|  |         {label: "畜禽经营许可证", prop: "breedPic", permit: ["breed"]}, | ||||||
|  |         {label: "动物防疫条件许可证", prop: "prevention", permit: ["breed"]}, | ||||||
|  |         {label: "组织机构证明", prop: "orgPic", permit: ["bank", "insurance"]}, | ||||||
|  |       ] | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user