mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["5433035e"],{"5433035e":function(a,e,d){"use strict";d.d(e,"__esModule",{value:!0}),d.d(e,"texts",{enumerable:!0,get:function(){return I;}}),d("12a967ed");let I=[{value:"\u4F7F\u7528\u56FE\u6807\u7EC4\u4EF6\uFF0C\u4F60\u9700\u8981\u5B89\u88C5 ",paraId:0,tocIndex:0},{value:"@ant-design/icons",paraId:0,tocIndex:0},{value:" \u56FE\u6807\u7EC4\u4EF6\u5305\uFF1A",paraId:0,tocIndex:0},{value:"\u5B89\u88C5 ",paraId:1,tocIndex:1},{value:"Kitchen Sketch \u63D2\u4EF6 \u{1F48E}",paraId:1,tocIndex:1},{value:"\uFF0C\u5C31\u53EF\u4EE5\u4E00\u952E\u62D6\u62FD\u4F7F\u7528 Ant Design \u548C Iconfont \u7684\u6D77\u91CF\u56FE\u6807\uFF0C\u8FD8\u53EF\u4EE5\u5173\u8054\u81EA\u6709\u9879\u76EE\u3002",paraId:1,tocIndex:1},{value:"\u4ECE 4.0 \u5F00\u59CB\uFF0Cantd \u4E0D\u518D\u5185\u7F6E Icon \u7EC4\u4EF6\uFF0C\u8BF7\u4F7F\u7528\u72EC\u7ACB\u7684\u5305 ",paraId:2,tocIndex:9},{value:"@ant-design/icons",paraId:2,tocIndex:9},{value:"\u3002",paraId:2,tocIndex:9},{value:"\u53C2\u6570",paraId:3,tocIndex:10},{value:"\u8BF4\u660E",paraId:3,tocIndex:10},{value:"\u7C7B\u578B",paraId:3,tocIndex:10},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:10},{value:"\u7248\u672C",paraId:3,tocIndex:10},{value:"className",paraId:3,tocIndex:10},{value:"\u8BBE\u7F6E\u56FE\u6807\u7684\u6837\u5F0F\u540D",paraId:3,tocIndex:10},{value:"string",paraId:3,tocIndex:10},{value:"-",paraId:3,tocIndex:10},{value:"rotate",paraId:3,tocIndex:10},{value:"\u56FE\u6807\u65CB\u8F6C\u89D2\u5EA6\uFF08IE9 \u65E0\u6548\uFF09",paraId:3,tocIndex:10},{value:"number",paraId:3,tocIndex:10},{value:"-",paraId:3,tocIndex:10},{value:"spin",paraId:3,tocIndex:10},{value:"\u662F\u5426\u6709\u65CB\u8F6C\u52A8\u753B",paraId:3,tocIndex:10},{value:"boolean",paraId:3,tocIndex:10},{value:"false",paraId:3,tocIndex:10},{value:"style",paraId:3,tocIndex:10},{value:"\u8BBE\u7F6E\u56FE\u6807\u7684\u6837\u5F0F\uFF0C\u4F8B\u5982 ",paraId:3,tocIndex:10},{value:"fontSize",paraId:3,tocIndex:10},{value:" \u548C ",paraId:3,tocIndex:10},{value:"color",paraId:3,tocIndex:10},{value:"CSSProperties",paraId:3,tocIndex:10},{value:"-",paraId:3,tocIndex:10},{value:"twoToneColor",paraId:3,tocIndex:10},{value:"\u4EC5\u9002\u7528\u53CC\u8272\u56FE\u6807\u3002\u8BBE\u7F6E\u53CC\u8272\u56FE\u6807\u7684\u4E3B\u8981\u989C\u8272\uFF0C\u652F\u6301\u8BBE\u7F6E\u5341\u516D\u8FDB\u5236\u989C\u8272\u5B57\u7B26\u4E32",paraId:3,tocIndex:10},{value:"string | string[]",paraId:3,tocIndex:10},{value:"-",paraId:3,tocIndex:10},{value:"\u5176\u4E2D\u6211\u4EEC\u63D0\u4F9B\u4E86\u4E09\u79CD\u4E3B\u9898\u7684\u56FE\u6807\uFF0C\u4E0D\u540C\u4E3B\u9898\u7684 Icon \u7EC4\u4EF6\u540D\u4E3A\u56FE\u6807\u540D\u52A0\u4E3B\u9898\u505A\u4E3A\u540E\u7F00\u3002",paraId:4,tocIndex:10},{value:"import { StarOutlined, StarFilled, StarTwoTone } from '@ant-design/icons';\n\n<StarOutlined />\n<StarFilled />\n<StarTwoTone twoToneColor=\"#eb2f96\" />\n",paraId:5,tocIndex:10},{value:"\u53C2\u6570",paraId:6,tocIndex:11},{value:"\u8BF4\u660E",paraId:6,tocIndex:11},{value:"\u7C7B\u578B",paraId:6,tocIndex:11},{value:"\u9ED8\u8BA4\u503C",paraId:6,tocIndex:11},{value:"\u7248\u672C",paraId:6,tocIndex:11},{value:"component",paraId:6,tocIndex:11},{value:"\u63A7\u5236\u5982\u4F55\u6E32\u67D3\u56FE\u6807\uFF0C\u901A\u5E38\u662F\u4E00\u4E2A\u6E32\u67D3\u6839\u6807\u7B7E\u4E3A ",paraId:6,tocIndex:11},{value:"<svg>",paraId:6,tocIndex:11},{value:" \u7684 React \u7EC4\u4EF6",paraId:6,tocIndex:11},{value:"ComponentType<CustomIconComponentProps>",paraId:6,tocIndex:11},{value:"-",paraId:6,tocIndex:11},{value:"rotate",paraId:6,tocIndex:11},{value:"\u56FE\u6807\u65CB\u8F6C\u89D2\u5EA6\uFF08IE9 \u65E0\u6548\uFF09",paraId:6,tocIndex:11},{value:"number",paraId:6,tocIndex:11},{value:"-",paraId:6,tocIndex:11},{value:"spin",paraId:6,tocIndex:11},{value:"\u662F\u5426\u6709\u65CB\u8F6C\u52A8\u753B",paraId:6,tocIndex:11},{value:"boolean",paraId:6,tocIndex:11},{value:"false",paraId:6,tocIndex:11},{value:"style",paraId:6,tocIndex:11},{value:"\u8BBE\u7F6E\u56FE\u6807\u7684\u6837\u5F0F\uFF0C\u4F8B\u5982 ",paraId:6,tocIndex:11},{value:"fontSize",paraId:6,tocIndex:11},{value:" \u548C ",paraId:6,tocIndex:11},{value:"color",paraId:6,tocIndex:11},{value:"CSSProperties",paraId:6,tocIndex:11},{value:"-",paraId:6,tocIndex:11},{value:"\u5728 ",paraId:7,tocIndex:12},{value:"3.9.0",paraId:7,tocIndex:12},{value:" \u4E4B\u540E\uFF0C\u6211\u4EEC\u4F7F\u7528\u4E86 SVG \u56FE\u6807\u66FF\u6362\u4E86\u539F\u5148\u7684 font \u56FE\u6807\uFF0C\u4ECE\u800C\u5E26\u6765\u4E86\u4EE5\u4E0B\u4F18\u52BF\uFF1A",paraId:7,tocIndex:12},{value:"\u5B8C\u5168\u79BB\u7EBF\u5316\u4F7F\u7528\uFF0C\u4E0D\u9700\u8981\u4ECE CDN \u4E0B\u8F7D\u5B57\u4F53\u6587\u4EF6\uFF0C\u56FE\u6807\u4E0D\u4F1A\u56E0\u4E3A\u7F51\u7EDC\u95EE\u9898\u5448\u73B0\u65B9\u5757\uFF0C\u4E5F\u65E0\u9700\u5B57\u4F53\u6587\u4EF6\u672C\u5730\u90E8\u7F72\u3002",paraId:8,tocIndex:12},{value:"\u5728\u4F4E\u7AEF\u8BBE\u5907\u4E0A SVG \u6709\u66F4\u597D\u7684\u6E05\u6670\u5EA6\u3002",paraId:8,tocIndex:12},{value:"\u652F\u6301\u591A\u8272\u56FE\u6807\u3002",paraId:8,tocIndex:12},{value:"\u5BF9\u4E8E\u5185\u5EFA\u56FE\u6807\u7684\u66F4\u6362\u53EF\u4EE5\u63D0\u4F9B\u66F4\u591A API\uFF0C\u800C\u4E0D\u9700\u8981\u8FDB\u884C\u6837\u5F0F\u8986\u76D6\u3002",paraId:8,tocIndex:12},{value:"\u66F4\u591A\u8BA8\u8BBA\u53EF\u53C2\u8003\uFF1A",paraId:9,tocIndex:12},{value:"#10353",paraId:9,tocIndex:12},{value:"\u3002",paraId:9,tocIndex:12},{value:"\u6240\u6709\u7684\u56FE\u6807\u90FD\u4F1A\u4EE5 ",paraId:10,tocIndex:12},{value:"<svg>",paraId:10,tocIndex:12},{value:" \u6807\u7B7E\u6E32\u67D3\uFF0C\u53EF\u4EE5\u4F7F\u7528 ",paraId:10,tocIndex:12},{value:"style",paraId:10,tocIndex:12},{value:" \u548C ",paraId:10,tocIndex:12},{value:"className",paraId:10,tocIndex:12},{value:" \u8BBE\u7F6E\u56FE\u6807\u7684\u5927\u5C0F\u548C\u5355\u8272\u56FE\u6807\u7684\u989C\u8272\u3002\u4F8B\u5982\uFF1A",paraId:10,tocIndex:12},{value:"import { MessageOutlined } from '@ant-design/icons';\n\n<MessageOutlined style={{ fontSize: '16px', color: '#08c' }} />;\n",paraId:11,tocIndex:12},{value:"\u5BF9\u4E8E\u53CC\u8272\u56FE\u6807\uFF0C\u53EF\u4EE5\u901A\u8FC7\u4F7F\u7528 ",paraId:12,tocIndex:13},{value:"getTwoToneColor()",paraId:12,tocIndex:13},{value:" \u548C ",paraId:12,tocIndex:13},{value:"setTwoToneColor(colorString)",paraId:12,tocIndex:13},{value:" \u6765\u5168\u5C40\u8BBE\u7F6E\u56FE\u6807\u4E3B\u8272\u3002",paraId:12,tocIndex:13},{value:"import { getTwoToneColor, setTwoToneColor } from '@ant-design/icons';\n\nsetTwoToneColor('#eb2f96');\ngetTwoToneColor(); // #eb2f96\n",paraId:13,tocIndex:13},{value:"\u5728 ",paraId:14,tocIndex:14},{value:"3.9.0",paraId:14,tocIndex:14},{value:" \u4E4B\u540E\uFF0C\u6211\u4EEC\u63D0\u4F9B\u4E86\u4E00\u4E2A ",paraId:14,tocIndex:14},{value:"createFromIconfontCN",paraId:14,tocIndex:14},{value:" \u65B9\u6CD5\uFF0C\u65B9\u4FBF\u5F00\u53D1\u8005\u8C03\u7528\u5728 ",paraId:14,tocIndex:14},{value:"iconfont.cn",paraId:14,tocIndex:14},{value:" \u4E0A\u81EA\u884C\u7BA1\u7406\u7684\u56FE\u6807\u3002",paraId:14,tocIndex:14},{value:"import React from 'react';\nimport { createFromIconfontCN } from '@ant-design/icons';\nimport ReactDOM from 'react-dom/client';\n\nconst MyIcon = createFromIconfontCN({\n scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js', // \u5728 iconfont.cn \u4E0A\u751F\u6210\n});\n\nReactDOM.createRoot(mountNode).render(<MyIcon type=\"icon-example\" />);\n",paraId:15,tocIndex:14},{value:"\u5176\u672C\u8D28\u4E0A\u662F\u521B\u5EFA\u4E86\u4E00\u4E2A\u4F7F\u7528 ",paraId:16,tocIndex:14},{value:"<use>",paraId:16,tocIndex:14},{value:" \u6807\u7B7E\u6765\u6E32\u67D3\u56FE\u6807\u7684\u7EC4\u4EF6\u3002",paraId:16,tocIndex:14},{value:"options \u7684\u914D\u7F6E\u9879\u5982\u4E0B\uFF1A",paraId:17,tocIndex:14},{value:"\u53C2\u6570",paraId:18,tocIndex:14},{value:"\u8BF4\u660E",paraId:18,tocIndex:14},{value:"\u7C7B\u578B",paraId:18,tocIndex:14},{value:"\u9ED8\u8BA4\u503C",paraId:18,tocIndex:14},{value:"\u7248\u672C",paraId:18,tocIndex:14},{value:"extraCommonProps",paraId:18,tocIndex:14},{value:"\u7ED9\u6240\u6709\u7684 ",paraId:18,tocIndex:14},{value:"svg",paraId:18,tocIndex:14},{value:" \u56FE\u6807 ",paraId:18,tocIndex:14},{value:"<Icon />",paraId:18,tocIndex:14},{value:" \u7EC4\u4EF6\u8BBE\u7F6E\u989D\u5916\u7684\u5C5E\u6027",paraId:18,tocIndex:14},{value:"{ [key: string]: any }",paraId:18,tocIndex:14},{value:"{}",paraId:18,tocIndex:14},{value:"scriptUrl",paraId:18,tocIndex:14},{value:"iconfont.cn",paraId:18,tocIndex:14},{value:" \u9879\u76EE\u5728\u7EBF\u751F\u6210\u7684 js \u5730\u5740\uFF0C",paraId:18,tocIndex:14},{value:"@ant-design/icons@4.1.0",paraId:18,tocIndex:14},{value:" \u4E4B\u540E\u652F\u6301 ",paraId:18,tocIndex:14},{value:"string[]",paraId:18,tocIndex:14},{value:" \u7C7B\u578B",paraId:18,tocIndex:14},{value:"string | string[]",paraId:18,tocIndex:14},{value:"-",paraId:18,tocIndex:14},{value:"\u5728 ",paraId:19,tocIndex:14},{value:"scriptUrl",paraId:19,tocIndex:14},{value:" \u90FD\u8BBE\u7F6E\u6709\u6548\u7684\u60C5\u51B5\u4E0B\uFF0C\u7EC4\u4EF6\u5728\u6E32\u67D3\u524D\u4F1A\u81EA\u52A8\u5F15\u5165 ",paraId:19,tocIndex:14},{value:"iconfont.cn",paraId:19,tocIndex:14},{value:" \u9879\u76EE\u4E2D\u7684\u56FE\u6807\u7B26\u53F7\u96C6\uFF0C\u65E0\u9700\u624B\u52A8\u5F15\u5165\u3002",paraId:19,tocIndex:14},{value:"\u89C1 ",paraId:20,tocIndex:14},{value:"iconfont.cn \u4F7F\u7528\u5E2E\u52A9",paraId:20,tocIndex:14},{value:" \u67E5\u770B\u5982\u4F55\u751F\u6210 js \u5730\u5740\u3002",paraId:20,tocIndex:14},{value:"\u5982\u679C\u4F7F\u7528 ",paraId:21,tocIndex:15},{value:"webpack",paraId:21,tocIndex:15},{value:"\uFF0C\u53EF\u4EE5\u901A\u8FC7\u914D\u7F6E ",paraId:21,tocIndex:15},{value:"@svgr/webpack",paraId:21,tocIndex:15},{value:" \u6765\u5C06 ",paraId:21,tocIndex:15},{value:"svg",paraId:21,tocIndex:15},{value:" \u56FE\u6807\u4F5C\u4E3A ",paraId:21,tocIndex:15},{value:"React",paraId:21,tocIndex:15},{value:" \u7EC4\u4EF6\u5BFC\u5165\u3002",paraId:21,tocIndex:15},{value:"@svgr/webpack",paraId:21,tocIndex:15},{value:" \u7684 ",paraId:21,tocIndex:15},{value:"options",paraId:21,tocIndex:15},{value:" \u9009\u9879\u8BF7\u53C2\u9605 ",paraId:21,tocIndex:15},{value:"svgr \u6587\u6863",paraId:21,tocIndex:15},{value:"\u3002",paraId:21,tocIndex:15},{value:"// webpack.config.js\nmodule.exports = {\n // ... other config\n test: /\\.svg(\\?v=\\d+\\.\\d+\\.\\d+)?$/,\n use: [\n {\n loader: 'babel-loader',\n },\n {\n loader: '@svgr/webpack',\n options: {\n babel: false,\n icon: true,\n },\n },\n ],\n};\n",paraId:22,tocIndex:15},{value:"\u5982\u679C\u4F7F\u7528 ",paraId:23,tocIndex:15},{value:"vite",paraId:23,tocIndex:15},{value:"\uFF0C\u53EF\u4EE5\u901A\u8FC7\u914D\u7F6E ",paraId:23,tocIndex:15},{value:"vite-plugin-svgr",paraId:23,tocIndex:15},{value:" \u6765\u5C06 ",paraId:23,tocIndex:15},{value:"svg",paraId:23,tocIndex:15},{value:" \u56FE\u6807\u4F5C\u4E3A ",paraId:23,tocIndex:15},{value:"React",paraId:23,tocIndex:15},{value:" \u7EC4\u4EF6\u5BFC\u5165\u3002",paraId:23,tocIndex:15},{value:"vite-plugin-svgr",paraId:23,tocIndex:15},{value:" \u7684 ",paraId:23,tocIndex:15},{value:"options",paraId:23,tocIndex:15},{value:" \u9009\u9879\u8BF7\u53C2\u9605 ",paraId:23,tocIndex:15},{value:"svgr \u6587\u6863",paraId:23,tocIndex:15},{value:"\u3002",paraId:23,tocIndex:15},{value:"// vite.config.js\nexport default defineConfig(() => ({\n // ... other config\n plugins: [svgr({ svgrOptions: { icon: true } })],\n}));\n",paraId:24,tocIndex:15},{value:"import React from 'react';\nimport Icon from '@ant-design/icons';\nimport MessageSvg from 'path/to/message.svg'; // \u4F60\u7684 '*.svg' \u6587\u4EF6\u8DEF\u5F84\n\n// import MessageSvg from 'path/to/message.svg?react'; // \u4F7F\u7528vite \u4F60\u7684 '*.svg?react' \u6587\u4EF6\u8DEF\u5F84.\nimport ReactDOM from 'react-dom/client';\n\n// in create-react-app:\n// import { ReactComponent as MessageSvg } from 'path/to/message.svg';\n\nReactDOM.createRoot(mountNode).render(<Icon component={MessageSvg} />);\n",paraId:25,tocIndex:15},{value:"Icon",paraId:26,tocIndex:15},{value:" \u4E2D\u7684 ",paraId:26,tocIndex:15},{value:"component",paraId:26,tocIndex:15},{value:" \u7EC4\u4EF6\u7684\u63A5\u53D7\u7684\u5C5E\u6027\u5982\u4E0B\uFF1A",paraId:26,tocIndex:15},{value:"\u5B57\u6BB5",paraId:27,tocIndex:15},{value:"\u8BF4\u660E",paraId:27,tocIndex:15},{value:"\u7C7B\u578B",paraId:27,tocIndex:15},{value:"\u53EA\u8BFB\u503C",paraId:27,tocIndex:15},{value:"\u7248\u672C",paraId:27,tocIndex:15},{value:"className",paraId:27,tocIndex:15},{value:"\u8BA1\u7B97\u540E\u7684 ",paraId:27,tocIndex:15},{value:"svg",paraId:27,tocIndex:15},{value:" \u7C7B\u540D",paraId:27,tocIndex:15},{value:"string",paraId:27,tocIndex:15},{value:"-",paraId:27,tocIndex:15},{value:"fill",paraId:27,tocIndex:15},{value:"svg",paraId:27,tocIndex:15},{value:" \u5143\u7D20\u586B\u5145\u7684\u989C\u8272",paraId:27,tocIndex:15},{value:"string",paraId:27,tocIndex:15},{value:"currentColor",paraId:27,tocIndex:15},{value:"height",paraId:27,tocIndex:15},{value:"svg",paraId:27,tocIndex:15},{value:" \u5143\u7D20\u9AD8\u5EA6",paraId:27,tocIndex:15},{value:"string | number",paraId:27,tocIndex:15},{value:"1em",paraId:27,tocIndex:15},{value:"style",paraId:27,tocIndex:15},{value:"\u8BA1\u7B97\u540E\u7684 ",paraId:27,tocIndex:15},{value:"svg",paraId:27,tocIndex:15},{value:" \u5143\u7D20\u6837\u5F0F",paraId:27,tocIndex:15},{value:"CSSProperties",paraId:27,tocIndex:15},{value:"-",paraId:27,tocIndex:15},{value:"width",paraId:27,tocIndex:15},{value:"svg",paraId:27,tocIndex:15},{value:" \u5143\u7D20\u5BBD\u5EA6",paraId:27,tocIndex:15},{value:"string | number",paraId:27,tocIndex:15},{value:"1em",paraId:27,tocIndex:15}];}}]); |