Socket
Socket
Sign inDemoInstall

vue-dynamic-component

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-dynamic-component

Component for fast creating dynamical components.


Version published
Maintainers
1
Install size
18.5 kB
Created

Readme

Source

vue-dynamic-component (ru)

Component for fast creating dynamical components.
This component can help for fast migrate from pjax to vue

Usage

import vueDynamicComponent from 'vue-dynamic-component'

Vue.use(vueDynamicComponent [, {componentName: 'name-for-component'}])

new Vue({
  ...
  data() {
    return {
      comp: {
        template: '<div>default component with {{msg}} <button @click="msg += \'!\'">add !</button></div>',
        data() {
          return {msg: 'some text'}
        },
      }
    }
  },
  ...
})
<vue-dynamic-component :component="comp"></vue-dynamic-component>

Example

props :component

  • required: true
  • type: Object
  • value
    • The standard content component: data, methods, watch, events, etc
    • keepAliveId - ID for caching the component by using keep-alive
      • required: false
      • type: String
    • inlineTemplate - Using the template from DOM, like this
      • required: false
      • type: Boolean

plugin options

componentName: changes the name of the component (default name 'vue-dynamic-component')

Keywords

FAQs

Last updated on 11 Mar 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc