@xw7_neu/elpis_xw7
v1.0.0
Published
## model 配置 javaScript { mode: 'dashboard' // 模版类型, 不同模版类型对应不一样的模版数据结构 name: '' // 名称 desc: '' // 描述 icon: '' // icon homePage: '' // 首页项目配置 menu: [{ key: '', // 菜单唯一描述 name: '', //菜单名称 menuType: '', //枚举值: group / module // 当 menuType = group 时,可填 subMen
Downloads
1
Readme
#elpis_xw7 ##企业级应用 xw7,通过全栈实现
model 配置 javaScript
{ mode: 'dashboard' // 模版类型, 不同模版类型对应不一样的模版数据结构 name: '' // 名称 desc: '' // 描述 icon: '' // icon homePage: '' // 首页项目配置 menu: [{ key: '', // 菜单唯一描述 name: '', //菜单名称 menuType: '', //枚举值: group / module // 当 menuType = group 时,可填 subMenu: [{ //可递归 menuItem },], moduleType: '', //枚举值: sider / iframe / custom / schema //当 moduleType == sider 时 siderConfig: { menu: [{ // 可递归 menuItem (除 moduleType == sider) },] }, //当 moduleType == iframe 时 iframeConfig: { path: '' //iframe 路径 }, //当 moduleType == custom 时 customConfig: { path: '' //自定义路由 }, //当 moduleType == schema 时 schemaConfig: { api: '', //数据源 API (遵循 RESFUL 规范) schema: { type: 'object', properties: { key: { ...schema, // 标准 schema 配置 type: '', // 字段类型 label: '', // 字段中文名 tableOption: { ...elTableColumnConfig, toFixed: 0, visible: true/false, }, searchOption: { ...elComponentConfig, comType: '', default: '', }, createFormOption: { ...elComponentConfig, comType: '', // 控件类型 visible: true/false, //是否展示 disabled: false/true, //是否禁用 default: '', // 默认值 enumList: [] //当 comType === select 时生效, 枚举列表 }, editFormOption: { ...elComponentConfig, comType: '', // 控件类型 visible: true/false, //是否展示 disabled: false/true, //是否禁用 default: '', // 默认值 enumList: [] }, detailPanelOption: { ...elComponentConfig, } }, }, required: [''] }, tableConfig: { headerButton: [{ label: '', //按钮名称 eventKey: '', //按钮事件名称 eventOption: {}, //按钮具体配置 ...elButtonConfig, // 标准的 el-button 配置 }], rowButtons: [{ label: '', eventKey: '', eventOption: { // 当 eventKey = remove // rowValueKey = 参数值(当格式为 schema::tableKey 的时候, 到 table 中找相应的字段) params: { paramKey: rowValueKey } }, ...elButtonConfig, }] }, // table 相关配置 searchConfig: {}, // search-bar 相关配置 // 动态组件相关配置 componentConfig: { // comA: {}, // comB: {}, // comC: {} createForm: { title: '', //表单标题 saveBtnText: '', //保存按钮文案 }, editForm: { mainKey: '', // 表单主键, 用于唯一标识要修改的数据对象 title: '', saveBtnText: '' }, // detail-panel detailPanel: { mainKey: '', title: '', } } }, },] }
服务端启动 nodeJs
const { serverStart } = require('@xw7_neu/elpis_xw7'); 启动 服务 const app = serverStart({})
##自定义服务端 router-schema router controller service extend config
前端构建
const { frontendBuild } = require('@xw7_neu/elpis_xw7');
// 编译构建前端工程 frontendBuild(process.env._ENV);
自定义页面扩展
- 在 app/pages/ 目录下写入口文件 entry.xxx.js
dashboard/custom-view 自定义页面扩展
- 在 app/pages/dashboard/XXX 写页面
dashboard/schema-view/components 动态组件扩展
- 1 在 app/pages/dashboard/complex-view/schema-view/components 下写组件 2 配置在 app/pages/dashboard/complex-view/schema-view/component-config.js
schema-form 控件扩展
- 1 在 app/pages/widgets/schema-form/complex-view 下写控件 2 配置在 app/pages/widgets/schema-form/form-item-config.js
schema-search-bar 控件扩展
- 1 在 app/pages/widgets/schema-search-bar/complex-view 下写控件 2 配置在 app/pages/widgets/schema-search-bar/search-item.js
