{"id":29860,"date":"2024-11-25T08:03:28","date_gmt":"2024-11-25T00:03:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29860\/"},"modified":"2024-11-25T08:03:28","modified_gmt":"2024-11-25T00:03:28","slug":"%e6%95%99%e4%bd%a0%e5%81%9a%e4%b8%80%e4%b8%aa%e5%bc%80%e6%ba%90%e7%9a%84%e5%b0%8f%e7%a8%8b%e5%ba%8f%e8%ae%a1%e7%ae%97%e5%99%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29860\/","title":{"rendered":"\u6559\u4f60\u505a\u4e00\u4e2a\u5f00\u6e90\u7684\u5c0f\u7a0b\u5e8f\u8ba1\u7b97\u5668"},"content":{"rendered":"<p>\u8fd9\u662f\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u65b0\u624b\u7ec3\u4e60\u7684\u9879\u76ee\uff08\u57fa\u4e8e\u5fae\u4fe1quick demo\u6539\u5199\uff09\uff0c\u505a\u4e86\u4e00\u4e2a\u8ba1\u7b97\u5668\u3002\u6709\u57fa\u672c\u7684ui\uff0c\u6709\u57fa\u672c\u7684\u8df3\u8f6c\u53ca\u7b80\u5355\u7684js\u903b\u8f91\uff0c\u5f88\u9002\u5408\u521d\u5b66\u8005\u9605\u8bfb\u3002<\/p>\n<p>\u8bfb\u522b\u4eba\u7684\u4ee3\u7801\uff0c\u5c31\u662f\u5f52\u6574\u81ea\u5df1\u7684\u7f16\u7a0b\u6280\u80fd\u3002<\/p>\n<p>\u6d89\u53ca\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u76f8\u5173\u77e5\u8bc6\uff1a<\/p>\n<p>1\u3001CSS Flexbox\u5e03\u5c40<\/p>\n<p>2\u3001\u4e8b\u4ef6\u7ed1\u5b9a\u3001\u9875\u9762\u8df3\u8f6c<\/p>\n<p>3\u3001Page\u3001window\u3001App\u5168\u5c40\u8bbe\u7f6e<\/p>\n<p>4\u3001wxml\u3001wxsss\u3001js\u3001json\u6587\u4ef6\u4f7f\u7528\u65b9\u6cd5<\/p>\n<p>5\u3001view\u3001text\u3001icon\u3001button\u7ec4\u4ef6\u4f7f\u7528\u65b9\u6cd5<\/p>\n<p>6\u3001navigate\u3001wx.setStorageSync\u3001\u6570\u636e\u7ed1\u5b9a\u7b49API<\/p>\n<p>Setup<\/p>\n<p>1\u3001Clone the repo<\/p>\n<pre>$&nbsp;git&nbsp;clone&nbsp;github.com\/dunizb\/wxapp-sCalc.git<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>2\u3001Import to Wechat DEV Tools<\/p>\n<p>\u628a\u9879\u76ee\u5bfc\u5165\u5230\u5fae\u4fe1\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u5373\u53ef<\/p>\n<p>\u7f16\u8005\u6ce8\uff1a\u6e90\u7801\u4e2d\u6709\u4e24\u70b9\u503c\u5f97\u6ce8\u610f\u2014\u2014<\/p>\n<p>1\uff0c\u4f5c\u8005\u5e76\u6ca1\u6709\u7ed9\u6bcf\u4e00\u4e2a\u8ba1\u7b97\u5668\u6309\u94ae\u7ed1\u5b9a\u4e00\u4e2a\u4e8b\u4ef6\u51fd\u6570\uff0c\u7edf\u4e00\u7ed1\u5b9a\u4e8eblickBtn\u8fd9\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u901a\u8fc7id\u4e0ee.target.id\u6765\u5206\u522b\u7528\u6237\u70b9\u51fb\u7684\u662f\u54ea\u4e00\u4e2a\u6309\u94ae\uff0c\u5e76\u4e14\u4f5c\u8005\u76f4\u63a5\u7528\u4e86\u8ba1\u7b97\u6309\u94ae\u7684\u5c4f\u663e\u6570\u5b57\u505a\u4e86id\uff0c\u7b80\u5355\u76f4\u63a5<\/p>\n<p>2\uff0c\u5355\u51fb\u6309\u94ae\u65f6\u6709\u4e00\u4e2a\u7ea2\u8272\u7684\u9ad8\u4eae\u6548\u679c\uff0c\u8be5\u6548\u679c\u662f\u901a\u8fc7css\u5b9e\u73b0\u7684\uff1a<\/p>\n<pre>.item:active&nbsp;{\r\nbackground-color:&nbsp;#ff0000;\r\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e00\u884c\u7b80\u5355\u7684\u4ee3\u7801\uff0c\u5c31\u4f7fUE\u4f53\u9a8c\u4e0a\u5347\u4e86\u4e0d\u5c11\u3002\u503c\u5f97\u5b66\u4e60~<\/p>\n<p>\u53e6\u5916\uff0c\u518d\u5206\u4eab\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u6e38\u620f\uff0c\u867d\u8bf4\u5fae\u4fe1\u5b98\u65b9\u7981\u6b62\u5c0f\u6e38\u620f\u4e0a\u67b6\uff0c\u4f46\u662f\u8c01\u53c8\u80fd\u963b\u6b62\u5b66\u4e60\u8005\u7684\u811a\u6b65\u5462\u3002\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u6587\u6863\u4e2d\u90a3\u4e9b\u7ed8\u56feAPI\u4e0e\u52a8\u753bAPI\uff0c\u53ef\u80fd\u4e5f\u662f\u4e3a\u5c06\u6765\u505a\u6e38\u620f\u51c6\u5907\u7684\u3002<\/p>\n<p>github.com\/natee\/wxapp-2048<\/p>\n<p>\u8fd9\u4e2a\u4e00\u4e2a2048\u6e38\u620f\uff0c\u5982\u679c\u559c\u6b22\u8ba1\u7b97\u5668\u98ce\u683c\u7684demo\uff0c\u8fd9\u4e2a\u53ef\u80fd\u4f60\u4e5f\u4f1a\u559c\u6b22\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u6559\u4f60\u505a\u4e00\u4e2a\u5f00\u6e90\u7684\u5c0f\u7a0b\u5e8f\u8ba1\u7b97\u5668\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>\u8fd9\u662f\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u65b0\u624b\u7ec3\u4e60\u7684\u9879\u76ee\uff08\u57fa\u4e8e\u5fae\u4fe1quick demo\u6539\u5199\uff09\uff0c\u505a\u4e86\u4e00\u4e2a\u8ba1\u7b97\u5668\u3002\u6709\u57fa\u672c\u7684ui\uff0c\u6709\u57fa\u672c\u7684\u8df3\u8f6c\u53ca\u7b80\u5355\u7684js\u903b\u8f91\uff0c\u5f88\u9002\u5408\u521d\u5b66\u8005\u9605\u8bfb\u3002 \u8bfb\u522b\u4eba\u7684\u4ee3\u7801\uff0c\u5c31\u662f\u5f52\u6574\u81ea\u5df1\u7684\u7f16\u7a0b\u6280\u80fd\u3002 \u6d89\u53ca\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u76f8\u5173\u77e5\u8bc6\uff1a 1\u3001CSS Flexbox\u5e03\u5c40 2\u3001\u4e8b\u4ef6\u7ed1\u5b9a\u3001\u9875\u9762\u8df3\u8f6c 3\u3001Page\u3001window\u3001App\u5168\u5c40\u8bbe\u7f6e 4\u3001wxml\u3001wxsss\u3001js\u3001json\u6587\u4ef6\u4f7f\u7528\u65b9\u6cd5 5\u3001view\u3001text\u3001icon\u3001button\u7ec4\u4ef6\u4f7f\u7528\u65b9\u6cd5 6\u3001navigate\u3001wx.setStorageSync\u3001\u6570\u636e\u7ed1\u5b9a\u7b49API Setup 1\u3001Clone the repo $&nbsp;git&nbsp;clone&nbsp;github.com\/dunizb\/wxapp-sCalc.git \u767b\u5f55\u540e\u590d\u5236 2\u3001Import to Wechat DEV Tools \u628a\u9879\u76ee\u5bfc\u5165\u5230\u5fae\u4fe1\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u5373\u53ef \u7f16\u8005\u6ce8\uff1a\u6e90\u7801\u4e2d\u6709\u4e24\u70b9\u503c\u5f97\u6ce8\u610f\u2014\u2014 1\uff0c\u4f5c\u8005\u5e76\u6ca1\u6709\u7ed9\u6bcf\u4e00\u4e2a\u8ba1\u7b97\u5668\u6309\u94ae\u7ed1\u5b9a\u4e00\u4e2a\u4e8b\u4ef6\u51fd\u6570\uff0c\u7edf\u4e00\u7ed1\u5b9a\u4e8eblickBtn\u8fd9\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u901a\u8fc7id\u4e0ee.target.id\u6765\u5206\u522b\u7528\u6237\u70b9\u51fb\u7684\u662f\u54ea\u4e00\u4e2a\u6309\u94ae\uff0c\u5e76\u4e14\u4f5c\u8005\u76f4\u63a5\u7528\u4e86\u8ba1\u7b97\u6309\u94ae\u7684\u5c4f\u663e\u6570\u5b57\u505a\u4e86id\uff0c\u7b80\u5355\u76f4\u63a5 2\uff0c\u5355\u51fb\u6309\u94ae\u65f6\u6709\u4e00\u4e2a\u7ea2\u8272\u7684\u9ad8\u4eae\u6548\u679c\uff0c\u8be5\u6548\u679c\u662f\u901a\u8fc7css\u5b9e\u73b0\u7684\uff1a .item:active&nbsp;{ background-color:&nbsp;#ff0000; } \u767b\u5f55\u540e\u590d\u5236 \u4e00\u884c\u7b80\u5355\u7684\u4ee3\u7801\uff0c\u5c31\u4f7fUE\u4f53\u9a8c\u4e0a\u5347\u4e86\u4e0d\u5c11\u3002\u503c\u5f97\u5b66\u4e60~ \u53e6\u5916\uff0c\u518d\u5206\u4eab\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u6e38\u620f\uff0c\u867d\u8bf4\u5fae\u4fe1\u5b98\u65b9\u7981\u6b62\u5c0f\u6e38\u620f\u4e0a\u67b6\uff0c\u4f46\u662f\u8c01\u53c8\u80fd\u963b\u6b62\u5b66\u4e60\u8005\u7684\u811a\u6b65\u5462\u3002\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u6587\u6863\u4e2d\u90a3\u4e9b\u7ed8\u56feAPI\u4e0e\u52a8\u753bAPI\uff0c\u53ef\u80fd\u4e5f\u662f\u4e3a\u5c06\u6765\u505a\u6e38\u620f\u51c6\u5907\u7684\u3002 github.com\/natee\/wxapp-2048 \u8fd9\u4e2a\u4e00\u4e2a2048\u6e38\u620f\uff0c\u5982\u679c\u559c\u6b22\u8ba1\u7b97\u5668\u98ce\u683c\u7684demo\uff0c\u8fd9\u4e2a\u53ef\u80fd\u4f60\u4e5f\u4f1a\u559c\u6b22\u3002 \u4ee5\u4e0a\u5c31\u662f\u6559\u4f60\u505a\u4e00\u4e2a\u5f00\u6e90\u7684\u5c0f\u7a0b\u5e8f\u8ba1\u7b97\u5668\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-29860","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29860","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=29860"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29860\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}