mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-12 02:04:20 +01:00
This commit is contained in:
parent
e90f594737
commit
f4e030b9eb
2 changed files with 13 additions and 4 deletions
|
|
@ -25,6 +25,9 @@ export const newCardModel = (options: {
|
|||
data: options.data,
|
||||
async init() {
|
||||
if (options.data.cardsData) {
|
||||
for (let i = 0; i < options.app.plugins.length; i++) {
|
||||
options.data.cardsData = await options.app.plugins[i].updateCards(options.data.cardsData);
|
||||
}
|
||||
this.element.innerHTML = genCardHTML({
|
||||
id: this.data.id,
|
||||
cardType: this.data.cardType,
|
||||
|
|
@ -52,6 +55,9 @@ export const newCardModel = (options: {
|
|||
deckID: this.data.id,
|
||||
notebook: this.data.id,
|
||||
}, async (response) => {
|
||||
for (let i = 0; i < options.app.plugins.length; i++) {
|
||||
options.data.cardsData = await options.app.plugins[i].updateCards(options.data.cardsData);
|
||||
}
|
||||
this.element.innerHTML = genCardHTML({
|
||||
id: this.data.id,
|
||||
cardType: this.data.cardType,
|
||||
|
|
@ -87,7 +93,10 @@ export const newCardModel = (options: {
|
|||
rootID: this.data.id,
|
||||
deckID: this.data.id,
|
||||
notebook: this.data.id,
|
||||
}, (response) => {
|
||||
}, async (response) => {
|
||||
for (let i = 0; i < options.app.plugins.length; i++) {
|
||||
options.data.cardsData = await options.app.plugins[i].updateCards(options.data.cardsData);
|
||||
}
|
||||
this.element.innerHTML = genCardHTML({
|
||||
id: this.data.id,
|
||||
cardType: this.data.cardType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue