w-ui
Version:
A Vue.js 2.0 UI Toolkit for mobile
1 lines • 2.68 kB
JavaScript
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=218)}({0:function(e,t){e.exports=function(e,t,n,r,o,u){var i,a=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(i=e,a=e.default);var c="function"==typeof a?a.options:a;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId=o);var d;if(u?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(u)},c._ssrRegister=d):r&&(d=r),d){var l=c.functional,f=l?c.render:c.beforeCreate;l?(c._injectStyles=d,c.render=function(e,t){return d.call(t),f(e,t)}):c.beforeCreate=f?[].concat(f,d):[d]}return{esModule:i,exports:a,options:c}}},218:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RadioGroup=void 0;var r=n(219),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.RadioGroup=o.default},219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45),o=n.n(r);for(var u in r)"default"!==u&&function(e){n.d(t,e,function(){return r[e]})}(u);var i=n(220),a=n(0),s=a(o.a,i.a,!1,null,null,null);s.options.__file="packages/radio-group/src/radio-group.vue",t.default=s.exports},220:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._t("default")],2)},o=[];r._withStripped=!0;var u={render:r,staticRenderFns:o};t.a=u},45:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"w-radio-group",data:function(){return{currentValue:this.value}},props:{value:{type:[String,Number,Boolean],default:""},color:{default:"#4CD864"},size:{validator:function(e){return/^([1-9]\d*)$/.test(e)},default:20}},methods:{updateValue:function(){var e=this.value;this.childrens=this.$children.filter(function(e){return"w-radio"===e.$options.name}),this.childrens&&this.childrens.forEach(function(t){t.checked=e==t.val})},change:function(e){this.currentValue=e,this.updateValue(),this.$emit("input",e)}},watch:{value:function(){this.updateValue()}},mounted:function(){this.$nextTick(this.updateValue)}}}});