{"id":33289,"date":"2024-11-25T17:07:00","date_gmt":"2024-11-25T09:07:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/33289\/"},"modified":"2024-11-25T17:07:00","modified_gmt":"2024-11-25T09:07:00","slug":"%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%bc%80%e5%8f%91%e7%bb%8f%e9%aa%8c%e7%9a%84%e6%80%bb%e7%bb%93","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/33289\/","title":{"rendered":"\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u7ecf\u9a8c\u7684\u603b\u7ed3"},"content":{"rendered":"<p><strong>\u4e00\u3001wxml<\/strong><\/p>\n<hr>\n<p><strong>1.1\uff1awx:if\u4e0ewx:else<\/strong><\/p>\n<p>\u524d\u7aef\u901a\u8fc7\u540e\u7aef\u7684\u63a5\u53e3\u83b7\u53d6\u4fe1\u606f\u5217\u8868\uff0c\u5982\u679c\u6709\u6570\u636e\u5219\u5c55\u793a\u6570\u636e\u5185\u5bb9\uff0c\u5426\u5219\u5219\u663e\u793a\u627e\u4e0d\u5230\u4fe1\u606f\u3002 \u5982\u679cif-else\u4f7f\u7528\u5e03\u5c14\u503c\u7684\u72b6\u6001\u4f5c\u8fd9\u4e2a\u5f00\u5173\u7684\u8bdd\uff0c\u9875\u9762\u4f1a\u5148\u51fa\u73b0false\u7684\u72b6\u6001\uff0c\u518d\u66f4\u65b0\u4e3atrue\uff0c\u5373\u95ea\u73b0\u627e\u4e0d\u5230\u4fe1\u606f\u7684\u5185\u5bb9\uff0c\u8fd9\u79cd\u4ea4\u4e92\u4e0d\u662f\u5f88\u7406\u60f3\u3002<\/p>\n<pre>&lt;view&gt;&lt;text&gt;\u8fd9\u662f\u4fe1\u606f\u5217\u8868&lt;\/text&gt;&lt;\/view&gt;&lt;view&gt;&lt;text&gt;\u627e\u4e0d\u5230\u4fe1\u606f&lt;\/text&gt;&lt;\/view&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6700\u597d\u7684\u505a\u6cd5\u662f\u4f7f\u7528\u4e0b\u9762\u8fd9\u79cd\uff0c\u4e00\u5f00\u59cb\u8bbe\u7f6einfo\u4e3anull,<\/p>\n<pre>data:{\n&nbsp;&nbsp;&nbsp;&nbsp;info:null\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>&lt;view&gt;&lt;text&gt;\u8fd9\u662f\u4fe1\u606f\u5217\u8868&lt;\/text&gt;&lt;\/view&gt;&lt;view&gt;&lt;text&gt;\u627e\u4e0d\u5230\u4fe1\u606f&lt;\/text&gt;&lt;\/view&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>1.2\uff1awx:for<\/strong><\/p>\n<p>for\u5faa\u73af\u8981\u6dfb\u52a0wx:for-item=&#8221;item&#8221; wx:key=&#8221;item&#8221;<\/p>\n<p><strong>1.3\uff1ablock\u6807\u7b7e<\/strong><\/p>\n<p>wx:if\u3001wx:for\u3001wx:else\u8fd9\u4e9b\u6ca1\u6709\u6837\u5f0f\u610f\u4e49\u7684\u8bed\u6cd5\u5c3d\u91cf\u4f7f\u7528block<\/p>\n<p><strong>1.4\uff1atemplate\u7ec4\u4ef6\u6a21\u677f<\/strong><\/p>\n<p>\u516c\u5171\u7684\u9875\u9762\u6a21\u5757\/\u7ec4\u4ef6\uff0c\u53ef\u76f4\u63a5\u5728wxml\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528import\u65b9\u5f0f\u3002\u5982\u679c\u6d89\u53ca\u5230css\uff0c\u9700\u8981\u5728wxss\u91cc@import\u5f15\u5165\u3002<\/p>\n<pre>\/**\n*&nbsp;\u65b9\u5f0f\u4e00\uff1a\u76f4\u63a5\u4f7f\u7528\n*&nbsp;1.&nbsp;\u7ed9template&nbsp;\u8bbe\u7f6ename\u5c5e\u6027\n*&nbsp;2.&nbsp;\u7ec4\u4ef6\u4f20\u8fc7\u6765\u7684\u503c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528&nbsp;&nbsp;hidden=\"{{!isloading}}\"\n*\/\n&lt;template&gt;\n&nbsp;&nbsp;&lt;view&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;view&gt;&lt;\/view&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;view&gt;\u6b63\u5728\u52a0\u8f7d&lt;\/view&gt;\n&nbsp;&nbsp;&lt;\/view&gt;&nbsp;\n&lt;\/template&gt;\n\n\/**&nbsp;\n*&nbsp;\u65b9\u5f0f\u4e8c\uff1a\u6309\u8def\u5f79\u5f15\u5165&nbsp;\n*&nbsp;1.&nbsp;is&nbsp;\u7b49\u540c\u65b9\u5f0f\u4e00\u7684name\n*&nbsp;2.&nbsp;data=\"{{isloading}}\"&nbsp;\u7ed9template\u7684\u6570\u636e\n*\/\n&lt;import&gt;&lt;\/import&gt;&lt;template&gt;&lt;\/template&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>1.5\uff1a\u811a\u672c\u8bed\u8a00wxs<\/strong><\/p>\n<p>\u4e13\u95e8\u8fd0\u884c\u4e8ewxml\u9875\u9762\u7684\u811a\u672c\u8bed\u8a00\uff0c\u4e0ejavascript\u4e0d\u540c\uff0c\u4e0d\u652f\u6301\u4f7f\u7528ES6\u8bed\u6cd5\uff0c\u4e5f\u4e0d\u80fd\u5f15\u7528js\u3002<\/p>\n<pre>&lt;wxs&gt;&lt;\/wxs&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>module.exports&nbsp;=&nbsp;{\n\t\/\/\u8f93\u51fa\u767e\u5206\u6bd4\n\tformatProgress:&nbsp;function&nbsp;(c,m)&nbsp;{\n\t\treturn&nbsp;c\/m*100\n\t}\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4e8c\u3001WXSS<\/strong><\/p>\n<hr>\n<p><strong>2.1\uff1a\u80cc\u666fIcon<\/strong><\/p>\n<p>\u5c0f\u7a0b\u5e8f\u7684 background \u91cc\u53ea\u80fd\u4f7f\u7528\u5b8c\u6574\u7684https\u56fe\u7247\u8def\u5f84\uff0c\u9879\u76ee\u4e2d\u4f7f\u7528icon\u7684\u65b9\u5f0f\uff1a<\/p>\n<ul>\n<li>\n<p>\u77e2\u91cf\u56fesvg\uff1a\u5177\u5907\u5b8c\u7f8e\u7684\u53ef\u4f38\u7f29\u6027\uff0c\u5bb9\u6613\u8fdb\u884c\u8c03\u6574\uff08\u989c\u8272\u3001\u5927\u5c0f\u7b49\uff09;<\/p>\n<\/li>\n<li>\n<p>data-uri\uff1a\u56fe\u7247\u4f53\u79ef\u5c0f\u4e8e20Kb\u4f7f\u7528base64\u65b9\u5f0f\u3002[\u524d\u7aef\u56fe\u7247\u6700\u4f18\u5316\u7684\u5f15\u5165\u65b9\u5f0f\u5206\u6790][segmentfault.com\/a\/119000001\u2026]<\/p>\n<\/li>\n<li>\n<p>\u8f83\u5927\u6587\u4ef6\uff1a\u76f4\u63a5\u5728wxml\u4f7f\u7528image\u6807\u7b7e<\/p>\n<\/li>\n<li>\n<p>\u5f15\u5165\u5916\u90e8icon\uff1a\u5982\u963f\u91cc\u5df4\u5df4\u77e2\u91cf\u56fe\u5e93\uff0c\u53ef\u4f7f\u7528\u7f51\u7edc\u8def\u5f84\u548c\u4e0b\u8f7d\u5230\u672c\u5730\u7684\u65b9\u5f0f\u6765\u4f7f\u7528\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>2.2\uff1a\u91cd\u7f6e\u6837\u5f0f<\/strong><\/p>\n<p><strong>2.3\uff1afont-family\u6807\u51c6\u89c4\u8303<\/strong><\/p>\n<pre>font-family:&nbsp;\n\/*\u897f\u6587\uff1a*\/\n-apple-system,BlinkMacSystemFont,Segoe&nbsp;UI,Roboto,Ubuntu,Helvetica&nbsp;Neue,Helvetica,Arial,\n\/*\u4e2d\u6587\uff1a*\/\nPingFang&nbsp;SC,Hiragino&nbsp;Sans&nbsp;GB,Microsoft&nbsp;YaHei&nbsp;UI,Microsoft&nbsp;YaHei,Source&nbsp;Han&nbsp;Sans&nbsp;CN,sans-serif;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2.4\uff1a\u5408\u7406\u4f7f\u7528rpx\u5355\u4f4d<\/strong><\/p>\n<ul>\n<li>\n<p>rpx \u662f\u4e00\u4e2a\u76f8\u5f53\u4e8e\u5c4f\u5e55\u5bbd\u5ea6\u767e\u5206\u6bd4\u7684\u76f8\u5bf9\u5355\u4f4d\uff0c\u4ee5\u4e0b\u60c5\u51b5\u4e0d\u5efa\u8bae\u4f7f\u7528\uff1a<\/p>\n<\/li>\n<li>\n<p>font-size\u548cborder-width\uff1banimation\u52a8\u753b\u4e2d\u6d89\u53catranslate\u4f4d\u79fb\uff1a\u90e8\u5206\u673a\u5668\u5728rpx\u8f6c\u6210px\u51fa\u73b0\u5c0f\u6570\u65f6\uff0c\u5982262.89px\uff0c\u5fae\u4fe1\u4f1a\u5411\u4e0b\u53d6\u503c\u4e3a262px\uff0c\u4ea7\u751f1px\u7684\u5dee\u8ddd\u3002<\/p>\n<\/li>\n<li>\n<p>canvas\u7ed8\u56fe\uff0c\u6bd4\u5982\u4e8c\u7ef4\u7801\u3001\u5206\u4eab\u56fe\u7247\u7b49\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u4e09\u3001JavaScript<\/strong><\/p>\n<hr>\n<p><strong>3.1\uff1a\u4e8c\u6b21\u5c01\u88c5wx.request\u65b9\u6cd5<\/strong><\/p>\n<p><strong>3.2\uff1a\u9875\u9762\u7684\u751f\u547d\u5468\u671f<\/strong><\/p>\n<ul>\n<li>\n<p>onLoad: \u9875\u9762\u52a0\u8f7d\uff0c\u4e00\u4e2a\u9875\u9762\u53ea\u4f1a\u8c03\u7528\u4e00\u6b21\u3002\u80fd\u83b7\u5f97\u5230\u9875\u9762\u53c2\u6570options\u3002<\/p>\n<\/li>\n<li>\n<p>onShow: \u9875\u9762\u663e\u793a\uff0c\u6bcf\u6b21\u6253\u5f00\u9875\u9762\u90fd\u4f1a\u8c03\u7528\u4e00\u6b21\uff0c\u4ece\u540e\u53f0\u5207\u6362\u524d\u53f0\u4e5f\u4f1a\u8c03\u7528\u4e00\u6b21\uff1a\u624b\u673a\u4ece\u7184\u5c4f\u5207\u56de\u663e\u5c4f\u3001\u4ece\u6700\u5c0f\u5316\u56de\u5230\u6700\u5927\u5316\u3002<\/p>\n<\/li>\n<li>\n<p>onReady: \u9875\u9762\u521d\u6b21\u6e32\u67d3\u5b8c\u6210\uff0c\u4e00\u4e2a\u9875\u9762\u53ea\u4f1a\u8c03\u7528\u4e00\u6b21\uff0c\u4ee3\u8868\u9875\u9762\u5df2\u7ecf\u51c6\u5907\u59a5\u5f53\uff0c\u53ef\u4ee5\u548c\u89c6\u56fe\u5c42\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<\/li>\n<li>\n<p>onHide: \u9875\u9762\u5207\u6362\u5230\u540e\u53f0\u3001navigateTo \u3001 tab \u5207\u6362\u65f6\u8c03\u7528\u3002<\/p>\n<\/li>\n<li>\n<p>onUnload: \u9875\u9762\u5378\u8f7d\u3002\u5f53\u9875\u9762\u88ab\u5173\u95ed\u6216\u5185\u5b58\u4e0d\u8db3\u4e3b\u52a8\u9500\u6bc1\u9875\u9762\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>3.3\uff1a new Date\u517c\u5bb9\u6027<\/strong><\/p>\n<p>\u5b89\u5353\u80fd\u8bc6\u522bnew Date(&#8220;2018-05-30 00:00:00&#8221;)\u683c\u5f0f\uff0c\u4f46\u5728IOS\u53ea\u80fd\u8bc6\u522b2018\/05\/30 00:00:00\u683c\u5f0f\u3002\u9700\u8981\u5c06\u77ed\u6a2a\u66ff\u6362\u4e3a\u659c\u6760\u3002var iosDate= date.replace(\/-\/g, &#8216;\/&#8217;)\u3002<\/p>\n<p><strong>3.4\uff1a\u5192\u6ce1\u4e8b\u4ef6<\/strong><\/p>\n<ul>\n<li>\n<p>bindtap \uff1a\u4e8b\u4ef6\u7ed1\u5b9a\u4e0d\u4f1a\u963b\u6b62\u5192\u6ce1\u4e8b\u4ef6\u5411\u4e0a\u5192\u6ce1<\/p>\n<\/li>\n<li>\n<p>catchtap\uff1a\u4e8b\u4ef6\u7ed1\u5b9a\u53ef\u4ee5\u963b\u6b62\u5192\u6ce1\u4e8b\u4ef6\u5411\u4e0a\u5192\u6ce1<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u56db\u3001\u5c0f\u7a0b\u5e8f\u529f\u80fd<\/strong><\/p>\n<hr>\n<p><strong>4.1\uff1acanvas\u751f\u6210\u56fe\u7247<\/strong><\/p>\n<p><strong>4.2\uff1a\u63d2\u4ef6\u7684\u4f7f\u7528<\/strong><\/p>\n<p><strong>4.3\uff1a\u9875\u9762\u6808\u9650\u5236<\/strong><\/p>\n<p>\u5c0f\u7a0b\u5e8f\u7684\u9875\u9762\u6808\u6700\u65b0\u7248\u672c\u9650\u5236\u4e3a10\u4e2a\uff0c\u8d85\u8fc710\u4e2a\u4e4b\u540e\u65e0\u6cd5\u8fdb\u5165\u4e0b\u4e00\u4e2a\u9875\u9762\u3002<\/p>\n<p>\u6545\u8981\u614e\u7528\u9875\u9762\u6570\u91cf\uff0c\u5bfc\u822aAPI\u8981\u7075\u6d3b\u7ed3\u5408wx.navigateTo\u3001wx.redirectTo\u3001wx.navigateBack<\/p>\n<p><strong>4.4\uff1a\u63d0\u793a\u5f39\u7a97Dialog<\/strong><\/p>\n<ul>\n<li>\n<p>\u4ee3\u7801\u524d\u9762\u4f7f\u7528wx.hideLoading\u4f1a\u5bfc\u81f4\u540e\u9762\u7684wx.showToast\u51fa\u4e0d\u6765\u3002\u56e0\u4e3awx.showToast\u5177\u5907\u9690\u85cfwx.showLoading()\u63d0\u793a\u6846\u7684\u529f\u80fd\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u4e94\u3001\u5176\u5b83<\/strong><\/p>\n<hr>\n<p><strong>5.1\uff1a\u4e3b\u6d41\u6846\u67b6<\/strong><\/p>\n<ul>\n<li>\n<p>mpvue\uff1a\u4f7f\u7528vue\u8bed\u6cd5\u89c4\u8303\u7f16\u8bd1\u6210\u5c0f\u7a0b\u5e8f\u548ch5\u8bed\u6cd5<\/p>\n<\/li>\n<li>\n<p>Taro\uff1a\u57fa\u4e8ereact\u53ef\u540c\u65f6\u7f16\u8bd1\u6210\u5c0f\u7a0b\u5e8f\u3001h5\u3001react-native\u7b49\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>5.2\uff1a\u5e38\u7528\u63d2\u4ef6<\/strong><\/p>\n<ul>\n<li>\n<p>wxParse\uff1a\u5bcc\u6587\u672c\u89e3\u6790<\/p>\n<\/li>\n<li>\n<p>wx-charts\uff1a\u56fe\u8868\u5de5\u5177<\/p>\n<\/li>\n<li>\n<p>wxapp-qrcode\uff1a\u4e8c\u7ef4\u7801\u751f\u6210\u5668<\/p>\n<\/li>\n<\/ul>\n<p>\u63a8\u8350\u6559\u7a0b\uff1a\u300a\u300b<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u7ecf\u9a8c\u7684\u603b\u7ed3\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>\u4e00\u3001wxml 1.1\uff1awx:if\u4e0ewx:else \u524d\u7aef\u901a\u8fc7\u540e\u7aef\u7684\u63a5\u53e3\u83b7\u53d6\u4fe1\u606f\u5217\u8868\uff0c\u5982\u679c\u6709\u6570\u636e\u5219\u5c55\u793a\u6570\u636e\u5185\u5bb9\uff0c\u5426\u5219\u5219\u663e\u793a\u627e\u4e0d\u5230\u4fe1\u606f\u3002 \u5982\u679cif-else\u4f7f\u7528\u5e03\u5c14\u503c\u7684\u72b6\u6001\u4f5c\u8fd9\u4e2a\u5f00\u5173\u7684\u8bdd\uff0c\u9875\u9762\u4f1a\u5148\u51fa\u73b0false\u7684\u72b6\u6001\uff0c\u518d\u66f4\u65b0\u4e3atrue\uff0c\u5373\u95ea\u73b0\u627e\u4e0d\u5230\u4fe1\u606f\u7684\u5185\u5bb9\uff0c\u8fd9\u79cd\u4ea4\u4e92\u4e0d\u662f\u5f88\u7406\u60f3\u3002 &lt;view&gt;&lt;text&gt;\u8fd9\u662f\u4fe1\u606f\u5217\u8868&lt;\/text&gt;&lt;\/view&gt;&lt;view&gt;&lt;text&gt;\u627e\u4e0d\u5230\u4fe1\u606f&lt;\/text&gt;&lt;\/view&gt; \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \u6700\u597d\u7684\u505a\u6cd5\u662f\u4f7f\u7528\u4e0b\u9762\u8fd9\u79cd\uff0c\u4e00\u5f00\u59cb\u8bbe\u7f6einfo\u4e3anull, data:{ &nbsp;&nbsp;&nbsp;&nbsp;info:null } \u767b\u5f55\u540e\u590d\u5236 &lt;view&gt;&lt;text&gt;\u8fd9\u662f\u4fe1\u606f\u5217\u8868&lt;\/text&gt;&lt;\/view&gt;&lt;view&gt;&lt;text&gt;\u627e\u4e0d\u5230\u4fe1\u606f&lt;\/text&gt;&lt;\/view&gt; \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 1.2\uff1awx:for for\u5faa\u73af\u8981\u6dfb\u52a0wx:for-item=&#8221;item&#8221; wx:key=&#8221;item&#8221; 1.3\uff1ablock\u6807\u7b7e wx:if\u3001wx:for\u3001wx:else\u8fd9\u4e9b\u6ca1\u6709\u6837\u5f0f\u610f\u4e49\u7684\u8bed\u6cd5\u5c3d\u91cf\u4f7f\u7528block 1.4\uff1atemplate\u7ec4\u4ef6\u6a21\u677f \u516c\u5171\u7684\u9875\u9762\u6a21\u5757\/\u7ec4\u4ef6\uff0c\u53ef\u76f4\u63a5\u5728wxml\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528import\u65b9\u5f0f\u3002\u5982\u679c\u6d89\u53ca\u5230css\uff0c\u9700\u8981\u5728wxss\u91cc@import\u5f15\u5165\u3002 \/** *&nbsp;\u65b9\u5f0f\u4e00\uff1a\u76f4\u63a5\u4f7f\u7528 *&nbsp;1.&nbsp;\u7ed9template&nbsp;\u8bbe\u7f6ename\u5c5e\u6027 *&nbsp;2.&nbsp;\u7ec4\u4ef6\u4f20\u8fc7\u6765\u7684\u503c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528&nbsp;&nbsp;hidden=&#8221;{{!isloading}}&#8221; *\/ &lt;template&gt; &nbsp;&nbsp;&lt;view&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;view&gt;&lt;\/view&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;view&gt;\u6b63\u5728\u52a0\u8f7d&lt;\/view&gt; &nbsp;&nbsp;&lt;\/view&gt;&nbsp; &lt;\/template&gt; \/**&nbsp; *&nbsp;\u65b9\u5f0f\u4e8c\uff1a\u6309\u8def\u5f79\u5f15\u5165&nbsp; *&nbsp;1.&nbsp;is&nbsp;\u7b49\u540c\u65b9\u5f0f\u4e00\u7684name *&nbsp;2.&nbsp;data=&#8221;{{isloading}}&#8221;&nbsp;\u7ed9template\u7684\u6570\u636e *\/ &lt;import&gt;&lt;\/import&gt;&lt;template&gt;&lt;\/template&gt; \u767b\u5f55\u540e\u590d\u5236 1.5\uff1a\u811a\u672c\u8bed\u8a00wxs \u4e13\u95e8\u8fd0\u884c\u4e8ewxml\u9875\u9762\u7684\u811a\u672c\u8bed\u8a00\uff0c\u4e0ejavascript\u4e0d\u540c\uff0c\u4e0d\u652f\u6301\u4f7f\u7528ES6\u8bed\u6cd5\uff0c\u4e5f\u4e0d\u80fd\u5f15\u7528js\u3002 &lt;wxs&gt;&lt;\/wxs&gt; \u767b\u5f55\u540e\u590d\u5236 module.exports&nbsp;=&nbsp;{ \/\/\u8f93\u51fa\u767e\u5206\u6bd4 formatProgress:&nbsp;function&nbsp;(c,m)&nbsp;{ return&nbsp;c\/m*100 } } \u767b\u5f55\u540e\u590d\u5236 \u4e8c\u3001WXSS 2.1\uff1a\u80cc\u666fIcon \u5c0f\u7a0b\u5e8f\u7684 background [&hellip;]<\/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-33289","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33289","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=33289"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33289\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=33289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=33289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=33289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}