父组件向子组件传值id,传不到?

小程序 文章 2022-03-09 11:20 410 0 全屏看文

AI助手支持GPT4.0

父组件向子组件传值id,传不到?The parent component passes the value id to the child component, but it cannot be passed?

父组件向子组件传值id,传不到?

父组件向子组件传值id,传不到, 但是传 idd 可以为啥


The parent component passes the value ID to the child component, but it cannot be passed, but why can it pass the IDD

回答:

八九:

那就换个名字呗

VBit:

你传值用“id”命名会冲突,加前缀或后缀 不要用本身属性关键字传值

brave:

1、这是父组件给子组件传值吧

2、标签默认就有 class、id、style 等特性,那肯定不能命名重复,否则会被覆盖

-EOF-

AI助手支持GPT4.0