Skip to content

Commit

Permalink
refactor!: 移除应用配置中 Element Plus 默认尺寸的配置项
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Oct 31, 2023
1 parent 5f9f1c7 commit dfc5127
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 30 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import.meta.env.VITE_APP_DEBUG_TOOL === 'vconsole' && new VConsole()
</script>

<template>
<ElConfigProvider :locale="zhCn" :size="settingsStore.settings.app.elementSize">
<ElConfigProvider :locale="zhCn">
<RouterView
:style="{
'--g-main-sidebar-actual-width': mainSidebarActualWidth,
Expand Down
1 change: 0 additions & 1 deletion src/settings.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
const globalSettingsDefault: RecursiveRequired<Settings.all> = {
app: {
colorScheme: 'light',
elementSize: 'default',
enablePermission: false,
iconifyOfflineUse: false,
enableAppSetting: false,
Expand Down
7 changes: 0 additions & 7 deletions src/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ declare namespace Settings {
* @可选值 `'dark'` 暗黑模式
*/
colorScheme?: '' | 'light' | 'dark'
/**
* Element Plus 组件默认尺寸
* @默认值 `'default'` 默认
* @可选值 `'large'` 大号
* @可选值 `'small'` 小号
*/
elementSize?: 'default' | 'large' | 'small'
/**
* 是否开启权限功能
* @默认值 `false`
Expand Down
21 changes: 0 additions & 21 deletions src/views/components/AppSetting/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,27 +199,6 @@ function handleCopy() {
<ElInput v-model="settingsStore.settings.copyright.beian" size="small" :disabled="!settingsStore.settings.copyright.enable" />
</div>
<ElDivider>其它</ElDivider>
<div class="setting-item">
<div class="label">
组件尺寸
<ElTooltip content="全局设置 Element Plus 组件的默认尺寸大小" placement="top" :append-to-body="false">
<ElIcon>
<SvgIcon name="ep:question-filled" />
</ElIcon>
</ElTooltip>
</div>
<ElRadioGroup v-model="settingsStore.settings.app.elementSize" size="small">
<ElRadioButton label="large">
较大
</ElRadioButton>
<ElRadioButton label="default">
默认
</ElRadioButton>
<ElRadioButton label="small">
稍小
</ElRadioButton>
</ElRadioGroup>
</div>
<div class="setting-item">
<div class="label">
是否启用权限
Expand Down

0 comments on commit dfc5127

Please sign in to comment.