{"id":48602,"date":"2020-03-09T11:54:14","date_gmt":"2020-03-09T03:54:14","guid":{"rendered":"http:\/\/4563.org\/?p=48602"},"modified":"2020-03-09T11:54:14","modified_gmt":"2020-03-09T03:54:14","slug":"%e5%85%a8%e7%90%83vue%e8%ae%ba%e5%9d%9b","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=48602","title":{"rendered":"\u5168\u7403VUE\u8bba\u575b"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>PSBC<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u5168\u7403VUE\u8bba\u575b<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 PSBC \u4e8e 2020-3-9 11:36 \u7f16\u8f91 <\/p>\n<p> \u6709\u6ca1\u6709\u4f1aVUE\u7684\uff0c\u65b0\u624b\u5165\u95e8\u5173\u4e8e VUE\u8df3\u8f6cVUE\u7684\uff0c\u840c\u65b0\u6c42\u89e3<\/p>\n<p>  import Test from &quot;@\/components\/Test&quot;;<br \/>  const router = new VueRouter({<br \/>  routes:[<br \/>  &nbsp; &nbsp; { path: &#8216;\/Test&#8217;, component: Test }<br \/>  ]<br \/>  })<\/p>\n<p>  \u73b0\u5728\u6211\u5728HelloWorld.vue\u4e2d\u5199\u5230<\/p>\n<p>  export default {<br \/>  name: &#8216;HelloWorld&#8217;,<br \/>  props: {<br \/>  &nbsp; &nbsp; msg: String<br \/>  },<br \/>  methods:{ \/\/\u8df3\u8f6c\u9875\u9762<br \/>  &nbsp; &nbsp; gotoTests(){<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;this.$router.push({ path:&#8217;\/Test&#8217;,params:{setid:111}})<br \/>  &nbsp; &nbsp; }<br \/>  }<br \/>  }<br \/>  &lt;\/script&gt;<\/p>\n<p>  \u8c8c\u4f3c\u4e0d\u8df3\u8f6c\u90a3\u4e2aTest.vue\u6587\u4ef6<\/p>\n<p>  \u8fd9\u4e2a\u597d\u50cf\u4e5f\u4e0d\u884c\uff0c\u4e0d\u77e5\u9053\u662f\u54ea\u91cc\u6709\u95ee\u9898<\/p>\n<p>  &nbsp; &nbsp; &lt;router-link :to=&quot;{path:&#8217;\/Test&#8217;,params: {setid:111}}&quot;&gt;\u7b2c\u4e8c\u4e2a\u9875\u9762&lt;\/router-link&gt;\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h2o<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u679c\u7136\u811a\u672c\u8bed\u8a00\u90fd\u662f\u4e92\u901a\u7684\uff0c\u8fd8\u4ee5\u4e3a\u4f1a\u4e00\u8138\u61f5\u903c\u7684\u51fa\u53bb\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5357\u66fc\u5357\u66fc<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5728\u8fd9\u91cc\u95ee\u4e3a\u561b\u4e0d\u770b\u6587\u6863\u5462\uff0c\u770b\u6587\u6863\u89e3\u51b35\u5206\u949f\uff0c\u8bba\u575b\u91cc\u5439\u903c5\u5c0f\u65f6<br \/>  \u597d\u6b79\u4e5f\u628a\u4ee3\u7801\u8d34\u5168\u5427\u770b\u4f60\u8fd9\u51e0\u884c\u4ee3\u7801 \u6709\u5f88\u591a\u53ef\u80fd\u554a \u6bd4\u5982\u8def\u7531\u6ca1\u6709\u66b4\u9732\u6216\u8005\u5f15\u5165\uff0c\u65b9\u6cd5\u6ca1\u6709\u7ed1\u5b9a\uff0c\u7ec4\u4ef6\u672c\u6765\u5c31\u662f\u7a7a\u9875\u9762\uff0c\u8c01\u77e5\u9053\u5462\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>darknoll<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u653e\u5728\u94a9\u5b50\u51fd\u6570\uff0c\u6bd4\u5982created\u91cc\u9762\uff0c\u6700\u597d\u7528\u5bfc\u822a\u5b88\u536b\u4e4b\u7c7b\u7684\u8df3\u8f6c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8eab\u65e0\u5206\u6587\u76845\u6bdb\u94b1<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7b2c\u4e00\u4e2a\u4f60\u4e0d\u6267\u884c \u600e\u4e48\u89e6\u53d1\u65b9\u6cd5\u8df3\u8f6c\u8981\u4e48\u5728created\u6216\u8005mounted\u91cc\u9762\u53bb\u89e6\u53d1\u4e00\u4e0b\u7b2c\u4e8c\u4e2a\u662f\u70b9\u51fb\u8df3\u8f6c \u8ddfa\u94fe\u63a5\u4e00\u6837\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yemingtu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4f60\u7684HelloWorld\u662f\u4e2a\u7ec4\u4ef6\uff0c\u4f60\u770b\u770b\u6839\u5b9e\u4f8b\u5728\u54ea\u91cc\u5bfc\u5165\u7684\uff0crouter\u9700\u8981\u5728\u6839\u5b9e\u4f8b\u90a3\u91cc\u6ce8\u5165\u3002\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>PSBC \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u5168\u7403VU&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\/48602"}],"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=48602"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/48602\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=48602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=48602"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=48602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}