diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts index 41362b210..934760caf 100644 --- a/app/src/protyle/render/av/col.ts +++ b/app/src/protyle/render/av/col.ts @@ -393,7 +393,7 @@ export const bindEditEvent = (options: { return; } colData.options.push({ - color: (colData.options.length + 1).toString(), + color: ((colData.options.length || 0) % 14 + 1).toString(), name: addOptionElement.value }); transaction(options.protyle, [{ diff --git a/app/src/protyle/render/av/select.ts b/app/src/protyle/render/av/select.ts index 2dfb3683e..65338d148 100644 --- a/app/src/protyle/render/av/select.ts +++ b/app/src/protyle/render/av/select.ts @@ -46,7 +46,7 @@ const filterSelectHTML = (key: string, options: { }); } if (!hasMatch && key) { - const colorIndex = (options?.length || 0) % 13 + 1; + const colorIndex = (options?.length || 0) % 14 + 1; html = ``; - Array.from(Array(13).keys()).forEach(index => { + let html = `
`; + Array.from(Array(14).keys()).forEach(index => { html += ``; }); menu.addItem({ @@ -634,7 +634,7 @@ export const mergeAddOption = (column: IAVColumn, cellValue: IAVCellValue, avID: } }); if (!needAdd) { - const newColor = ((column.options?.length || 0) % 13 + 1).toString(); + const newColor = ((column.options?.length || 0) % 14 + 1).toString(); column.options.push({ name: item.content, color: newColor