You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
4.6 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-componentsB-switch-index"],{"0e21":function(e,i,t){"use strict";t.d(i,"b",(function(){return a})),t.d(i,"c",(function(){return s})),t.d(i,"a",(function(){return n}));var n={uSwitch:t("feb7").default,uSubsection:t("e97e").default},a=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("v-uni-view",{staticClass:"u-demo"},[t("v-uni-view",{staticClass:"u-demo-wrap"},[t("v-uni-view",{staticClass:"u-demo-title"},[e._v("演示效果")]),t("v-uni-view",{staticClass:"u-demo-area"},[t("u-switch",{attrs:{loading:e.loading,size:e.size,"active-color":e.activeColor,disabled:e.disabled,activeValue:100,inactiveValue:1},on:{change:function(i){arguments[0]=i=e.$handleEvent(i),e.change.apply(void 0,arguments)}},model:{value:e.checked,callback:function(i){e.checked=i},expression:"checked"}})],1)],1),t("v-uni-view",{staticClass:"u-config-wrap"},[t("v-uni-view",{staticClass:"u-config-title u-border-bottom"},[e._v("参数配置")]),t("v-uni-view",{staticClass:"u-config-item"},[t("v-uni-view",{staticClass:"u-item-title"},[e._v("状态")]),t("u-subsection",{attrs:{list:["关闭","打开"]},on:{change:function(i){arguments[0]=i=e.$handleEvent(i),e.modelChange.apply(void 0,arguments)}}})],1),t("v-uni-view",{staticClass:"u-config-item"},[t("v-uni-view",{staticClass:"u-item-title"},[e._v("颜色")]),t("u-subsection",{attrs:{list:["primary","error","warning","success"]},on:{change:function(i){arguments[0]=i=e.$handleEvent(i),e.colorChange.apply(void 0,arguments)}}})],1),t("v-uni-view",{staticClass:"u-config-item"},[t("v-uni-view",{staticClass:"u-item-title"},[e._v("尺寸(单位rpx)")]),t("u-subsection",{attrs:{current:"1",list:["40","60","80"]},on:{change:function(i){arguments[0]=i=e.$handleEvent(i),e.sizeChange.apply(void 0,arguments)}}})],1),t("v-uni-view",{staticClass:"u-config-item"},[t("v-uni-view",{staticClass:"u-item-title"},[e._v("加载中")]),t("u-subsection",{attrs:{list:["否","是"]},on:{change:function(i){arguments[0]=i=e.$handleEvent(i),e.loadingChange.apply(void 0,arguments)}}})],1),t("v-uni-view",{staticClass:"u-config-item"},[t("v-uni-view",{staticClass:"u-item-title"},[e._v("禁用")]),t("u-subsection",{attrs:{current:"1",list:["是","否"]},on:{change:function(i){arguments[0]=i=e.$handleEvent(i),e.disabledChange.apply(void 0,arguments)}}})],1),t("v-uni-view",{staticClass:"u-config-item"},[t("v-uni-view",{staticClass:"u-item-title"},[e._v("异步控制")]),t("u-subsection",{attrs:{list:["关闭","打开"]},on:{change:function(i){arguments[0]=i=e.$handleEvent(i),e.asyncChange.apply(void 0,arguments)}}})],1)],1)],1)},s=[]},"23f9":function(e,i,t){"use strict";t.r(i);var n=t("3a01"),a=t.n(n);for(var s in n)"default"!==s&&function(e){t.d(i,e,(function(){return n[e]}))}(s);i["default"]=a.a},"3a01":function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n={data:function(){return{checked:!1,activeColor:"#2979ff",size:50,loading:!1,disabled:!1}},methods:{modelChange:function(e){this.checked=!!e},colorChange:function(e){var i=0==e?"primary":1==e?"error":2==e?"warning":"success";this.activeColor=this.$u.color[i]},sizeChange:function(e){this.size=0==e?"40":1==e?"60":"80"},loadingChange:function(e){this.loading=!!e},disabledChange:function(e){this.disabled=0==e},asyncChange:function(e){var i=this;if(this.checked&&1==e)this.$u.toast("请先关闭选择器");else if(this.checked||0!=e){var t=0==e?"是否要关闭?":"是否要打开?";this.loading=!0;var n=this.checked;this.checked=!0,uni.showModal({title:"提示",content:t,complete:function(e){i.loading=!1,e.confirm?i.checked=!n:i.checked=!!n}})}else this.$u.toast("请先打开选择器")},change:function(e){}}};i.default=n},"3e80":function(e,i,t){var n=t("a7a3");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var a=t("4f06").default;a("726a0e32",n,!0,{sourceMap:!1,shadowMode:!1})},"3ee5":function(e,i,t){"use strict";t.r(i);var n=t("0e21"),a=t("23f9");for(var s in a)"default"!==s&&function(e){t.d(i,e,(function(){return a[e]}))}(s);t("6ff9");var c,u=t("f0c5"),o=Object(u["a"])(a["default"],n["b"],n["c"],!1,null,"0d601f9e",null,!1,n["a"],c);i["default"]=o.exports},"6ff9":function(e,i,t){"use strict";var n=t("3e80"),a=t.n(n);a.a},a7a3:function(e,i,t){var n=t("24fb");i=n(!1),i.push([e.i,'@charset "UTF-8";/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */',""]),e.exports=i}}]);