使用 Typescript 支持启动新的 nativescript-vue 项目的正确方法是什么?
What is proper way of starting a new nativescript-vue project with Typescript support?
我希望能够在 Vue 实例方法中使用 Typescript,如 blog page of nativescript-vue.org
中所述
当我使用 vue init nativescript-vue/vue-cli-template <project-name>
创建新的 nativescript-vue 项目时,调试屏幕中出现以下警告。
tns debug android
始终给出以下错误行...
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(NativePage)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(NativeActionBar)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativepage), ElementNode(nativeactionbar))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(nativegridlayout)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(nativelabel)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativegridlayout), ElementNode(nativelabel))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativepage), ElementNode(nativegridlayout))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativeframe), ElementNode(nativepage))'
这些以 JS:... 开头的样板警告是什么?
更新
我添加 @vue/devtools nativescript-toasty nativescript-socketio nativescript-vue-devtools
后开始出现 JS 错误行
即使我删除了它们,控制台警告仍然存在。
我想知道 quick start 页面是否已过时?
由于 Vue-cli-template 在过去 30 天内没有收到任何更新。
注意:使用tns create
创建的项目不会出现此类错误。只有 vue-cli-template 有警告。
日志中提到的行既不是错误也不是警告 - 它们是渲染器日志。
这些可以通过
关闭
Vue.config.silent = true
// Since NativeScript-Vue 2.5.0-alpha.3 the renderer logs
// can be disabled keeping other useful logs intact via
Vue.config.suppressRenderLogs = false
in app.js
或 main.js
(取决于使用的模板)。
我希望能够在 Vue 实例方法中使用 Typescript,如 blog page of nativescript-vue.org
中所述当我使用 vue init nativescript-vue/vue-cli-template <project-name>
创建新的 nativescript-vue 项目时,调试屏幕中出现以下警告。
tns debug android
始终给出以下错误行...
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(NativePage)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(NativeActionBar)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativepage), ElementNode(nativeactionbar))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(nativegridlayout)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> CreateElement(nativelabel)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativegridlayout), ElementNode(nativelabel))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativepage), ElementNode(nativegridlayout))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.5.0)} -> AppendChild(ElementNode(nativeframe), ElementNode(nativepage))'
这些以 JS:... 开头的样板警告是什么?
更新
我添加 @vue/devtools nativescript-toasty nativescript-socketio nativescript-vue-devtools
即使我删除了它们,控制台警告仍然存在。
我想知道 quick start 页面是否已过时? 由于 Vue-cli-template 在过去 30 天内没有收到任何更新。
注意:使用tns create
创建的项目不会出现此类错误。只有 vue-cli-template 有警告。
日志中提到的行既不是错误也不是警告 - 它们是渲染器日志。
这些可以通过
关闭Vue.config.silent = true
// Since NativeScript-Vue 2.5.0-alpha.3 the renderer logs
// can be disabled keeping other useful logs intact via
Vue.config.suppressRenderLogs = false
in app.js
或 main.js
(取决于使用的模板)。