webpackJsonp([66],{"18H/":function(t,s){t.exports={render:function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",[e("h2",{attrs:{id:"Checkbox"}},[e("a",{staticClass:"anchor",attrs:{href:"#cube-Checkbox-anchor","aria-hidden":"true"}},[e("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),t._v(" Checkbox")]),t._v(" "),t._m(0),t._v(" "),e("h3",{attrs:{id:"Example"}},[e("a",{staticClass:"anchor",attrs:{href:"#cube-Example-anchor","aria-hidden":"true"}},[e("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),t._v(" Example")]),t._v(" "),t._m(1),t._v(" "),e("h3",{attrs:{id:"Propsconfiguration"}},[e("a",{staticClass:"anchor",attrs:{href:"#cube-Propsconfiguration-anchor","aria-hidden":"true"}},[e("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),t._v(" Props configuration")]),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4)])},staticRenderFns:[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("p",[e("code",{pre:!0},[t._v("Checkbox")]),t._v(" component. You can set the state, pass on special class and set the position of the checkbox's icon.")])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ul",[e("li",[e("p",[t._v("Basic usage")]),t._v(" "),e("pre",{pre:!0},[e("code",{attrs:{"v-pre":"",class:"language-html"}},[e("span",{attrs:{class:"hljs-tag"}},[t._v("<"),e("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(">")]),t._v("\n Checkbox\n"),e("span",{attrs:{class:"hljs-tag"}},[t._v("")]),t._v("\n")])]),t._v(" "),e("p",[t._v("If selected, the value of "),e("code",{pre:!0},[t._v("checked")]),t._v(" is "),e("code",{pre:!0},[t._v("true")]),t._v(".")])]),t._v(" "),e("li",[e("p",[t._v("Styled checkbox")]),t._v(" "),e("pre",{pre:!0},[e("code",{attrs:{"v-pre":"",class:"language-html"}},[e("span",{attrs:{class:"hljs-tag"}},[t._v("<"),e("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v("position")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"right"')]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v("shape")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"square"')]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":hollow-style")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"true"')]),t._v(">")]),t._v("\n Styled Checkbox\n"),e("span",{attrs:{class:"hljs-tag"}},[t._v("")]),t._v("\n")])]),t._v(" "),e("p",[t._v("If setting "),e("code",{pre:!0},[t._v("position")]),t._v(" to "),e("code",{pre:!0},[t._v("'right'")]),t._v(", the position of the checkbox's icon is on the right. And you could use "),e("code",{pre:!0},[t._v("shape")]),t._v(" to configure the shape of icon, set "),e("code",{pre:!0},[t._v("hollow-style=true")]),t._v(" to use hollow-out style.")])]),t._v(" "),e("li",[e("p",[t._v("Change the value of model")]),t._v(" "),e("pre",{pre:!0},[e("code",{attrs:{"v-pre":"",class:"language-html"}},[e("span",{attrs:{class:"hljs-tag"}},[t._v("<"),e("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":option")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"option"')]),t._v(" />")]),t._v("\n")])]),t._v(" "),e("pre",{pre:!0},[e("code",{attrs:{"v-pre":"",class:"language-js"}},[e("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),e("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),e("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("checked")]),t._v(": "),e("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v(",\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("option")]),t._v(": {\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("label")]),t._v(": "),e("span",{attrs:{class:"hljs-string"}},[t._v("'Option Checkbox'")]),t._v(",\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("value")]),t._v(": "),e("span",{attrs:{class:"hljs-string"}},[t._v("'optionValue'")]),t._v(",\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("disabled")]),t._v(": "),e("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v("\n }\n }\n }\n}\n")])]),t._v(" "),e("p",[t._v("If "),e("code",{pre:!0},[t._v("option")]),t._v(" is setted, and when the checkbox is selected, the value of "),e("code",{pre:!0},[t._v("checked")]),t._v(" is "),e("code",{pre:!0},[t._v("'optionValue'")]),t._v(". When not selected, the value is "),e("code",{pre:!0},[t._v("false")]),t._v("; Therefore, in circumstances of single checkbox, better not set "),e("code",{pre:!0},[t._v("option")]),t._v(".")])]),t._v(" "),e("li",[e("p",[t._v("Disabled state")]),t._v(" "),e("pre",{pre:!0},[e("code",{attrs:{"v-pre":"",class:"language-html"}},[e("span",{attrs:{class:"hljs-tag"}},[t._v("<"),e("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(" "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":option")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"{disabled: true}"')]),t._v(">")]),t._v("\n Disabled Checkbox\n"),e("span",{attrs:{class:"hljs-tag"}},[t._v("")]),t._v("\n")])])])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("table",[e("thead",[e("tr",[e("th",[t._v("Attribute")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Type")]),t._v(" "),e("th",[t._v("Accepted Values")]),t._v(" "),e("th",[t._v("Default")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("option")]),t._v(" "),e("td",[t._v("option value")]),t._v(" "),e("td",[t._v("Boolean/String/Object")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")])]),t._v(" "),e("tr",[e("td",[t._v("position")]),t._v(" "),e("td",[t._v("icon position")]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("left/right")]),t._v(" "),e("td",[t._v("left")])]),t._v(" "),e("tr",[e("td",[t._v("shape")]),t._v(" "),e("td",[t._v("icon shape")]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("circle/square")]),t._v(" "),e("td",[t._v("circle")])]),t._v(" "),e("tr",[e("td",[t._v("hollow-style")]),t._v(" "),e("td",[t._v("whether is hollow-out style")]),t._v(" "),e("td",[t._v("Boolean")]),t._v(" "),e("td",[t._v("true/false")]),t._v(" "),e("td",[t._v("false")])])])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ul",[e("li",[e("code",{pre:!0},[t._v("option")]),t._v(" sub configuration")])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("table",[e("thead",[e("tr",[e("th",[t._v("Attribute")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Type")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("label")]),t._v(" "),e("td",[t._v("the text of label")]),t._v(" "),e("td",[t._v("String")])]),t._v(" "),e("tr",[e("td",[t._v("value")]),t._v(" "),e("td",[t._v("the value of checkbox item")]),t._v(" "),e("td",[t._v("String/Number")])]),t._v(" "),e("tr",[e("td",[t._v("disabled")]),t._v(" "),e("td",[t._v("whether the checkbox item is disabled")]),t._v(" "),e("td",[t._v("Boolean")])])])])}]}},QTnR:function(t,s,e){t.exports=e("nejK")},nejK:function(t,s,e){var a=e("VU/8")(null,e("18H/"),null,null,null);t.exports=a.exports}});