UNPKG

shu-c-view

Version:

rollup 打包vue@2.7组件库框架

20 lines (18 loc) 666 B
// 金额输入框 import _isArray from 'lodash/isArray'; import _isEmpty from 'lodash/isEmpty'; import { devConsole } from '../helper/util.js'; import BasePriceInput from './price-input.vue'; BasePriceInput.install = function(Vue, ElComponents) { // 用于按需加载的时候独立使用 devConsole(`按需加载独立组件:${BasePriceInput.name}`); if (_isArray(ElComponents) && !_isEmpty(ElComponents)) { for (let i = 0; i < ElComponents.length; i++) { if (ElComponents[i].name !== BasePriceInput.name) { Vue.use(ElComponents[i]); } } } Vue.component(BasePriceInput.name, BasePriceInput); }; export { BasePriceInput };