mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-29 05:49:07 +08:00
feat: 网站,创建网站分组时,禁止多个分组处于编辑状态
This commit is contained in:
parent
3db3df7ffe
commit
1895219787
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user