0.1.12 • Published 6 years ago

vue-json-to-html v0.1.12

Weekly downloads
55
License
-
Repository
github
Last release
6 years ago

vue-json-to-html

Status: beta

:tongue: Vue component for generating equal HTML from Json/JS-Object

Table of contents

Usage

Install component to your project:

npm install vue-json-to-html
yarn add vue-json-to-html

Import and include to Vue Instance installed component:

import JsonToHtml from 'vue-json-to-html'

export default {
  components: {
    JsonToHtml
  }
  ...
}

Use component in template:

<template>
  <div id="content">
    <JsonToHtml :json="json" :bem="true" rootClassName="wrapper" rootTagName="section" :inheritClassName="false"/>
  </div>
</template>

Component props

PropTypeDefaultDescription
jsonJson(JS Object)requiredDOM will rendered such as object structure. Each elements will have necessary classNames from json keys.
bemBooleanfalseGenerate classNames with BEM methodology.
inheritClassNameBooleantrueGenerate classNames with inherited parent class name. For using BEM must be a true.
bemBooleanfalseGenerate classNames with BEM methodology.
rootClassNameStringundefinedClassName for root element in <JsonToHtml/>, using for inherited parent class name from root element
rootTagNameString'div'TagName for root element in <JsonToHtml/>.
0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago