# my-form **Repository Path**: lucas-dxg/my-form ## Basic Information - **Project Name**: my-form - **Description**: 用配置的方式生成 form , list页面, 解决增删改的问题 - **Primary Language**: JavaScript - **License**: GPL-2.0 - **Default Branch**: new1 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 2 - **Created**: 2021-08-16 - **Last Updated**: 2025-12-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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"}, ] } } ``` 2. 把数据定义对象挂接到 Server dm上面 import("xxx/dm.js").then(res=>{ Server.dm = res.default; }); 3. 使用dm中的数据定义自动生成form, grid, cell, selectDlg, searchbar等基本编辑页面