{"id":443255,"date":"2021-04-19T12:16:15","date_gmt":"2021-04-19T04:16:15","guid":{"rendered":"http:\/\/4563.org\/?p=443255"},"modified":"2021-04-19T12:16:15","modified_gmt":"2021-04-19T04:16:15","slug":"vue3-%e7%9a%84-composition-api-%e5%9c%a8%e4%bd%bf%e7%94%a8-tsvue-class-component-%e6%97%b6%ef%bc%8c%e9%99%a4%e4%ba%86-created-%e9%9c%80%e8%a6%81-setup-%e5%a4%96%ef%bc%8c%e5%a5%bd%e5%83%8f%e6%b2%a1","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=443255","title":{"rendered":"vue3 \u7684 composition api \u5728\u4f7f\u7528 ts+vue-class-component \u65f6\uff0c\u9664\u4e86 created \u9700\u8981 setup \u5916\uff0c\u597d\u50cf\u6ca1\u6709\u5176\u4ed6\u4f18\u52bf"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  vue3 \u7684 composition api \u5728\u4f7f\u7528 ts+vue-class-component \u65f6\uff0c\u9664\u4e86 created \u9700\u8981 setup \u5916\uff0c\u597d\u50cf\u6ca1\u6709\u5176\u4ed6\u4f18\u52bf               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : TomVista <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        vue3 \u5df2\u7ecf\u4e0d\u9700\u8981\u7528 vue-class-component \u548c vue-property-decorator \u4e86\u3002\u3002      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5650603\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ddzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             class \u548c hooks \u8fd8\u80fd\u6df7\u5408\u7528\u6602\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650604\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : gouflv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ddzy vue-cli \u9009 vue3+ts \u9ed8\u8ba4\u6709\u8fd9\u4e2a\u4e1c\u897f\uff0cemm\uff0c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650605\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : TomVista <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @gouflv \u80fd\uff0c\u6211\u73b0\u5728\uff0c\u5728 setup \u91cc\u7528 inject \u62ff\u5168\u5c40\u7684 provider \u7684 reactive \u4ee3\u66ff vuex\uff0c\u4f5c\u4e3a\u9759\u6001\u7c7b\u578b\u7684\u5168\u5c40\u6570\u636e\u4ed3\u5e93\uff0c\u5e26\u7c7b\u578b\u63a8\u5bfc\uff0c\u667a\u80fd\u63d0\u793a\uff0c\u723d\u7684\u4e00\u6279\uff0c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650606\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : TomVista <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ddzy \u80fd\u7ed9\u4e2a\u76f8\u5173\u6587\u6863\u6216\u8005\u601d\u8def\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650607\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : TomVista <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 vite \u521b\u5efa\u9879\u76ee\u7684\u8bdd\uff0c\u9ed8\u8ba4\u5c31\u6ca1\u6709\u4e86\uff0c\u4e4b\u524d\u4e00\u4e2a\u7248\u672c\u751a\u81f3\u66f4\u6fc0\u8fdb\u76f4\u63a5\u9ed8\u8ba4\u6587\u4ef6\u662f script setup                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>vue3 \u7684 compositio&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\/443255"}],"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=443255"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/443255\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=443255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=443255"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=443255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}