form-designer-cs
v1.2.12
Published
服务云-表单设计器
Downloads
570
Readme
form-designer-cs
服务云定制化组件-表单设计器
简介:此组件主要用于服务云各个项目中动态表单方面的配置和渲染;包含四类字段属性分别是自定义属性、系统属性、业务组件、纯显示组件;自定义属性需要在字段池功能中手动添加;系统属性是系统后端内置的字段;业务组件是根据不同业务需求定制化的属性组件;纯显示组件是纯粹显示个性化内容的组件。
核心功能:表单配置、表单渲染、查询条件表单渲染器、详情渲染器。
组件依赖:此组件依赖了系统中的Vue对象以及Vue.prototype上挂载的一些方法($request、$download、$confirm、$msgSuccess、$msgWarning、$msgError、$defaultValue、$getUUID、$getFileType、$Validator、$getToken、$toPrice、$getLocalStorage)。
微服务API:VUE_APP_TEMPLATE_API、VUE_APP_FIELDSERVICE_API、VUE_APP_PRODUCT_API、VUE_APP_PARTMGT_API、VUE_APP_AUTHORITY_API、VUE_APP_MANAGEDSERVICE_API、VUE_APP_MAGICCUBE_API
Install
npm install form-designer-cs --save
Usage
import FormDesigner from 'form-designer-cs'
Vue.use(FormDesigner)
调试
使用npm link进行组件联调
创建/解除 form-designer-cs 的全局链接
// 进入模块目录 npm link // 创建链接 npm unlink // 解除链接
创建/解除项目和模块的链接
// 进入项目目录 npm link form-designer-cs // 创建链接 npm unlink form-designer-cs // 解除引用链接
npm发布
npm login // 每天登陆一次就行,不需要每次发版登陆
npm publish // 发布到npm
发布完后一定记得push代码
Instructions
开发新的业务组件: 方法一:把lib文件夹下的所有内容Copy到本地项目中作为一个Component引入使用并开发,待开发测试无误后根据组件要求(严格执行)复写到lib中并提交到gitlab 方法二:在本组件项目中开发完build后把dist文件夹copy到服务云项目node_modules/form-designer-cs/
Notes
组件中使用的通用方法都是挂在到Vue.prototype下的方法
接口放在api文件夹下,要跟服务云项目中的api文件夹区分开