update 优化userSelect 选中未确定,再次打开还保留选中的问题
This commit is contained in:
parent
f36e2c713d
commit
cb18e08144
@ -171,6 +171,7 @@ const confirm = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const computedIds = (data) => {
|
const computedIds = (data) => {
|
||||||
|
console.log(data);
|
||||||
if (data instanceof Array) {
|
if (data instanceof Array) {
|
||||||
return [...data];
|
return [...data];
|
||||||
} else if (typeof data === 'string') {
|
} else if (typeof data === 'string') {
|
||||||
@ -275,10 +276,10 @@ const initSelectUser = async () => {
|
|||||||
if (defaultSelectUserIds.value.length > 0) {
|
if (defaultSelectUserIds.value.length > 0) {
|
||||||
const { data } = await api.optionSelect(defaultSelectUserIds.value);
|
const { data } = await api.optionSelect(defaultSelectUserIds.value);
|
||||||
selectUserList.value = data;
|
selectUserList.value = data;
|
||||||
|
const users = userList.value.filter((item) => {
|
||||||
|
return defaultSelectUserIds.value.includes(String(item.userId));
|
||||||
|
});
|
||||||
await nextTick(() => {
|
await nextTick(() => {
|
||||||
const users = userList.value.filter((item) => {
|
|
||||||
return defaultSelectUserIds.value.includes(String(item.userId));
|
|
||||||
});
|
|
||||||
tableRef.value.setCheckboxRow(users, true);
|
tableRef.value.setCheckboxRow(users, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user