Forráskód Böngészése

:art: Add Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9958

Daniel 1 éve
szülő
commit
641db503f0
2 módosított fájl, 3 hozzáadás és 3 törlés
  1. 1 1
      app/src/protyle/render/av/rollup.ts
  2. 2 2
      kernel/api/av.go

+ 1 - 1
app/src/protyle/render/av/rollup.ts

@@ -37,7 +37,7 @@ const genSearchList = (element: Element, keyword: string, avId: string, cb?: ()
         keyword
         keyword
     }, (response) => {
     }, (response) => {
         let html = "";
         let html = "";
-        response.data.nonRelationKeys.forEach((item: IAVColumn, index: number) => {
+        response.data.keys.forEach((item: IAVColumn, index: number) => {
             html += `<div class="b3-list-item b3-list-item--narrow${index === 0 ? " b3-list-item--focus" : ""}" data-col-id="${item.id}">
             html += `<div class="b3-list-item b3-list-item--narrow${index === 0 ? " b3-list-item--focus" : ""}" data-col-id="${item.id}">
         ${item.icon ? unicode2Emoji(item.icon, "b3-list-item__graphic", true) : `<svg class="b3-list-item__graphic"><use xlink:href="#${getColIconByType(item.type)}"></use></svg>`}
         ${item.icon ? unicode2Emoji(item.icon, "b3-list-item__graphic", true) : `<svg class="b3-list-item__graphic"><use xlink:href="#${getColIconByType(item.type)}"></use></svg>`}
         ${genIconHTML()}
         ${genIconHTML()}

+ 2 - 2
kernel/api/av.go

@@ -40,7 +40,7 @@ func searchAttributeViewNonRelationKey(c *gin.Context) {
 
 
 	nonRelationKeys := model.SearchAttributeViewNonRelationKey(avID, keyword)
 	nonRelationKeys := model.SearchAttributeViewNonRelationKey(avID, keyword)
 	ret.Data = map[string]interface{}{
 	ret.Data = map[string]interface{}{
-		"nonRelationKeys": nonRelationKeys,
+		"keys": nonRelationKeys,
 	}
 	}
 }
 }
 
 
@@ -58,7 +58,7 @@ func searchAttributeViewRelationKey(c *gin.Context) {
 
 
 	relationKeys := model.SearchAttributeViewRelationKey(avID, keyword)
 	relationKeys := model.SearchAttributeViewRelationKey(avID, keyword)
 	ret.Data = map[string]interface{}{
 	ret.Data = map[string]interface{}{
-		"relationKeys": relationKeys,
+		"keys": relationKeys,
 	}
 	}
 }
 }