-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Search before asking
- I had searched in the issues and found no similar feature requirement.
Description
The configuration of the current workflow is not divided into different components according to different tools, which is not convenient for subsequent maintenance and update of function points. Therefore, it is planned to split different tools into different components by refactoring the workflow configuration. At the same time, part of the access points of upper-level components, data access methods, and method invocation methods will be part of the reconstruction process. optimization.
The refactored workflow configuration is a way to drive view rendering with data components. The tool configuration of the left toolbar remains unchanged, and the form configuration of different tools is completely written in accordance with the standard in form-create + element-ui. In addition, there must be complete Chinese and English support for the refactored components, so in the subsequent functional changes and expansion, the Chinese and English need to be improved or modified. Under normal circumstances, most of the subsequent custom development and expansion scenarios will be supported in this refactoring, and the code changes and labor costs involved in the subsequent changes are not very large.
Use case
- Keep the
tasksTypeconstant inconfig.js, and use this constant to render the tools in the toolbar - The forms of all tools are rendered in the existing
formModel.vue, so all form-related code in this file is discarded, including the structure and validation of the form - Manage the form configuration of different tool components through
form-createto facilitate subsequent expansion, such as increasing the management function of tool components or changing low-code configurations, etc. - Create a new
modulefolder under theformModelfolder to create a newbase.jsand thejsfile of the corresponding tool. Thebase.jsfile stores the common configuration in the tool form, and the restjsstores the configuration of the corresponding tool. Conditional rendering is performed in theformModel.vueaccording to thetasksTypein theconfig.js - The
formModel.vuefile does not use theMessagecomponent to prompt for form verification errors, and uniformly uses the form of form verification - The
formModel.vuefile no longer uses thepositionlayout method after refactoring - Optimize how the parent component calls
form-create - Deal with the problem of data confusion as much as possible. In this part of the function, the existing implementation uses a variety of data transfer and method invocation methods, such as
mixins,provide,inject,props,localStorage,vuex,emitand directly calling child component methods throughrefin the parent component are not conducive to subsequent maintenance - Change the irregular naming, such as the method
addTaskInfothat is exposed to the parent informModel.vueis replaced withconfirm, etc.
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct