mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
a95edc256c
commit
06c54f43ef
2 changed files with 7 additions and 11 deletions
|
|
@ -182,6 +182,11 @@ export const bindCardEvent = (options: {
|
|||
const countElement = options.element.querySelector('[data-type="count"] span');
|
||||
countElement.innerHTML = (index + 1).toString();
|
||||
const actionElements = options.element.querySelectorAll(".card__action");
|
||||
if (options.index === 0) {
|
||||
actionElements[0].firstElementChild.setAttribute("disabled", "disabled");
|
||||
} else {
|
||||
actionElements[0].firstElementChild.removeAttribute("disabled");
|
||||
}
|
||||
const filterElement = options.element.querySelector('[data-type="filter"]');
|
||||
const fetchNewRound = () => {
|
||||
const currentCardType = filterElement.getAttribute("data-cardtype");
|
||||
|
|
@ -248,7 +253,7 @@ export const bindCardEvent = (options: {
|
|||
icon: "iconRiffCard",
|
||||
title: window.siyuan.languages.spaceRepetition,
|
||||
data: {
|
||||
blocks: options.cardsData.cards,
|
||||
cardsData: options.cardsData,
|
||||
index,
|
||||
cardType: filterElement.getAttribute("data-cardtype") as TCardType,
|
||||
id: filterElement.getAttribute("data-id"),
|
||||
|
|
@ -351,7 +356,7 @@ export const bindCardEvent = (options: {
|
|||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
hideElements(["toolbar", "hint", "util"], editor.protyle);
|
||||
hideElements(["toolbar", "hint", "util", "gutter"], editor.protyle);
|
||||
if (type === "-1") { // 显示答案
|
||||
if (actionElements[0].classList.contains("fn__none")) {
|
||||
type = "3";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue