shu-c-view
Version:
rollup 打包vue@2.7组件库框架
22 lines (20 loc) • 720 B
JavaScript
/**
* @desc nesting-grid 嵌套列表组件
*/
import _isArray from 'lodash/isArray';
import _isEmpty from 'lodash/isEmpty';
import { devConsole } from '../helper/util.js';
import { BaseNestingGrid } from './grid.js';
BaseNestingGrid.install = function(Vue, ElComponents) {
// 用于按需加载的时候独立使用
devConsole(`按需加载独立组件:${BaseNestingGrid.name}`);
if (_isArray(ElComponents) && !_isEmpty(ElComponents)) {
for (let i = 0; i < ElComponents.length; i++) {
if (ElComponents[i].name !== BaseNestingGrid.name) {
Vue.use(ElComponents[i]);
}
}
}
Vue.component(BaseNestingGrid.name, BaseNestingGrid);
};
export { BaseNestingGrid };