{"id":326092,"date":"2021-02-05T02:02:10","date_gmt":"2021-02-04T18:02:10","guid":{"rendered":"http:\/\/4563.org\/?p=326092"},"modified":"2021-02-05T02:02:10","modified_gmt":"2021-02-04T18:02:10","slug":"vue-cli4-5-11-%e5%ae%9e%e7%8e%b0%e5%a4%9a%e5%85%a5%e5%8f%a3%e8%b7%af%e7%94%b1%e5%8a%9f%e8%83%bd%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=326092","title":{"rendered":"vue-cli4.5.11 \u5b9e\u73b0\u591a\u5165\u53e3\u8def\u7531\u529f\u80fd\u5b9e\u73b0"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  vue-cli4.5.11 \u5b9e\u73b0\u591a\u5165\u53e3\u8def\u7531\u529f\u80fd\u5b9e\u73b0               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : phpxiaowangzi <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>vue.config.js:<\/p>\n<pre><code>module.exports = {     pages:{         supplier:{             entry:'src\/supplier\/main.js',             template:'public\/supplier.html',             filename:'supplier.html',             title:'\u5408\u4f5c\u4f19\u4f34'         },         staff:{             entry:'src\/staff\/main.js',             template:'public\/staff.html',             filename:'staff.html',             title:'\u5458\u5de5\u52a9\u624b'         }     } } <\/code><\/pre>\n<p>main.js:<\/p>\n<pre><code>import { createApp } from 'vue' import VueRouter from 'vue-router' import Supplier from '.\/Supplier.vue'  import MicroPay from '.\/components\/MicroPay\/index.vue'  const routes = [     {path:'\/MicroPay', component:MicroPay} ]  const router = new VueRouter({  mode:'hash',  routes })  createApp(Supplier).use(router).mount('#supplier') <\/code><\/pre>\n<p>Supplier.vue:<\/p>\n<pre><code>&lt;template&gt;     &lt;div id=\"supplier\"&gt;         &lt;router-view&gt;&lt;\/router-view&gt;     &lt;\/div&gt; &lt;\/template&gt;  &lt;script&gt;     export default {         name: 'Supplier'     } &lt;\/script&gt; <\/code><\/pre>\n<p>components\/MicroPay\/index.vue:<\/p>\n<pre><code>&lt;template&gt;     &lt;div&gt;MicroPay&lt;\/div&gt; &lt;\/template&gt;  &lt;script&gt;     export default {         name:'MicroPay'     } &lt;\/script&gt; <\/code><\/pre>\n<p>\u73b0\u5728\u8bbf\u95ee http:\/\/localhost:8080\/supplier#\/MicroPay \u7a7a\u767d\u65e0\u6cd5\u663e\u793a components\/MicroPay\/index.vue \u6587\u4ef6\u5185\u5bb9\uff0c\u6c42\u6559\u662f\u5426\u8def\u7531\u8bbe\u7f6e\u4e0d\u6b63\u786e\uff0c\u6c42\u524d\u7aef\u5927\u795e\u6307\u6559\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>1<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5219840\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : PinkRabbit <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7a7a\u767d\u7684\u65f6\u5019\uff0c\u770b\u4e0b\u63a7\u5236\u53f0\u6709\u6ca1\u6709\u62a5\u4ec0\u4e48\u9519\u8bef\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>vue-cli4.5.11 \u5b9e\u73b0\u591a&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\/326092"}],"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=326092"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/326092\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326092"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}