@ace_tao/vue-confirm
Version:
基于vue插件发布
24 lines (18 loc) • 429 B
JavaScript
import Confirm from './packages/confirm/index.js';
const components = []
// 标签组件,挂载全局
const install = function(Vue, opts = {}) {
if(components.length) {
components.map(component => {
Vue.component(component.name, component);
})
}
}
/* 支持使用标签的方式引入 */
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
export default {
install,
Confirm
}