0.1.11 • Published 6 years ago

vue-top-down-test v0.1.11

Weekly downloads
15
License
MIT
Repository
github
Last release
6 years ago

vue-top-down

Build Status

NPM

With this, you can mount Vue components on some of the elements on a raw html as template, with original DOM hierarchy preserved.

Check out demo.

Usage

import { VueTopDown, VTDConstants as VTD } from 'vue-top-down'
import OneComponent from 'path/to/one/component'

const StructComp = {
  mixins: [VueTopDown],
  components: {
    OneComponent
  },
  data () {
    return {
      [VTD.ROOT]: '.selector.of.hosting.element', // in case you want to skip some dom node levels
      [VTD.MAPPING]: {
        '.selector.for.one.component': OneComponent
      }
    }
  }
}
import { VueTopDownItem } from 'vue-top-down'

export default {
  name: 'OneComponent',
  mixins: [VueTopDownItem], // with this, you can handle 'clazz' / 'outerHTML'
  inheritAttrs: false
}
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

0.1.0

6 years ago