0.2.15 • Published 6 years ago

vue-top-down v0.2.15

Weekly downloads
4
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.2.15

6 years ago

0.2.14

6 years ago

0.2.13

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.0.1

6 years ago

0.1.0

6 years ago