mirror of
https://github.com/fanchenio/DawnLauncher.git
synced 2025-07-13 21:02:10 +08:00
Settings - Subclassification - Added name alignment function, which can adjust the alignment of subcategory names in the project area on the right side of the main interface.
This commit is contained in:
parent
0d93c2f922
commit
dcb2b1cc38
@ -185,15 +185,18 @@ function getSubClassification({
|
||||
itemAreaNameFontSize = 14,
|
||||
itemAreaNameFontWeight = 700,
|
||||
itemAreaNameFontLineHeight = 1.25,
|
||||
itemAreaNameAlign = "left",
|
||||
}: {
|
||||
itemAreaNameFontSize?: number | null;
|
||||
itemAreaNameFontWeight?: number | null;
|
||||
itemAreaNameFontLineHeight?: number | null;
|
||||
itemAreaNameAlign?: "left" | "center" | "right" | null;
|
||||
}): SubClassification {
|
||||
return {
|
||||
itemAreaNameFontSize: itemAreaNameFontSize ?? 14,
|
||||
itemAreaNameFontWeight: itemAreaNameFontWeight ?? 700,
|
||||
itemAreaNameFontLineHeight: itemAreaNameFontLineHeight ?? 1.25,
|
||||
itemAreaNameAlign: itemAreaNameAlign ?? "left",
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
lineHeight:
|
||||
store.setting.subClassification.itemAreaNameFontLineHeight +
|
||||
'rem',
|
||||
textAlign: store.setting.subClassification.itemAreaNameAlign,
|
||||
}"
|
||||
>
|
||||
{{ classification.name }}
|
||||
|
@ -771,6 +771,13 @@
|
||||
<div class="mx-2" v-if="selectedMenuId === 3">
|
||||
<NForm label-placement="left" :show-feedback="false" size="small">
|
||||
<span class="block font-semibold">{{ store.language.name }}</span>
|
||||
<NFormItem :label="store.language.align" class="mt-1">
|
||||
<NSelect
|
||||
v-model:value="setting.subClassification.itemAreaNameAlign"
|
||||
:options="itemAreaSubclassificationNameAlignOptions"
|
||||
size="small"
|
||||
></NSelect>
|
||||
</NFormItem>
|
||||
<NFormItem :label="store.language.fontSize" class="mt-1">
|
||||
<NInputNumber
|
||||
v-model:value="setting.subClassification.itemAreaNameFontSize"
|
||||
@ -1771,6 +1778,21 @@ let backgroundImagePositionOptions = ref([
|
||||
value: "right",
|
||||
},
|
||||
]);
|
||||
// 子分类项目区域名称对齐
|
||||
let itemAreaSubclassificationNameAlignOptions = ref([
|
||||
{
|
||||
label: store.language.left,
|
||||
value: "left",
|
||||
},
|
||||
{
|
||||
label: store.language.center,
|
||||
value: "center",
|
||||
},
|
||||
{
|
||||
label: store.language.right,
|
||||
value: "right",
|
||||
},
|
||||
]);
|
||||
// 监听
|
||||
watch(
|
||||
() => setting.value,
|
||||
|
2
types/setting.d.ts
vendored
2
types/setting.d.ts
vendored
@ -118,6 +118,8 @@ export interface SubClassification {
|
||||
itemAreaNameFontWeight: number;
|
||||
// 名称字体行高(项目区域)
|
||||
itemAreaNameFontLineHeight: number;
|
||||
// 名称对齐(项目区域)
|
||||
itemAreaNameAlign: "left" | "center" | "right";
|
||||
}
|
||||
|
||||
// 项目
|
||||
|
Loading…
Reference in New Issue
Block a user