Skip to content

Latest commit

 

History

History
104 lines (76 loc) · 2.29 KB

README_EN.md

File metadata and controls

104 lines (76 loc) · 2.29 KB

EpageVant

vant based epage-core rendering package

English Introduction | 中文介绍

Documents

Official website:http://epage.didichuxing.com

Demo

Demo

Install

npm install epage-vant -S
# or yarn add epage-vant

Usage

  • npm (recommend)
import { render } from 'epage-core'
import Epage from 'epage'
import widgets, { entry } from 'epage-vant'
import 'epage/src/style/main.less'
import 'epage-vant/src/style/main.less'
import schema from './schema.json'

// create Designer
new Epage({
  el,
  schema,
  view: 'h5',
  h5: {
    widgets,
    Render: render.VueRender,
    component: entry
  }
})

// create Render
new Render({ el, widgets, schema, component: entry })
  • script
<!-- third-party style -->
<link href='https://cdn.jsdelivr.net/npm/vant@2.8/lib/index.css' rel='stylesheet'></link>
<link href='./epage.css' rel='stylesheet'></link>
<link href='./epage-vant.css' rel='stylesheet'></link>

<!-- third lib -->
<script src='https://cdn.bootcss.com/vue/2.6.10/vue.min.js' ></script>
<script src='https://cdn.bootcss.com/vuex/3.1.1/vuex.min.js' ></script>
<script src='https://cdn.jsdelivr.net/npm/vant@2.8/lib/vant.min.js' ></script>

<script src="./epage-core.min.js"></script>
<script src="./epage.min.js"></script>
<script src="./epage-vant.min.js"></script>

<script>

const el = document.getElementById('root')
const { default: widgets, entry } = EpageVant
const { render } = EpageCore


new Epage({
  el,
  schema,
  view: 'h5',
  h5: {
    widgets,
    Render: render.VueRender,
    component: entry
  }
})
// create Render
new render.VueRender({ el, widgets, schema, component: entry })
</script>

Communication Group

QQ group

License

MIT