UNPKG

6.39 kBJavaScriptView Raw
1module.exports=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=282)}({0:function(t,e){t.exports=function(t,e,n,i,o,a){var r,s=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(r=t,s=t.default);var d="function"==typeof s?s.options:s;e&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0),n&&(d.functional=!0),o&&(d._scopeId=o);var l;if(a?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=l):i&&(l=i),l){var c=d.functional,p=c?d.render:d.beforeCreate;c?(d._injectStyles=l,d.render=function(t,e){return l.call(e),p(t,e)}):d.beforeCreate=p?[].concat(p,l):[l]}return{esModule:r,exports:s,options:d}}},1:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"b",function(){return r});var i={props:{disabled:{type:Boolean},type:{type:String,default:"default"},size:{type:String,default:"default"},nativeType:{type:String,default:"button"},plain:{type:Boolean},loadingColor:{type:Object,default:function(){return{default:"#d6d6d6",danger:"#e04b00",warning:"#ff9900"}}},loading:{type:Boolean},ripple:{type:Boolean}}},o={inject:{vxFormItem:{default:"vxFormItem"}},props:{disabled:{type:Boolean},clearable:{type:Boolean,default:!0},nativeType:{type:String,default:"text"},readonly:{type:Boolean},value:{type:[String,Number]},placeholder:{type:String},autocomplete:{type:String},autofocus:{type:String},maxlength:{type:Number},name:{type:String,default:function(){return Math.random().toString(36).substr(2)}},checked:{type:Boolean},validateEvent:{type:Boolean,default:!0},arrow:{type:Boolean,default:!1},arrowProps:{type:Object},border:{type:Boolean,default:!0},autoIntoView:{type:Boolean,default:!0},size:{type:String,default:"default"}},data:function(){return{isFocus:!1}},methods:{handleFocusIn:function(t){this.isFocus=!0;var e=t.target;this.autoIntoView&&void 0!==e.ontouchstart&&window.addEventListener("resize",function(){e.scrollIntoView&&e.scrollIntoView()},{once:!0})},handleFocusOut:function(t){this.isFocus=!1,this.eDispatch("ElFormItem","el.form.blur",[t.target.value])},handleChange:function(t){this.$emit("change",t.target.value)},handleInput:function(t){var e=t.target?t.target.value:t;this.$emit("input",e),this.eDispatch("ElFormItem","el.form.change",[e])},eDispatch:function(){this.validateEvent&&this.dispatch&&this.dispatch.apply(this,arguments)}}},a={methods:{change:function(t){this.active!==t&&this.$emit("update:active",t).$emit("change",t)}},props:{active:{type:[Number,String,Object],required:!0},layout:{type:String,default:"default"}}},r={props:{history:{type:Boolean,default:!0}},methods:{getPushURL:function(){var t=window.location.hash;this.pushString="popup="+Math.random().toString(36).substr(2);var e=[window.location.href.split("#")[0],t];return e.push(t?-1===t.indexOf("?")&&-1===t.indexOf("=")?"?":"&":"#"),e.push(this.pushString),e.join("")},pushState:function(){var t=this;this.history&&(this.pushString&&this.isCurrentPopup()&&window.history.back(),setTimeout(function(){window.history.pushState({},"",t.getPushURL()),window.addEventListener("popstate",t.handlePopstate)},16))},handlePopstate:function(){-1===window.location.href.indexOf(this.pushString)&&(this.$emit("update:open",!1).$emit("close"),this.popStateBack&&this.popStateBack(),window.removeEventListener("popstate",this.handlePopstate))},goBack:function(){this.history&&this.isCurrentPopup()&&(window.removeEventListener("popstate",this.handlePopstate),history.back())},isCurrentPopup:function(){return window.location.href.indexOf(this.pushString)===window.location.href.length-this.pushString.length}}}},133:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(134),o=n(136);n.d(e,"Radio",function(){return i.a}),n.d(e,"RadioGroup",function(){return o.a})},134:function(t,e,n){"use strict";var i=n(76),o=n(135),a=n(0),r=a(i.a,o.a,!1,null,null,null);e.a=r.exports},135:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{class:["vx-radio",{"is-disabled":t.disabled,"is-checked":t.myChecked}]},[n("input",{attrs:{type:"radio",name:t.name,disabled:t.disabled},domProps:{value:t.value,checked:t.myChecked},on:{change:t.handleChange}}),t.$slots.default?[n("i",{staticClass:"vx-radio--icon"}),n("span",{staticClass:"vx-radio--text"},[t._t("default")],2)]:t._t("default",null,null,{checked:t.myChecked,disabled:t.disabled})],2)},o=[],a={render:i,staticRenderFns:o};e.a=a},136:function(t,e,n){"use strict";var i=n(77),o=n(137),a=n(0),r=a(i.a,o.a,!1,null,null,null);e.a=r.exports},137:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{class:["vx-radio-group",{"is-divider":t.divider,"is-disabled":t.disabled}]},[t._t("default")],2)},o=[],a={render:i,staticRenderFns:o};e.a=a},2:function(t,e){t.exports=require("babel-runtime/helpers/extends")},282:function(t,e,n){t.exports=n(133)},76:function(t,e,n){"use strict";var i=n(2),o=n.n(i),a=n(1);e.a={name:"Radio",componentName:"Radio",mixins:[a.c],props:o()({},a.c.props),computed:{myChecked:function(){return this.$parent.value?this.$parent.value===this.value:this.checked}},methods:{handleChange:function(){this.$parent&&this.$parent.$options&&"RadioGroup"===this.$parent.$options.componentName?this.$parent.handleChange(this.value):this.$emit("input",this.value).$emit("change",this.value)}}}},77:function(t,e,n){"use strict";var i=n(2),o=n.n(i),a=n(1);e.a={name:"RadioGroup",componentName:"RadioGroup",mixins:[a.c],props:o()({},a.c.props,{divider:{type:Boolean,default:!0}}),methods:{handleChange:function(t){this.$emit("input",t).$emit("change",t),this.eDispatch("ElFormItem","el.form.blur",[t]),this.eDispatch("ElFormItem","el.form.change",[t])}}}}});
\No newline at end of file