mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-10 01:41:07 +00:00
1 line
No EOL
4.2 KiB
JavaScript
1 line
No EOL
4.2 KiB
JavaScript
!function(e,d){"object"==typeof exports&&"object"==typeof module?module.exports=d():"function"==typeof define&&define.amd?define([],d):"object"==typeof exports?exports.VueMaterial=d():e.VueMaterial=d()}(this,function(){return function(e){function d(c){if(t[c])return t[c].exports;var i=t[c]={exports:{},id:c,loaded:!1};return e[c].call(i.exports,i,i.exports,d),i.loaded=!0,i.exports}var t={};return d.m=e,d.c=t,d.p="/",d(0)}({0:function(e,d,t){e.exports=t(15)},15:function(e,d,t){"use strict";function c(e){return e&&e.__esModule?e:{"default":e}}function i(e){e.component("md-switch",e.extend(m["default"])),e.material.styles.push(o["default"])}Object.defineProperty(d,"__esModule",{value:!0}),d["default"]=i;var s=t(105),m=c(s),n=t(80),o=c(n)},41:function(e,d){"use strict";Object.defineProperty(d,"__esModule",{value:!0});var t=75,c="-1px";d["default"]={props:{name:String,value:Boolean,id:String,disabled:Boolean},data:function(){return{leftPos:c,checked:this.value}},computed:{classes:function(){return{"md-checked":Boolean(this.value),"md-disabled":this.disabled}},styles:function(){return{transform:"translate3D("+this.leftPos+", -50%, 0)"}}},watch:{checked:function(){this.leftPos=this.value?t+"%":c}},methods:{toggleSwitch:function(){this.disabled||(this.checked=!this.checked,this.$emit("change",this.checked),this.$emit("input",this.checked))}},mounted:function(){this.leftPos=this.value?t+"%":c}}},63:function(e,d){},80:function(e,d){e.exports=".THEME_NAME .md-switch.md-checked .md-switch-container,.THEME_NAME.md-switch.md-checked .md-switch-container{background-color:ACCENT-COLOR-500-0.5}.THEME_NAME .md-switch.md-checked .md-switch-thumb,.THEME_NAME.md-switch.md-checked .md-switch-thumb{background-color:ACCENT-COLOR}.THEME_NAME .md-switch.md-checked .md-ink-ripple,.THEME_NAME.md-switch.md-checked .md-ink-ripple{color:ACCENT-COLOR}.THEME_NAME .md-switch.md-checked .md-ripple,.THEME_NAME.md-switch.md-checked .md-ripple{opacity:.38}.THEME_NAME .md-switch.md-checked.md-primary .md-switch-container,.THEME_NAME.md-switch.md-checked.md-primary .md-switch-container{background-color:PRIMARY-COLOR-500-0.5}.THEME_NAME .md-switch.md-checked.md-primary .md-switch-thumb,.THEME_NAME.md-switch.md-checked.md-primary .md-switch-thumb{background-color:PRIMARY-COLOR}.THEME_NAME .md-switch.md-checked.md-primary .md-ink-ripple,.THEME_NAME.md-switch.md-checked.md-primary .md-ink-ripple{color:PRIMARY-COLOR}.THEME_NAME .md-switch.md-checked.md-warn .md-switch-container,.THEME_NAME.md-switch.md-checked.md-warn .md-switch-container{background-color:WARN-COLOR-500-0.5}.THEME_NAME .md-switch.md-checked.md-warn .md-switch-thumb,.THEME_NAME.md-switch.md-checked.md-warn .md-switch-thumb{background-color:WARN-COLOR}.THEME_NAME .md-switch.md-checked.md-warn .md-ink-ripple,.THEME_NAME.md-switch.md-checked.md-warn .md-ink-ripple{color:WARN-COLOR}.THEME_NAME .md-switch.md-disabled .md-switch-container,.THEME_NAME .md-switch.md-disabled.md-checked .md-switch-container,.THEME_NAME.md-switch.md-disabled .md-switch-container,.THEME_NAME.md-switch.md-disabled.md-checked .md-switch-container{background-color:rgba(0,0,0,0.12)}.THEME_NAME .md-switch.md-disabled .md-switch-thumb,.THEME_NAME .md-switch.md-disabled.md-checked .md-switch-thumb,.THEME_NAME.md-switch.md-disabled .md-switch-thumb,.THEME_NAME.md-switch.md-disabled.md-checked .md-switch-thumb{background-color:#bdbdbd}\n"},105:function(e,d,t){var c,i;t(63),c=t(41);var s=t(128);i=c=c||{},"object"!=typeof c["default"]&&"function"!=typeof c["default"]||(i=c=c["default"]),"function"==typeof i&&(i=i.options),i.render=s.render,i.staticRenderFns=s.staticRenderFns,e.exports=c},128:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"md-switch","class":classes},[_h("div",{staticClass:"md-switch-container",on:{click:toggleSwitch}},[_h("div",{directives:[{name:"md-ink-ripple",rawName:"v-md-ink-ripple",value:disabled,expression:"disabled"}],staticClass:"md-switch-thumb",style:styles},[_h("input",{attrs:{type:"checkbox",name:name,id:id,disabled:disabled},domProps:{value:value}})," ",_m(0)])])," ",$slots["default"]?_h("label",{staticClass:"md-switch-label",attrs:{"for":id||name}},[_t("default")]):_e()])},staticRenderFns:[function(){with(this)return _h("button",{staticClass:"md-switch-holder"})}]}}})}); |