Skip to content

Commit a98f4fe

Browse files
committed
im: replace native scrollbar
1 parent 96e4507 commit a98f4fe

File tree

1 file changed

+32
-20
lines changed

1 file changed

+32
-20
lines changed

src/InputMethodConfig.vue

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -162,38 +162,45 @@ function apply() {
162162
@collapse="collapsed = true"
163163
@expand="collapsed = false"
164164
>
165-
<NLayout v-if="adding" style="height: 100%">
166-
<NLayout position="absolute" style="bottom: 50px">
165+
<NLayout style="height: 100%">
166+
<NLayout
167+
position="absolute"
168+
:native-scrollbar="false"
169+
style="bottom: 50px"
170+
>
167171
<NMenu
172+
v-if="adding"
168173
v-model:value="selectedLanguage"
169174
:options="filteredLanguageOptions"
170175
/>
176+
<NMenu
177+
v-else
178+
v-model:value="selectedInputMethod"
179+
:collapsed="collapsed"
180+
:collapsed-width="0"
181+
:options="options"
182+
:render-label="labelWithMinus"
183+
/>
171184
</NLayout>
172185
<NLayoutFooter position="absolute">
173186
<NCheckbox
187+
v-if="adding"
174188
v-model:checked="onlyShowCurrentLanguage"
175189
style="height: 50px; display: flex; justify-content: center; align-items: center"
176190
>
177-
Only show current language
191+
{{ collapsed ? '' : 'Only show current language' }}
178192
</NCheckbox>
193+
<div
194+
v-else
195+
style="display: flex; justify-content: end"
196+
>
197+
<PlusButton
198+
style="align-self: flex-end"
199+
@click="adding = true"
200+
/>
201+
</div>
179202
</NLayoutFooter>
180203
</NLayout>
181-
<div
182-
v-else
183-
style="display: flex; flex-direction: column; justify-content: space-between; height: 100%"
184-
>
185-
<NMenu
186-
v-model:value="selectedInputMethod"
187-
:collapsed="collapsed"
188-
:collapsed-width="0"
189-
:options="options"
190-
:render-label="labelWithMinus"
191-
/>
192-
<PlusButton
193-
style="align-self: flex-end"
194-
@click="adding = true"
195-
/>
196-
</div>
197204
</NLayoutSider>
198205
<NLayout style="min-height: 480px; max-height: calc(100vh - 100px)">
199206
<template v-if="adding">
@@ -203,7 +210,12 @@ function apply() {
203210
>
204211
Select a language from the left list
205212
</div>
206-
<NLayout v-else position="absolute" style="bottom: 50px">
213+
<NLayout
214+
v-else
215+
position="absolute"
216+
:native-scrollbar="false"
217+
style="bottom: 50px"
218+
>
207219
<NCheckboxGroup
208220
v-model:value="imsToAdd"
209221
style="margin: 16px"

0 commit comments

Comments
 (0)