Skip to content

Commit

Permalink
feat: mod 设置页面 number 的 step
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Sep 17, 2024
1 parent 3acc4f1 commit bb1a703
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export default defineComponent({

watch(() => show.value, async (val) => {
if (!val && config.value) {
await api.SetAquaMaiConfig(config.value)
try {
await api.SetAquaMaiConfig(config.value)
} catch (e) {
globalCapture(e, "保存 AquaMai 配置失败")
}
}
})

Expand Down Expand Up @@ -113,7 +117,7 @@ export default defineComponent({
<NFlex class="h-34px" align="center">
{typeof section[k] === 'boolean' && <NSwitch v-model:value={section[k]}/>}
{typeof section[k] === 'string' && <NInput v-model:value={section[k]} placeholder=""/>}
{typeof section[k] === 'number' && <NInputNumber v-model:value={section[k]} placeholder=""/>}
{typeof section[k] === 'number' && <NInputNumber v-model:value={section[k]} placeholder="" step={comments.steps[k] || 1}/>}
{comments.shouldEnableOptions[key]?.[k] && !section[k] && <ProblemsDisplay problems={['需要开启此选项']}/>}
</NFlex>
{comments[key]?.[k]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,15 @@ fix:
utils:
logUserId: 在玩家登录时调试输出用户 ID
judgeAdjustA: 全局增加 A 判,单位和游戏里一样
judgeAdjustB: 全局增加 B 判,单位和游戏里一样
touchDelay: 给触摸屏增加额外延迟,单位为毫秒,一秒 = 1000 毫秒。必须是整数

shouldEnableOptions:
ux:
loadAssetsPng: true
loadLocalBga: true

steps:
judgeAdjustA: 0.1
judgeAdjustB: 0.1
1 change: 1 addition & 0 deletions MaiChartManager/Front/src/store/refs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const errorId = ref<string>();
export const errorContext = ref<string>();

export const globalCapture = (err: any, context: string) => {
console.log(err)
error.value = err;
errorContext.value = context;
errorId.value = captureException(err.error || err, {
Expand Down

0 comments on commit bb1a703

Please sign in to comment.