form-designer-h5-cs
v1.0.36
Published
服务云-h5表单渲染器
Downloads
115
Readme
form-designer-h5-cs
服务云定制化组件-H5 表单渲染器
简介:此组件主要用于服务云 H5 项目中动态表单方面渲染;包含四类字段属性分别是自定义属性、系统属性、业务组件、纯显示组件;自定义属性需要在字段池功能中手动添加;系统属性是系统后端内置的字段;业务组件是根据不同业务需求定制化的属性组件;纯显示组件是纯粹显示个性化内容的组件。
核心功能:表单渲染。
组件依赖:此组件依赖了系统中的 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_PARTMGT_API、VUE_APP_AUTHORITY_API、VUE_APP_TENANTCENTER_API、VUE_APP_MAGICCUBe_API、VUE_APP_EDGE_API、VUE_APP_CUBE_API、VUE_APP_UPGRADE_API
Install
npm install form-designer-h5-cs --save
Usage
import FormDesignerh5 from 'form-designer-h5-cs'
Vue.use(FormDesignerH5)
Publish
打包
npm run build
调试
使用 npm link 进行组件联调
创建/解除 form-designer-h5-cs 的全局链接
// 进入模块目录 npm link // 创建链接 npm unlink // 解除链接
创建/解除项目和模块的链接
// 进入项目目录 npm link form-designer-h5-cs // 创建链接 npm unlink form-designer-h5-cs // 解除引用链接
npm 发布
npm login // 每天登陆一次就行,不需要每次发版登陆
npm publish // 发布到npm
发布完后一定记得 push 代码
Instructions
开发新的业务组件: 方法一:把 lib 文件夹下的所有内容 Copy 到本地项目中作为一个 Component 引入使用并开发,待开发测试无误后根据组件要求(严格执行)复写到 lib 中并提交到 gitlab 方法二:在本组件项目中开发完 build 后把 dist 文件夹 copy 到服务云项目 node_modules/form-designer-h5-cs/
Notes
组件中使用的通用方法都是挂在到 Vue.prototype 下的方法
接口放在 api 文件夹下,要跟服务云项目中的 api 文件夹区分开