UNPKG

vue-weui-expand

Version:

WeUI 的轻量级 js 封装

63 lines (47 loc) 1.47 kB
//import Vue from "vue"; //import picker from "./picker/picker.vue"; // import multipicker from "./multipicker/multipicker.vue"; // import datepicker from "./datepicker/datepicker.vue"; import * as toast from "./toast/toast.js"; import * as dialog from './dialog/dialog.js'; import * as toptip from './toptip/toptip.js'; import * as actionsheet from './actionsheet/actionsheet.js'; import * as picker from './picker/picker.js'; import * as multipicker from './multipicker/multipicker.js'; import * as datepicker from "./datepicker/datepicker.js"; import cellswiped from "./list/cellswiped.vue"; const components ={ //datepicker cellswiped }; // // //按需要引入 Object.keys(components).forEach(name => { components[name].install = function (Vue) { Vue.component(name, components[name]); }; }); //安装全部 const install = function(Vue) { Object.keys(components).forEach(name => { Vue.component(name, components[name]); }); //自定义函数方式插件 Vue.prototype.toast=toast; Vue.prototype.dialog=dialog; Vue.prototype.toptip=toptip; Vue.prototype.actionsheet=actionsheet; Vue.prototype.picker=picker; Vue.prototype.multipicker=multipicker; Vue.prototype.datepicker=datepicker; }; export { install, picker, datepicker, multipicker, toast, dialog, toptip, actionsheet, cellswiped };