feat:修改基础组件的暗黑主题背景色透明

main
liu.shiyi
parent e75d40a10c
commit f146b547d6

@ -117,7 +117,7 @@ export default {
color: #000000; color: #000000;
} }
.dark-theme { .dark-theme {
background-color: #000000; background-color:transparent;
color: #ffffff; color: #ffffff;
} }
.auto-theme { .auto-theme {

@ -21,7 +21,7 @@ const customConfig = {
customize: { customize: {
fontSize: 28, fontSize: 28,
fontWeight: 700, fontWeight: 700,
color: '#ffffff' color: 'rgb(155 159 172)'
} }
} }

@ -5,7 +5,7 @@
> >
<dv-scroll-board <dv-scroll-board
:key="updateKey" :key="updateKey"
:class="{'light-theme':customTheme === 'light','auto-theme':customTheme =='auto','dark-theme':customTheme =='dark'}" :class="{'light-theme':customTheme === 'light','auto-theme':customTheme =='dark'}"
:config="option" :config="option"
@click="rowClick" @click="rowClick"
/> />

@ -6,7 +6,7 @@
<dv-scroll-ranking-board <dv-scroll-ranking-board
:key="updateKey" :key="updateKey"
class="ranking-box" class="ranking-box"
:class="{'light-theme':customTheme === 'light','auto-theme':customTheme =='auto','dark-theme':customTheme =='dark'}" :class="{'light-theme':customTheme === 'light','auto-theme':customTheme =='dark'}"
:config="option" :config="option"
@click="rowClick" @click="rowClick"
/> />

@ -68,9 +68,8 @@ export default {
computed: { computed: {
headerCellStyle () { headerCellStyle () {
const headerBackgroundColor = { const headerBackgroundColor = {
dark: '#141414',
light: '#ffffff', light: '#ffffff',
auto: 'transparent' dark: 'transparent'
} }
if (document.getElementById(this.config.code)?.querySelector('tr')) { if (document.getElementById(this.config.code)?.querySelector('tr')) {
document document
@ -124,9 +123,8 @@ export default {
cellStyle ({ row, column, rowIndex, columnIndex }) { cellStyle ({ row, column, rowIndex, columnIndex }) {
const bodyBackgroundColor = { const bodyBackgroundColor = {
dark: '#141414',
light: '#ffffff', light: '#ffffff',
auto: 'transparent' dark: 'transparent'
} }
const initColor = this.customTheme === 'light' ? '#000000' : '#ffffff' const initColor = this.customTheme === 'light' ? '#000000' : '#ffffff'
const style = { const style = {

@ -41,13 +41,13 @@ const customConfig = {
// 表格头部背景颜色 // 表格头部背景颜色
headerBackgroundColor: '#232832', headerBackgroundColor: '#232832',
// 表格头部字体颜色 // 表格头部字体颜色
headerFontColor: '#ffffff', headerFontColor: '#fff',
// 表格头部字体大小 // 表格头部字体大小
headerFontSize: 14, headerFontSize: 14,
// 表格主体背景颜色 // 表格主体背景颜色
bodyBackgroundColor: '', bodyBackgroundColor: '',
// 表格主体字体颜色 // 表格主体字体颜色
bodyFontColor: '#ffffff', bodyFontColor: 'rgb(155 159 172)',
// 表格主体字体大小 // 表格主体字体大小
bodyFontSize: 14, bodyFontSize: 14,
// 表格是否需要斑马纹 // 表格是否需要斑马纹

@ -176,7 +176,7 @@ export default {
color: #000000; color: #000000;
} }
.dark-theme { .dark-theme {
background-color: #000000; background-color: transparent;
color: #ffffff; color: #ffffff;
} }
.auto-theme { .auto-theme {

@ -20,7 +20,7 @@ const customConfig = {
customize: { customize: {
fontSize: 28, fontSize: 28,
fontWeight: 700, fontWeight: 700,
color: '#ffffff' color: 'rgb(155 159 172)'
} }
} }

@ -361,7 +361,8 @@ export default {
'changePageConfig', 'changePageConfig',
'changeLayout', 'changeLayout',
'changeChartKey', 'changeChartKey',
'changeRefreshConfig' 'changeRefreshConfig',
'changePageInfo'
]), ]),
// //
changeTheme (theme) { changeTheme (theme) {

@ -10,33 +10,31 @@
<span class="logo-text name-span">{{ pageInfo.name }}</span> <span class="logo-text name-span">{{ pageInfo.name }}</span>
</div> </div>
<div class="head-btn-group"> <div class="head-btn-group">
<el-switch <el-dropdown
v-model="pageInfo.pageConfig.customTheme" trigger="click"
active-text="暗黑" class="align-list-dropdown"
inactive-text="明亮"
class="bs-el-switch theme-switch"
active-color="#007aff"
active-value="dark"
inactive-value="light"
@change="changeTheme"
/>
<el-tooltip
v-for="(mode,index) in alignList"
:key="mode.value"
popper-class="bs-el-tooltip-dark"
effect="dark"
:content="mode.label"
placement="top"
> >
<CusBtn <CusBtn
class="align-btn" type="primary"
@click="setAlign(mode.value)"
> >
<icon-svg 对齐<i class="el-icon-arrow-down el-icon--right" />
:name="iconList[index]"
/>
</CusBtn> </CusBtn>
</el-tooltip> <el-dropdown-menu
slot="dropdown"
class="align-dropdown-menu"
>
<el-dropdown-item
v-for="(mode,index) in alignList"
:key="mode.value"
@click.native="setAlign(mode.value)"
>
<icon-svg
style="padding:3px 20px"
:name="iconList[index]"
/>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<CusBtn <CusBtn
:loading="saveAndPreviewLoading" :loading="saveAndPreviewLoading"
@ -600,5 +598,22 @@ export default {
color: var(--bs-el-color-primary)!important; color: var(--bs-el-color-primary)!important;
} }
} }
.align-list-dropdown{
color: #ffffff!important;
}
}
// dropdown
.align-dropdown-menu{
background-color: var(--bs-background-2)!important;
border: 1px solid var(--bs-border-1);
/deep/ .el-dropdown-menu__item{
background-color: var(--bs-background-2)!important;
&:hover {
color: var(--bs-el-color-primary) !important;
background-color: var(--bs-el-background-3) !important;
}
}
} }
</style> </style>

Loading…
Cancel
Save