await和$nextTick的使用

async editDialog(row) {
let { userId, loginName } = row;
if (loginName == "admin") {
Message.warning("admin用户不接受更改");
return;
}
this.formOp = "edit";
this.vStatus.dialogEditFormVisible = true;
this.loadingStatus.loadingOthers = true;
await this.$nextTick(()=>{});
Object.assign(this.editForm, this.initForm);
Object.assign(this.editForm, row);
row.treeIds = row.treeIds || [];
this.editForm.xiaoman = row.treeIds.length ? row.treeIds[0] : "";
let fg = await findRoleList(userId, { data: {} });
let res1 = fg.filter((item) => item.flag).map((item) => item.roleId);
this.editForm.roleIds = res1;
this.loadingStatus.loadingOthers = false;
},
漫思