-
-
Notifications
You must be signed in to change notification settings - Fork 6
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use v-model in vue2.7 jsx #7
Comments
Actions to access export default defineComponent({
setup() {
const date3 = ref(new Date());
return () => <DatePicker v-model={date3.value}></DatePicker>;
},
}); |
Thanks for your help, your answer resolve my problem. https://stackblitz.com/edit/vitejs-vite-rmxqpw?file=src/App.vue |
@Mr-xzq 我也遇到了,咋解决 |
一个组件上的 这是我一个临时的解决方案:https://stackblitz.com/edit/vitejs-vite-hocdde?file=src/components/FormItem.vue <script lang="jsx">
import { defineComponent, computed, ref } from 'vue';
export default defineComponent({
name: 'FormItem',
inheritAttrs: false,
props: ['value'],
emits: ['input'],
setup(props, { emit }) {
return () => {
return (
<el-input
value={props.value}
vOn:input={(val) => emit('input', val)}
clearable
placeholder="请输入"
/>
);
};
},
});
</script>
|
@Mr-xzq 感谢解答 |
The text was updated successfully, but these errors were encountered: