UNPKG

shu-c-view

Version:

rollup 打包vue组件库框架

22 lines (20 loc) 725 B
/** * @desc 密码验证强度控件 */ import _isArray from 'lodash/isArray'; import _isEmpty from 'lodash/isEmpty'; import { devConsole } from '../helper/util.js'; import BasePasswordCheck from './index.vue'; BasePasswordCheck.install = function(Vue, ElComponents) { // 用于按需加载的时候独立使用 devConsole('按需加载独立组件:' + BasePasswordCheck.name); if (_isArray(ElComponents) && !_isEmpty(ElComponents)) { for (let i = 0; i < ElComponents.length; i++) { if (ElComponents[i].name !== BasePasswordCheck.name) { Vue.use(ElComponents[i]); } } } Vue.component(BasePasswordCheck.name, BasePasswordCheck); }; export { BasePasswordCheck };