-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathchunk-AQZI3OCI.js
1 lines (1 loc) · 31.9 KB
/
chunk-AQZI3OCI.js
1
import{a as ne,b as z,c as u}from"./chunk-M2QWHQVX.js";import{a as X,c as Y}from"./chunk-YRDZVT6A.js";import{a as K,b as q,d as j}from"./chunk-HVFPNQ3B.js";import{a as J}from"./chunk-6AJOFIIP.js";import"./chunk-3LAVY7RV.js";import{a as x,g as H,h as w,j as F}from"./chunk-PNYJKZIQ.js";import"./chunk-UJZP7RYT.js";import{Ca as v,Fc as te,Hc as k,Ic as B,Lc as I,ec as N,oc as $,sc as ee}from"./chunk-YWVGY2C2.js";import{Aa as p,Ac as b,Bc as y,Cc as D,Hc as n,Ib as c,Jc as W,Mc as Z,Nc as P,Oc as Q,Qc as U,Wb as d,Xb as E,ic as e,jc as t,kc as i,rb as l,rc as S,za as s}from"./chunk-GBKJFEQZ.js";import"./chunk-EQDQRRRY.js";var T=(()=>{class m{constructor(){this.options=["Daily","Weekly","Monthly","Quarterly","Yearly"]}handleValueChange(r){console.log(r)}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-basic"]],decls:1,vars:1,consts:[[3,"nzValueChange","nzOptions"]],template:function(o,a){o&1&&(e(0,"nz-segmented",0),S("nzValueChange",function(f){return a.handleValueChange(f)}),t()),o&2&&d("nzOptions",a.options)},dependencies:[u,z],encapsulation:2})}}return m})();var O=(()=>{class m{constructor(){this.options=["Daily","Weekly","Monthly","Quarterly","Yearly"]}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-block"]],decls:1,vars:2,consts:[[3,"nzOptions","nzBlock"]],template:function(o,a){o&1&&i(0,"nz-segmented",0),o&2&&d("nzOptions",a.options)("nzBlock",!0)},dependencies:[u,z],encapsulation:2})}}return m})();var M=(()=>{class m{static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-custom"]],decls:43,vars:18,consts:[["nz-segmented-item","","nzValue","user1"],["nzSrc","https://joeschmoe.io/api/v1/random"],["nz-segmented-item","","nzValue","user2"],["nzText","K"],["nz-segmented-item","","nzValue","user3"],["nzIcon","user"],["nz-segmented-item","","nzValue","spring"],["nz-segmented-item","","nzValue","summer"],["nz-segmented-item","","nzValue","autumn"],["nz-segmented-item","","nzValue","winter"]],template:function(o,a){o&1&&(e(0,"nz-segmented")(1,"label",0)(2,"div"),i(3,"nz-avatar",1),e(4,"div"),n(5,"User 1"),t()()(),e(6,"label",2)(7,"div"),i(8,"nz-avatar",3),e(9,"div"),n(10,"User 2"),t()()(),e(11,"label",4)(12,"div"),i(13,"nz-avatar",5),e(14,"div"),n(15,"User 3"),t()()()(),i(16,"br")(17,"br"),e(18,"nz-segmented")(19,"label",6)(20,"div")(21,"div"),n(22,"Spring"),t(),e(23,"div"),n(24,"Jan-Mar"),t()()(),e(25,"label",7)(26,"div")(27,"div"),n(28,"Summer"),t(),e(29,"div"),n(30,"Apr-Jun"),t()()(),e(31,"label",8)(32,"div")(33,"div"),n(34,"Autumn"),t(),e(35,"div"),n(36,"Jul-Sept"),t()()(),e(37,"label",9)(38,"div")(39,"div"),n(40,"Winter"),t(),e(41,"div"),n(42,"Oct-Dec"),t()()()()),o&2&&(l(2),E("padding",4,"px"),l(5),E("padding",4,"px"),l(),E("background","#f56a00"),l(4),E("padding",4,"px"),l(),E("background","#87d068"),l(7),E("padding",4,"px"),l(6),E("padding",4,"px"),l(6),E("padding",4,"px"),l(6),E("padding",4,"px"))},dependencies:[Y,X,u,z,ne],encapsulation:2})}}return m})();var de=()=>["Map","Transit","Satellite"],A=(()=>{class m{constructor(){this.options=["Daily",{label:"Weekly",value:"Weekly",disabled:!0},"Monthly",{label:"Quarterly",value:"Quarterly",disabled:!0},"Yearly"]}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-disabled"]],decls:3,vars:3,consts:[["nzDisabled","",3,"nzOptions"],[3,"nzOptions"]],template:function(o,a){o&1&&i(0,"nz-segmented",0)(1,"br")(2,"nz-segmented",1),o&2&&(d("nzOptions",U(2,de)),l(2),d("nzOptions",a.options))},dependencies:[u,z],styles:[".ant-segmented[_ngcontent-%COMP%]{margin-bottom:10px}"]})}}return m})();var ie=["Daily","Weekly","Monthly"],_=(()=>{class m{constructor(){this.options=[...ie],this.moreLoaded=!1}handleLoadMore(){this.moreLoaded=!0,this.options=[...ie,"Quarterly","Yearly"]}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-dynamic"]],decls:4,vars:2,consts:[[3,"nzOptions"],["nz-button","","nzType","primary",3,"click","disabled"]],template:function(o,a){o&1&&(i(0,"nz-segmented",0)(1,"br"),e(2,"button",1),S("click",function(){return a.handleLoadMore()}),n(3," Load more options "),t()),o&2&&(d("nzOptions",a.options),l(2),d("disabled",a.moreLoaded))},dependencies:[j,q,K,J,u,z],styles:[".ant-segmented[_ngcontent-%COMP%]{margin-bottom:10px}"]})}}return m})();var L=(()=>{class m{constructor(){this.options=[{label:"List",value:"List",icon:"bars"},{label:"Kanban",value:"Kanban",icon:"appstore"}]}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-icon"]],decls:1,vars:1,consts:[[3,"nzOptions"]],template:function(o,a){o&1&&i(0,"nz-segmented",0),o&2&&d("nzOptions",a.options)},dependencies:[u,z],encapsulation:2})}}return m})();var G=(()=>{class m{constructor(){this.options=["Daily","Weekly","Monthly","Quarterly","Yearly"]}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-size"]],decls:5,vars:3,consts:[["nzSize","small",3,"nzOptions"],[3,"nzOptions"],["nzSize","large",3,"nzOptions"]],template:function(o,a){o&1&&i(0,"nz-segmented",0)(1,"br")(2,"nz-segmented",1)(3,"br")(4,"nz-segmented",2),o&2&&(d("nzOptions",a.options),l(2),d("nzOptions",a.options),l(2),d("nzOptions",a.options))},dependencies:[u,z],styles:[".ant-segmented[_ngcontent-%COMP%]{margin-bottom:10px}"]})}}return m})();var R=(()=>{class m{constructor(){this.selectedValue="Weekly",this.options=["Daily","Weekly","Monthly","Quarterly","Yearly"]}handleModelChange(r){console.log(r)}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-value"]],decls:3,vars:3,consts:[[3,"ngModelChange","nzOptions","ngModel"]],template:function(o,a){o&1&&(e(0,"nz-segmented",0),Q("ngModelChange",function(f){return P(a.selectedValue,f)||(a.selectedValue=f),f}),S("ngModelChange",function(f){return a.handleModelChange(f)}),t(),i(1,"br"),n(2)),o&2&&(d("nzOptions",a.options),Z("ngModel",a.selectedValue),l(2),W(" Selected value: ",a.selectedValue," "))},dependencies:[te,$,ee,u,z],styles:[".ant-segmented[_ngcontent-%COMP%]{margin-bottom:10px}"]})}}return m})();var V=(()=>{class m{constructor(){this.options=[{value:"List",icon:"bars"},{value:"Kanban",icon:"appstore"}]}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented-with-icon-only"]],decls:1,vars:1,consts:[[3,"nzOptions"]],template:function(o,a){o&1&&i(0,"nz-segmented",0),o&2&&d("nzOptions",a.options)},dependencies:[u,z],encapsulation:2})}}return m})();var oe=(()=>{class m{constructor(){this.expanded=!1}goLink(r){window&&(window.location.hash=r)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(r=>r.expandCode(this.expanded))}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented"]],viewQuery:function(o,a){if(o&1&&b(x,5),o&2){let g;y(g=D())&&(a.codeBoxes=g)}},decls:280,vars:43,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-segmented-demo-basic","nzTitle","\u57FA\u672C"],["nzHref","#components-segmented-demo-disabled","nzTitle","\u4E0D\u53EF\u7528"],["nzHref","#components-segmented-demo-dynamic","nzTitle","\u52A8\u6001\u6570\u636E"],["nzHref","#components-segmented-demo-icon","nzTitle","\u8BBE\u7F6E\u56FE\u6807"],["nzHref","#components-segmented-demo-value","nzTitle","ngModel"],["nzHref","#components-segmented-demo-custom","nzTitle","\u81EA\u5B9A\u4E49\u6E32\u67D3"],["nzHref","#components-segmented-demo-size","nzTitle","\u4E09\u79CD\u5927\u5C0F"],["nzHref","#components-segmented-demo-block","nzTitle","Block \u5206\u6BB5\u9009\u62E9\u5668"],["nzHref","#components-segmented-demo-with-icon-only","nzTitle","\u53EA\u8BBE\u7F6E\u56FE\u6807"],["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/segmented/doc/index.zh-CN.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["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","nzSelector","nz-demo-segmented-basic","nzGenerateCommand","ng g ng-zorro-antd:segmented-basic <name>","nzComponentName","NzDemoSegmentedBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","\u52A8\u6001\u6570\u636E","nzSelector","nz-demo-segmented-dynamic","nzGenerateCommand","ng g ng-zorro-antd:segmented-dynamic <name>","nzComponentName","NzDemoSegmentedDynamicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","ngModel","nzSelector","nz-demo-segmented-value","nzGenerateCommand","ng g ng-zorro-antd:segmented-value <name>","nzComponentName","NzDemoSegmentedValueComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u4E09\u79CD\u5927\u5C0F","nzSelector","nz-demo-segmented-size","nzGenerateCommand","ng g ng-zorro-antd:segmented-size <name>","nzComponentName","NzDemoSegmentedSizeComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u53EA\u8BBE\u7F6E\u56FE\u6807","nzSelector","nz-demo-segmented-with-icon-only","nzGenerateCommand","ng g ng-zorro-antd:segmented-with-icon-only <name>","nzComponentName","NzDemoSegmentedWithIconOnlyComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u4E0D\u53EF\u7528","nzSelector","nz-demo-segmented-disabled","nzGenerateCommand","ng g ng-zorro-antd:segmented-disabled <name>","nzComponentName","NzDemoSegmentedDisabledComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u8BBE\u7F6E\u56FE\u6807","nzSelector","nz-demo-segmented-icon","nzGenerateCommand","ng g ng-zorro-antd:segmented-icon <name>","nzComponentName","NzDemoSegmentedIconComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u81EA\u5B9A\u4E49\u6E32\u67D3","nzSelector","nz-demo-segmented-custom","nzGenerateCommand","ng g ng-zorro-antd:segmented-custom <name>","nzComponentName","NzDemoSegmentedCustomComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Block \u5206\u6BB5\u9009\u62E9\u5668","nzSelector","nz-demo-segmented-block","nzGenerateCommand","ng g ng-zorro-antd:segmented-block <name>","nzComponentName","NzDemoSegmentedBlockComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["id","nz-segmented"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-segmented'",1,"anchor"],["id","label[nz-segmented-item]"],["onclick","window.location.hash = 'label[nz-segmented-item]'",1,"anchor"]],template:function(o,a){o&1&&(e(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),S("nzClick",function(f){return a.goLink(f)}),i(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)(10,"nz-link",9)(11,"nz-link",10)(12,"nz-link",11),t()(),e(13,"section",12)(14,"h1"),n(15,"Segmented"),e(16,"span",13),n(17,"\u5206\u6BB5\u63A7\u5236\u5668"),t(),i(18,"span",14),e(19,"a",15),i(20,"nz-icon",16),t()(),e(21,"section",12),p(),e(22,"h2",17)(23,"span"),n(24,"\u4F55\u65F6\u4F7F\u7528"),t(),e(25,"a",18),n(26,"#"),t()(),e(27,"ul")(28,"li"),n(29,"\u7528\u4E8E\u5C55\u793A\u591A\u4E2A\u9009\u9879\u5E76\u5141\u8BB8\u7528\u6237\u9009\u62E9\u5176\u4E2D\u5355\u4E2A\u9009\u9879\uFF1B"),t(),e(30,"li"),n(31,"\u5F53\u5207\u6362\u9009\u4E2D\u9009\u9879\u65F6\uFF0C\u5173\u8054\u533A\u57DF\u7684\u5185\u5BB9\u4F1A\u53D1\u751F\u53D8\u5316\u3002"),t()(),e(32,"pre",19)(33,"code")(34,"span",20),n(35,"import"),t(),n(36," "),e(37,"span",21),n(38,"{"),t(),n(39," NzSegmentedModule "),e(40,"span",21),n(41,"}"),t(),n(42," "),e(43,"span",20),n(44,"from"),t(),n(45," "),e(46,"span",22),n(47,"'ng-zorro-antd/segmented'"),t(),e(48,"span",21),n(49,";"),t()()(),s(),t(),e(50,"h2")(51,"span"),n(52,"\u4EE3\u7801\u6F14\u793A"),t(),e(53,"span",23),S("click",function(){return a.expandAllCode()}),t()()(),e(54,"div",24)(55,"div",25)(56,"nz-code-box",26),i(57,"nz-demo-segmented-basic",27),e(58,"div",28),p(),e(59,"p"),n(60,"\u6700\u7B80\u5355\u7684\u7528\u6CD5\u3002"),t(),s(),t()(),e(61,"nz-code-box",29),i(62,"nz-demo-segmented-dynamic",27),e(63,"div",28),p(),e(64,"p"),n(65,"\u52A8\u6001\u52A0\u8F7D\u6570\u636E\u3002"),t(),s(),t()(),e(66,"nz-code-box",30),i(67,"nz-demo-segmented-value",27),e(68,"div",28),p(),e(69,"p"),n(70,"\u901A\u8FC7 ngModel \u6307\u5B9A\u9009\u4E2D\u7684 value"),t(),s(),t()(),e(71,"nz-code-box",31),i(72,"nz-demo-segmented-size",27),e(73,"div",28),p(),e(74,"p"),n(75,"\u6211\u4EEC\u4E3A Segmented \u7EC4\u4EF6\u5B9A\u4E49\u4E86\u4E09\u79CD\u5C3A\u5BF8\uFF08\u5927\u3001\u9ED8\u8BA4\u3001\u5C0F\uFF09\uFF0C\u9AD8\u5EA6\u5206\u522B\u4E3A "),e(76,"code"),n(77,"40px"),t(),n(78,"\u3001"),e(79,"code"),n(80,"32px"),t(),n(81," \u548C "),e(82,"code"),n(83,"24px"),t(),n(84,"\u3002"),t(),s(),t()(),e(85,"nz-code-box",32),i(86,"nz-demo-segmented-with-icon-only",27),e(87,"div",28),p(),e(88,"p"),n(89,"\u5728 Segmented Item \u9009\u9879\u4E2D\u53EA\u8BBE\u7F6E Icon\u3002"),t(),s(),t()()(),e(90,"div",25)(91,"nz-code-box",33),i(92,"nz-demo-segmented-disabled",27),e(93,"div",28),p(),e(94,"p"),n(95,"Segmented \u4E0D\u53EF\u7528\u3002"),t(),s(),t()(),e(96,"nz-code-box",34),i(97,"nz-demo-segmented-icon",27),e(98,"div",28),p(),e(99,"p"),n(100,"\u7ED9 Segmented Item \u8BBE\u7F6E Icon\u3002"),t(),s(),t()(),e(101,"nz-code-box",35),i(102,"nz-demo-segmented-custom",27),e(103,"div",28),p(),e(104,"p"),n(105,"\u81EA\u5B9A\u4E49\u6E32\u67D3\u6BCF\u4E00\u4E2A Segmented Item\u3002"),t(),s(),t()(),e(106,"nz-code-box",36),i(107,"nz-demo-segmented-block",27),e(108,"div",28),p(),e(109,"p")(110,"code"),n(111,"nzBlock"),t(),n(112," \u5C5E\u6027\u4F7F\u5176\u9002\u5408\u7236\u5143\u7D20\u5BBD\u5EA6\u3002"),t(),s(),t()()()(),e(113,"section",37),p(),e(114,"h2",38)(115,"span"),n(116,"API"),t(),e(117,"a",39),n(118,"#"),t()(),e(119,"h3",40)(120,"span"),n(121,"nz-segmented"),t(),e(122,"label",41),n(123,"component"),t(),e(124,"a",42),n(125,"#"),t()(),e(126,"table")(127,"thead")(128,"tr")(129,"th"),n(130,"\u53C2\u6570"),t(),e(131,"th"),n(132,"\u8BF4\u660E"),t(),e(133,"th"),n(134,"\u7C7B\u578B"),t(),e(135,"th"),n(136,"\u9ED8\u8BA4\u503C"),t(),e(137,"th"),n(138,"\u5168\u5C40\u914D\u7F6E"),t()()(),e(139,"tbody")(140,"tr")(141,"td")(142,"code"),n(143,"[nzBlock]"),t()(),e(144,"td"),n(145,"\u5C06\u5BBD\u5EA6\u8C03\u6574\u4E3A\u7236\u5143\u7D20\u5BBD\u5EA6\u7684\u9009\u9879"),t(),e(146,"td")(147,"code"),n(148,"boolean"),t()(),e(149,"td"),n(150,"false"),t(),i(151,"td"),t(),e(152,"tr")(153,"td")(154,"code"),n(155,"[nzDisabled]"),t()(),e(156,"td"),n(157,"\u662F\u5426\u7981\u7528"),t(),e(158,"td")(159,"code"),n(160,"boolean"),t()(),e(161,"td"),n(162,"false"),t(),i(163,"td"),t(),e(164,"tr")(165,"td")(166,"code"),n(167,"[nzOptions]"),t()(),e(168,"td"),n(169,"\u6570\u636E\u5316\u914D\u7F6E\u9009\u9879\u5185\u5BB9"),t(),e(170,"td")(171,"code"),n(172,"string[] | number[] | Array<{ label: string; value: string | number; icon: string; disabled?: boolean; }>"),t()(),e(173,"td"),n(174,"-"),t(),i(175,"td"),t(),e(176,"tr")(177,"td")(178,"code"),n(179,"[nzSize]"),t()(),e(180,"td"),n(181,"\u63A7\u4EF6\u5C3A\u5BF8"),t(),e(182,"td")(183,"code"),n(184,"large | default | small"),t()(),e(185,"td"),n(186,"-"),t(),e(187,"td"),n(188,"\u2705"),t()(),e(189,"tr")(190,"td")(191,"code"),n(192,"[ngModel]"),t()(),e(193,"td"),n(194,"\u5F53\u524D\u9009\u4E2D\u9879\u76EE\u7684 value"),t(),e(195,"td")(196,"code"),n(197,"string | number"),t()(),e(198,"td"),n(199,"-"),t(),i(200,"td"),t(),e(201,"tr")(202,"td")(203,"code"),n(204,"(nzValueChange)"),t()(),e(205,"td"),n(206,"\u5F53\u524D\u9009\u4E2D\u9879\u76EE\u53D8\u5316\u65F6\u89E6\u53D1\u56DE\u8C03"),t(),e(207,"td")(208,"code"),n(209,"EventEmitter<string | number>"),t()(),e(210,"td"),n(211,"-"),t(),i(212,"td"),t(),e(213,"tr")(214,"td")(215,"code"),n(216,"(ngModelChange)"),t()(),e(217,"td"),n(218,"\u5F53\u524D\u9009\u4E2D\u9879\u76EE\u53D8\u5316\u65F6\u89E6\u53D1\u56DE\u8C03"),t(),e(219,"td")(220,"code"),n(221,"EventEmitter<string | number>"),t()(),e(222,"td"),n(223,"-"),t(),i(224,"td"),t()()(),e(225,"h3",43)(226,"span"),n(227,"label[nz-segmented-item]"),t(),e(228,"a",44),n(229,"#"),t()(),e(230,"table")(231,"thead")(232,"tr")(233,"th"),n(234,"\u53C2\u6570"),t(),e(235,"th"),n(236,"\u8BF4\u660E"),t(),e(237,"th"),n(238,"\u7C7B\u578B"),t(),e(239,"th"),n(240,"\u9ED8\u8BA4\u503C"),t(),e(241,"th"),n(242,"\u5168\u5C40\u914D\u7F6E"),t()()(),e(243,"tbody")(244,"tr")(245,"td")(246,"code"),n(247,"[nzIcon]"),t()(),e(248,"td"),n(249,"\u56FE\u6807"),t(),e(250,"td")(251,"code"),n(252,"string"),t()(),e(253,"td"),n(254,"-"),t(),i(255,"td"),t(),e(256,"tr")(257,"td")(258,"code"),n(259,"[nzValue]"),t()(),e(260,"td"),n(261,"\u503C"),t(),e(262,"td")(263,"code"),n(264,"string | number"),t()(),e(265,"td"),n(266,"-"),t(),i(267,"td"),t(),e(268,"tr")(269,"td")(270,"code"),n(271,"[nzDisabled]"),t()(),e(272,"td"),n(273,"\u662F\u5426\u7981\u7528"),t(),e(274,"td")(275,"code"),n(276,"boolean"),t()(),e(277,"td"),n(278,"false"),t(),i(279,"td"),t()()(),s(),t()()),o&2&&(l(),d("nzOffsetTop",16),l(),d("nzAffix",!1),l(52),d("nzGutter",16),l(),d("nzXl",12)("nzSpan",24),l(),d("nzId","components-segmented-demo-basic")("nzLink","components-segmented-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/basic.md"),l(5),d("nzId","components-segmented-demo-dynamic")("nzLink","components-segmented-demo-dynamic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/dynamic.md"),l(5),d("nzId","components-segmented-demo-value")("nzLink","components-segmented-demo-value")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/value.md"),l(5),d("nzId","components-segmented-demo-size")("nzLink","components-segmented-demo-size")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/size.md"),l(14),d("nzId","components-segmented-demo-with-icon-only")("nzLink","components-segmented-demo-with-icon-only")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/with-icon-only.md"),l(5),d("nzXl",12)("nzSpan",24),l(),d("nzId","components-segmented-demo-disabled")("nzLink","components-segmented-demo-disabled")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/disabled.md"),l(5),d("nzId","components-segmented-demo-icon")("nzLink","components-segmented-demo-icon")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/icon.md"),l(5),d("nzId","components-segmented-demo-custom")("nzLink","components-segmented-demo-custom")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/custom.md"),l(5),d("nzId","components-segmented-demo-block")("nzLink","components-segmented-demo-block")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/block.md"))},dependencies:[F,x,H,w,I,B,k,N,v,T,O,M,A,_,L,G,R,V],encapsulation:2})}}return m})();var me=(()=>{class m{constructor(){this.expanded=!1}goLink(r){window&&(window.location.hash=r)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(r=>r.expandCode(this.expanded))}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=c({type:m,selectors:[["nz-demo-segmented"]],viewQuery:function(o,a){if(o&1&&b(x,5),o&2){let g;y(g=D())&&(a.codeBoxes=g)}},decls:294,vars:43,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-segmented-demo-basic","nzTitle","Basic usage"],["nzHref","#components-segmented-demo-disabled","nzTitle","Disabled"],["nzHref","#components-segmented-demo-dynamic","nzTitle","Dynamic"],["nzHref","#components-segmented-demo-icon","nzTitle","With Icon"],["nzHref","#components-segmented-demo-value","nzTitle","ngModel"],["nzHref","#components-segmented-demo-custom","nzTitle","Custom Render"],["nzHref","#components-segmented-demo-size","nzTitle","Three sizes of Segmented"],["nzHref","#components-segmented-demo-block","nzTitle","Block Segmented"],["nzHref","#components-segmented-demo-with-icon-only","nzTitle","With Icon only"],["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/segmented/doc/index.en-US.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["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 usage","nzSelector","nz-demo-segmented-basic","nzGenerateCommand","ng g ng-zorro-antd:segmented-basic <name>","nzComponentName","NzDemoSegmentedBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","Dynamic","nzSelector","nz-demo-segmented-dynamic","nzGenerateCommand","ng g ng-zorro-antd:segmented-dynamic <name>","nzComponentName","NzDemoSegmentedDynamicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","ngModel","nzSelector","nz-demo-segmented-value","nzGenerateCommand","ng g ng-zorro-antd:segmented-value <name>","nzComponentName","NzDemoSegmentedValueComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Three sizes of Segmented","nzSelector","nz-demo-segmented-size","nzGenerateCommand","ng g ng-zorro-antd:segmented-size <name>","nzComponentName","NzDemoSegmentedSizeComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","With Icon only","nzSelector","nz-demo-segmented-with-icon-only","nzGenerateCommand","ng g ng-zorro-antd:segmented-with-icon-only <name>","nzComponentName","NzDemoSegmentedWithIconOnlyComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Disabled","nzSelector","nz-demo-segmented-disabled","nzGenerateCommand","ng g ng-zorro-antd:segmented-disabled <name>","nzComponentName","NzDemoSegmentedDisabledComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","With Icon","nzSelector","nz-demo-segmented-icon","nzGenerateCommand","ng g ng-zorro-antd:segmented-icon <name>","nzComponentName","NzDemoSegmentedIconComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Custom Render","nzSelector","nz-demo-segmented-custom","nzGenerateCommand","ng g ng-zorro-antd:segmented-custom <name>","nzComponentName","NzDemoSegmentedCustomComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Block Segmented","nzSelector","nz-demo-segmented-block","nzGenerateCommand","ng g ng-zorro-antd:segmented-block <name>","nzComponentName","NzDemoSegmentedBlockComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["id","nz-segmented"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-segmented'",1,"anchor"],["id","label[nz-segmented-item]"],["onclick","window.location.hash = 'label[nz-segmented-item]'",1,"anchor"]],template:function(o,a){o&1&&(e(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),S("nzClick",function(f){return a.goLink(f)}),i(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)(10,"nz-link",9)(11,"nz-link",10)(12,"nz-link",11),t()(),e(13,"section",12)(14,"h1"),n(15,"Segmented"),i(16,"span",13)(17,"span",14),e(18,"a",15),i(19,"nz-icon",16),t()(),e(20,"section",12),p(),e(21,"h2",17)(22,"span"),n(23,"When To Use"),t(),e(24,"a",18),n(25,"#"),t()(),e(26,"ul")(27,"li"),n(28,"When displaying multiple options and user can select a single option;"),t(),e(29,"li"),n(30,"When switching the selected option, the content of the associated area changes."),t()(),e(31,"pre",19)(32,"code")(33,"span",20),n(34,"import"),t(),n(35," "),e(36,"span",21),n(37,"{"),t(),n(38," NzSegmentedModule "),e(39,"span",21),n(40,"}"),t(),n(41," "),e(42,"span",20),n(43,"from"),t(),n(44," "),e(45,"span",22),n(46,"'ng-zorro-antd/segmented'"),t(),e(47,"span",21),n(48,";"),t()()(),s(),t(),e(49,"h2")(50,"span"),n(51,"Examples"),t(),e(52,"span",23),S("click",function(){return a.expandAllCode()}),t()()(),e(53,"div",24)(54,"div",25)(55,"nz-code-box",26),i(56,"nz-demo-segmented-basic",27),e(57,"div",28),p(),e(58,"p"),n(59,"Basic Usage."),t(),s(),t()(),e(60,"nz-code-box",29),i(61,"nz-demo-segmented-dynamic",27),e(62,"div",28),p(),e(63,"p"),n(64,"Load "),e(65,"code"),n(66,"options"),t(),n(67," dynamically."),t(),s(),t()(),e(68,"nz-code-box",30),i(69,"nz-demo-segmented-value",27),e(70,"div",28),p(),e(71,"p"),n(72,"Set selected option via ngModel."),t(),s(),t()(),e(73,"nz-code-box",31),i(74,"nz-demo-segmented-size",27),e(75,"div",28),p(),e(76,"p"),n(77,"There are three sizes of an Segmented: "),e(78,"code"),n(79,"large"),t(),n(80," (40px), "),e(81,"code"),n(82,"default"),t(),n(83," (32px) and "),e(84,"code"),n(85,"small"),t(),n(86," (24px)."),t(),s(),t()(),e(87,"nz-code-box",32),i(88,"nz-demo-segmented-with-icon-only",27),e(89,"div",28),p(),e(90,"p"),n(91,"Set "),e(92,"code"),n(93,"icon"),t(),n(94," without "),e(95,"code"),n(96,"label"),t(),n(97," for Segmented Item."),t(),s(),t()()(),e(98,"div",25)(99,"nz-code-box",33),i(100,"nz-demo-segmented-disabled",27),e(101,"div",28),p(),e(102,"p"),n(103,"Disabled Segmented."),t(),s(),t()(),e(104,"nz-code-box",34),i(105,"nz-demo-segmented-icon",27),e(106,"div",28),p(),e(107,"p"),n(108,"Set "),e(109,"code"),n(110,"icon"),t(),n(111," for Segmented Item."),t(),s(),t()(),e(112,"nz-code-box",35),i(113,"nz-demo-segmented-custom",27),e(114,"div",28),p(),e(115,"p"),n(116,"Custom render each Segmented Item."),t(),s(),t()(),e(117,"nz-code-box",36),i(118,"nz-demo-segmented-block",27),e(119,"div",28),p(),e(120,"p")(121,"code"),n(122,"nzBlock"),t(),n(123," property will make the "),e(124,"code"),n(125,"Segmented"),t(),n(126," fit to its parent width."),t(),s(),t()()()(),e(127,"section",37),p(),e(128,"h2",38)(129,"span"),n(130,"API"),t(),e(131,"a",39),n(132,"#"),t()(),e(133,"h3",40)(134,"span"),n(135,"nz-segmented"),t(),e(136,"label",41),n(137,"component"),t(),e(138,"a",42),n(139,"#"),t()(),e(140,"table")(141,"thead")(142,"tr")(143,"th"),n(144,"Property"),t(),e(145,"th"),n(146,"Description"),t(),e(147,"th"),n(148,"Type"),t(),e(149,"th"),n(150,"Default"),t(),e(151,"th"),n(152,"Global Config"),t()()(),e(153,"tbody")(154,"tr")(155,"td")(156,"code"),n(157,"[nzBlock]"),t()(),e(158,"td"),n(159,"Option to fit width to its parent's width"),t(),e(160,"td")(161,"code"),n(162,"boolean"),t()(),e(163,"td"),n(164,"false"),t(),i(165,"td"),t(),e(166,"tr")(167,"td")(168,"code"),n(169,"[nzDisabled]"),t()(),e(170,"td"),n(171,"Disable all segments"),t(),e(172,"td")(173,"code"),n(174,"boolean"),t()(),e(175,"td"),n(176,"false"),t(),i(177,"td"),t(),e(178,"tr")(179,"td")(180,"code"),n(181,"[nzOptions]"),t()(),e(182,"td"),n(183,"Set children optional"),t(),e(184,"td")(185,"code"),n(186,"string[] | number[] | Array<{ label: string; value: string | number; icon: string; disabled?: boolean }>"),t()(),e(187,"td"),n(188,"-"),t(),i(189,"td"),t(),e(190,"tr")(191,"td")(192,"code"),n(193,"[nzSize]"),t()(),e(194,"td"),n(195,"The size of the Segmented"),t(),e(196,"td")(197,"code"),n(198,"large | default | small"),t()(),e(199,"td"),n(200,"-"),t(),e(201,"td"),n(202,"\u2705"),t()(),e(203,"tr")(204,"td")(205,"code"),n(206,"[ngModel]"),t()(),e(207,"td"),n(208,"Value of the currently selected option"),t(),e(209,"td")(210,"code"),n(211,"string | number"),t()(),e(212,"td"),n(213,"-"),t(),i(214,"td"),t(),e(215,"tr")(216,"td")(217,"code"),n(218,"(nzValueChange)"),t()(),e(219,"td"),n(220,"Emits when value of the currently selected option changes"),t(),e(221,"td")(222,"code"),n(223,"EventEmitter<string | number>"),t()(),e(224,"td"),n(225,"-"),t(),i(226,"td"),t(),e(227,"tr")(228,"td")(229,"code"),n(230,"(ngModelChange)"),t()(),e(231,"td"),n(232,"Emits when value of the currently selected option changes"),t(),e(233,"td")(234,"code"),n(235,"EventEmitter<string | number>"),t()(),e(236,"td"),n(237,"-"),t(),i(238,"td"),t()()(),e(239,"h3",43)(240,"span"),n(241,"label[nz-segmented-item]"),t(),e(242,"a",44),n(243,"#"),t()(),e(244,"table")(245,"thead")(246,"tr")(247,"th"),n(248,"Property"),t(),e(249,"th"),n(250,"Description"),t(),e(251,"th"),n(252,"Type"),t(),e(253,"th"),n(254,"Default"),t(),e(255,"th"),n(256,"Global Config"),t()()(),e(257,"tbody")(258,"tr")(259,"td")(260,"code"),n(261,"[nzIcon]"),t()(),e(262,"td"),n(263,"Icon in segmented item"),t(),e(264,"td")(265,"code"),n(266,"string"),t()(),e(267,"td"),n(268,"-"),t(),i(269,"td"),t(),e(270,"tr")(271,"td")(272,"code"),n(273,"[nzValue]"),t()(),e(274,"td"),n(275,"Value of segmented item"),t(),e(276,"td")(277,"code"),n(278,"string | number"),t()(),e(279,"td"),n(280,"-"),t(),i(281,"td"),t(),e(282,"tr")(283,"td")(284,"code"),n(285,"[nzDisabled]"),t()(),e(286,"td"),n(287,"Disable the segmented item"),t(),e(288,"td")(289,"code"),n(290,"boolean"),t()(),e(291,"td"),n(292,"false"),t(),i(293,"td"),t()()(),s(),t()()),o&2&&(l(),d("nzOffsetTop",16),l(),d("nzAffix",!1),l(51),d("nzGutter",16),l(),d("nzXl",12)("nzSpan",24),l(),d("nzId","components-segmented-demo-basic")("nzLink","components-segmented-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/basic.md"),l(5),d("nzId","components-segmented-demo-dynamic")("nzLink","components-segmented-demo-dynamic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/dynamic.md"),l(8),d("nzId","components-segmented-demo-value")("nzLink","components-segmented-demo-value")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/value.md"),l(5),d("nzId","components-segmented-demo-size")("nzLink","components-segmented-demo-size")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/size.md"),l(14),d("nzId","components-segmented-demo-with-icon-only")("nzLink","components-segmented-demo-with-icon-only")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/with-icon-only.md"),l(11),d("nzXl",12)("nzSpan",24),l(),d("nzId","components-segmented-demo-disabled")("nzLink","components-segmented-demo-disabled")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/disabled.md"),l(5),d("nzId","components-segmented-demo-icon")("nzLink","components-segmented-demo-icon")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/icon.md"),l(8),d("nzId","components-segmented-demo-custom")("nzLink","components-segmented-demo-custom")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/custom.md"),l(5),d("nzId","components-segmented-demo-block")("nzLink","components-segmented-demo-block")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/segmented/demo/block.md"))},dependencies:[F,x,H,w,I,B,k,N,v,T,O,M,A,_,L,G,R,V],encapsulation:2})}}return m})();var ze=[{path:"en",component:me},{path:"zh",component:oe}],ct=ze;export{ct as default};