ElementUI dynamically renders form data, and check boxes do not display selected items

problem description

question: elementUI dynamically renders form data, check boxes do not display selected items

scenario of the problem

first of all, there will be a form submission page that submits user information, and after the submission is successful, the data will be refreshed.

at present, the problem is that after the check box in the form is refreshed, the selected item does not show the selected status, in addition, it cannot be selected by a single click again, but all is selected;

Picture description

Picture description

related codes

returned field structure: course1: "[" Joint "," Aesthetics "]"

"
  • template Code
// 
this.resumeForm.course1 = res.data.course1;

solve

Dec.08,2021

if the course1: "[Joint", "Aesthetics"] "" code you intercepted is not copied incorrectly, it should be an unserialized string rather than an array.
the requested data assignment can be changed to the following code

this.resumeForm.course1 = JSON.parse(res.data.course1);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5b35e-4560b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5b35e-4560b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?