Epage
一款基于schema的可视化页面配置工具
# 设计器
// 以`epage-iview`渲染为例
import { render } from 'epage-core'
import Epage from 'epage'
import PCWidgets, { entry as PCEntry } from 'epage-iview'
import H5Widgets, { entry as H5Entry } from 'epage-vant'
import schema from './schema.json'
const el = document.getElementById('root')
new Epage({
el,
schema,
view: 'pc',
pc: {
component: PCEntry,
widgets: PCWidgets,
Render: render.VueRender
},
h5: {
component: entry,
widgets: H5Widgets,
Render: render.VueRender
}
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 渲染器
// 以`epage-iview`渲染器为例
import { render } from 'epage-core'
import widgets, { entry as component } from 'epage-iview'
import schema from './schema.json'
const el = document.getElementById('root')
new render.VueRender({ el, widgets, schema, component })
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8