跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 自动生成 Vue+ElementUI 增删改查代码插件
未分類
5 9 月 2020

自动生成 Vue+ElementUI 增删改查代码插件

自动生成 Vue+ElementUI 增删改查代码插件

資深大佬 : Marstin 1

webpack 插件,目的是为了在简单的 CURD 动作中减少Ctrl+c和 Ctrl+v。

webpack配置文件 或 Vue-Cli配置文件中配置一下下,即可生成对应目录中的代码。可配置数据 Model,增删改查四项功能搭配,请求配置与自定义等

npm install curd-vue-element-plugin -D 
const CurdVueElementPlugin = require('curd-vue-element-plugin')  plugins: [   new CurdVueElementPlugin({     baseDir: './src',     options: [{       name: 'project',       service: ['list', 'add', 'update', 'del'],       component: {         primaryKey: 'id',         model: [{           name: 'name',           text: '姓名',           isSearch: true         }, {           name: 'sex',           text: '性别'         }, {           name: 'telephone',           text: '手机号码',           isSearch: true         }, {           name: 'email',           text: '邮箱'         }, {           name: 'address',           text: '地址',           isEdit: false         }]       }     },     {     //……options     },     {     //……options     }]   }) ] 

详见 curd-vue-element-plugin

大佬有話說 (2)

  • 資深大佬 : NikoXu

    能定义模版吗

  • 主 資深大佬 : Marstin

    @NikoXu 不能

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具