ksh-plugins
Version:
可视化插件
32 lines (26 loc) • 548 B
JavaScript
// 导入单个组件
import KshRollNum from './KshRollNum';
import KshSelfInc from './KshSelfInc';
import KshRankBar from './KshRankBar';
// 保存 便于遍历
const components = [
KshRollNum,
KshSelfInc,
KshRankBar,
];
const install = function (Vue) {
if (install.installed) return;
install.installed = true;
components.map((component) => component.install(Vue));
};
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
export {
KshRollNum,
KshSelfInc,
KshRankBar,
};
export default {
install,
};