{"id":6512,"date":"2023-01-08T21:25:53","date_gmt":"2023-01-08T13:25:53","guid":{"rendered":"https:\/\/badgameshow.com\/steven\/?p=6512"},"modified":"2023-01-08T21:25:53","modified_gmt":"2023-01-08T13:25:53","slug":"%e5%ad%b8%e7%bf%92%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8react-js%e6%b1%82%e5%8f%96%e7%99%be%e5%88%86%e4%bd%8d%e6%95%b8-2","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/steven\/react-js\/%e5%ad%b8%e7%bf%92%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8react-js%e6%b1%82%e5%8f%96%e7%99%be%e5%88%86%e4%bd%8d%e6%95%b8-2\/","title":{"rendered":"\u5b78\u7fd2\u5982\u4f55\u4f7f\u7528React.JS\u6c42\u53d6\u767e\u5206\u4f4d\u6578"},"content":{"rendered":"<p><meta name=\"keywords\" content=\"React, React List, \u767e\u5206\u4f4d\u6570, percentiles\"><\/p>\n<h1>\u4f7f\u7528 React.JS \u6c42\u767e\u5206\u4f4d\u6570(percentiles)<\/h1>\n<p>React.JS \u662f\u4e00\u500b\u7528\u65bc\u69cb\u5efa\u7528\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u7684 JavaScript \u6846\u67b6\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u69cb\u5efa\u51fa\u9ad8\u54c1\u8cea\u7684\u7528\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u3002React List \u662f React.JS \u7684\u4e00\u500b\u6a21\u7d44\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u6c42\u51fa\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\u3002<\/p>\n<h2>\u4ec0\u9ebc\u662f\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\uff1f<\/h2>\n<p>\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\u662f\u4e00\u7a2e\u7d71\u8a08\u6307\u6a19\uff0c\u5b83\u53ef\u4ee5\u7528\u4f86\u8861\u91cf\u4e00\u500b\u6578\u64da\u96c6\u4e2d\u7684\u67d0\u500b\u503c\u5728\u6574\u500b\u6578\u64da\u96c6\u4e2d\u7684\u4f4d\u7f6e\u3002\u5b83\u53ef\u4ee5\u7528\u4f86\u6bd4\u8f03\u4e0d\u540c\u6578\u64da\u96c6\u4e2d\u7684\u503c\uff0c\u6216\u8005\u7528\u4f86\u6bd4\u8f03\u540c\u4e00\u6578\u64da\u96c6\u4e2d\u7684\u503c\u3002<\/p>\n<h2>React List \u7684\u6c42\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09<\/h2>\n<p>React List \u662f\u4e00\u500b\u7528\u65bc\u69cb\u5efa\u7528\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u7684 JavaScript \u6846\u67b6\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u69cb\u5efa\u51fa\u9ad8\u54c1\u8cea\u7684\u7528\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u3002React List \u63d0\u4f9b\u4e86\u4e00\u500b\u7c21\u55ae\u7684 API\uff0c\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u6c42\u51fa\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\u3002<\/p>\n<p>React List \u7684\u6c42\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\u7684 API \u5982\u4e0b\uff1a<\/p>\n<pre class=\"brush: javascript\">\n\/\/ \u5c07\u6578\u64da\u96c6\u8f49\u63db\u70ba React List\nconst list = React.List(data);\n\n\/\/ \u6c42\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\nconst percentile = list.percentile(percent);\n<\/pre>\n<p>\u4e0a\u9762\u7684\u4ee3\u78bc\u4e2d\uff0c<code>data<\/code> \u662f\u4e00\u500b\u6578\u64da\u96c6\uff0c<code>percent<\/code> \u662f\u8981\u6c42\u7684\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\uff0c<code>percentile<\/code> \u662f\u6c42\u51fa\u7684\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\u3002<\/p>\n<h2>\u7e3d\u7d50<\/h2>\n<p>React List \u662f\u4e00\u500b\u7528\u65bc\u69cb\u5efa\u7528\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u7684 JavaScript \u6846\u67b6\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u69cb\u5efa\u51fa\u9ad8\u54c1\u8cea\u7684\u7528\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u3002React List \u63d0\u4f9b\u4e86\u4e00\u500b\u7c21\u55ae\u7684 API\uff0c\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u6c42\u51fa\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\u3002\u4f7f\u7528 React List \u53ef\u4ee5\u8b93\u958b\u767c\u8005\u5feb\u901f\u6c42\u51fa\u767e\u5206\u4f4d\u6578\uff08percentiles\uff09\uff0c\u63d0\u9ad8\u958b\u767c\u6548\u7387\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6458\u8981\uff1a\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u4f7f\u7528React.JS\u6c42\u53d6\u767e\u5206\u4f4d\u6578\uff0c\u4e26\u63d0\u4f9b\u4e00\u4e9b\u7c21\u55ae\u7684\u7bc4\u4f8b\u4f86\u89e3\u91cb\u5982\u4f55\u4f7f\u7528ReactList\u7d44\u4ef6\u4f86\u6c42\u53d6\u767e\u5206\u4f4d\u6578\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-6512","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-1H2","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6512","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=6512"}],"version-history":[{"count":1,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6512\/revisions"}],"predecessor-version":[{"id":6513,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6512\/revisions\/6513"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/media?parent=6512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/categories?post=6512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/tags?post=6512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}