lucas-form

1.0.1 • Public • Published

my-form

介绍

用配置的方式生成 form , list页面, 解决增删改的问题

软件架构

vue 3 ElementPlus

安装教程

  1. xxxx
  2. xxxx
  3. xxxx

使用说明

  1. 首先新建一个数据定义的js文件,例如: dm.js
const Product = {
        title:"产品资料",
        columns:[
            {code:"ID", label:"产品ID", type:"int", control:"text", editable:false},
            {code:"Name",label:"产品名称", type:"String", control:"text", editable:true}
        ],
        rules:{
            Name:[
                {required:true, message:"请输入产品名称", trigger:"blur"},
                { min: 3, max: 20, message: '产品名称长度3-20个字符', trigger: 'blur' },
            ]
        },
        search:"Name",
        grid:"ID:80,Name",
        cell:{title:"Name"},
        form:{
            width: "800px",
            label_position: "right",
            label_width: "80px",
            actions: [],
            items: [
                { type:"item", field:"ID"},
                { type:"item", field:"Name"},
            ]
        }
    }
  1. 把数据定义对象挂接到 Server dm上面 import("xxx/dm.js").then(res=>{ Server.dm = res.default; });

  2. 使用dm中的数据定义自动生成form, grid, cell, selectDlg, searchbar等基本编辑页面

Readme

Keywords

none

Package Sidebar

Install

npm i lucas-form

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

669 kB

Total Files

35

Last publish

Collaborators

  • lucas-dxg