From 37c45ef3b6fbc56138e9c02a1381c7cfbe6a6ba0 Mon Sep 17 00:00:00 2001 From: rookie4show Date: Thu, 6 Mar 2025 16:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=EF=BC=8C=E6=B0=B4=E5=8D=B0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=89=A9=E5=B1=95=EF=BC=8C=E5=85=B6=E4=BB=96=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 9 +- src/components/ShikigamiProperty.vue | 38 +++-- src/components/Watermark.vue | 52 ++++--- src/components/YuhunSelect.vue | 41 +++--- src/components/Yys.vue | 198 +++++++++++++++++++-------- src/locales/zh.json | 4 + 6 files changed, 230 insertions(+), 112 deletions(-) diff --git a/src/App.vue b/src/App.vue index 0bc1f4f..365cf03 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,8 +5,10 @@ import Watermark from './components/Watermark.vue' // 引入 Watermark 组件 @@ -15,7 +17,8 @@ import Watermark from './components/Watermark.vue' // 引入 Watermark 组件 #main-container { position: relative; width: 100%; - height: 100vh; /* 视口高度 */ + min-height: 100vh; /* 允许容器扩展 */ + //position: relative; } /* 如果 Yys 组件需要特定的高度或布局,可以根据需要调整 */ diff --git a/src/components/ShikigamiProperty.vue b/src/components/ShikigamiProperty.vue index e18a7eb..fec63ce 100644 --- a/src/components/ShikigamiProperty.vue +++ b/src/components/ShikigamiProperty.vue @@ -18,15 +18,15 @@ - 40 - 献祭 + 40 + 献祭 - 全满 - 111 - 自定义 + 全满 + 111 + 自定义
- - - - + + + + @@ -281,12 +281,22 @@ const openYuhunSelect = (index) => { const closeYuhunSelect = () => showYuhunSelect.value = false -const updateYuhunSelect = (yuhun) => { +const updateYuhunSelect = (yuhun, operator) => { showYuhunSelect.value = false - if(yuhunIndex.value >=0) - shikigami.value.yuhun.yuhunSetEffect[yuhunIndex.value] = (JSON.parse(JSON.stringify(yuhun))) - else - shikigami.value.yuhun.yuhunSetEffect.push(JSON.parse(JSON.stringify(yuhun))) + //Update + if (operator == "Update") { + if (yuhunIndex.value >= 0) + shikigami.value.yuhun.yuhunSetEffect[yuhunIndex.value] = (JSON.parse(JSON.stringify(yuhun))) + else + shikigami.value.yuhun.yuhunSetEffect.push(JSON.parse(JSON.stringify(yuhun))) + } + //Delete + else if (operator == "Remove") { + if (yuhunIndex.value >= 0) { + // 使用splice方法移除指定位置的御魂 + shikigami.value.yuhun.yuhunSetEffect.splice(yuhunIndex.value, 1); + } + } } const cancel = () => { diff --git a/src/components/Watermark.vue b/src/components/Watermark.vue index 753c6ac..7bfaa03 100644 --- a/src/components/Watermark.vue +++ b/src/components/Watermark.vue @@ -1,5 +1,8 @@ \ No newline at end of file diff --git a/src/components/YuhunSelect.vue b/src/components/YuhunSelect.vue index a3cec55..bd0dd5a 100644 --- a/src/components/YuhunSelect.vue +++ b/src/components/YuhunSelect.vue @@ -1,12 +1,15 @@ \ No newline at end of file diff --git a/src/components/Yys.vue b/src/components/Yys.vue index d5bf8a7..25c006d 100644 --- a/src/components/Yys.vue +++ b/src/components/Yys.vue @@ -20,42 +20,71 @@