New issue
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] v-model arguments is not work in tsx #602
Labels
bug
Something isn't working
Comments
@NidusP, try this // my-comp.tsx
import { defineComponent, PropType } from "vue";
export default defineComponent<{ 'v-model'?: any }>({
props: {
title: String as PropType<string>,
'update:title': Function as PropType<() => void>
},
setup(props, { emit }){
return () => <div>
<div>{ props.title }</div>
<button onClick={ () => emit('update:title', props.title + '_a') }>change</button>
</div>
}
}) // test.tsx
import { defineComponent, ref } from "vue";
import MyComp from "./my-comp";
export default defineComponent({
setup(){
const title = ref('this is title')
const key = 'title'
return () => <>
test comp (tsx)
<MyComp v-model={[title.value, "title"]}></MyComp>
<MyComp v-model={[title.value, 'title']}></MyComp>
<h4 style="color: red">this is not working </h4>
<MyComp v-model={[title.value, key]}></MyComp>
</>
}
}) this will not work because See more precise example here. |
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃悰 Bug description
when I use
v-model:[key]="title"
in tsx锛宨t is not work. Is there a problem with my writing?thanks!
馃彏 Desired result
馃殤 Other information
The text was updated successfully, but these errors were encountered: