{"id":27637,"date":"2024-11-24T12:14:50","date_gmt":"2024-11-24T04:14:50","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27637\/"},"modified":"2024-11-24T12:14:50","modified_gmt":"2024-11-24T04:14:50","slug":"%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8-ant-design-%e6%97%a5%e6%9c%9f%e9%80%89%e6%8b%a9%e5%99%a8%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%b9%b4%e3%80%81%e5%ad%a3%e5%ba%a6%e3%80%81%e6%9c%88%e3%80%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27637\/","title":{"rendered":"\u5982\u4f55\u5229\u7528 Ant Design \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173129996050647.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5229\u7528 Ant Design \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5229\u7528 Ant Design \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528\u5f00\u6e90 javascript \u63d2\u4ef6\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff1f<\/strong><\/p>\n<p>\u60f3\u8981\u5728 javascript \u4e2d\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff0c\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u5f00\u6e90\u7684 ant design \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u3002<\/p>\n<p>ant design \u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u65e5\u671f\u9009\u62e9\u5668\uff0c\u652f\u6301\uff1a<\/p>\n<p><strong>\u5e74\uff1a<\/strong><\/p>\n<ul>\n<li>\u5f00\u59cb\u5e74<\/li>\n<li>\u7ed3\u675f\u5e74<\/li>\n<\/ul>\n<p><strong>\u5b63\u5ea6\uff1a<\/strong><\/p>\n<ul>\n<li>\u5f00\u59cb\u5b63\u5ea6<\/li>\n<li>\u7ed3\u675f\u5b63\u5ea6<\/li>\n<\/ul>\n<p><strong>\u6708\uff1a<\/strong><\/p>\n<ul>\n<li>\u5f00\u59cb\u6708<\/li>\n<li>\u7ed3\u675f\u6708<\/li>\n<\/ul>\n<p><strong>\u5468\uff1a<\/strong><\/p>\n<ul>\n<li>\u5f00\u59cb\u5468<\/li>\n<li>\u7ed3\u675f\u5468<\/li>\n<\/ul>\n<p><strong>\u65e5\uff1a<\/strong><\/p>\n<ul>\n<li>\u5f00\u59cb\u65e5<\/li>\n<li>\u7ed3\u675f\u65e5<\/li>\n<\/ul>\n<p>\u5177\u4f53\u4f7f\u7528\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\n<p>\u5b89\u88c5 ant design\uff1a<\/p>\n<pre>npm install antd --save\uff0c<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p>\u5728\u4ee3\u7801\u4e2d\u5f15\u5165 ant design\uff1a<\/p>\n<pre>import { datepicker, rangepicker } from 'antd';<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p>\u521b\u5efa\u65e5\u671f\u8303\u56f4\u9009\u62e9\u5668\uff1a<\/p>\n<pre>const mydatepicker = () =&gt; {\n  return (\n &lt;rangepicker \/&gt;\n  );\n};<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p>\u8bbe\u7f6e\u6307\u5b9a\u7684\u8303\u56f4\uff1a<\/p>\n<pre>&lt;RangePicker picker=\"year\" \/&gt;  \/\/ \u5e74\u8303\u56f4\u9009\u62e9\n&lt;RangePicker picker=\"quarter\" \/&gt;  \/\/ \u5b63\u5ea6\u8303\u56f4\u9009\u62e9\n&lt;RangePicker picker=\"month\" \/&gt;  \/\/ \u6708\u8303\u56f4\u9009\u62e9\n&lt;RangePicker picker=\"week\" \/&gt;  \/\/ \u5468\u8303\u56f4\u9009\u62e9\n&lt;RangePicker picker=\"date\" \/&gt;  \/\/ \u65e5\u8303\u56f4\u9009\u62e9<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<\/ol>\n<p>ant design \u7684\u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u529f\u80fd\u5f3a\u5927\uff0c\u4f7f\u7528\u7b80\u5355\uff0c\u53ef\u4ee5\u8f7b\u677e\u6ee1\u8db3\u60a8\u7684\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u8303\u56f4\u9009\u62e9\u9700\u6c42\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5229\u7528 Ant Design \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f7f\u7528\u5f00\u6e90 javascript \u63d2\u4ef6\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff1f \u60f3\u8981\u5728 javascript \u4e2d\u5b9e\u73b0\u5e74\u3001\u5b63\u5ea6\u3001\u6708\u3001\u5468\u3001\u65e5\u7684\u8303\u56f4\u9009\u62e9\uff0c\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u5f00\u6e90\u7684 ant design \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u3002 ant design \u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u65e5\u671f\u9009\u62e9\u5668\uff0c\u652f\u6301\uff1a \u5e74\uff1a \u5f00\u59cb\u5e74 \u7ed3\u675f\u5e74 \u5b63\u5ea6\uff1a \u5f00\u59cb\u5b63\u5ea6 \u7ed3\u675f\u5b63\u5ea6 \u6708\uff1a \u5f00\u59cb\u6708 \u7ed3\u675f\u6708 \u5468\uff1a \u5f00\u59cb\u5468 \u7ed3\u675f\u5468 \u65e5\uff1a \u5f00\u59cb\u65e5 \u7ed3\u675f\u65e5 \u5177\u4f53\u4f7f\u7528\u6b65\u9aa4\u5982\u4e0b\uff1a \u5b89\u88c5 ant design\uff1a npm install antd &#8211;save\uff0c \u767b\u5f55\u540e\u590d\u5236 \u5728\u4ee3\u7801\u4e2d\u5f15\u5165 ant design\uff1a import { datepicker, rangepicker } from &#8216;antd&#8217;; \u767b\u5f55\u540e\u590d\u5236 \u521b\u5efa\u65e5\u671f\u8303\u56f4\u9009\u62e9\u5668\uff1a const mydatepicker = () =&gt; { return [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-27637","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27637"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27637\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}