Skip to content

Commit 125b630

Browse files
committed
feat: semi
1 parent 7d093f8 commit 125b630

File tree

6 files changed

+19
-30
lines changed

6 files changed

+19
-30
lines changed

src/pages/app/components/HelpUs/MemberList.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import { getMembers } from "@api/crowdin"
99
import { t } from "@app/locale"
1010
import { useRequest } from "@hooks"
1111
import Box from "@pages/components/Box"
12-
import Flex from "@pages/components/Flex"
13-
import { ElDivider } from "element-plus"
12+
import { ElDivider, ElSpace } from "element-plus"
1413
import { defineComponent } from "vue"
1514

1615
const _default = defineComponent(() => {
@@ -21,10 +20,7 @@ const _default = defineComponent(() => {
2120
return () => (
2221
<Box marginTop={10}>
2322
<ElDivider>{t(msg => msg.helpUs.contributors)}</ElDivider>
24-
<Flex
25-
wrap gap={15} justify="space-around"
26-
marginInline="auto" paddingBlock={5}
27-
>
23+
<ElSpace wrap>
2824
{list.value?.map(({ avatarUrl, username }, idx, arr) => (
2925
<a
3026
href={`https://crowdin.com/profile/${username}`}
@@ -39,7 +35,7 @@ const _default = defineComponent(() => {
3935
/>
4036
</a>
4137
))}
42-
</Flex>
38+
</ElSpace>
4339
</Box>
4440
)
4541
})

src/pages/app/components/Option/components/LimitOption/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import { t } from "@app/locale"
88
import { processVerification } from "@app/util/limit"
99
import { Edit } from "@element-plus/icons-vue"
10+
import { locale } from '@i18n'
1011
import { defaultDailyLimit } from "@util/constant/option"
1112
import { ElButton, ElInput, ElInputNumber, ElMessage, ElMessageBox, ElOption, ElSelect, ElSwitch } from "element-plus"
1213
import { defineComponent, type StyleValue } from "vue"
@@ -61,6 +62,13 @@ const confirm4Strict = async (): Promise<void> => {
6162
})
6263
}
6364

65+
const LEVEL_SELECT_WIDTH: Messages<number> = {
66+
en: 330,
67+
uk: 330,
68+
zh_CN: 210,
69+
zh_TW: 210,
70+
}
71+
6472
const _default = defineComponent((_, ctx) => {
6573
const { option } = useOption<timer.option.LimitOption>({ defaultValue: defaultDailyLimit, copy })
6674
const { verified, verify } = useVerify(option)
@@ -118,12 +126,12 @@ const _default = defineComponent((_, ctx) => {
118126
/>
119127
<OptionItem
120128
label={msg => msg.option.dailyLimit.level.label}
121-
defaultValue={t(msg => msg.option.dailyLimit.level[defaultDailyLimit().limitLevel])}
129+
defaultValue={msg => msg.option.dailyLimit.level[defaultDailyLimit().limitLevel]}
122130
>
123131
<ElSelect
124132
modelValue={option.limitLevel}
125133
size="small"
126-
class='option-daily-limit-level-select'
134+
style={{ '--el-select-width': `${LEVEL_SELECT_WIDTH[locale] ?? 370}px` }}
127135
onChange={handleLevelChange}
128136
>
129137
{ALL_LEVEL.map(item => <ElOption value={item} label={t(msg => msg.option.dailyLimit.level[item])} />)}

src/pages/app/components/Option/components/LimitOption/limit-option.sass

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,3 @@
55
display: none
66
.el-message-box__message
77
flex: 1
8-
9-
.option-daily-limit-level-select>.el-select__wrapper
10-
width: 100% !important
11-
12-
.option-daily-limit-level-select
13-
width: 370px !important
14-
html[data-locale="en"],html[data-locale="uk"]
15-
.option-daily-limit-level-select
16-
width: 330px !important
17-
html[data-locale="zh_CN"],html[data-locale="zh_TW"]
18-
.option-daily-limit-level-select
19-
width: 210px !important

src/pages/app/components/Option/style.sass

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
display: inline-flex
4343
height: 28px
4444
min-width: 120px
45-
width: 120px
4645
.el-select__wrapper
4746
width: 100%
4847
.el-date-editor--time

src/pages/app/components/RuleMerge/ItemList.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
import { t } from "@app/locale"
99
import mergeRuleDatabase from "@db/merge-rule-database"
1010
import { useManualRequest, useRequest } from "@hooks"
11-
import Flex from "@pages/components/Flex"
12-
import { ElMessage, ElMessageBox } from "element-plus"
11+
import { ElMessage, ElMessageBox, ElSpace } from "element-plus"
1312
import { defineComponent, ref } from "vue"
1413
import AddButton from './components/AddButton'
1514
import Item, { type ItemInstance } from './components/Item'
@@ -70,7 +69,7 @@ const _default = defineComponent(() => {
7069
}
7170

7271
return () => (
73-
<Flex gap={10} wrap justify="space-between">
72+
<ElSpace size="small">
7473
{items.value?.map((item, idx) =>
7574
<Item
7675
ref={() => itemRefs.value[idx]}
@@ -81,7 +80,7 @@ const _default = defineComponent(() => {
8180
/>
8281
)}
8382
<AddButton onSave={handleAdd} />
84-
</Flex>
83+
</ElSpace>
8584
)
8685
})
8786

src/pages/app/components/Whitelist/WhitePanel/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
* https://opensource.org/licenses/MIT
66
*/
77
import { t } from "@app/locale"
8-
import Flex from "@pages/components/Flex"
98
import whitelistService from "@service/whitelist/service"
10-
import { ElMessage, ElMessageBox } from "element-plus"
9+
import { ElMessage, ElMessageBox, ElSpace } from "element-plus"
1110
import { defineComponent, onBeforeMount, reactive } from "vue"
1211
import AddButton from './AddButton'
1312
import WhiteItem from './WhiteItem'
@@ -64,7 +63,7 @@ const _default = defineComponent(() => {
6463
}
6564

6665
return () => (
67-
<Flex gap={10} wrap justify="space-between">
66+
<ElSpace size="small">
6867
{whitelist.map((white, index) => (
6968
<WhiteItem
7069
white={white}
@@ -73,7 +72,7 @@ const _default = defineComponent(() => {
7372
/>
7473
))}
7574
<AddButton onSave={handleAdd} />
76-
</Flex>
75+
</ElSpace>
7776
)
7877
})
7978

0 commit comments

Comments
 (0)