zoukankan      html  css  js  c++  java
  • 两步创建vue全局组件

    import Login from './Login'
    
    export default {
        install: function(Vue){
            Vue.component('Login', Login);
        }
    }
    // The Vue build version to load with the `import` command
    // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
    import Vue from 'vue'
    import App from './App'
    import Login from '@/components/common/login'
    //import store from './store'
    import store from '@/store'
    
    Vue.use(Login)
    
    Vue.config.productionTip = false
    
    /* eslint-disable no-new */
    new Vue({
      el: '#app',
      store,
      components: { App },
      template: '<App/>'
    })
  • 相关阅读:
    快速排序
    fedora 配置
    while与do while
    switch选择结构
    if选择结构
    java有参
    java猜拳
    java类的无参方法
    java类与对象
    java数组
  • 原文地址:https://www.cnblogs.com/ivan5277/p/11026854.html
Copyright © 2011-2022 走看看