From ae881f0e4b28281c9b5eb54e391541aec5dd40ec Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 7 Jul 2023 09:35:52 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/8690 --- app/src/protyle/render/av/addCol.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/app/src/protyle/render/av/addCol.ts b/app/src/protyle/render/av/addCol.ts index 82f5991a5..39401283a 100644 --- a/app/src/protyle/render/av/addCol.ts +++ b/app/src/protyle/render/av/addCol.ts @@ -8,12 +8,11 @@ export const addCol = (protyle: IProtyle, blockElement: HTMLElement) => { label: window.siyuan.languages.text, click() { const id = Lute.NewNodeID(); - const type = "text"; transaction(protyle, [{ action: "addAttrViewCol", name: "Text", parentID: blockElement.getAttribute("data-av-id"), - type, + type: "text", id }], [{ action: "removeAttrViewCol", @@ -27,12 +26,11 @@ export const addCol = (protyle: IProtyle, blockElement: HTMLElement) => { label: window.siyuan.languages.number, click() { const id = Lute.NewNodeID(); - const type = "text"; transaction(protyle, [{ action: "addAttrViewCol", - name: "Text", + name: "Number", parentID: blockElement.getAttribute("data-av-id"), - type, + type: "number", id }], [{ action: "removeAttrViewCol", @@ -46,12 +44,11 @@ export const addCol = (protyle: IProtyle, blockElement: HTMLElement) => { label: window.siyuan.languages.select, click() { const id = Lute.NewNodeID(); - const type = "text"; transaction(protyle, [{ action: "addAttrViewCol", name: "Text", parentID: blockElement.getAttribute("data-av-id"), - type, + type: "select", id }], [{ action: "removeAttrViewCol", @@ -65,12 +62,11 @@ export const addCol = (protyle: IProtyle, blockElement: HTMLElement) => { label: window.siyuan.languages.multiSelect, click() { const id = Lute.NewNodeID(); - const type = "text"; transaction(protyle, [{ action: "addAttrViewCol", name: "Text", parentID: blockElement.getAttribute("data-av-id"), - type, + type: "mSelect", id }], [{ action: "removeAttrViewCol", @@ -84,12 +80,11 @@ export const addCol = (protyle: IProtyle, blockElement: HTMLElement) => { label: window.siyuan.languages.date, click() { const id = Lute.NewNodeID(); - const type = "text"; transaction(protyle, [{ action: "addAttrViewCol", name: "Text", parentID: blockElement.getAttribute("data-av-id"), - type, + type: "date", id }], [{ action: "removeAttrViewCol",