text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-85c8ddf2"],{"8ef9":function(s,t,a){},e22d:function(s,t,a){"use strict";var l=a("8ef9"),e=a.n(l);e.a},fb89:function(s,t,a){"use strict";a.r(t);var l=function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("section",[a("h1",[s._v("CheckboxList 复选框组")]),a("h2",[s._v("基本用法")]),a("p",[s._v("与单个的checkbox不同的是,复选框组通过v-model绑定一个数组(Array),是所有选中的key值")]),a("demo-block",[a("div",{staticClass:"source",attrs:{slot:"source"},slot:"source"},[a("nt-checkbox-list",{model:{value:s.kjlist,callback:function(t){s.kjlist=t},expression:"kjlist"}},[a("nt-checkbox",{attrs:{value:"facebook",disabled:!0}},[s._v("facebook")]),a("nt-checkbox",{attrs:{value:"github"}},[s._v("github")]),a("nt-checkbox",{attrs:{value:"google"}},[s._v("google")])],1),a("p",[s._v("当前选中复选框组的key值:"+s._s(s.kjlist))])],1),a("div",{staticClass:"highlight",attrs:{slot:"highlight"},slot:"highlight"},[a("pre",{pre:!0},[a("code",{pre:!0,attrs:{"v-pre":"",class:"language-html"}},[a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox-list")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"kjlist"')]),s._v(">")]),s._v("\n            "),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("value")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"facebook"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v(":disabled")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"true"')]),s._v(">")]),s._v("facebook"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(">")]),s._v("\n            "),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("value")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"github"')]),s._v(">")]),s._v("github"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(">")]),s._v("\n            "),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("value")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"google"')]),s._v(">")]),s._v("google"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox-list")]),s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("p")]),s._v(">")]),s._v("当前选中复选框组的key值:{{kjlist}}"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("p")]),s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("script")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"javascript"}},[s._v("\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v("{\n    data(){\n        "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("return")]),s._v(" {\n          "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("list")]),s._v(":["),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'tmall'")]),s._v("]\n        }\n    }\n}\n")]),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("script")]),s._v(">")]),s._v("\n\n\n")])])])]),a("h2",[s._v("绑定change事件")]),a("p",[s._v("可以绑定change事件来监听复选框的改变,默认传递参数为复选框组中所有选中项的key值")]),a("demo-block",[a("div",{staticClass:"source",attrs:{slot:"source"},slot:"source"},[a("nt-checkbox-list",{on:{change:s.handChange},model:{value:s.list,callback:function(t){s.list=t},expression:"list"}},[a("nt-checkbox",{attrs:{value:"taobao"}},[s._v("taobao")]),a("nt-checkbox",{attrs:{value:"tmall"}},[s._v("tmall")])],1)],1),a("div",{staticClass:"highlight",attrs:{slot:"highlight"},slot:"highlight"},[a("pre",{pre:!0},[a("code",{pre:!0,attrs:{"v-pre":"",class:"language-html"}},[a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox-list")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"list"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("@change")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"handChange"')]),s._v(">")]),s._v("\n            "),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("value")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"taobao"')]),s._v(">")]),s._v("taobao"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(">")]),s._v("\n            "),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("value")]),s._v("="),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v('"tmall"')]),s._v(">")]),s._v("tmall"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox")]),s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("nt-checkbox-list")]),s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("script")]),s._v(">")]),a("span",{pre:!0,attrs:{class:"javascript"}},[s._v("\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v("{\n    data(){\n        "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("return")]),s._v(" {\n          "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("list")]),s._v(":["),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'tmall'")]),s._v("]\n        }\n    },\n    "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("methods")]),s._v(":{\n      handChange(list){\n        alert("),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("`当前选中的复选框组的key是"),a("span",{pre:!0,attrs:{class:"hljs-subst"}},[s._v("${list}")]),s._v("`")]),s._v(")\n      }\n    }\n}\n")]),a("span",{pre:!0,attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{pre:!0,attrs:{class:"hljs-name"}},[s._v("script")]),s._v(">")]),s._v("\n\n\n\n")])])])]),a("h3",[s._v("Events")]),s._m(0)],1)},e=[function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"left"}},[s._v("事件名称")]),a("th",{staticStyle:{"text-align":"left"}},[s._v("说明")]),a("th",{staticStyle:{"text-align":"center"}},[s._v("回调参数")])])]),a("tbody",[a("tr",[a("td",{staticStyle:{"text-align":"left"}},[s._v("Change")]),a("td",{staticStyle:{"text-align":"left"}},[s._v("监听复选框组改变的事件")]),a("td",{staticStyle:{"text-align":"center"}},[s._v("新数组(Array),是所有选中的key值")])])])])}],r={data:function(){return{list:["tmall"],kjlist:["github"]}},methods:{handChange:function(s){alert("当前选中的复选框组的key是".concat(s))}}},n=r,v=(a("e22d"),a("6691")),c=Object(v["a"])(n,l,e,!1,null,null,null);t["default"]=c.exports}}]);
  //# sourceMappingURL=chunk-85c8ddf2.ab6ecfe7.js.map