16.js 4.0 KB

12
  1. /*! NutUI v1.2.7 Tue Jun 05 2018 15:50:15 GMT+0800 (CST) */
  2. webpackJsonpnutui([16],{1067:function(t,v,_){(t.exports=_(2)()).push([t.i,"",""])},1167:function(t,v){t.exports={render:function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("div",[_("nut-docheader",{attrs:{name:t.$route.name,chName:t.$route.params.chnName,type:"Component",desc:"一种滑动开关,通过点击使按钮左右滑动,同时触发对应的开关状态。",showQrCode:!0}}),t._v(" "),_("h6",[t._v("默认用法")]),t._v(" "),_("nut-codebox",{attrs:{code:t.demo1,imgUrl:["../asset/img/demo/switch1.png","../asset/img/demo/switch2.png"]}}),t._v(" "),_("h6",[t._v("自定义颜色")]),t._v(" "),_("nut-codebox",{attrs:{code:t.demo2,imgUrl:["../asset/img/demo/switch3.png","../asset/img/demo/switch4.png"]}}),t._v(" "),_("h6",[t._v("ON/OFF事件")]),t._v(" "),_("nut-codebox",{attrs:{code:t.demo3}}),t._v(" "),_("nut-codebox",{attrs:{code:t.demo4}}),t._v(" "),_("h5",[t._v("Props")]),t._v(" "),t._m(0),t._v(" "),_("h5",[t._v("Events")]),t._v(" "),t._m(1)],1)},staticRenderFns:[function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("div",{staticClass:"tbl-wrapper"},[_("table",{staticClass:"u-full-width"},[_("thead",[_("tr",[_("th",[t._v("参数")]),t._v(" "),_("th",[t._v("说明")]),t._v(" "),_("th",[t._v("类型")]),t._v(" "),_("th",[t._v("默认值")]),t._v(" "),_("th",[t._v("可选值")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("active.sync")]),t._v(" "),_("td",[t._v("开关状态")]),t._v(" "),_("td",[t._v("Boolean")]),t._v(" "),_("td",[t._v("false")]),t._v(" "),_("td",[t._v("true/false")])]),t._v(" "),_("tr",[_("td",[t._v("width")]),t._v(" "),_("td",[t._v("组件宽度(单位rem)")]),t._v(" "),_("td",[t._v("Number")]),t._v(" "),_("td",[t._v("0.8")]),t._v(" "),_("td",[t._v("--")])]),t._v(" "),_("tr",[_("td",[t._v("height")]),t._v(" "),_("td",[t._v("组件高度(单位rem)")]),t._v(" "),_("td",[t._v("Number")]),t._v(" "),_("td",[t._v("0.4")]),t._v(" "),_("td",[t._v("--")])]),t._v(" "),_("tr",[_("td",[t._v("activeBgColor")]),t._v(" "),_("td",[t._v("打开状态背景颜色")]),t._v(" "),_("td",[t._v("String")]),t._v(" "),_("td",[t._v("#F42E2D")]),t._v(" "),_("td",[t._v("--")])]),t._v(" "),_("tr",[_("td",[t._v("inActiveBgColor")]),t._v(" "),_("td",[t._v("关闭状态背景颜色")]),t._v(" "),_("td",[t._v("String")]),t._v(" "),_("td",[t._v("#FDFDFD")]),t._v(" "),_("td",[t._v("--")])]),t._v(" "),_("tr",[_("td",[t._v("btnColor")]),t._v(" "),_("td",[t._v("滑动圆按钮颜色")]),t._v(" "),_("td",[t._v("String")]),t._v(" "),_("td",[t._v("#FFFFFF")]),t._v(" "),_("td",[t._v("--")])])])])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("div",{staticClass:"tbl-wrapper"},[_("table",{staticClass:"u-full-width"},[_("thead",[_("tr",[_("th",[t._v("事件名")]),t._v(" "),_("th",[t._v("说明")]),t._v(" "),_("th",[t._v("回调参数")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("switch-on")]),t._v(" "),_("td",[t._v("开关打开时触发")]),t._v(" "),_("td",[t._v("--")])]),t._v(" "),_("tr",[_("td",[t._v("switch-off")]),t._v(" "),_("td",[t._v("开关关闭时触发")]),t._v(" "),_("td",[t._v("--")])])])])])}]}},1261:function(t,v,_){var e=_(1067);"string"==typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);_(3)("55b980d3",e,!0,{})},881:function(t,v,_){var e=_(1)(_(977),_(1167),function(t){_(1261)},null,null);t.exports=e.exports},977:function(t,v,_){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.default={data:function(){return{demo1:'<nut-switch\n:active="true"\n></nut-switch>',demo2:'<nut-switch\n:height="0.3"\n:width="0.6"\nactiveBgColor="#9ABB82"\ninActiveBgColor="#EAE7E2"\nbtnColor="#CBDDDD"\n></nut-switch>',demo3:'<nut-switch\n@switch-on="switchOnEvt"\n@switch-off="switchOffEvt"\n></nut-switch>',demo4:"export default {\n methods:{\n switchOnEvt(){\n alert('on');\n },\n switchOffEvt(){\n alert('off');\n }\n }\n}"}},methods:{switchOnEvt:function(){alert("on")},switchOffEvt:function(){alert("off")}}}}});