undefinedfix
Sign in

Vue parent to child parameter not available

user620747 edited in Sun, 29 May 2022

子组件

父

报错

My ultimate goal is to get it in methods. Now I can't get it on the page. Why

7 Replies
mhjld
commented on Sun, 29 May 2022

I found the problem myself, the component is too long.. There is also a props below:{ msg:String }It's supposed to be the back, covering the front

MNSH
commented on Sun, 29 May 2022

Change membertype to member type and dueid to dueid

bqqqu
commented on Sun, 29 May 2022
props:{
  memberType:{
     type:Number,
     default:0
  }
}

Props requires a default initialization value.

zkuir
commented on Sun, 29 May 2022

There should be no problem. Do you directly use membertype and dueid in methods this.memberType and this.dueId call

Sniper
commented on Mon, 30 May 2022

I suggest that you complete the page layout and feel that you have called the same name method in methods.

jstoobz
commented on Mon, 30 May 2022

Either it is in the form of direct array, or each value is an object and a default value is brought to it

Henery2
commented on Mon, 30 May 2022

I don't know. I'll wait for the developer downstairs to reply

lock This question has been locked and the reply function has been disabled.