{"id":1655,"date":"2024-11-10T10:50:33","date_gmt":"2024-11-10T02:50:33","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1655\/"},"modified":"2024-11-10T10:50:33","modified_gmt":"2024-11-10T02:50:33","slug":"vue-%e7%88%b6%e7%bb%84%e4%bb%b6%e5%90%91%e5%ad%90%e7%bb%84%e4%bb%b6%e4%bc%a0%e9%80%92-map-%e7%b1%bb%e5%9e%8b%e7%9a%84%e5%8f%98%e9%87%8f%ef%bc%8c%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3%e5%88%9d%e5%a7%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1655\/","title":{"rendered":"Vue \u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u9012 map \u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u5982\u4f55\u89e3\u51b3\u521d\u59cb\u5316\u4e3a\u7a7a\u5bf9\u8c61\u5bfc\u81f4\u7684\u9519\u8bef\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173052726435200.jpg\" class=\"aligncenter\" title=\"Vue \u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u9012 map \u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u5982\u4f55\u89e3\u51b3\u521d\u59cb\u5316\u4e3a\u7a7a\u5bf9\u8c61\u5bfc\u81f4\u7684\u9519\u8bef\uff1f\u63d2\u56fe\" alt=\"Vue \u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u9012 map \u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u5982\u4f55\u89e3\u51b3\u521d\u59cb\u5316\u4e3a\u7a7a\u5bf9\u8c61\u5bfc\u81f4\u7684\u9519\u8bef\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728  \u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u9012 map \u7c7b\u578b\u7684\u53d8\u91cf<\/strong><\/p>\n<p><strong>\u95ee\u9898\u5f15\u5165\uff1a<\/strong><\/p>\n<p>\u5c1d\u8bd5\u5728\u7236\u7ec4\u4ef6\u4e2d\u5b9a\u4e49\u4e00\u4e2a map\u7c7b\u578b\u7684\u53d8\u91cf roomPictureList\uff0c\u5e76\u5728\u5b50\u7ec4\u4ef6\u4e2d\u4f7f\u7528\u6a21\u677f\u8bed\u6cd5\u5bf9\u5176\u8fdb\u884c\u8d4b\u503c\u548c\u4f20\u9012\u540e\uff0c\u63a7\u5236\u53f0\u51fa\u73b0\u4e86\u9519\u8bef\u3002<\/p>\n<p><strong>\u95ee\u9898\u5206\u6790\uff1a<\/strong><\/p>\n<p>\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u6211\u4eec\u9700\u8981\u4ed4\u7ec6\u68c0\u67e5 roomPictureList \u7684\u521d\u59cb\u5316\u65b9\u5f0f\u3002\u5728\u793a\u4f8b\u4e2d\uff0croomPictureList \u88ab\u521d\u59cb\u5316\u4e3a\u7a7a\u5bf9\u8c61 {}\u3002\u7136\u800c\uff0c\u5728 Vue \u4e2d\uff0cmap \u7c7b\u578b\u53d8\u91cf\u5e94\u8be5\u88ab\u521d\u59cb\u5316\u4e3a null\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u5c06 roomPictureList \u7684\u521d\u59cb\u503c\u66f4\u6539\u4e3a null \u5373\u53ef\u89e3\u51b3\u6b64\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4fee\u6b63\u540e\u7684\u4ee3\u7801\uff1a<\/p>\n<p><strong>\u7236\u7ec4\u4ef6\uff1a<\/strong><\/p>\n<pre>data() {\n  return {\n    roomPictureList: null\n  }\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u5b50\u7ec4\u4ef6\uff1a<\/strong><\/p>\n<pre>&lt;template&gt;\n  &lt;div&gt;...&lt;\/div&gt;\n&lt;\/template&gt;\n\n&lt;script&gt;\nexport default {\n  props: ['roomPictureList'],\n  ...\n}\n&lt;\/script&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fVue \u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u9012 map \u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u5982\u4f55\u89e3\u51b3\u521d\u59cb\u5316\u4e3a\u7a7a\u5bf9\u8c61\u5bfc\u81f4\u7684\u9519\u8bef\uff1f\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>\u5982\u4f55\u5728 \u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u9012 map \u7c7b\u578b\u7684\u53d8\u91cf \u95ee\u9898\u5f15\u5165\uff1a \u5c1d\u8bd5\u5728\u7236\u7ec4\u4ef6\u4e2d\u5b9a\u4e49\u4e00\u4e2a map\u7c7b\u578b\u7684\u53d8\u91cf roomPictureList\uff0c\u5e76\u5728\u5b50\u7ec4\u4ef6\u4e2d\u4f7f\u7528\u6a21\u677f\u8bed\u6cd5\u5bf9\u5176\u8fdb\u884c\u8d4b\u503c\u548c\u4f20\u9012\u540e\uff0c\u63a7\u5236\u53f0\u51fa\u73b0\u4e86\u9519\u8bef\u3002 \u95ee\u9898\u5206\u6790\uff1a \u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u6211\u4eec\u9700\u8981\u4ed4\u7ec6\u68c0\u67e5 roomPictureList \u7684\u521d\u59cb\u5316\u65b9\u5f0f\u3002\u5728\u793a\u4f8b\u4e2d\uff0croomPictureList \u88ab\u521d\u59cb\u5316\u4e3a\u7a7a\u5bf9\u8c61 {}\u3002\u7136\u800c\uff0c\u5728 Vue \u4e2d\uff0cmap \u7c7b\u578b\u53d8\u91cf\u5e94\u8be5\u88ab\u521d\u59cb\u5316\u4e3a null\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u89e3\u51b3\u65b9\u6cd5\uff1a \u5c06 roomPictureList \u7684\u521d\u59cb\u503c\u66f4\u6539\u4e3a null \u5373\u53ef\u89e3\u51b3\u6b64\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4fee\u6b63\u540e\u7684\u4ee3\u7801\uff1a \u7236\u7ec4\u4ef6\uff1a data() { return { roomPictureList: null } } \u767b\u5f55\u540e\u590d\u5236 \u5b50\u7ec4\u4ef6\uff1a &lt;template&gt; &lt;div&gt;&#8230;&lt;\/div&gt; &lt;\/template&gt; &lt;script&gt; export default { props: [&#8216;roomPictureList&#8217;], &#8230; } &lt;\/script&gt; \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662fVue \u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u9012 map \u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u5982\u4f55\u89e3\u51b3\u521d\u59cb\u5316\u4e3a\u7a7a\u5bf9\u8c61\u5bfc\u81f4\u7684\u9519\u8bef\uff1f\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":[16],"tags":[],"class_list":["post-1655","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1655","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=1655"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1655\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}