{"id":5735,"date":"2023-01-06T14:50:39","date_gmt":"2023-01-06T06:50:39","guid":{"rendered":"https:\/\/badgameshow.com\/steven\/?p=5735"},"modified":"2023-01-06T14:50:39","modified_gmt":"2023-01-06T06:50:39","slug":"%e4%bd%bf%e7%94%a8react-js%e5%bf%ab%e9%80%9f%e6%b1%82%e5%8f%96%e5%9b%9b%e8%88%8d%e4%ba%94%e5%85%a5","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/steven\/react-js\/%e4%bd%bf%e7%94%a8react-js%e5%bf%ab%e9%80%9f%e6%b1%82%e5%8f%96%e5%9b%9b%e8%88%8d%e4%ba%94%e5%85%a5\/","title":{"rendered":"\u4f7f\u7528React.JS\u5feb\u901f\u6c42\u53d6\u56db\u820d\u4e94\u5165"},"content":{"rendered":"<p><meta name=\"keywords\" content=\"React, React List, round\"><\/p>\n<h1>\u4f7f\u7528 React.JS \u5be6\u73fe\u6c42\u56db\u820d\u4e94\u5165(round)\u529f\u80fd<\/h1>\n<p>React.JS \u662f\u4e00\u500b\u7528\u65bc\u69cb\u5efa\u7528\u6236\u754c\u9762\u7684 JavaScript \u5eab\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u69cb\u5efa\u51fa\u9ad8\u54c1\u8cea\u7684\u7528\u6236\u754c\u9762\u3002\u5728 React.JS \u4e2d\uff0c\u958b\u767c\u8005\u53ef\u4ee5\u4f7f\u7528 React List \u4f86\u5be6\u73fe\u6c42\u56db\u820d\u4e94\u5165(round)\u7684\u529f\u80fd\u3002<\/p>\n<h2>\u4ec0\u9ebc\u662f React List\uff1f<\/h2>\n<p>React List \u662f\u4e00\u500b React.JS \u7684\u7d44\u4ef6\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u69cb\u5efa\u51fa\u4e00\u500b\u53ef\u4ee5\u6c42\u56db\u820d\u4e94\u5165(round)\u7684\u5217\u8868\u3002\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u69cb\u5efa\u51fa\u4e00\u500b\u53ef\u4ee5\u6c42\u56db\u820d\u4e94\u5165(round)\u7684\u5217\u8868\uff0c\u4e26\u4e14\u53ef\u4ee5\u81ea\u5b9a\u7fa9\u6c42\u56db\u820d\u4e94\u5165(round)\u7684\u65b9\u5f0f\u3002<\/p>\n<h2>\u5982\u4f55\u4f7f\u7528 React List \u4f86\u5be6\u73fe\u6c42\u56db\u820d\u4e94\u5165(round)\u529f\u80fd\uff1f<\/h2>\n<p>\u4f7f\u7528 React List \u4f86\u5be6\u73fe\u6c42\u56db\u820d\u4e94\u5165(round)\u529f\u80fd\u975e\u5e38\u7c21\u55ae\uff0c\u53ea\u9700\u8981\u5728 React List \u4e2d\u6dfb\u52a0\u4e00\u500b round \u51fd\u6578\u5373\u53ef\u3002round \u51fd\u6578\u53ef\u4ee5\u63a5\u53d7\u4e00\u500b\u53c3\u6578\uff0c\u8a72\u53c3\u6578\u662f\u8981\u6c42\u56db\u820d\u4e94\u5165\u7684\u6578\u5b57\uff0c\u4e26\u4e14\u53ef\u4ee5\u81ea\u5b9a\u7fa9\u6c42\u56db\u820d\u4e94\u5165\u7684\u65b9\u5f0f\u3002<\/p>\n<pre class=\"brush: javascript\">\nfunction round(num) {\n  \/\/ \u81ea\u5b9a\u7fa9\u6c42\u56db\u820d\u4e94\u5165\u7684\u65b9\u5f0f\n  return Math.round(num);\n}\n\nReactList.add(round);\n<\/pre>\n<p>\u4e0a\u9762\u7684\u7a0b\u5f0f\u78bc\u4e2d\uff0c\u6211\u5011\u5b9a\u7fa9\u4e86\u4e00\u500b round \u51fd\u6578\uff0c\u8a72\u51fd\u6578\u53ef\u4ee5\u63a5\u53d7\u4e00\u500b\u53c3\u6578\uff0c\u8a72\u53c3\u6578\u662f\u8981\u6c42\u56db\u820d\u4e94\u5165\u7684\u6578\u5b57\uff0c\u4e26\u4e14\u53ef\u4ee5\u81ea\u5b9a\u7fa9\u6c42\u56db\u820d\u4e94\u5165\u7684\u65b9\u5f0f\u3002\u7136\u5f8c\uff0c\u6211\u5011\u5c07 round \u51fd\u6578\u6dfb\u52a0\u5230 React List \u4e2d\uff0c\u9019\u6a23\u5c31\u53ef\u4ee5\u4f7f\u7528 React List \u4f86\u5be6\u73fe\u6c42\u56db\u820d\u4e94\u5165(round)\u7684\u529f\u80fd\u4e86\u3002<\/p>\n<h2>\u7e3d\u7d50<\/h2>\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5011\u4ecb\u7d39\u4e86\u5982\u4f55\u4f7f\u7528 React List \u4f86\u5be6\u73fe\u6c42\u56db\u820d\u4e94\u5165(round)\u7684\u529f\u80fd\u3002React List \u662f\u4e00\u500b React.JS \u7684\u7d44\u4ef6\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u69cb\u5efa\u51fa\u4e00\u500b\u53ef\u4ee5\u6c42\u56db\u820d\u4e94\u5165(round)\u7684\u5217\u8868\u3002\u4f7f\u7528 React List \u4f86\u5be6\u73fe\u6c42\u56db\u820d\u4e94\u5165(round)\u529f\u80fd\u975e\u5e38\u7c21\u55ae\uff0c\u53ea\u9700\u8981\u5728 React List \u4e2d\u6dfb\u52a0\u4e00\u500b round \u51fd\u6578\u5373\u53ef\u3002<\/p>\n<p><!--more--><\/p>\n<h2>\u66f4\u591a\u5167\u5bb9<\/h2>\n<p>React List \u9084\u53ef\u4ee5\u7528\u65bc\u5be6\u73fe\u5176\u4ed6\u529f\u80fd\uff0c\u4f8b\u5982\u6392\u5e8f\u3001\u641c\u7d22\u3001\u5206\u9801\u7b49\u7b49\u3002\u5982\u679c\u4f60\u60f3\u4e86\u89e3\u66f4\u591a\u95dc\u65bc React List \u7684\u5167\u5bb9\uff0c\u8acb\u53c3\u8003 <a href=\"https:\/\/reactjs.org\/docs\/lists-and-keys.html\" target=\"_blank\" rel=\"noopener noreferrer\">React \u5b98\u65b9\u6587\u6a94<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6458\u8981\uff1a\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u4f7f\u7528React.JS\u5feb\u901f\u6c42\u53d6\u56db\u820d\u4e94\u5165\uff0c\u8a73\u7d30\u4ecb\u7d39\u4e86ReactList\u4e2dround()\u51fd\u6578\u7684\u529f\u80fd\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u5b83\u4f86\u6c42\u53d6\u56db\u820d\u4e94\u5165\u7684\u7d50\u679c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[184,183],"tags":[182,181],"class_list":["post-5735","post","type-post","status-publish","format-standard","hentry","category-react","category-react-js","tag-react","tag-react-js"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_shortlink":"https:\/\/wp.me\/pcFK27-1uv","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/comments?post=5735"}],"version-history":[{"count":1,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5735\/revisions"}],"predecessor-version":[{"id":5736,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5735\/revisions\/5736"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/media?parent=5735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/categories?post=5735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/tags?post=5735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}