-
doClickBlock(block, e)"
- >
- {{ block.type }}
+
+
+
doClickBlock(block)"
+ >
+ {{ block.type }}
+
@@ -35,11 +35,13 @@
>
doClickBlock(randomBlock[0], e, index)"
+ @click="() => doClickBlock(randomBlock[0], index)"
>
{{ randomBlock[0].type }}
+
+
+
+ 撤回
+ 移出
+ 洗牌
+ 破坏
+
@@ -77,6 +86,10 @@ const {
heightUnit,
doClickBlock,
doStart,
+ doShuffle,
+ doBroke,
+ doRemove,
+ doRevert,
} = useGame();
/**
diff --git a/src/pages/IndexPage.vue b/src/pages/IndexPage.vue
index 1a14fb2..5f56168 100644
--- a/src/pages/IndexPage.vue
+++ b/src/pages/IndexPage.vue
@@ -39,6 +39,20 @@
代码完全开源,欢迎 star
+
@@ -57,7 +71,7 @@ const router = useRouter();
const { setGameConfig } = useGlobalStore();
-const toGamePage = (config?: GameConfig) => {
+const toGamePage = (config?: GameConfigType) => {
if (config) {
setGameConfig(config);
router.push("/game");
@@ -71,4 +85,15 @@ const toGamePage = (config?: GameConfig) => {
#indexPage {
text-align: center;
}
+
+.footer {
+ background: rgba(0, 0, 0, 0.6);
+ color: #fff;
+ padding: 12px;
+ text-align: center;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}