mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-21 15:56:10 +01:00
🎨 数据库单选/多选的选项不能为空
This commit is contained in:
parent
e280517002
commit
3cc5644991
2 changed files with 2 additions and 2 deletions
|
|
@ -279,7 +279,7 @@ export const bindEditEvent = (options: { protyle: IProtyle, data: IAV, menuEleme
|
|||
return true;
|
||||
}
|
||||
});
|
||||
if (hasSelected) {
|
||||
if (hasSelected || !addOptionElement.value) {
|
||||
return;
|
||||
}
|
||||
colData.options.push({
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|||
let name = target.parentElement.dataset.name;
|
||||
let color = target.parentElement.dataset.color;
|
||||
const menu = new Menu("av-col-option", () => {
|
||||
if (name === inputElement.value) {
|
||||
if (name === inputElement.value || !inputElement.value) {
|
||||
return;
|
||||
}
|
||||
transaction(protyle, [{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue