webpackJsonp([50],{"3sTa":function(t,s,e){var a=e("VU/8")(null,e("wpdz"),null,null,null);t.exports=a.exports},CSGf:function(t,s,e){t.exports=e("3sTa")},wpdz: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:"Select"}},[e("a",{staticClass:"anchor",attrs:{href:"#cube-Select-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(" Select")]),t._v(" "),t._m(0),t._v(" "),e("p",[t._v("Select component.")]),t._v(" "),t._m(1),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(2),t._v(" "),e("h3",{attrs:{id:"Props"}},[e("a",{staticClass:"anchor",attrs:{href:"#cube-Props-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")]),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),e("p",[t._v("If an option is not an object, such as 2014,we will transform it to { value: 2014, text: 2014 }.")]),t._v(" "),e("h3",{attrs:{id:"Events"}},[e("a",{staticClass:"anchor",attrs:{href:"#cube-Events-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(" Events")]),t._v(" "),t._m(6)])},staticRenderFns:[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("blockquote",[e("p",[t._v("New in 1.5.0+")])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("p",[e("strong",[t._v("Notice:")]),t._v(" Cause this component depend on Picker component, and Picker used create-api, so you should read "),e("a",{attrs:{href:"#/en-US/docs/create-api"}},[t._v("create-api")]),t._v(" first.")])},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("p",[t._v("Basically, you need to use "),e("code",{pre:!0},[t._v("options")]),t._v(" to define each option and the selected value will bind on "),e("code",{pre:!0},[t._v("v-model")]),t._v(".")]),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-select")]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"value"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":options")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"options"')]),t._v(">")]),t._v("\n"),e("span",{attrs:{class:"hljs-tag"}},[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("options")]),t._v(": ["),e("span",{attrs:{class:"hljs-number"}},[t._v("2013")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2014")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2015")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2017")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2018")]),t._v("],\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("value")]),t._v(": "),e("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v("\n }\n }\n}\n")])])]),t._v(" "),e("li",[e("p",[t._v("Configs and Events")]),t._v(" "),e("p",[t._v("Select supports the configs of picker title, placeholder, whether auto pop, disabled. And if the selected value is changed when selected, it will emit the event "),e("code",{pre:!0},[t._v("change")]),t._v(".")]),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-select")]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"value"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":title")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"title"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":options")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"options"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":placeholder")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"placeholder"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":auto-pop")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"autoPop"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v(":disabled")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"disabled"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("cancelTxt")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"Cancel"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("confirmTxt")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"Confirm"')]),t._v("\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("@change")]),t._v("="),e("span",{attrs:{class:"hljs-string"}},[t._v('"change"')]),t._v(">")]),t._v("\n"),e("span",{attrs:{class:"hljs-tag"}},[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("options")]),t._v(": ["),e("span",{attrs:{class:"hljs-number"}},[t._v("2013")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2014")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2015")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2017")]),t._v(", "),e("span",{attrs:{class:"hljs-number"}},[t._v("2018")]),t._v("],\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("value")]),t._v(": "),e("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(",\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("title")]),t._v(": "),e("span",{attrs:{class:"hljs-string"}},[t._v("'Entry time'")]),t._v(",\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("placeholder")]),t._v(": "),e("span",{attrs:{class:"hljs-string"}},[t._v("'Please choose entry time'")]),t._v(",\n "),e("span",{attrs:{class:"hljs-attr"}},[t._v("autoPop")]),t._v(": "),e("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),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 "),e("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n change(value, index, text) {\n "),e("span",{attrs:{class:"hljs-built_in"}},[t._v("console")]),t._v(".log("),e("span",{attrs:{class:"hljs-string"}},[t._v("'change'")]),t._v(", value, index, text)\n }\n }\n}\n")])]),t._v(" "),e("p",[t._v("There is one thing you may need notice. the "),e("code",{pre:!0},[t._v("change")]),t._v(" event won't change when you directly set the value of "),e("code",{pre:!0},[t._v("v-model")]),t._v(", it only emit when the change is caused by select. If you want to listen the change of "),e("code",{pre:!0},[t._v("v-model")]),t._v(", just watch it.")])])])},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("options")]),t._v(" "),e("td",[t._v("options")]),t._v(" "),e("td",[t._v("Array")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("[]")])]),t._v(" "),e("tr",[e("td",[t._v("v-model")]),t._v(" "),e("td",[t._v("the selected value")]),t._v(" "),e("td",[t._v("Any")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")])]),t._v(" "),e("tr",[e("td",[t._v("placeholder")]),t._v(" "),e("td",[t._v("placeholder")]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("'请选择'")])]),t._v(" "),e("tr",[e("td",[t._v("auto-pop")]),t._v(" "),e("td",[t._v("whether auto pop picker")]),t._v(" "),e("td",[t._v("Boolean")]),t._v(" "),e("td",[t._v("true/false")]),t._v(" "),e("td",[t._v("false")])]),t._v(" "),e("tr",[e("td",[t._v("disabled")]),t._v(" "),e("td",[t._v("whether disabled")]),t._v(" "),e("td",[t._v("Boolean")]),t._v(" "),e("td",[t._v("true/false")]),t._v(" "),e("td",[t._v("false")])]),t._v(" "),e("tr",[e("td",[t._v("title")]),t._v(" "),e("td",[t._v("the title of picker")]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("'请选择'")])]),t._v(" "),e("tr",[e("td",[t._v("cancelTxt")]),t._v(" "),e("td",[t._v("the cancel text of picker")]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("'取消'")])]),t._v(" "),e("tr",[e("td",[t._v("confirmTxt")]),t._v(" "),e("td",[t._v("the confirm text of picker")]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("'确认'")])])])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ul",[e("li",[e("code",{pre:!0},[t._v("options")]),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("th",[t._v("Accepted Values")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("value")]),t._v(" "),e("td",[t._v("value of the option")]),t._v(" "),e("td",[t._v("Any")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")])]),t._v(" "),e("tr",[e("td",[t._v("text")]),t._v(" "),e("td",[t._v("text of the option")]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")])])])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("table",[e("thead",[e("tr",[e("th",[t._v("Event Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Parameters 1")]),t._v(" "),e("th",[t._v("Parameters 2")]),t._v(" "),e("th",[t._v("Parameters 3")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("change")]),t._v(" "),e("td",[t._v("when the selected value changed by select")]),t._v(" "),e("td",[t._v("the selected value")]),t._v(" "),e("td",[t._v("the selected index")]),t._v(" "),e("td",[t._v("the selected text")])]),t._v(" "),e("tr",[e("td",[t._v("picker-show")]),t._v(" "),e("td",[t._v("when Picker show")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")])]),t._v(" "),e("tr",[e("td",[t._v("picker-hide")]),t._v(" "),e("td",[t._v("when Picker hide")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")]),t._v(" "),e("td",[t._v("-")])])])])}]}}});