Vue使用uikit

作者: 左木北鱼 | 来源:发表于2018-12-15 14:48 被阅读0次

    Uikit官网

    1、安装uikit:npm i uikit --save-dev
    2、新建src/uikit.js
    import UIkit from 'uikit'
    import Icons from 'uikit/dist/js/uikit-icons'
    import 'uikit/dist/css/uikit.min.css'
    
    UIkit.use(Icons)
    
    export default (Vue, options) => {
      Vue.prototype.$uikit = UIkit
    }
    
    3、main.js引入
    // 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 router from './router'
    import UIkit from './uikit'
    
    Vue.config.productionTip = false
    Vue.use(UIkit)
    
    /* eslint-disable no-new */
    new Vue({
      el: '#app',
      router,
      components: { App },
      template: '<App/>'
    })
    
    

    相关文章

      网友评论

        本文标题:Vue使用uikit

        本文链接:https://www.haomeiwen.com/subject/czlahqtx.html