UNPKG

nimble-ui

Version:
24 lines (20 loc) 804 B
import createInstall from './createInstall'; let _install = createInstall(() => { return new Promise((resolve, reject) => { import(/* webpackChunkName: "_address_" */ '../../Components/business/address').then(resolve, reject); }); }); /** * install方法,如果外面直接通过Vue.install安装,就会通过这个方法实例化Address对象 * @param {Vue} Vue vue * @param {Object} options 可选参数 */ _install.install = (Vue, options) => { const _config = (options && options.Address) || options; let $sAddress = _install(Vue, _config); Vue.component('nu-address', () => import(/* webpackChunkName: "_address_" */ '../../Components/business/address')); [$sAddress].forEach((item) => { Vue.use(item, _config); }); }; export default _install;