diff --git a/examples/main.js b/examples/main.js index c27d94f..54abbbd 100644 --- a/examples/main.js +++ b/examples/main.js @@ -10,7 +10,10 @@ import iView from '../src/index'; import locale from '../src/locale/lang/zh-CN'; Vue.use(VueRouter); -Vue.use(iView, { locale }); +Vue.use(iView, { + locale, + transfer: true +}); // 开启debug模式 Vue.config.debug = true; diff --git a/examples/routers/select.vue b/examples/routers/select.vue index b3e7185..82e4bb9 100644 --- a/examples/routers/select.vue +++ b/examples/routers/select.vue @@ -1,959 +1,40 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 5271d11..269723e 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -204,7 +204,9 @@ }, transfer: { type: Boolean, - default: false + default () { + return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + } }, // Use for AutoComplete autoComplete: { diff --git a/src/index.js b/src/index.js index af25aa1..05cf930 100644 --- a/src/index.js +++ b/src/index.js @@ -164,6 +164,11 @@ const install = function(Vue, opts = {}) { Vue.component(key, iview[key]); }); + Vue.prototype.$IVIEW = { + size: opts.size || '', + transfer: opts.transfer || '' + }; + Vue.prototype.$Loading = LoadingBar; Vue.prototype.$Message = Message; Vue.prototype.$Modal = Modal; -- libgit2 0.21.4