{"id":93966,"date":"2020-04-20T21:20:27","date_gmt":"2020-04-20T13:20:27","guid":{"rendered":"http:\/\/4563.org\/?p=93966"},"modified":"2020-04-20T21:20:27","modified_gmt":"2020-04-20T13:20:27","slug":"vue-%e9%a1%b9%e7%9b%ae%ef%bc%8c%e5%a6%82%e6%9e%9c%e6%96%b0%e5%bb%ba%e4%ba%86%e4%b8%80%e4%b8%aa%e6%96%87%e4%bb%b6%ef%bc%8c-%e4%bd%86%e6%98%af%e5%90%8e%e6%9d%a5%e4%b8%8d%e7%94%a8%e4%ba%86%ef%bc%8c","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=93966","title":{"rendered":"vue \u9879\u76ee\uff0c\u5982\u679c\u65b0\u5efa\u4e86\u4e00\u4e2a\u6587\u4ef6\uff0c \u4f46\u662f\u540e\u6765\u4e0d\u7528\u4e86\uff0c\u4f46\u662f\u6ca1\u6709\u53bb\u5220\u6389\u5b83\uff0c\u5982\u679c\u8fd9\u6837\u7684\u6587\u4ef6\u8d8a\u6765\u8d8a\u591a\uff0c\u4f1a\u4e0d\u4f1a\u6574\u4e2a\u5de5\u7a0b\u6253\u5305\u7684\u901f\u5ea6\u4f1a\u53d8\u6162\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  vue \u9879\u76ee\uff0c\u5982\u679c\u65b0\u5efa\u4e86\u4e00\u4e2a\u6587\u4ef6\uff0c \u4f46\u662f\u540e\u6765\u4e0d\u7528\u4e86\uff0c\u4f46\u662f\u6ca1\u6709\u53bb\u5220\u6389\u5b83\uff0c\u5982\u679c\u8fd9\u6837\u7684\u6587\u4ef6\u8d8a\u6765\u8d8a\u591a\uff0c\u4f1a\u4e0d\u4f1a\u6574\u4e2a\u5de5\u7a0b\u6253\u5305\u7684\u901f\u5ea6\u4f1a\u53d8\u6162\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : youcanwin8099 <\/span>  <span><i><\/i> 22<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u4e0d\u4f1a\uff0c\u6ca1\u6709\u5f15\u7528\u7684\u6587\u4ef6\u4e0d\u4f1a\u88ab\u6253\u5305      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>13<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1182486\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SunriseFox <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SunriseFox \u5f15\u7528\u4e00\u822c\u662f\u7528\u4ec0\u4e48\u8bed\u53e5\u5f15\u7528\u8fdb\u6765\uff1f\u4e0d\u597d\u610f\u601d\uff0c\u521d\u5b66 vue.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182487\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youcanwin8099 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youcanwin8099 nodejs \u7684 package.json \u4f1a\u6709\u4f9d\u8d56                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182488\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mazai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mazai \u4f46\u662f\u6211\u5199\u7684\u6587\u4ef6\u53ea\u662f\u4e00\u4e2a\u666e\u901a\u7684 vue\uff0c\u8c08\u4e0d\u4e0a\u4ec0\u4e48\u7ec4\u4ef6\uff0c\u4e0d\u4f1a\u5728 package.json \u91cc\u5b9a\u4e49\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182489\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youcanwin8099 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youcanwin8099 import \u6216\u8005 require                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182490\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SunriseFox <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SunriseFox \u6bd4\u5982\u6211<br \/>import departWindow from &#8216;.\/DepartWindow&#8217;\uff0c<br \/>\u4f46\u662f\u6211\u9875\u9762\u91cc\uff0c\u6ca1\u6709\u5728\u505a\u4efb\u4f55\u5173\u4e8e\u8fd9\u4e2a DepartWindow \u7684\u4e8b\u60c5\uff0c\u90a3\u4e48\u662f\u4e0d\u662f\u5982\u679c\u4e0d\u5220\u6389\u8fd9\u4e2a\u5f15\u7528\uff0c\u540c\u65f6\u4e5f\u4e0d\u5220\u6389\u8fd9\u4e2a DepartWindow.vue,\u90a3\u4e48\u9879\u76ee\u4f1a\u8d8a\u6765\u8d8a\u5927\uff1f\u6253\u5305\u8d8a\u6765\u8d8a\u6162\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182491\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youcanwin8099 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youcanwin8099 \u662f\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182492\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SunriseFox <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SunriseFox \u54ce\uff01\u90a3\u4ece\u67d0\u79cd\u610f\u4e49\u4e0a\u8bb2\uff0cvue \u8fd9\u79cd\u4e1c\u897f\uff0c\u5c31\u4e0d\u9002\u5408\u5feb\u901f\u8fed\u4ee3\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182493\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youcanwin8099 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youcanwin8099 \u8fd9\u4e2a\u5176\u5b9e\u548c vue \u6ca1\u5173\u7cfb\u7684\uff0c\u800c\u662f\u548c webpack \u914d\u7f6e\u6709\u5173\u7cfb\u3002webpack \u53ef\u4ee5\u914d\u7f6e\u4e00\u4e9b tree shaking \u7684\u529e\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u79fb\u9664\u8fd9\u4e9b\u6ca1\u6709\u5f15\u7528\u7684\u4ee3\u7801\u6765\u51cf\u5c11\u9879\u76ee\u4f53\u79ef\uff08\u4f46\u662f\u4f1a\u6781\u5927\u5730\u51cf\u6162\u6253\u5305\u901f\u5ea6\uff09\uff1b\u4e3a\u4e86\u9632\u6b62\u8fd9\u4e9b\u6ca1\u6709\u7528\u5230\u7684\u5f15\u7528\uff0c\u6709 eslint \u8fd9\u6837\u7684\u5de5\u5177\u5e2e\u5fd9\u67e5\u627e\u5b9a\u4f4d\uff0c\u5982\u679c\u9700\u8981\u7684\u8bdd\u4e5f\u53ef\u4ee5\u501f\u52a9\u5de5\u5177\u5728\u6253\u5305\u65f6\u81ea\u52a8\u79fb\u9664\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182494\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SunriseFox <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youcanwin8099 \u4f7f\u7528 eslint \u53ef\u4ee5\u907f\u514d\u51fa\u73b0\u8fd9\u79cd\u95ee\u9898                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182495\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jrtzxh020 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u201c\u51cf\u5c11\u4e86\u9879\u76ee\u4f53\u79ef\u201c\uff0c\u201d\u4f46\u662f\u4f1a\u6781\u5927\u5730\u51cf\u6162\u6253\u5305\u901f\u5ea6\uff1f\u201d<br \/>\u4f7f\u7528 eslint \u65f6\uff0c\u5e94\u8be5\u53ea\u662f\u4e0d\u6253\u5305\u5b83\uff0c\u4f46\u662f\u4e0d\u4f1a\u7269\u7406\u5220\u9664\u8fd9\u4e2a DepartWindow.vue \u5427\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182496\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youcanwin8099 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u4f7f\u7528\u4e86 async import \u53ef\u80fd\u4f1a\u7d22\u5f15\u5230\uff0c\u51cf\u6162\u6253\u5305\u901f\u5ea6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182497\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ljwrer <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4ee5 Webpack \u4e3a\u4f8b\uff0cbuild \u65f6\u5b83\u4f1a\u4ece\u5165\u53e3\u6a21\u5757\u5f00\u59cb\u4e00\u4e2a\u4e2a\u5206\u6790 require\/import \u8bed\u53e5\uff0c\u88ab\u5f15\u7528\u5230\u7684\u6a21\u5757\u4f1a\u88ab\u7eb3\u5165\u6784\u5efa\u5206\u6790\u8303\u56f4\uff0c\u8fd9\u91cc\u662f\u4f1a\u5f71\u54cd\u6784\u5efa\u901f\u5ea6\u7684\u3002<\/p>\n<p>\u5982\u679c\u4f60\u5728\u67d0\u4e2a\u88ab\u5f15\u7528\u7684\u6a21\u5757\u91cc import \u4e86 DepartWindow.vue \uff0c\u90a3\u4e48\u5b83\u5c31\u88ab\u7eb3\u5165\u6784\u5efa\u5206\u6790\u8303\u56f4\uff0c\u7406\u8bba\u4e0a\u4f1a\u589e\u52a0\u6784\u5efa\u8017\u65f6\u3002\u81f3\u4e8e\u5f71\u54cd\u591a\u5927\uff0c\u53d6\u51b3\u4e8e\u6a21\u5757\u4f53\u79ef\uff08\u6bd4\u5982\u4ee3\u7801\u5185\u5bb9\u8d8a\u591a\u5206\u6790\u8fc7\u7a0b\u8d8a\u957f\uff09\u3001\u6784\u5efa\u4f18\u5316\u624b\u6bb5\uff08\u6bd4\u5982\u53ef\u4ee5\u76f4\u63a5\u9759\u6001\u5206\u6790 vue \u6a21\u5757\u5c31\u4e0d\u9700\u8981 vue-loader \u5de5\u4f5c\u4e86\uff09\u3002<\/p>\n<p>ESLint \u53ef\u4ee5\u5728\u5f00\u53d1\u9636\u6bb5\u63d0\u793a\u672a\u88ab\u5b9e\u9645\u4f7f\u7528\u7684\u4f9d\u8d56\u3002\u5982\u679c\u53ef\u80fd\uff0c\u6700\u597d\u5728\u4e00\u5f00\u59cb\u5c31\u79fb\u9664\u8fd9\u4e9b\u672a\u4f7f\u7528\u4f9d\u8d56\u3002\u4f46\u5b9e\u9645\u5730\u8bf4\uff0c\u9664\u975e\u8fd9\u79cd\u60c5\u51b5\u975e\u5e38\u591a\uff0c\u6216\u8005\u6587\u4ef6\u5185\u5bb9\u975e\u5e38\u5927\uff0c\u901a\u5e38\u5bf9\u6784\u5efa\u6027\u80fd\u6ca1\u6709\u592a\u5927\u5f71\u54cd\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1182498\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SilentDepth <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youcanwin8099 #11 \u90a3\u80af\u5b9a\u554a\uff0c\u5047\u5982\u4e00\u4e2a\u6846\u67b6\u4e0d\u7ecf\u8fc7\u4f60\u7684\u5141\u8bb8\uff0c\u5c31\u81ea\u52a8\u5220\u9664\u4f60\u7684\u6587\u4ef6\u3002\u4f60\u6562\u7528\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>vue \u9879\u76ee\uff0c\u5982\u679c\u65b0\u5efa\u4e86\u4e00\u4e2a\u6587\u4ef6\uff0c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/93966"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=93966"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/93966\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=93966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=93966"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=93966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}