1 line
212 KiB
JavaScript
1 line
212 KiB
JavaScript
|
webpackJsonp([6],{"+VzJ":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("CTPG"),s=a.n(o);for(var i in o)"default"!==i&&function(e){a.d(t,e,function(){return o[e]})}(i);var n=a("lTX3"),r=a("VU/8"),l=r(s.a,n.a,!1,function(){a("DfIM")},null,null);t["default"]=l.exports},"+rcY":function(e,t,a){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}Object.defineProperty(t,"__esModule",{value:!0});var i,n=a("BWlx"),r=o(n),l=a("nPEU"),d=o(l),A=a("2CIf"),m=o(A);t.default={name:"selector-demo",title:"\u9700\u786E\u8BA4",height:500,components:(i={},s(i,m.default.name,m.default),s(i,d.default.name,d.default),s(i,r.default.name,r.default),i),data:function(){return{isSelectorShow:!1,data:[[{text:"\u9009\u9879\u4E00"},{text:"\u9009\u9879\u4E8C"},{text:"\u9009\u9879\u4E09"},{text:"\u9009\u9879\u56DB"}]],selectorValue:""}},methods:{showSelector:function(){this.isSelectorShow=!0},onSelectorConfirm:function(e){var t=e.text;this.selectorValue=t}}}},"2/7X":function(e,t,a){var o=a("78Ox");"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);a("rjj0")("fb293cae",o,!0,{})},"2CIf":function(e,t,a){var o,s,i;(function(){(function(n,r){s=[t,a("Diih"),a("9KZS"),a("A/fi"),a("dgYx"),a("DsKr")],o=r,i="function"==typeof o?o.apply(t,s):o,!(void 0!==i&&(e.exports=i))})(this,function(e,t,a,o,s){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}Object.defineProperty(e,"__esModule",{value:!0});var r,l=i(t),d=i(a),A=i(o);e.default={name:"md-selector",components:(r={},n(r,A.default.name,A.default),n(r,l.default.name,l.default),n(r,d.default.name,d.default),r),props:{value:{type:Boolean,default:!1},data:{type:Array,default:function(){return[]}},defaultIndex:{type:Number,default:-1},invalidIndex:{type:[Array,Number],default:function(){return-1}},title:{type:String,default:""},okText:{type:String,default:""},cancelText:{type:String,default:""},isCheck:{type:Boolean,default:!1},optionRender:{type:Function,default:s.noop}},data:function(){return{isSelectorShow:!1,radioKey:Date.now(),activeIndex:-1,tmpActiveIndex:-1}},computed:{isNeedConfirm:function(){return""!==this.okText},hasSlot:function(){return!!this.$scopedSlots.default}},watch:{value:function(e){this.isSelectorShow=e},isSelectorShow:function(e){this.$emit("input",e)}},created:function(){this.value&&(this.isSelectorShow=this.value),this.isNeedConfirm||(this.activeIndex=this.defaultIndex),this.activeIndex=this.tmpActiveIndex=this.defaultIndex},methods:{$_getItemText:function(e){var t=this.itemRender(e);return t||e.text||e.label},$_isActive:function(e){var t=this.tmpActiveIndex;return-1<t?t===e:this.defaultIndex===e},$_isInvalid:function(e){var t=this.invalidIndex;return Array.isArray(t)?!!~t.indexOf(e):e===t},$_onSelectorConfirm:function(){-1<this.tmpActiveIndex&&(this.activeIndex=this.tmpActiveIndex,this.isSelectorShow=!1,this.$emit("confirm",this.data[this.activeIndex]))},$_onSelectorCancel:function(){this.isSelectorShow=!1,this.tmpActiveIndex=this.activeIndex,-1===this.tmpActiveIndex?this.radioKey=Date.now():this.$refs.radio.selectByIndex(this.tmpActiveIndex),this.$emit("cancel")},$_onSelectorChoose:function(e,t){this.tmpActiveIndex=t,this.isNeedConfirm||(this.activeIndex=t,this.isSelectorShow=!1),this.$emit("choose",e)}}}})})(),e.exports.__esModule&&(e.exports=e.exports.default);var n="function"==typeof e.exports?e.exports.options:e.exports;n.functional&&console.error("[vueify] functional components are not supported and should be defined in plain js files using render functions."),n.render=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"md-selector",class:{"is-normal":!e.isCheck,"is-check":e.isCheck&&e.isNeedConfirm}},[a("md-popup",{attrs:{position:"bottom","mask-closable":!1,"prevent-scroll":!0},on:{show:function(){e.$emit("show")},hide:function(){e.$em
|