vue自定义全局组件
1,创建PagInation.vue组件 2,index.js中引用PagInation.vue import PagInation from './PagInation.vue' 3,// 添加install方法 PagInation.install = Vue => { Vue.component(PagInation.name, PagInation) } export default PagInation 4,main.js引用 import pagination from '../components/pagination/index.js' Vue.use(Pagination)