mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🎨 Try fill flashcard to db tpl https://github.com/siyuan-note/siyuan/issues/10502#issuecomment-1986703280
This commit is contained in:
parent
8b1f42acea
commit
f163fbb669
1 changed files with 12 additions and 12 deletions
|
|
@ -1138,18 +1138,18 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
|
||||||
|
|
||||||
// 获取闪卡信息
|
// 获取闪卡信息
|
||||||
flashcards := map[string]*Flashcard{}
|
flashcards := map[string]*Flashcard{}
|
||||||
deck := Decks[builtinDeckID]
|
//deck := Decks[builtinDeckID]
|
||||||
if nil != deck {
|
//if nil != deck {
|
||||||
var blockIDs []string
|
// var blockIDs []string
|
||||||
for _, row := range ret.Rows {
|
// for _, row := range ret.Rows {
|
||||||
blockIDs = append(blockIDs, row.ID)
|
// blockIDs = append(blockIDs, row.ID)
|
||||||
}
|
// }
|
||||||
cards := deck.GetCardsByBlockIDs(blockIDs)
|
// cards := deck.GetCardsByBlockIDs(blockIDs)
|
||||||
now := time.Now()
|
// now := time.Now()
|
||||||
for _, card := range cards {
|
// for _, card := range cards {
|
||||||
flashcards[card.BlockID()] = newFlashcard(card, builtinDeckID, now)
|
// flashcards[card.BlockID()] = newFlashcard(card, builtinDeckID, now)
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
for _, row := range ret.Rows {
|
for _, row := range ret.Rows {
|
||||||
for _, cell := range row.Cells {
|
for _, cell := range row.Cells {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue