在子组件中直接
defineProps<{
cjgcSelectVisible: boolean;
bzrq: string;
}>();
然后在js中对bzrq操作会取不到值
defineProps<Props>()会返回一个对象,接收一下就可以取到了
可以写成
const props = defineProps<{
cjgcSelectVisible: boolean;
bzrq: string;
}>();
然后props.bzrq就可以了
在子组件中直接
defineProps<{
cjgcSelectVisible: boolean;
bzrq: string;
}>();
然后在js中对bzrq操作会取不到值
defineProps<Props>()会返回一个对象,接收一下就可以取到了
可以写成
const props = defineProps<{
cjgcSelectVisible: boolean;
bzrq: string;
}>();
然后props.bzrq就可以了