{"id":52951,"date":"2024-12-03T15:37:44","date_gmt":"2024-12-03T07:37:44","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52951\/"},"modified":"2024-12-03T15:37:44","modified_gmt":"2024-12-03T07:37:44","slug":"%e5%a6%82%e4%bd%95%e4%b8%ba%e7%bd%91%e9%a1%b5%e4%bb%a3%e7%a0%81%e6%b7%bb%e5%8a%a0%e8%a1%8c%e5%8f%b7%ef%bc%9f-3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52951\/","title":{"rendered":"\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f <\/h1>\n<p>\u4eb2\u7231\u7684\u7f16\u7a0b\u5b66\u4e60\u7231\u597d\u8005\uff0c\u5982\u679c\u4f60\u70b9\u5f00\u4e86\u8fd9\u7bc7\u6587\u7ae0\uff0c\u8bf4\u660e\u4f60\u5bf9\u300a\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f \u300b\u5f88\u611f\u5174\u8da3\u3002\u672c\u7bc7\u6587\u7ae0\u5c31\u6765\u7ed9\u5927\u5bb6\u8be6\u7ec6\u89e3\u6790\u4e00\u4e0b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u5e0c\u671b\u6240\u6709\u8ba4\u771f\u8bfb\u5b8c\u7684\u7ae5\u978b\u4eec\uff0c\u90fd\u6709\u5b9e\u8d28\u6027\u7684\u63d0\u9ad8\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241125\/17324957346743c97635664.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7<\/strong><\/p>\n<p>\u5728\u4ee3\u7801\u4e2d\u6dfb\u52a0\u884c\u53f7\u53ef\u4ee5\u66f4\u8f7b\u677e\u5730\u8fdb\u884c\u9605\u8bfb\u548c\u8c03\u8bd5\u3002\u4f20\u7edf\u65b9\u6cd5\u662f\u4f7f\u7528&lt;xmp&gt;\u6807\u7b7e\uff0c\u4f46\u7531\u4e8e\u5b83\u5df2\u88ab\u5f03\u7528\uff0c\u56e0\u6b64\u53ef\u4ee5\u4f7f\u7528\u66f4\u73b0\u4ee3\u7684\u65b9\u6cd5\u3002<\/p>\n<p><strong>\u4f7f\u7528&lt;pre&gt;\u6807\u7b7e\u548c\u8f6c\u4e49\u5b57\u7b26<\/strong><\/p>\n<p>&lt;pre&gt;\u6807\u7b7e\u53ef\u4ee5\u4fdd\u7559\u7a7a\u767d\u548c\u6362\u884c\u7b26\uff0c\u4f46\u9700\u8981\u5c06HTML\u4ee3\u7801\u4e2d\u7684&lt;\u548c&gt;\u7b26\u53f7\u8f6c\u4e49\u4e3a&amp;lt;\u548c&amp;gt;\u3002\u8fd9\u79cd\u65b9\u6cd5\u8f83\u4e3a\u7e41\u7410\u3002<\/p>\n<p><strong>\u4f7f\u7528CSS\u548c&lt;p&gt;\u6807\u7b7e<\/strong><\/p>\n<p>\u4e00\u79cd\u66f4\u7b80\u5355\u7684\u89e3\u51b3\u65b9\u6848\u662f\u4f7f\u7528CSS\u548c&lt;p&gt;\u6807\u7b7e\uff1a<\/p>\n<pre>&lt;div id=\"code\" style=\"font-size: 12px\"&gt;&lt;\/div&gt;\n&lt;style&gt;\n  * { margin: 0; padding: 0; }\n  #code p::before {\n    content: attr(data-line-number);\n    min-width: 50px;\n    text-align: right;\n    display: inline-block;\n    padding: 0 5px;\n    color: #ccc;\n  }\n&lt;\/style&gt;\n&lt;script&gt;\n  var $code = document.getElementById('code');\n  `&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;title&gt;\u884c\u53f7&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;p&gt;\u6d4b\u8bd5\u9875\u9762&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;`.split('\\n').forEach((text, index) =&gt; {\n    var $line = document.createElement('p');\n    $line.dataset.lineNumber = index + 1;\n    $line.innerText = text;\n    $code.appendChild($line);\n  });\n&lt;\/script&gt;<\/pre>\n<p>\u4eca\u5929\u5173\u4e8e\u300a\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f \u300b\u7684\u5185\u5bb9\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e86\uff0c\u662f\u4e0d\u662f\u5b66\u8d77\u6765\u4e00\u76ee\u4e86\u7136\uff01\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u7684\u5185\u5bb9\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   Vue \u8868\u683c\u5408\u5e76\u5355\u5143\u683c\u540e\uff0c\u5982\u4f55\u53bb\u9664\u591a\u4f59\u6570\u636e\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f \u4eb2\u7231\u7684\u7f16\u7a0b\u5b66\u4e60\u7231\u597d\u8005\uff0c\u5982\u679c\u4f60\u70b9\u5f00\u4e86\u8fd9\u7bc7\u6587\u7ae0\uff0c\u8bf4\u660e\u4f60\u5bf9\u300a\u5982\u4f55\u4e3a\u7f51\u9875\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7\uff1f \u300b\u5f88\u611f\u5174\u8da3\u3002\u672c\u7bc7\u6587\u7ae0\u5c31\u6765\u7ed9\u5927\u5bb6\u8be6\u7ec6\u89e3\u6790\u4e00\u4e0b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u5e0c\u671b\u6240\u6709\u8ba4\u771f\u8bfb\u5b8c\u7684\u7ae5\u978b\u4eec\uff0c\u90fd\u6709\u5b9e\u8d28\u6027\u7684\u63d0\u9ad8\u3002 \u7ed9\u4ee3\u7801\u6dfb\u52a0\u884c\u53f7 \u5728\u4ee3\u7801\u4e2d\u6dfb\u52a0\u884c\u53f7\u53ef\u4ee5\u66f4\u8f7b\u677e\u5730\u8fdb\u884c\u9605\u8bfb\u548c\u8c03\u8bd5\u3002\u4f20\u7edf\u65b9\u6cd5\u662f\u4f7f\u7528&lt;xmp&gt;\u6807\u7b7e\uff0c\u4f46\u7531\u4e8e\u5b83\u5df2\u88ab\u5f03\u7528\uff0c\u56e0\u6b64\u53ef\u4ee5\u4f7f\u7528\u66f4\u73b0\u4ee3\u7684\u65b9\u6cd5\u3002 \u4f7f\u7528&lt;pre&gt;\u6807\u7b7e\u548c\u8f6c\u4e49\u5b57\u7b26 &lt;pre&gt;\u6807\u7b7e\u53ef\u4ee5\u4fdd\u7559\u7a7a\u767d\u548c\u6362\u884c\u7b26\uff0c\u4f46\u9700\u8981\u5c06HTML\u4ee3\u7801\u4e2d\u7684&lt;\u548c&gt;\u7b26\u53f7\u8f6c\u4e49\u4e3a&amp;lt;\u548c&amp;gt;\u3002\u8fd9\u79cd\u65b9\u6cd5\u8f83\u4e3a\u7e41\u7410\u3002 \u4f7f\u7528CSS\u548c&lt;p&gt;\u6807\u7b7e \u4e00\u79cd\u66f4\u7b80\u5355\u7684\u89e3\u51b3\u65b9\u6848\u662f\u4f7f\u7528CSS\u548c&lt;p&gt;\u6807\u7b7e\uff1a &lt;div id=&#8221;code&#8221; style=&#8221;font-size: 12px&#8221;&gt;&lt;\/div&gt; &lt;style&gt; * { margin: 0; padding: 0; } #code p::before { content: attr(data-line-number); min-width: 50px; text-align: right; display: inline-block; padding: 0 5px; color: #ccc; } &lt;\/style&gt; &lt;script&gt; var $code = document.getElementById(&#8216;code&#8217;); `&lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &lt;meta charset=&#8221;UTF-8&#8243;&gt; &lt;title&gt;\u884c\u53f7&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;p&gt;\u6d4b\u8bd5\u9875\u9762&lt;\/p&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-52951","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52951","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=52951"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52951\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}