Skip to content

Commit d37cc3a

Browse files
committed
fix: 某些窗口大小下导入的弹窗超出屏幕
1 parent 498d3e4 commit d37cc3a

6 files changed

Lines changed: 10 additions & 12 deletions

File tree

‎MaiChartManager/Front/src/components/ChangelogModal/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default defineComponent({
5151
title={`${t('about.changelogTitle')} - v${changelogTargetVersion.value}`}
5252
v-model:show={showChangelogModal.value}
5353
>
54-
<div class={[style.mdContent, 'cst of-y-auto of-x-hidden max-h-[80vh]']}>
54+
<div class={[style.mdContent, 'cst of-x-hidden']}>
5555
{changelogContent.value
5656
? <VueMarkdownIt source={changelogContent.value} />
5757
: <div class="text-center py-4 op-60">{t('common.loading')}</div>

‎MaiChartManager/Front/src/components/StartupErrorDialog.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineComponent({
2929
v-model:show={show.value}
3030
class="bg-#FCEEEE!"
3131
>
32-
<div class="flex flex-col gap-2 max-h-70vh overflow-y-auto">
32+
<div class="flex flex-col gap-2">
3333
<div class="flex flex-col gap-1">
3434
{errors.data.value?.data?.map((error) => {
3535
return <div>

‎MaiChartManager/Front/src/views/Charts/AssetDirsManager/CheckConflictButton/CheckContent.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default defineComponent({
6060
<Button onClick={requestDelete} disabled={!selectedIds.value.length}>{t('assetDir.conflict.deleteSelected')}</Button>
6161
{load.value ? <div class="c-neutral text-center p-4">Loading...</div> :
6262
data.value.length === 0 ? <div class="c-neutral text-center p-4">{t('assetDir.conflict.noConflict')}</div> :
63-
<div class="of-y-auto max-h-70vh">
63+
<div>
6464
<table class="w-full text-sm border-collapse">
6565
<thead>
6666
<tr class="border-b border-neutral/20">

‎MaiChartManager/Front/src/views/Charts/ImportCreateChartButton/ImportChartButton/ErrorDisplayIdInput.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ export default defineComponent({
6161
<ImportAlert errors={props.errors} tempOptions={props.tempOptions}></ImportAlert>
6262
{!!props.meta.length && <>
6363
<div>{t('chart.import.assignId')}</div>
64-
<div class="of-y-auto cst max-h-[50dvh]">
65-
<div class="flex flex-col gap-3">
66-
{props.meta.map((meta, i) => <MusicIdInput key={i} meta={meta} utage={props.savedOptions.genreId === UTAGE_GENRE}/>)}
67-
</div>
64+
{/* 高度交给 Modal 的 content 区统一滚动,这里不再单独限高,否则大窗口下也被压成半屏 */}
65+
<div class="flex flex-col gap-3">
66+
{props.meta.map((meta, i) => <MusicIdInput key={i} meta={meta} utage={props.savedOptions.genreId === UTAGE_GENRE}/>)}
6867
</div>
6968
<div>
7069
<div class="ml-1 text-sm">{t('music.edit.genre')}</div>

‎MaiChartManager/Front/src/views/Charts/ImportCreateChartButton/ImportChartButton/ImportAlert.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export default defineComponent({
2222
})
2323

2424
return () => <>
25-
<div class="of-y-auto cst max-h-20vh">
26-
<div class="flex flex-col gap-2">
25+
{/* 不再单独限高,交给 Modal 的 content 区统一滚动,避免弹窗内套两层滚动条 */}
26+
<div class="flex flex-col gap-2">
2727
{
2828
props.errors.map((error, i) => {
2929
if ('first' in error) {
@@ -86,15 +86,14 @@ export default defineComponent({
8686
</div>
8787
})
8888
}
89-
</div>
9089
</div>
9190
<Modal
9291
width="min(70vw,70em)"
9392
title={t('common.detail')}
9493
show={!!detail.value}
9594
onUpdateShow={() => detail.value = undefined}
9695
>
97-
<pre class="max-h-60vh of-auto cst whitespace-pre-wrap break-words text-xs font-mono">{detail.value}</pre>
96+
<pre class="whitespace-pre-wrap break-words text-xs font-mono">{detail.value}</pre>
9897
</Modal>
9998
</>
10099
}

0 commit comments

Comments
 (0)