Vue data change view does not update the solution

When the front-end and back-end are jointly debugged, sometimes the front-end needs to adjust the back-end data format. For complex types of data, sometimes the view is not updated through the click event assignment operation, which can be processed through the $forceUpdate() event

 

handleClick(e) {
				this.list[e].child.flag = true
				this.$forceUpdate();
			}

Add this.$forceUpdate() under the assignment logic;

 

Guess you like

Origin blog.csdn.net/Dajdhushvj/article/details/125494644