ant-design/5960c8ae-async.14d6f37d.js
2025-05-31 08:49:44 +00:00

1 line
3.3 KiB
JavaScript

(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["5960c8ae"],{"5960c8ae":function(e,t,a){"use strict";a.d(t,"__esModule",{value:!0}),a.d(t,"default",{enumerable:!0,get:function(){return i;}});var n=a("777fffbe"),o=a("f19d2b93"),l=n._(a("b622e337")),r=n._(a("97c488ea")),d=n._(a("c96b0d01")),s=a("5b220c3d"),c=a("9c86e52a"),p=a("e10b770f"),i=function(){return(0,o.jsx)(c.DumiPage,{children:(0,o.jsx)(s.Suspense,{fallback:(0,o.jsx)(d.default,{}),children:(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"markdown",children:[(0,o.jsxs)("p",{children:[p.texts[0].value,(0,o.jsx)("code",{children:p.texts[1].value}),p.texts[2].value]}),(0,o.jsxs)("h2",{id:"getref",children:[(0,o.jsx)(r.default,{"aria-hidden":"true",tabIndex:"-1",href:"#getref",sourceType:"a",children:(0,o.jsx)("span",{className:"icon icon-link"})}),"GetRef"]}),(0,o.jsxs)("p",{children:[p.texts[3].value,(0,o.jsx)("code",{children:p.texts[4].value}),p.texts[5].value]}),(0,o.jsx)(l.default,{lang:"tsx",children:p.texts[6].value}),(0,o.jsxs)("h2",{id:"getprops",children:[(0,o.jsx)(r.default,{"aria-hidden":"true",tabIndex:"-1",href:"#getprops",sourceType:"a",children:(0,o.jsx)("span",{className:"icon icon-link"})}),"GetProps"]}),(0,o.jsxs)("p",{children:[p.texts[7].value,(0,o.jsx)("code",{children:p.texts[8].value}),p.texts[9].value]}),(0,o.jsx)(l.default,{lang:"tsx",children:p.texts[10].value}),(0,o.jsxs)("h2",{id:"getprop",children:[(0,o.jsx)(r.default,{"aria-hidden":"true",tabIndex:"-1",href:"#getprop",sourceType:"a",children:(0,o.jsx)("span",{className:"icon icon-link"})}),"GetProp"]}),(0,o.jsxs)("p",{children:[p.texts[11].value,(0,o.jsx)("code",{children:p.texts[12].value}),p.texts[13].value,(0,o.jsx)("code",{children:p.texts[14].value}),p.texts[15].value]}),(0,o.jsx)(l.default,{lang:"tsx",children:p.texts[16].value})]})})})});};},e10b770f:function(e,t,a){"use strict";a.d(t,"__esModule",{value:!0}),a.d(t,"texts",{enumerable:!0,get:function(){return n;}}),a("a18f44d0");let n=[{value:"Available since ",paraId:0},{value:"5.13.0",paraId:0},{value:".",paraId:0},{value:"Get the ",paraId:1,tocIndex:0},{value:"ref",paraId:1,tocIndex:0},{value:" property definition of the component, which is very useful for components that are not directly exposed or child components.",paraId:1,tocIndex:0},{value:"import { Select } from 'antd';\nimport type { GetRef } from 'antd';\n\ntype SelectRefType = GetRef<typeof Select>; // BaseSelectRef\n",paraId:2,tocIndex:0},{value:"Get the ",paraId:3,tocIndex:1},{value:"props",paraId:3,tocIndex:1},{value:" property definition of the component:",paraId:3,tocIndex:1},{value:"import { Checkbox } from 'antd';\nimport type { GetProps } from 'antd';\n\ntype CheckboxGroupType = GetProps<typeof Checkbox.Group>;\n",paraId:4,tocIndex:1},{value:"Get the single ",paraId:5,tocIndex:2},{value:"props",paraId:5,tocIndex:2},{value:" property definition of the component. It has encapsulated ",paraId:5,tocIndex:2},{value:"NonNullable",paraId:5,tocIndex:2},{value:", so you don't have to worry about it being empty:",paraId:5,tocIndex:2},{value:"import { Select } from 'antd';\nimport type { GetProp, SelectProps } from 'antd';\n\n// Both of these can work\ntype SelectOptionType1 = GetProp<SelectProps, 'options'>[number];\ntype SelectOptionType2 = GetProp<typeof Select, 'options'>[number];\n",paraId:6,tocIndex:2}];}}]);