vue框架中props的typescript用法 在vue中使用typescript时,需要引入vue-property-decorator库来兼容格式。 javascript写法 Vue.component('blog-post', { // 在 JavaScript 中是 camelCase 的 props: ['postTitle'], template: '<h3>{ { postTitle }}</h3>' }) <