-
Notifications
You must be signed in to change notification settings - Fork 11
/
chunk-7767CCIZ.js
1 lines (1 loc) · 31 KB
/
chunk-7767CCIZ.js
1
import{a as ie,b as D,c as W,d as g}from"./chunk-KRUW7MMZ.js";import"./chunk-QKKRINFW.js";import{a as $,b as te,d as ne}from"./chunk-B4IH7RR4.js";import{a as ee}from"./chunk-7HQXT7RK.js";import{a as B,g as G,h as L,j as R}from"./chunk-2RTS5GAO.js";import"./chunk-V2SRXRXL.js";import{Ea as I,Fc as C,Ic as H,Kc as v,Lc as w,Mc as Y,Wb as A,oc as k,sc as E}from"./chunk-BYER7FCH.js";import{Ca as p,Da as h,Hb as m,Vb as e,Wb as t,Xb as u,cc as x,lc as M,mb as a,mc as T,nc as O,pc as n,ra as z,rc as J,sc as K,uc as f,vc as S,wc as y,yc as b}from"./chunk-U274QCT3.js";import{a as q,b as j}from"./chunk-RKLIRILV.js";var P=(()=>{let i=class i{constructor(){this.checked=!0}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox-basic"]],standalone:!0,features:[b],decls:2,vars:1,consts:[["nz-checkbox","",3,"ngModelChange","ngModel"]],template:function(l,o){l&1&&(e(0,"label",0),y("ngModelChange",function(d){return S(o.checked,d)||(o.checked=d),d}),n(1,"Checkbox"),t()),l&2&&f("ngModel",o.checked)},dependencies:[C,k,E,g,D],encapsulation:2});let c=i;return c})();var Z=(()=>{let i=class i{constructor(){this.allChecked=!1,this.indeterminate=!0,this.checkOptionsOne=[{label:"Apple",value:"Apple",checked:!0},{label:"Pear",value:"Pear",checked:!1},{label:"Orange",value:"Orange",checked:!1}]}updateAllChecked(){this.indeterminate=!1,this.allChecked?this.checkOptionsOne=this.checkOptionsOne.map(r=>j(q({},r),{checked:!0})):this.checkOptionsOne=this.checkOptionsOne.map(r=>j(q({},r),{checked:!1}))}updateSingleChecked(){this.checkOptionsOne.every(r=>!r.checked)?(this.allChecked=!1,this.indeterminate=!1):this.checkOptionsOne.every(r=>r.checked)?(this.allChecked=!0,this.indeterminate=!1):this.indeterminate=!0}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox-check-all"]],standalone:!0,features:[b],decls:5,vars:3,consts:[[2,"border-bottom","1px solid rgb(233, 233, 233)","padding-bottom","16px"],["nz-checkbox","",3,"ngModelChange","ngModel","nzIndeterminate"],[3,"ngModelChange","ngModel"]],template:function(l,o){l&1&&(e(0,"div",0)(1,"label",1),y("ngModelChange",function(d){return S(o.allChecked,d)||(o.allChecked=d),d}),x("ngModelChange",function(){return o.updateAllChecked()}),n(2," Check all "),t()(),u(3,"br"),e(4,"nz-checkbox-group",2),y("ngModelChange",function(d){return S(o.checkOptionsOne,d)||(o.checkOptionsOne=d),d}),x("ngModelChange",function(){return o.updateSingleChecked()}),t()),l&2&&(a(),f("ngModel",o.allChecked),m("nzIndeterminate",o.indeterminate),a(3),f("ngModel",o.checkOptionsOne))},dependencies:[C,k,E,g,D,W],encapsulation:2});let c=i;return c})();var V=(()=>{let i=class i{constructor(){this.isCheckedButton=!0,this.isDisabledButton=!1}checkButton(){this.isCheckedButton=!this.isCheckedButton}disableButton(){this.isDisabledButton=!this.isDisabledButton}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox-controller"]],standalone:!0,features:[b],decls:7,vars:10,consts:[["nz-checkbox","",3,"ngModelChange","ngModel","nzDisabled"],["nz-button","",3,"click","nzType","nzSize"]],template:function(l,o){l&1&&(e(0,"label",0),y("ngModelChange",function(d){return S(o.isCheckedButton,d)||(o.isCheckedButton=d),d}),n(1),t(),u(2,"br"),e(3,"button",1),x("click",function(){return o.checkButton()}),n(4),t(),e(5,"button",1),x("click",function(){return o.disableButton()}),n(6),t()),l&2&&(f("ngModel",o.isCheckedButton),m("nzDisabled",o.isDisabledButton),a(),K(" ",o.isCheckedButton?"Checked":"Unchecked"," - ",o.isDisabledButton?"Disabled":"Enabled"," "),a(2),m("nzType","primary")("nzSize","small"),a(),J(" ",o.isCheckedButton?"Unchecked":"Checked"," "),a(),m("nzType","primary")("nzSize","small"),a(),J(" ",o.isDisabledButton?"Enabled":"Disabled"," "))},dependencies:[C,k,E,ne,te,$,ee,g,D],styles:["button[_ngcontent-%COMP%]{margin-right:8px}"]});let c=i;return c})();var Q=(()=>{let i=class i{};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox-disabled"]],standalone:!0,features:[b],decls:3,vars:2,consts:[["nz-checkbox","","nzDisabled","",3,"ngModel"]],template:function(l,o){l&1&&u(0,"label",0)(1,"br")(2,"label",0),l&2&&(m("ngModel",!1),a(2),m("ngModel",!0))},dependencies:[C,k,E,g,D],encapsulation:2});let c=i;return c})();var U=(()=>{let i=class i{constructor(){this.checkOptionsOne=[{label:"Apple",value:"Apple",checked:!0},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange"}],this.checkOptionsTwo=[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear",checked:!0},{label:"Orange",value:"Orange"}],this.checkOptionsThree=[{label:"Apple",value:"Apple",disabled:!0,checked:!0},{label:"Pear",value:"Pear",disabled:!0},{label:"Orange",value:"Orange"}]}log(r){console.log(r)}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox-group"]],standalone:!0,features:[b],decls:7,vars:3,consts:[[3,"ngModelChange","ngModel"]],template:function(l,o){l&1&&(e(0,"nz-checkbox-group",0),y("ngModelChange",function(d){return S(o.checkOptionsOne,d)||(o.checkOptionsOne=d),d}),x("ngModelChange",function(){return o.log(o.checkOptionsOne)}),t(),u(1,"br")(2,"br"),e(3,"nz-checkbox-group",0),y("ngModelChange",function(d){return S(o.checkOptionsTwo,d)||(o.checkOptionsTwo=d),d}),x("ngModelChange",function(){return o.log(o.checkOptionsTwo)}),t(),u(4,"br")(5,"br"),e(6,"nz-checkbox-group",0),y("ngModelChange",function(d){return S(o.checkOptionsThree,d)||(o.checkOptionsThree=d),d}),x("ngModelChange",function(){return o.log(o.checkOptionsThree)}),t()),l&2&&(f("ngModel",o.checkOptionsOne),a(3),f("ngModel",o.checkOptionsTwo),a(3),f("ngModel",o.checkOptionsThree))},dependencies:[C,k,E,g,W],encapsulation:2});let c=i;return c})();var X=(()=>{let i=class i{log(r){console.log(r)}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox-layout"]],standalone:!0,features:[b],decls:17,vars:1,consts:[[2,"width","100%",3,"nzOnChange"],["nz-row",""],["nz-col","","nzSpan","8"],["nz-checkbox","","nzValue","A",3,"ngModel"],["nz-checkbox","","nzValue","B"],["nz-checkbox","","nzValue","C"],["nz-checkbox","","nzValue","D"],["nz-checkbox","","nzValue","E"]],template:function(l,o){l&1&&(e(0,"nz-checkbox-wrapper",0),x("nzOnChange",function(d){return o.log(d)}),e(1,"div",1)(2,"div",2)(3,"label",3),n(4,"A"),t()(),e(5,"div",2)(6,"label",4),n(7,"B"),t()(),e(8,"div",2)(9,"label",5),n(10,"C"),t()(),e(11,"div",2)(12,"label",6),n(13,"D"),t()(),e(14,"div",2)(15,"label",7),n(16,"E"),t()()()()),l&2&&(a(3),m("ngModel",!0))},dependencies:[C,k,E,g,D,ie,Y,w,v],encapsulation:2});let c=i;return c})();var le=(()=>{let i=class i{constructor(){this.expanded=!1}goLink(r){window&&(window.location.hash=r)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(r=>r.expandCode(this.expanded))}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox"]],viewQuery:function(l,o){if(l&1&&M(B,5),l&2){let s;T(s=O())&&(o.codeBoxes=s)}},standalone:!0,features:[b],decls:339,vars:31,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-checkbox-demo-basic","nzTitle","\u57FA\u672C\u7528\u6CD5"],["nzHref","#components-checkbox-demo-disabled","nzTitle","\u4E0D\u53EF\u7528"],["nzHref","#components-checkbox-demo-controller","nzTitle","\u53D7\u63A7\u7684 Checkbox"],["nzHref","#components-checkbox-demo-group","nzTitle","Checkbox \u7EC4"],["nzHref","#components-checkbox-demo-check-all","nzTitle","\u5168\u9009"],["nzHref","#components-checkbox-demo-layout","nzTitle","\u5E03\u5C40"],["nzHref","#api","nzTitle","API"],[1,"markdown"],[1,"subtitle"],[1,"widget"],["aria-label","Edit this page on Github","href","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/doc/index.zh-CN.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["nz-icon","","nzType","edit"],["id","\u4F55\u65F6\u4F7F\u7528"],["onclick","window.location.hash = '\u4F55\u65F6\u4F7F\u7528'",1,"anchor"],[1,"language-ts"],[1,"token","keyword"],[1,"token","punctuation"],[1,"token","string"],["nz-icon","","nzType","appstore","nz-tooltip","","nzTooltipTitle","\u5C55\u5F00\u5168\u90E8\u4EE3\u7801",1,"code-box-expand-trigger",3,"click"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzXl","nzSpan"],["nzTitle","\u57FA\u672C\u7528\u6CD5","nzSelector","nz-demo-checkbox-basic","nzGenerateCommand","ng g ng-zorro-antd:checkbox-basic <name>","nzComponentName","NzDemoCheckboxBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","\u53D7\u63A7\u7684 Checkbox","nzSelector","nz-demo-checkbox-controller","nzGenerateCommand","ng g ng-zorro-antd:checkbox-controller <name>","nzComponentName","NzDemoCheckboxControllerComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u5168\u9009","nzSelector","nz-demo-checkbox-check-all","nzGenerateCommand","ng g ng-zorro-antd:checkbox-check-all <name>","nzComponentName","NzDemoCheckboxCheckAllComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u4E0D\u53EF\u7528","nzSelector","nz-demo-checkbox-disabled","nzGenerateCommand","ng g ng-zorro-antd:checkbox-disabled <name>","nzComponentName","NzDemoCheckboxDisabledComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Checkbox \u7EC4","nzSelector","nz-demo-checkbox-group","nzGenerateCommand","ng g ng-zorro-antd:checkbox-group <name>","nzComponentName","NzDemoCheckboxGroupComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u5E03\u5C40","nzSelector","nz-demo-checkbox-layout","nzGenerateCommand","ng g ng-zorro-antd:checkbox-layout <name>","nzComponentName","NzDemoCheckboxLayoutComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["id","[nz-checkbox]:standalone"],[1,"api-type-label","directive"],[1,"api-type-label","standalone"],["onclick","window.location.hash = '[nz-checkbox]:standalone'",1,"anchor"],["id","nz-checkbox-group:standalone"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-checkbox-group:standalone'",1,"anchor"],["id","nz-checkbox-wrapper:standalone"],["onclick","window.location.hash = 'nz-checkbox-wrapper:standalone'",1,"anchor"],["id","\u65B9\u6CD5"],["onclick","window.location.hash = '\u65B9\u6CD5'",1,"anchor"]],template:function(l,o){l&1&&(e(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),x("nzClick",function(d){return o.goLink(d)}),u(3,"nz-link",2)(4,"nz-link",3)(5,"nz-link",4)(6,"nz-link",5)(7,"nz-link",6)(8,"nz-link",7)(9,"nz-link",8),t()(),e(10,"section",9)(11,"h1"),n(12,"Checkbox"),e(13,"span",10),n(14,"\u591A\u9009\u6846"),t(),u(15,"span",11),e(16,"a",12),u(17,"span",13),t()(),e(18,"section",9),h(),e(19,"p"),n(20,"\u591A\u9009\u6846\u3002"),t(),e(21,"h2",14)(22,"span"),n(23,"\u4F55\u65F6\u4F7F\u7528"),t(),e(24,"a",15),n(25,"#"),t()(),e(26,"ul")(27,"li"),n(28,"\u5728\u4E00\u7EC4\u53EF\u9009\u9879\u4E2D\u8FDB\u884C\u591A\u9879\u9009\u62E9\u65F6\uFF1B"),t(),e(29,"li"),n(30,"\u5355\u72EC\u4F7F\u7528\u53EF\u4EE5\u8868\u793A\u4E24\u79CD\u72B6\u6001\u4E4B\u95F4\u7684\u5207\u6362\uFF0C\u548C "),e(31,"code"),n(32,"switch"),t(),n(33," \u7C7B\u4F3C\u3002\u533A\u522B\u5728\u4E8E\u5207\u6362 "),e(34,"code"),n(35,"switch"),t(),n(36," \u4F1A\u76F4\u63A5\u89E6\u53D1\u72B6\u6001\u6539\u53D8\uFF0C\u800C "),e(37,"code"),n(38,"checkbox"),t(),n(39," \u4E00\u822C\u7528\u4E8E\u72B6\u6001\u6807\u8BB0\uFF0C\u9700\u8981\u548C\u63D0\u4EA4\u64CD\u4F5C\u914D\u5408\u3002"),t()(),e(40,"pre",16)(41,"code")(42,"span",17),n(43,"import"),t(),n(44," "),e(45,"span",18),n(46,"{"),t(),n(47," NzCheckboxModule "),e(48,"span",18),n(49,"}"),t(),n(50," "),e(51,"span",17),n(52,"from"),t(),n(53," "),e(54,"span",19),n(55,"'ng-zorro-antd/checkbox'"),t(),e(56,"span",18),n(57,";"),t()()(),p(),t(),e(58,"h2")(59,"span"),n(60,"\u4EE3\u7801\u6F14\u793A"),t(),e(61,"span",20),x("click",function(){return o.expandAllCode()}),t()()(),e(62,"div",21)(63,"div",22)(64,"nz-code-box",23),u(65,"nz-demo-checkbox-basic",24),e(66,"div",25),h(),e(67,"p"),n(68,"\u7B80\u5355\u7684 checkbox\u3002"),t(),p(),t()(),e(69,"nz-code-box",26),u(70,"nz-demo-checkbox-controller",24),e(71,"div",25),h(),e(72,"p"),n(73,"\u8054\u52A8 checkbox\u3002"),t(),p(),t()(),e(74,"nz-code-box",27),u(75,"nz-demo-checkbox-check-all",24),e(76,"div",25),h(),e(77,"p"),n(78,"\u5728\u5B9E\u73B0\u5168\u9009\u6548\u679C\u65F6\uFF0C\u4F60\u53EF\u80FD\u4F1A\u7528\u5230 "),e(79,"code"),n(80,"nzIndeterminate"),t(),n(81," \u5C5E\u6027\u3002"),t(),p(),t()()(),e(82,"div",22)(83,"nz-code-box",28),u(84,"nz-demo-checkbox-disabled",24),e(85,"div",25),h(),e(86,"p"),n(87,"checkbox \u4E0D\u53EF\u7528\u3002"),t(),p(),t()(),e(88,"nz-code-box",29),u(89,"nz-demo-checkbox-group",24),e(90,"div",25),h(),e(91,"p"),n(92,"\u65B9\u4FBF\u7684\u4ECE\u6570\u7EC4\u751F\u6210 Checkbox \u7EC4\u3002"),t(),p(),t()(),e(93,"nz-code-box",30),u(94,"nz-demo-checkbox-layout",24),e(95,"div",25),h(),e(96,"p")(97,"code"),n(98,"nz-checkbox-wrapper"),t(),n(99," \u5185\u5D4C "),e(100,"code"),n(101,"nz-checkbox"),t(),n(102," \u5E76\u4E0E Grid \u7EC4\u4EF6\u4E00\u8D77\u4F7F\u7528\uFF0C\u53EF\u4EE5\u5B9E\u73B0\u7075\u6D3B\u7684\u5E03\u5C40\u3002"),t(),p(),t()()()(),e(103,"section",31),h(),e(104,"h2",32)(105,"span"),n(106,"API"),t(),e(107,"a",33),n(108,"#"),t()(),e(109,"h3",34)(110,"span"),n(111,"[nz-checkbox]"),t(),e(112,"label",35),n(113,"directive"),t(),e(114,"label",36),n(115,"standalone"),t(),e(116,"a",37),n(117,"#"),t()(),e(118,"table")(119,"thead")(120,"tr")(121,"th"),n(122,"\u53C2\u6570"),t(),e(123,"th"),n(124,"\u8BF4\u660E"),t(),e(125,"th"),n(126,"\u7C7B\u578B"),t(),e(127,"th"),n(128,"\u9ED8\u8BA4\u503C"),t()()(),e(129,"tbody")(130,"tr")(131,"td")(132,"code"),n(133,"[nzId]"),t()(),e(134,"td"),n(135,"\u7EC4\u4EF6\u5185\u90E8 input \u7684 id \u503C"),t(),e(136,"td")(137,"code"),n(138,"string"),t()(),e(139,"td"),n(140,"-"),t()(),e(141,"tr")(142,"td")(143,"code"),n(144,"[nzAutoFocus]"),t()(),e(145,"td"),n(146,"\u81EA\u52A8\u83B7\u53D6\u7126\u70B9"),t(),e(147,"td")(148,"code"),n(149,"boolean"),t()(),e(150,"td")(151,"code"),n(152,"false"),t()()(),e(153,"tr")(154,"td")(155,"code"),n(156,"[nzDisabled]"),t()(),e(157,"td"),n(158,"\u8BBE\u5B9A disable \u72B6\u6001"),t(),e(159,"td")(160,"code"),n(161,"boolean"),t()(),e(162,"td")(163,"code"),n(164,"false"),t()()(),e(165,"tr")(166,"td")(167,"code"),n(168,"[ngModel]"),t()(),e(169,"td"),n(170,"\u6307\u5B9A\u5F53\u524D\u662F\u5426\u9009\u4E2D\uFF0C\u53EF\u53CC\u5411\u7ED1\u5B9A"),t(),e(171,"td")(172,"code"),n(173,"boolean"),t()(),e(174,"td")(175,"code"),n(176,"false"),t()()(),e(177,"tr")(178,"td")(179,"code"),n(180,"[nzIndeterminate]"),t()(),e(181,"td"),n(182,"\u8BBE\u7F6E indeterminate \u72B6\u6001\uFF0C\u53EA\u8D1F\u8D23\u6837\u5F0F\u63A7\u5236"),t(),e(183,"td")(184,"code"),n(185,"boolean"),t()(),e(186,"td")(187,"code"),n(188,"false"),t()()(),e(189,"tr")(190,"td")(191,"code"),n(192,"[nzValue]"),t()(),e(193,"td"),n(194,"\u4EC5\u4E0E "),e(195,"code"),n(196,"nz-checkbox-wrapper"),t(),n(197," \u7684\u9009\u4E2D\u56DE\u8C03\u914D\u5408\u4F7F\u7528"),t(),e(198,"td")(199,"code"),n(200,"any"),t()(),e(201,"td"),n(202,"-"),t()(),e(203,"tr")(204,"td")(205,"code"),n(206,"(ngModelChange)"),t()(),e(207,"td"),n(208,"\u9009\u4E2D\u53D8\u5316\u65F6\u56DE\u8C03"),t(),e(209,"td")(210,"code"),n(211,"EventEmitter<boolean>"),t()(),e(212,"td"),n(213,"-"),t()()()(),e(214,"h3",38)(215,"span"),n(216,"nz-checkbox-group"),t(),e(217,"label",39),n(218,"component"),t(),e(219,"label",36),n(220,"standalone"),t(),e(221,"a",40),n(222,"#"),t()(),e(223,"table")(224,"thead")(225,"tr")(226,"th"),n(227,"\u53C2\u6570"),t(),e(228,"th"),n(229,"\u8BF4\u660E"),t(),e(230,"th"),n(231,"\u7C7B\u578B"),t(),e(232,"th"),n(233,"\u9ED8\u8BA4\u503C"),t()()(),e(234,"tbody")(235,"tr")(236,"td")(237,"code"),n(238,"[ngModel]"),t()(),e(239,"td"),n(240,"\u6307\u5B9A\u53EF\u9009\u9879\uFF0C\u53EF\u53CC\u5411\u7ED1\u5B9A"),t(),e(241,"td")(242,"code"),n(243,"Array<{ label: string; value: string; checked?: boolean; }>"),t()(),e(244,"td")(245,"code"),n(246,"[]"),t()()(),e(247,"tr")(248,"td")(249,"code"),n(250,"[nzDisabled]"),t()(),e(251,"td"),n(252,"\u8BBE\u5B9A\u5168\u90E8 checkbox disable \u72B6\u6001"),t(),e(253,"td")(254,"code"),n(255,"boolean"),t()(),e(256,"td")(257,"code"),n(258,"false"),t()()(),e(259,"tr")(260,"td")(261,"code"),n(262,"(ngModelChange)"),t()(),e(263,"td"),n(264,"\u9009\u4E2D\u6570\u636E\u53D8\u5316\u65F6\u7684\u56DE\u8C03"),t(),e(265,"td")(266,"code"),n(267,"EventEmitter<Array<{ label: string; value: string; checked?: boolean; }>>"),t()(),e(268,"td"),n(269,"-"),t()()()(),e(270,"h3",41)(271,"span"),n(272,"nz-checkbox-wrapper"),t(),e(273,"label",39),n(274,"component"),t(),e(275,"label",36),n(276,"standalone"),t(),e(277,"a",42),n(278,"#"),t()(),e(279,"table")(280,"thead")(281,"tr")(282,"th"),n(283,"\u53C2\u6570"),t(),e(284,"th"),n(285,"\u8BF4\u660E"),t(),e(286,"th"),n(287,"\u7C7B\u578B"),t(),e(288,"th"),n(289,"\u9ED8\u8BA4\u503C"),t()()(),e(290,"tbody")(291,"tr")(292,"td")(293,"code"),n(294,"(nzOnChange)"),t()(),e(295,"td"),n(296,"\u9009\u4E2D\u6570\u636E\u53D8\u5316\u65F6\u7684\u56DE\u8C03"),t(),e(297,"td")(298,"code"),n(299,"EventEmitter<any[]>"),t()(),e(300,"td"),n(301,"-"),t()()()(),e(302,"h2",43)(303,"span"),n(304,"\u65B9\u6CD5"),t(),e(305,"a",44),n(306,"#"),t()(),e(307,"h3",34)(308,"span"),n(309,"[nz-checkbox]"),t(),e(310,"label",35),n(311,"directive"),t(),e(312,"label",36),n(313,"standalone"),t(),e(314,"a",37),n(315,"#"),t()(),e(316,"p"),n(317,"\u901A\u8FC7 ViewChild \u6216\u5176\u4ED6\u65B9\u5F0F\u83B7\u5F97 "),e(318,"code"),n(319,"nz-checkbox"),t(),n(320," \u5B9E\u4F8B"),t(),e(321,"table")(322,"thead")(323,"tr")(324,"th"),n(325,"\u540D\u79F0"),t(),e(326,"th"),n(327,"\u63CF\u8FF0"),t()()(),e(328,"tbody")(329,"tr")(330,"td"),n(331,"focus()"),t(),e(332,"td"),n(333,"\u83B7\u53D6\u7126\u70B9"),t()(),e(334,"tr")(335,"td"),n(336,"blur()"),t(),e(337,"td"),n(338,"\u79FB\u9664\u7126\u70B9"),t()()()(),p(),t()()),l&2&&(a(),m("nzOffsetTop",16),a(),m("nzAffix",!1),a(60),m("nzGutter",16),a(),m("nzXl",12)("nzSpan",24),a(),m("nzId","components-checkbox-demo-basic")("nzLink","components-checkbox-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/basic.md"),a(5),m("nzId","components-checkbox-demo-controller")("nzLink","components-checkbox-demo-controller")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/controller.md"),a(5),m("nzId","components-checkbox-demo-check-all")("nzLink","components-checkbox-demo-check-all")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/check-all.md"),a(8),m("nzXl",12)("nzSpan",24),a(),m("nzId","components-checkbox-demo-disabled")("nzLink","components-checkbox-demo-disabled")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/disabled.md"),a(5),m("nzId","components-checkbox-demo-group")("nzLink","components-checkbox-demo-group")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/group.md"),a(5),m("nzId","components-checkbox-demo-layout")("nzLink","components-checkbox-demo-layout")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/layout.md"))},dependencies:[R,B,G,L,H,w,v,A,I,P,Z,V,Q,U,X],encapsulation:2});let c=i;return c})();var ae=(()=>{let i=class i{constructor(){this.expanded=!1}goLink(r){window&&(window.location.hash=r)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(r=>r.expandCode(this.expanded))}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=z({type:i,selectors:[["nz-demo-checkbox"]],viewQuery:function(l,o){if(l&1&&M(B,5),l&2){let s;T(s=O())&&(o.codeBoxes=s)}},standalone:!0,features:[b],decls:324,vars:31,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-checkbox-demo-basic","nzTitle","Basic"],["nzHref","#components-checkbox-demo-disabled","nzTitle","Disabled"],["nzHref","#components-checkbox-demo-controller","nzTitle","Controlled Checkbox"],["nzHref","#components-checkbox-demo-group","nzTitle","Checkbox Group"],["nzHref","#components-checkbox-demo-check-all","nzTitle","Check all"],["nzHref","#components-checkbox-demo-layout","nzTitle","Use with Grid"],["nzHref","#api","nzTitle","API"],[1,"markdown"],[1,"subtitle"],[1,"widget"],["aria-label","Edit this page on Github","href","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/doc/index.en-US.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["nz-icon","","nzType","edit"],["id","when-to-use"],["onclick","window.location.hash = 'when-to-use'",1,"anchor"],[1,"language-ts"],[1,"token","keyword"],[1,"token","punctuation"],[1,"token","string"],["nz-icon","","nzType","appstore","nz-tooltip","","nzTooltipTitle","Expand All Code",1,"code-box-expand-trigger",3,"click"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzXl","nzSpan"],["nzTitle","Basic","nzSelector","nz-demo-checkbox-basic","nzGenerateCommand","ng g ng-zorro-antd:checkbox-basic <name>","nzComponentName","NzDemoCheckboxBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","Controlled Checkbox","nzSelector","nz-demo-checkbox-controller","nzGenerateCommand","ng g ng-zorro-antd:checkbox-controller <name>","nzComponentName","NzDemoCheckboxControllerComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Check all","nzSelector","nz-demo-checkbox-check-all","nzGenerateCommand","ng g ng-zorro-antd:checkbox-check-all <name>","nzComponentName","NzDemoCheckboxCheckAllComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Disabled","nzSelector","nz-demo-checkbox-disabled","nzGenerateCommand","ng g ng-zorro-antd:checkbox-disabled <name>","nzComponentName","NzDemoCheckboxDisabledComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Checkbox Group","nzSelector","nz-demo-checkbox-group","nzGenerateCommand","ng g ng-zorro-antd:checkbox-group <name>","nzComponentName","NzDemoCheckboxGroupComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Use with Grid","nzSelector","nz-demo-checkbox-layout","nzGenerateCommand","ng g ng-zorro-antd:checkbox-layout <name>","nzComponentName","NzDemoCheckboxLayoutComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["id","[nz-checkbox]:standalone"],[1,"api-type-label","directive"],[1,"api-type-label","standalone"],["onclick","window.location.hash = '[nz-checkbox]:standalone'",1,"anchor"],["id","nz-checkbox-group:standalone"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-checkbox-group:standalone'",1,"anchor"],["id","nz-checkbox-wrapper:standalone"],["onclick","window.location.hash = 'nz-checkbox-wrapper:standalone'",1,"anchor"],["id","methods"],["onclick","window.location.hash = 'methods'",1,"anchor"]],template:function(l,o){l&1&&(e(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),x("nzClick",function(d){return o.goLink(d)}),u(3,"nz-link",2)(4,"nz-link",3)(5,"nz-link",4)(6,"nz-link",5)(7,"nz-link",6)(8,"nz-link",7)(9,"nz-link",8),t()(),e(10,"section",9)(11,"h1"),n(12,"Checkbox"),u(13,"span",10)(14,"span",11),e(15,"a",12),u(16,"span",13),t()(),e(17,"section",9),h(),e(18,"p"),n(19,"Checkbox."),t(),e(20,"h2",14)(21,"span"),n(22,"When To Use"),t(),e(23,"a",15),n(24,"#"),t()(),e(25,"ul")(26,"li"),n(27,"Used for selecting multiple values from several options."),t(),e(28,"li"),n(29,"If you use only one checkbox, it is the same as using Switch to toggle between two states. The difference is that Switch will trigger the state change directly, but Checkbox just marks the state as changed and this needs to be submitted."),t()(),e(30,"pre",16)(31,"code")(32,"span",17),n(33,"import"),t(),n(34," "),e(35,"span",18),n(36,"{"),t(),n(37," NzCheckboxModule "),e(38,"span",18),n(39,"}"),t(),n(40," "),e(41,"span",17),n(42,"from"),t(),n(43," "),e(44,"span",19),n(45,"'ng-zorro-antd/checkbox'"),t(),e(46,"span",18),n(47,";"),t()()(),p(),t(),e(48,"h2")(49,"span"),n(50,"Examples"),t(),e(51,"span",20),x("click",function(){return o.expandAllCode()}),t()()(),e(52,"div",21)(53,"div",22)(54,"nz-code-box",23),u(55,"nz-demo-checkbox-basic",24),e(56,"div",25),h(),e(57,"p"),n(58,"Basic usage of checkbox."),t(),p(),t()(),e(59,"nz-code-box",26),u(60,"nz-demo-checkbox-controller",24),e(61,"div",25),h(),e(62,"p"),n(63,"Communicated with other components."),t(),p(),t()(),e(64,"nz-code-box",27),u(65,"nz-demo-checkbox-check-all",24),e(66,"div",25),h(),e(67,"p"),n(68,"The "),e(69,"code"),n(70,"nzIndeterminate"),t(),n(71," property can help you to achieve a 'check all' effect."),t(),p(),t()()(),e(72,"div",22)(73,"nz-code-box",28),u(74,"nz-demo-checkbox-disabled",24),e(75,"div",25),h(),e(76,"p"),n(77,"Disabled checkbox."),t(),p(),t()(),e(78,"nz-code-box",29),u(79,"nz-demo-checkbox-group",24),e(80,"div",25),h(),e(81,"p"),n(82,"Generate a group of checkboxes from an array."),t(),p(),t()(),e(83,"nz-code-box",30),u(84,"nz-demo-checkbox-layout",24),e(85,"div",25),h(),e(86,"p"),n(87,"We can use "),e(88,"code"),n(89,"nz-checkbox"),t(),n(90," and Grid in "),e(91,"code"),n(92,"nz-checkbox-wrapper"),t(),n(93,", to implement complex layout."),t(),p(),t()()()(),e(94,"section",31),h(),e(95,"h2",32)(96,"span"),n(97,"API"),t(),e(98,"a",33),n(99,"#"),t()(),e(100,"h3",34)(101,"span"),n(102,"[nz-checkbox]"),t(),e(103,"label",35),n(104,"directive"),t(),e(105,"label",36),n(106,"standalone"),t(),e(107,"a",37),n(108,"#"),t()(),e(109,"table")(110,"thead")(111,"tr")(112,"th"),n(113,"Property"),t(),e(114,"th"),n(115,"Description"),t(),e(116,"th"),n(117,"Type"),t(),e(118,"th"),n(119,"Default"),t()()(),e(120,"tbody")(121,"tr")(122,"td")(123,"code"),n(124,"[nzId]"),t()(),e(125,"td"),n(126,"input id attribute inside the component"),t(),e(127,"td")(128,"code"),n(129,"string"),t()(),e(130,"td"),n(131,"-"),t()(),e(132,"tr")(133,"td")(134,"code"),n(135,"[nzAutoFocus]"),t()(),e(136,"td"),n(137,"get focus when component mounted"),t(),e(138,"td")(139,"code"),n(140,"boolean"),t()(),e(141,"td")(142,"code"),n(143,"false"),t()()(),e(144,"tr")(145,"td")(146,"code"),n(147,"[nzDisabled]"),t()(),e(148,"td"),n(149,"Disable checkbox"),t(),e(150,"td")(151,"code"),n(152,"boolean"),t()(),e(153,"td")(154,"code"),n(155,"false"),t()()(),e(156,"tr")(157,"td")(158,"code"),n(159,"[ngModel]"),t()(),e(160,"td"),n(161,"Specifies whether the checkbox is selected, double binding"),t(),e(162,"td")(163,"code"),n(164,"boolean"),t()(),e(165,"td")(166,"code"),n(167,"false"),t()()(),e(168,"tr")(169,"td")(170,"code"),n(171,"[nzIndeterminate]"),t()(),e(172,"td"),n(173,"set the status of indeterminate\uFF0Conly affect the style"),t(),e(174,"td")(175,"code"),n(176,"boolean"),t()(),e(177,"td")(178,"code"),n(179,"false"),t()()(),e(180,"tr")(181,"td")(182,"code"),n(183,"[nzValue]"),t()(),e(184,"td"),n(185,"use for the callback of "),e(186,"code"),n(187,"nz-checkbox-wrapper"),t()(),e(188,"td")(189,"code"),n(190,"any"),t()(),e(191,"td"),n(192,"-"),t()(),e(193,"tr")(194,"td")(195,"code"),n(196,"(ngModelChange)"),t()(),e(197,"td"),n(198,"The callback function that is triggered when the state changes."),t(),e(199,"td")(200,"code"),n(201,"EventEmitter<boolean>"),t()(),e(202,"td"),n(203,"-"),t()()()(),e(204,"h3",38)(205,"span"),n(206,"nz-checkbox-group"),t(),e(207,"label",39),n(208,"component"),t(),e(209,"label",36),n(210,"standalone"),t(),e(211,"a",40),n(212,"#"),t()(),e(213,"table")(214,"thead")(215,"tr")(216,"th"),n(217,"Property"),t(),e(218,"th"),n(219,"Description"),t(),e(220,"th"),n(221,"Type"),t(),e(222,"th"),n(223,"Default"),t()()(),e(224,"tbody")(225,"tr")(226,"td")(227,"code"),n(228,"[ngModel]"),t()(),e(229,"td"),n(230,"Specifies options, double binding"),t(),e(231,"td")(232,"code"),n(233,"Array<{ label: string; value: string; checked?: boolean; }>"),t()(),e(234,"td")(235,"code"),n(236,"[]"),t()()(),e(237,"tr")(238,"td")(239,"code"),n(240,"[nzDisabled]"),t()(),e(241,"td"),n(242,"Disable all checkboxes"),t(),e(243,"td")(244,"code"),n(245,"boolean"),t()(),e(246,"td")(247,"code"),n(248,"false"),t()()(),e(249,"tr")(250,"td")(251,"code"),n(252,"(ngModelChange)"),t()(),e(253,"td"),n(254,"The callback function that is triggered when the state changes."),t(),e(255,"td")(256,"code"),n(257,"EventEmitter<Array<{ label: string; value: string; checked?: boolean; }>>"),t()(),e(258,"td"),n(259,"-"),t()()()(),e(260,"h3",41)(261,"span"),n(262,"nz-checkbox-wrapper"),t(),e(263,"label",39),n(264,"component"),t(),e(265,"label",36),n(266,"standalone"),t(),e(267,"a",42),n(268,"#"),t()(),e(269,"table")(270,"thead")(271,"tr")(272,"th"),n(273,"Property"),t(),e(274,"th"),n(275,"Description"),t(),e(276,"th"),n(277,"Type"),t(),e(278,"th"),n(279,"Default"),t()()(),e(280,"tbody")(281,"tr")(282,"td")(283,"code"),n(284,"(nzOnChange)"),t()(),e(285,"td"),n(286,"The callback function that is triggered when the state changes."),t(),e(287,"td")(288,"code"),n(289,"EventEmitter<any[]>"),t()(),e(290,"td"),n(291,"-"),t()()()(),e(292,"h2",43)(293,"span"),n(294,"Methods"),t(),e(295,"a",44),n(296,"#"),t()(),e(297,"h3",34)(298,"span"),n(299,"[nz-checkbox]"),t(),e(300,"label",35),n(301,"directive"),t(),e(302,"label",36),n(303,"standalone"),t(),e(304,"a",37),n(305,"#"),t()(),e(306,"table")(307,"thead")(308,"tr")(309,"th"),n(310,"Name"),t(),e(311,"th"),n(312,"Description"),t()()(),e(313,"tbody")(314,"tr")(315,"td"),n(316,"focus()"),t(),e(317,"td"),n(318,"get focus"),t()(),e(319,"tr")(320,"td"),n(321,"blur()"),t(),e(322,"td"),n(323,"remove focus"),t()()()(),p(),t()()),l&2&&(a(),m("nzOffsetTop",16),a(),m("nzAffix",!1),a(50),m("nzGutter",16),a(),m("nzXl",12)("nzSpan",24),a(),m("nzId","components-checkbox-demo-basic")("nzLink","components-checkbox-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/basic.md"),a(5),m("nzId","components-checkbox-demo-controller")("nzLink","components-checkbox-demo-controller")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/controller.md"),a(5),m("nzId","components-checkbox-demo-check-all")("nzLink","components-checkbox-demo-check-all")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/check-all.md"),a(8),m("nzXl",12)("nzSpan",24),a(),m("nzId","components-checkbox-demo-disabled")("nzLink","components-checkbox-demo-disabled")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/disabled.md"),a(5),m("nzId","components-checkbox-demo-group")("nzLink","components-checkbox-demo-group")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/group.md"),a(5),m("nzId","components-checkbox-demo-layout")("nzLink","components-checkbox-demo-layout")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/checkbox/demo/layout.md"))},dependencies:[R,B,G,L,H,w,v,A,I,P,Z,V,Q,U,X],encapsulation:2});let c=i;return c})();var se=[{path:"en",component:ae},{path:"zh",component:le}],it=se;export{it as default};