consts
这个提交包含在:
父节点
fd76c5ebe4
当前提交
5c428750bb
6
tarot.js
6
tarot.js
@ -40,7 +40,7 @@ class Tarot {
|
||||
}
|
||||
|
||||
drawCard() {
|
||||
let cardName = this.deck.random();
|
||||
const cardName = this.deck.random();
|
||||
if (cardName === null) {
|
||||
this.render();
|
||||
return;
|
||||
@ -89,8 +89,8 @@ class Tarot {
|
||||
continue;
|
||||
}
|
||||
|
||||
let bp = document.querySelector(".card.blueprint");
|
||||
let cardElem = bp.cloneNode(true);
|
||||
const bp = document.querySelector(".card.blueprint");
|
||||
const cardElem = bp.cloneNode(true);
|
||||
cardElem.classList.remove("blueprint");
|
||||
cardElem.setAttribute("data-cardName", cardName)
|
||||
cardElem.setAttribute("style", "float:left; width: 150px; height: 250px; border: 1px solid pink;");
|
||||
|
正在加载...
x
在新工单中引用
屏蔽一个用户