mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve Add to Database https://github.com/siyuan-note/siyuan/issues/10659
This commit is contained in:
parent
ca9427cc82
commit
3182f7abb8
1 changed files with 15 additions and 13 deletions
|
|
@ -1232,13 +1232,14 @@ func GetAttributeView(avID string) (ret *av.AttributeView) {
|
||||||
}
|
}
|
||||||
|
|
||||||
type AvSearchResult struct {
|
type AvSearchResult struct {
|
||||||
AvID string `json:"avID"`
|
AvID string `json:"avID"`
|
||||||
AvName string `json:"avName"`
|
AvName string `json:"avName"`
|
||||||
ViewName string `json:"viewName"`
|
ViewName string `json:"viewName"`
|
||||||
ViewID string `json:"viewID"`
|
ViewID string `json:"viewID"`
|
||||||
BlockID string `json:"blockID"`
|
ViewLayout av.LayoutType `json:"viewLayout"`
|
||||||
HPath string `json:"hPath"`
|
BlockID string `json:"blockID"`
|
||||||
Children []*AvSearchResult `json:"children,omitempty"`
|
HPath string `json:"hPath"`
|
||||||
|
Children []*AvSearchResult `json:"children,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AvSearchTempResult struct {
|
type AvSearchTempResult struct {
|
||||||
|
|
@ -1392,12 +1393,13 @@ func SearchAttributeView(keyword string, excludeAvIDs []string) (ret []*AvSearch
|
||||||
|
|
||||||
for _, view := range attrView.Views {
|
for _, view := range attrView.Views {
|
||||||
child := &AvSearchResult{
|
child := &AvSearchResult{
|
||||||
AvID: avID,
|
AvID: avID,
|
||||||
AvName: existAv.AvName,
|
AvName: existAv.AvName,
|
||||||
ViewName: view.Name,
|
ViewName: view.Name,
|
||||||
ViewID: view.ID,
|
ViewID: view.ID,
|
||||||
BlockID: blockID,
|
ViewLayout: view.LayoutType,
|
||||||
HPath: hPath,
|
BlockID: blockID,
|
||||||
|
HPath: hPath,
|
||||||
}
|
}
|
||||||
parent.Children = append(parent.Children, child)
|
parent.Children = append(parent.Children, child)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue