We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.1.1
https://github.com/Wlisfes/vuetsx
System: OS: Windows 10 10.0.17763 CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz Binaries: Node: 10.15.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.13.0 - E:\AppData\Yarn\bin\yarn.CMD npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 44.17763.831.0 npmPackages: @vue/babel-helper-vue-jsx-merge-props: 1.0.0 @vue/babel-plugin-transform-vue-jsx: 1.1.2 @vue/babel-preset-app: 4.1.1 @vue/babel-preset-jsx: 1.1.2 @vue/babel-sugar-functional-vue: 1.1.2 @vue/babel-sugar-inject-h: 1.1.2 @vue/babel-sugar-v-model: 1.1.2 @vue/babel-sugar-v-on: 1.1.2 @vue/cli-overlay: 4.1.1 @vue/cli-plugin-babel: ^4.1.0 => 4.1.1 @vue/cli-plugin-router: 4.1.1 @vue/cli-plugin-typescript: ^4.1.0 => 4.1.1 @vue/cli-plugin-vuex: 4.1.1 @vue/cli-service: ^4.1.0 => 4.1.1 @vue/cli-shared-utils: 4.1.1 @vue/component-compiler-utils: 3.1.0 @vue/preload-webpack-plugin: 1.1.1 @vue/web-component-wrapper: 1.2.0 typescript: ~3.5.3 => 3.5.3 vue: ^2.6.10 => 2.6.11 vue-class-component: ^7.0.2 => 7.1.0 vue-hot-reload-api: 2.3.4 vue-loader: 15.8.3 vue-property-decorator: ^8.3.0 => 8.3.0 vue-router: ^3.1.3 => 3.1.3 vue-style-loader: 4.1.2 vue-template-compiler: ^2.6.10 => 2.6.11 vue-template-es2015-compiler: 1.9.1 vuex: ^3.1.2 => 3.1.2 npmGlobalPackages: @vue/cli: Not Found
import { Component, Vue,Prop } from 'vue-property-decorator';
@component class Hello extends Vue { @prop({default: '张三'}) msg!: string
render() { return (
@component export default class Home extends Vue { render() { return (
No overload matches this call. Overload 1 of 3, '(options?: ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never> | undefined): Hello', gave the following error. 不能将类型“{ msg: string; }”分配给类型“ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>”。 类型“ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>”上不存在属性“msg”。 Overload 2 of 3, '(options?: ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object> | undefined): Hello', gave the following error. 不能将类型“{ msg: string; }”分配给类型“ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>”。 类型“ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>”上不存在属性“msg”。 Overload 3 of 3, '(options?: ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>> | undefined): Hello', gave the following error. 不能将类型“{ msg: string; }”分配给类型“ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>”。 类型“ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>”上不存在属性“msg”。ts(2769)
Hello这个组件使用{...{props}}展传值不爆错,msg=xxx class=xxx都会爆错误
The text was updated successfully, but these errors were encountered:
Duplicate of #2417 建议使用 https://github.com/wonderful-panda/vue-tsx-support (vue add tsx-support)
vue add tsx-support
Sorry, something went wrong.
No branches or pull requests
Version
4.1.1
Reproduction link
https://github.com/Wlisfes/vuetsx
Environment info
Steps to reproduce
import { Component, Vue,Prop } from 'vue-property-decorator';
@component
class Hello extends Vue {
@prop({default: '张三'})
msg!: string
render() {
return (
{this.msg}
)
}
}
@component
export default class Home extends Vue {
render() {
return (
Home
)
}
}
What is expected?
import { Component, Vue,Prop } from 'vue-property-decorator';
@component
class Hello extends Vue {
@prop({default: '张三'})
msg!: string
render() {
return (
{this.msg}
)
}
}
@component
export default class Home extends Vue {
render() {
return (
Home
<Hello
{...{
props: {
msg: '李四'
}
}}
>
)
}
}
What is actually happening?
No overload matches this call.
Overload 1 of 3, '(options?: ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never> | undefined): Hello', gave the following error.
不能将类型“{ msg: string; }”分配给类型“ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>”。
类型“ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>”上不存在属性“msg”。
Overload 2 of 3, '(options?: ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object> | undefined): Hello', gave the following error.
不能将类型“{ msg: string; }”分配给类型“ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>”。
类型“ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>”上不存在属性“msg”。
Overload 3 of 3, '(options?: ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>> | undefined): Hello', gave the following error.
不能将类型“{ msg: string; }”分配给类型“ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>”。
类型“ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>”上不存在属性“msg”。ts(2769)
Hello这个组件使用{...{props}}展传值不爆错,msg=xxx class=xxx都会爆错误
The text was updated successfully, but these errors were encountered: