{"id":29175,"date":"2024-11-25T14:30:11","date_gmt":"2024-11-25T06:30:11","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29175\/"},"modified":"2024-11-25T14:30:11","modified_gmt":"2024-11-25T06:30:11","slug":"%e8%a7%a3%e8%af%bb%e5%92%8c%e5%88%86%e6%9e%90%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e7%bb%84%e4%bb%b6%ef%bc%9a%e4%ba%94%e3%80%81text%e6%96%87%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29175\/","title":{"rendered":"\u89e3\u8bfb\u548c\u5206\u6790\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7ec4\u4ef6\uff1a\u4e94\u3001text\u6587\u672c"},"content":{"rendered":"<p><strong><span style=\"color:#001000\"><span style=\"font-size:13px\">text\u6587\u672c<\/span><\/span><span style=\"color:#333333\"><span style=\"font-size:13px\">\u7ec4\u4ef6\u8bf4\u660e:<\/span><\/span><\/strong><\/p>\n<p style=\"line-height:20px;text-indent:nullem;text-align:left\"><span style=\"color:#333333\"><span style=\"font-family:\"><span style=\"font-size:13px\">text \u6587\u672c\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e2d\u663e\u793a\u51fa\u6765\u7684\u6587\u672c\u3002<\/span><\/span><\/span><\/p>\n<p style=\"line-height:20px;text-indent:nullem;text-align:left\"><span style=\"color:#333333\">\u4e0b\u9762\u662fWXML\u4ee3\u7801\uff1a<\/span><\/p>\n<p style=\"font-size:12px\">[XML] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>&lt;view&gt;&lt;text&gt;\u6211\u662f\u6587\u672c\u7ec4\u4ef6&lt;\/text&gt;&lt;\/view&gt;&lt;text&gt;{{text}}&lt;\/text&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e0b\u9762\u662fJS\u4ee3\u7801\uff1a<\/p>\n<p style=\"font-size:12px\">[JavaScript] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>Page({\r\n\/**\r\n&nbsp;&nbsp;*&nbsp;\u521d\u59cb\u5316\u6570\u636e\r\n&nbsp;&nbsp;*\/\r\ndata:{\r\ntext:\"\u6211\u662f\u5728js\u6587\u4ef6\u4e2d\u7ed1\u5b9a\u7684\u6587\u672c\"\r\n},\r\nonLoad:function(options){\r\n\/\/&nbsp;\u9875\u9762\u521d\u59cb\u5316&nbsp;options\u4e3a\u9875\u9762\u8df3\u8f6c\u6240\u5e26\u6765\u7684\u53c2\u6570\r\n},\r\nonReady:function(){\r\n\/\/&nbsp;\u9875\u9762\u6e32\u67d3\u5b8c\u6210\r\n},\r\nonShow:function(){\r\n\/\/&nbsp;\u9875\u9762\u663e\u793a\r\n},\r\nonHide:function(){\r\n\/\/&nbsp;\u9875\u9762\u9690\u85cf\r\n},\r\nonUnload:function(){\r\n\/\/&nbsp;\u9875\u9762\u5173\u95ed\r\n}\r\n})<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p><strong><span style=\"color:#001000\"><span style=\"font-size:13px\">text\u6587\u672c\u7684<\/span><\/span><span style=\"color:#333333\"><span style=\"font-size:13px\">\u4e3b\u8981\u5c5e\u6027\uff1a<\/span><\/span><\/strong><\/p>\n<table style=\"width:98%\">\n<tbody>\n<tr>\n<td>\n<p style=\"text-align:left\">\u5c5e\u6027<\/p>\n<\/td>\n<td>\n<p style=\"text-align:left\">\u63cf\u8ff0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>font-size<\/td>\n<td>\u5b57\u4f53\u5927\u5c0f<\/td>\n<\/tr>\n<tr>\n<td>color<\/td>\n<td>\u5b57\u4f53\u989c\u8272<\/td>\n<\/tr>\n<tr>\n<td>font-style<\/td>\n<td>\u5b57\u4f53\u6837\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>margin-top<\/td>\n<td>\u5b57\u4f53\u4e0a\u8fb9\u8ddd<\/td>\n<\/tr>\n<tr>\n<td>margin-bottom<\/td>\n<td>\u5b57\u4f53\u4e0b\u8fb9\u8ddd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ee5\u4e0a\u5c31\u662f\u89e3\u8bfb\u548c\u5206\u6790\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7ec4\u4ef6\uff1a\u4e94\u3001text\u6587\u672c\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>text\u6587\u672c\u7ec4\u4ef6\u8bf4\u660e: text \u6587\u672c\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e2d\u663e\u793a\u51fa\u6765\u7684\u6587\u672c\u3002 \u4e0b\u9762\u662fWXML\u4ee3\u7801\uff1a [XML] \u7eaf\u6587\u672c\u67e5\u770b \u590d\u5236\u4ee3\u7801 &lt;view&gt;&lt;text&gt;\u6211\u662f\u6587\u672c\u7ec4\u4ef6&lt;\/text&gt;&lt;\/view&gt;&lt;text&gt;{{text}}&lt;\/text&gt; \u767b\u5f55\u540e\u590d\u5236 \u4e0b\u9762\u662fJS\u4ee3\u7801\uff1a [JavaScript] \u7eaf\u6587\u672c\u67e5\u770b \u590d\u5236\u4ee3\u7801 Page({ \/** &nbsp;&nbsp;*&nbsp;\u521d\u59cb\u5316\u6570\u636e &nbsp;&nbsp;*\/ data:{ text:&#8221;\u6211\u662f\u5728js\u6587\u4ef6\u4e2d\u7ed1\u5b9a\u7684\u6587\u672c&#8221; }, onLoad:function(options){ \/\/&nbsp;\u9875\u9762\u521d\u59cb\u5316&nbsp;options\u4e3a\u9875\u9762\u8df3\u8f6c\u6240\u5e26\u6765\u7684\u53c2\u6570 }, onReady:function(){ \/\/&nbsp;\u9875\u9762\u6e32\u67d3\u5b8c\u6210 }, onShow:function(){ \/\/&nbsp;\u9875\u9762\u663e\u793a }, onHide:function(){ \/\/&nbsp;\u9875\u9762\u9690\u85cf }, onUnload:function(){ \/\/&nbsp;\u9875\u9762\u5173\u95ed } }) \u767b\u5f55\u540e\u590d\u5236 text\u6587\u672c\u7684\u4e3b\u8981\u5c5e\u6027\uff1a \u5c5e\u6027 \u63cf\u8ff0 font-size \u5b57\u4f53\u5927\u5c0f color \u5b57\u4f53\u989c\u8272 font-style \u5b57\u4f53\u6837\u5f0f margin-top \u5b57\u4f53\u4e0a\u8fb9\u8ddd margin-bottom \u5b57\u4f53\u4e0b\u8fb9\u8ddd \u4ee5\u4e0a\u5c31\u662f\u89e3\u8bfb\u548c\u5206\u6790\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7ec4\u4ef6\uff1a\u4e94\u3001text\u6587\u672c\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-29175","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29175","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=29175"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29175\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}