Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔩 功能开发 | 关于代码生成这一块d2admin 有规划吗 #123

Open
ChasLui opened this issue Nov 1, 2018 · 7 comments
Open

Comments

@ChasLui
Copy link

ChasLui commented Nov 1, 2018

  1. model生成
    痛点: 现在写一个接口要写 api, state,mutations, mutation-types,action,getters这么多地方, 其实大多是重复的代码
    期望: 有个 model 层或者 model 配置, 根据 model 生成(更新): api(curd),state,mutation,mutation-types,actions,getters 如果能前后端维护统一接口文档如 swagger, 甚至可以拉swagger 文档生成代码
  2. view生成
    痛点: 增加一个页面需要写 menu 配置,route配置, page 组件
    期望: 通过配置自动生成 route 配置, menu 配置, 生成page
    以上目前都有现成的yeoman generator 或者vue-cli3 plugin, 期望集成d2进来
  3. docs 生成
    通过注释生成 docs
@ChasLui ChasLui changed the title 关于代码生成这一块d2admin 有规划吗 🔩 功能开发 | 关于代码生成这一块d2admin 有规划吗 Nov 1, 2018
@qinzitong
Copy link

+1 同需要

@E00n
Copy link

E00n commented Jan 16, 2019

+1 确实是痛点

@JamesDream87
Copy link

+1

1 similar comment
@zhuzhh
Copy link

zhuzhh commented Apr 8, 2019

+1

@wjkang
Copy link

wjkang commented May 12, 2019

写了个简单的工具 https://github.com/wjkang/lazy-mock

以及关于d2的代码生成模板https://github.com/lazy-mock-templates/d2-admin-pm

大家可以讨论下更加通用的代码生成模板

@wellenzhong
Copy link

我们内部有一个react项目的生成器。
其实挺简单,就是用nodejs来写文件就可以了。

@qxchen6
Copy link

qxchen6 commented Dec 20, 2020

rails g scaffold users name:string age:integer ^-^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants