Home > front end >  According to the button style judgment weight when rendering dom return data
According to the button style judgment weight when rendering dom return data

Time:09-25


At the beginning of my idea is to give it a table column binding a ref, because here are two of the same button, I don't know is not feasible, so for a moment in this way,
Because the button bindings modify permissions, when I have no change permissions assigned to it, I hope I can to determine its style, namely this. $refs. MyStatus. $el. Style. The display, when it is "", I display the button inside the text content, is the state is normal or disabled, can't click and modify,

CodePudding user response:

The two button to delete a, another written:
 
//remove the if, it is ok to add this
: disabled="scope. Row. The status!=='normal'
"Size="mini"
//the unchanged under the
.

CodePudding user response:

That is to write the ref attribute inside the button, I print the cosole
 console. The log (this. $refs. MyStatus) 

The returned result is undefined, let alone for its style and then to judge,
Because I am in the outer layer of the el - packing a ref attribute table too, that if so how do you judge?
  • Related