Generate service
mock
page
according to the table of the database
- generate service
- generate mock
- generate Page
- auto modify menu and route
- generate test
npm i -g ant-g
Create a new empty folder as project root. Execute command in the folder:
npm create umi
Execute command in the folder: ant-g
$ ant-g
? Select the boilerplate type (Use arrow keys)
> init - Create g-config.json config file for generator
dataStructure - Create data structure file from database, this file save /.g
dependencies - Add dependencies to the project
service - Create service and data.d from db
mock - Create mock from db
pageConfig - Create page config file for generator page
pageGenerate - Create page from config file
error message
Client does not support authentication protocol requested by server; consider upgrading MySQL client
The reason is that the initial password of the database is not configured. Execute the following command on the MySQL command line:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your password';
SELECT plugin FROM mysql.user WHERE User = 'root';
2020-01-16
- 🐞 fix searchForm date bug.
- ⚡ display the field tile from filed columnComment.
2020-01-13
- simple page template
- ⚡ Promote display and edit form by data type.
2020-01-10
- 🐞 fix searchForm.less missed bug.
2020-01-10
- ⚡ Added the function of configuring MySQL
- ⚡ Added shortcut command
2020-01-02
- ⚡ Add prettier module to prettier the code
- ⚡ Add generate page's code