mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2026-01-15 02:57:09 +08:00
refactor: 调整 eslint.config.js,优化代码格式
This commit is contained in:
@@ -30,7 +30,7 @@ const queryParam = reactive({
|
||||
isRead: false,
|
||||
sort: ['createTime,desc'],
|
||||
page: 1,
|
||||
size: 5
|
||||
size: 5,
|
||||
})
|
||||
|
||||
const messageList = ref<MessageResp[]>()
|
||||
|
||||
@@ -6,16 +6,20 @@
|
||||
<a-space>
|
||||
<a-badge>
|
||||
<template #content>
|
||||
<icon-check-circle-fill v-if="appStore.layout === 'left'" style="color: rgb(var(--success-6))"
|
||||
:size="16"></icon-check-circle-fill>
|
||||
<icon-check-circle-fill
|
||||
v-if="appStore.layout === 'left'" style="color: rgb(var(--success-6))"
|
||||
:size="16"
|
||||
></icon-check-circle-fill>
|
||||
</template>
|
||||
<LayoutItem mode="left" @click="appStore.layout = 'left'"></LayoutItem>
|
||||
<p class="layout-text">默认布局</p>
|
||||
</a-badge>
|
||||
<a-badge>
|
||||
<template #content>
|
||||
<icon-check-circle-fill v-if="appStore.layout === 'mix'" :size="16"
|
||||
style="color: rgb(var(--success-6))"></icon-check-circle-fill>
|
||||
<icon-check-circle-fill
|
||||
v-if="appStore.layout === 'mix'" :size="16"
|
||||
style="color: rgb(var(--success-6))"
|
||||
></icon-check-circle-fill>
|
||||
</template>
|
||||
<LayoutItem mode="mix" @click="appStore.layout = 'mix'"></LayoutItem>
|
||||
<p class="layout-text">混合布局</p>
|
||||
@@ -25,8 +29,10 @@
|
||||
|
||||
<a-divider orientation="center">系统主题</a-divider>
|
||||
<a-row justify="center">
|
||||
<ColorPicker theme="dark" :color="appStore.themeColor" :sucker-hide="true" :colors-default="defaultColorList"
|
||||
@change-color="changeColor"></ColorPicker>
|
||||
<ColorPicker
|
||||
theme="dark" :color="appStore.themeColor" :sucker-hide="true" :colors-default="defaultColorList"
|
||||
@change-color="changeColor"
|
||||
></ColorPicker>
|
||||
</a-row>
|
||||
|
||||
<a-divider orientation="center">界面显示</a-divider>
|
||||
@@ -36,16 +42,20 @@
|
||||
<a-switch v-model="appStore.tab" />
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="页签风格">
|
||||
<a-select v-model="appStore.tabMode" placeholder="请选择" :options="tabModeList" :disabled="!appStore.tab"
|
||||
:trigger-props="{ autoFitPopupMinWidth: true }" :style="{ width: '120px' }">
|
||||
<a-select
|
||||
v-model="appStore.tabMode" placeholder="请选择" :options="tabModeList" :disabled="!appStore.tab"
|
||||
:trigger-props="{ autoFitPopupMinWidth: true }" :style="{ width: '120px' }"
|
||||
>
|
||||
</a-select>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="动画显示">
|
||||
<a-switch v-model="appStore.animate" />
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="动画显示">
|
||||
<a-select v-model="appStore.animateMode" placeholder="请选择" :options="animateModeList"
|
||||
:disabled="!appStore.animate" :style="{ width: '120px' }">
|
||||
<a-select
|
||||
v-model="appStore.animateMode" placeholder="请选择" :options="animateModeList"
|
||||
:disabled="!appStore.animate" :style="{ width: '120px' }"
|
||||
>
|
||||
</a-select>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="深色菜单">
|
||||
@@ -72,17 +82,16 @@
|
||||
import { ColorPicker } from 'vue-color-kit'
|
||||
import 'vue-color-kit/dist/vue-color-kit.css'
|
||||
import LayoutItem from './components/LayoutItem.vue'
|
||||
import { useAppStore, useUserStore } from '@/stores'
|
||||
import { useAppStore } from '@/stores'
|
||||
|
||||
defineOptions({ name: 'SettingDrawer' })
|
||||
const appStore = useAppStore()
|
||||
const userStore = useUserStore()
|
||||
const visible = ref(false)
|
||||
|
||||
const tabModeList: App.TabItem[] = [
|
||||
{ label: '卡片', value: 'card' },
|
||||
{ label: '间隔卡片', value: 'card-gutter' },
|
||||
{ label: '圆角', value: 'rounded' }
|
||||
{ label: '圆角', value: 'rounded' },
|
||||
]
|
||||
|
||||
const animateModeList: App.AnimateItem[] = [
|
||||
@@ -90,14 +99,13 @@ const animateModeList: App.AnimateItem[] = [
|
||||
{ label: '滑动', value: 'fade-slide' },
|
||||
{ label: '渐变', value: 'fade' },
|
||||
{ label: '底部滑出', value: 'fade-bottom' },
|
||||
{ label: '缩放消退', value: 'fade-scale' }
|
||||
{ label: '缩放消退', value: 'fade-scale' },
|
||||
]
|
||||
|
||||
const open = () => {
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
const waterMarkPlaceholder = ref<string>()
|
||||
defineExpose({ open })
|
||||
|
||||
// 默认显示的主题色列表
|
||||
@@ -117,10 +125,10 @@ const defaultColorList = [
|
||||
'#43a047',
|
||||
'#e53935',
|
||||
'#f4511e',
|
||||
'#6d4c41'
|
||||
'#6d4c41',
|
||||
]
|
||||
|
||||
type ColorObj = {
|
||||
interface ColorObj {
|
||||
hex: string
|
||||
hsv: { h: number, s: number, v: number }
|
||||
rgba: { r: number, g: number, b: number, a: number }
|
||||
|
||||
@@ -140,7 +140,7 @@ const logout = () => {
|
||||
} catch (error) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user