2019-11-16

2019-11-16  本文已影响0人  知识文青
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

import fyChatContent from '@cps/chatContent/'
import fyHeadTitle from '@cps/headTitle/'
import {fyButton,fyNegativeButton} from '@cps/button/'
import toast from '@cps/toast/index'
import fyChatTimeLine from '@cps/chatTimeLine/'
import fyMessageNotify from '@cps/messageNotify'


Vue.use(toast)

//自定义组件
Vue.component('fy-chat-content', fyChatContent)
Vue.component('fy-head-title', fyHeadTitle)
Vue.component('fy-button', fyButton)
Vue.component('fy-negative-button', fyNegativeButton)
Vue.component('fy-chat-time-line', fyChatTimeLine)
Vue.component('fy-message-notify', fyMessageNotify)

import { XSwitch } from 'vux'
import fyChatXSwitch from '@cps/chatXSwitch'
import fyChatCheckbox from '@cps/chatCheckbox'
// import Actionsheet  from 'vux/src/components/actionsheet'
/**
 * 官网有一些 bug
 * 按照官方文档提示在项目入口文件中 全局注册 并不成功
 * import Vue from 'vue'
 * import { Actionsheet } from 'vux'
 * Vue.component('actionsheet', Actionsheet)
 * 
 * 把import { Actionsheet } from 'vux' 改成
 * import Actionsheet from 'vux/src/components/actionsheet' 即可
 * 
 * 但是局部注册却有效
 * import { Actionsheet } from 'vux'
 * export default {
 *  components: {
 *    Actionsheet
 *  }
 * }
 * 
 * actionsheet 用法有些问题
 * <group>
 *  <x-switch title="demo" v-model="show1"></x-switch>
 * </group>
 * 
 * <load-more :show-loading="true" tip='加载中...'></load-more>
 * */ 
Vue.component('x-switch', XSwitch)
// 二次封装组件
Vue.component('fy-chat-x-switch', fyChatXSwitch)
Vue.component('fy-chat-checkbox', fyChatCheckbox)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
上一篇下一篇

猜你喜欢

热点阅读