feat: 网站,创建网站分组时,禁止多个分组处于编辑状态

This commit is contained in:
zhengkunwang223 2023-02-20 17:40:19 +08:00 committed by zhengkunwang223
parent 3db3df7ffe
commit 1895219787

View File

@ -112,6 +112,14 @@ const acceptParams = async () => {
}; };
const openCreate = () => { const openCreate = () => {
for (const d of data.value) {
if (d.name == '') {
return;
}
if (d.edit) {
d.edit = false;
}
}
const g = { const g = {
id: 0, id: 0,
name: '', name: '',
@ -135,6 +143,15 @@ const deleteGroup = (index: number) => {
}; };
const editGroup = (index: number) => { const editGroup = (index: number) => {
for (const i in data.value) {
const d = data.value[i];
if (d.name == '') {
data.value.splice(Number(i), 1);
}
if (d.edit) {
d.edit = false;
}
}
data.value[index].edit = true; data.value[index].edit = true;
}; };