1.0.5 • Published 3 years ago

json-code-with-vue v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

json-code-with-vue

通过json文件渲染出html页面在vue项目中

install

  npm install json-code-with-vue --save

quick start

  import render from 'json-code-with-vue'

  const jsonStr = '{"componentName":"div","componentList":[{"componentName":"p","slot":"p1"},{"componentName":"p","slot":"p2"}]}'
  /**
   * jsonStr: json串
   * dom: 挂载的dom节点
   */
  render(jsonStr, dom)

json 规范

componentName: 组件名,可以是全局组件名,或者html 标签
componentList: 子组件列表

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago