swiper-next
Version:
Vue3 的 Swiper 组件
19 lines (18 loc) • 373 B
JavaScript
const registerInstall = function(component) {
component.install = function(Vue) {
if (!Vue.component(component.name)) {
Vue.component(component.name, component);
}
};
return component;
};
function withInstall(comp) {
comp.install = function(Vue) {
Vue.component(comp.name, comp);
};
return comp;
}
export {
registerInstall,
withInstall
};