fix: 🐛 修复一些样式问题

This commit is contained in:
nsnail 2024-12-12 23:22:58 +08:00
parent f1fd53f72b
commit 442a69f90d
8 changed files with 103 additions and 109 deletions

View File

@ -1,92 +1,95 @@
import colorTool from '@/utils/color' import colorTool from '@/utils/color'
const style = getComputedStyle(document.documentElement)
const el_color_primary = style.getPropertyValue('--el-color-primary')
const el_color_info = style.getPropertyValue('--el-color-info')
const el_text_color_primary = style.getPropertyValue('--el-text-color-primary')
const el_border_color_lighter = style.getPropertyValue('--el-border-color-lighter')
const T = { export default {
color: [el_color_primary, colorTool.lighten(el_color_primary, 0.5), ...colorTool.colorSets], build() {
grid: { const style = getComputedStyle(document.documentElement)
left: '3%', const el_color_primary = style.getPropertyValue('--el-color-primary')
right: '3%', const el_color_info = style.getPropertyValue('--el-color-info')
bottom: '10', const el_text_color_primary = style.getPropertyValue('--el-text-color-primary')
top: '40', const el_border_color_lighter = style.getPropertyValue('--el-border-color-lighter')
containLabel: true,
},
pie: {
label: {
color: el_color_info,
},
},
gauge: {
axisTick: {
lineStyle: {
color: el_color_info,
},
},
splitLine: {
lineStyle: {
color: el_color_info,
},
},
axisLabel: {
color: el_color_info,
},
title: {
color: el_color_info,
},
},
legend: {
textStyle: {
color: el_color_info,
},
inactiveColor: 'rgba(128,128,128,0.4)',
},
categoryAxis: {
axisLine: {
show: true,
lineStyle: {
color: 'rgba(128,128,128,0.2)',
width: 1,
},
},
axisTick: {
show: false,
lineStyle: {
color: el_text_color_primary,
},
},
axisLabel: {
color: el_color_info,
},
splitLine: {
show: false,
lineStyle: {
color: [el_border_color_lighter],
},
},
splitArea: {
show: false,
areaStyle: {
color: ['rgba(255,255,255,0.01)', 'rgba(0,0,0,0.01)'],
},
},
},
valueAxis: {
axisLine: {
show: false,
lineStyle: {
color: el_color_info,
},
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(128,128,128,0.2)',
},
},
},
}
export default T return {
color: [el_color_primary, colorTool.lighten(el_color_primary, 0.5), ...colorTool.colorSets],
grid: {
left: '3%',
right: '3%',
bottom: '10',
top: '40',
containLabel: true,
},
pie: {
label: {
color: el_color_info,
},
},
gauge: {
axisTick: {
lineStyle: {
color: el_color_info,
},
},
splitLine: {
lineStyle: {
color: el_color_info,
},
},
axisLabel: {
color: el_color_info,
},
title: {
color: el_color_info,
},
},
legend: {
textStyle: {
color: el_color_info,
},
inactiveColor: 'rgba(128,128,128,0.4)',
},
categoryAxis: {
axisLine: {
show: true,
lineStyle: {
color: 'rgba(128,128,128,0.2)',
width: 1,
},
},
axisTick: {
show: false,
lineStyle: {
color: el_text_color_primary,
},
},
axisLabel: {
color: el_color_info,
},
splitLine: {
show: false,
lineStyle: {
color: [el_border_color_lighter],
},
},
splitArea: {
show: false,
areaStyle: {
color: ['rgba(255,255,255,0.01)', 'rgba(0,0,0,0.01)'],
},
},
},
valueAxis: {
axisLine: {
show: false,
lineStyle: {
color: el_color_info,
},
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(128,128,128,0.2)',
},
},
},
}
},
}

View File

@ -5,8 +5,6 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import T from './echarts-theme-T.js' import T from './echarts-theme-T.js'
echarts.registerTheme('T', T)
const unwarp = (obj) => obj && (obj.__v_raw || obj.valueOf() || obj) const unwarp = (obj) => obj && (obj.__v_raw || obj.valueOf() || obj)
export default { export default {
@ -53,6 +51,7 @@ export default {
mounted() { mounted() {
this.isActivat = true this.isActivat = true
this.$nextTick(() => { this.$nextTick(() => {
echarts.registerTheme('T', T.build())
this.draw() this.draw()
}) })
}, },

View File

@ -14,11 +14,7 @@
</el-header> </el-header>
<el-main> <el-main>
<el-scrollbar> <el-scrollbar>
<el-menu <el-menu :default-active="$route.meta.active || $route.fullPath" @select="select" router>
:active-text-color="DEFAULT_CONFIG.APP_SET_COLOR"
:default-active="$route.meta.active || $route.fullPath"
@select="select"
router>
<NavMenu :navMenus="menu"></NavMenu> <NavMenu :navMenus="menu"></NavMenu>
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>

View File

@ -7,10 +7,6 @@
--el-menu-horizontal-height: 4rem; --el-menu-horizontal-height: 4rem;
} }
.el-menu--inline {
--el-menu-active-color: var(--el-color-primary) !important;
}
.el-form-item--default { .el-form-item--default {
--font-size: 1rem; --font-size: 1rem;
} }

View File

@ -1,8 +1,7 @@
<template> <template>
<div v-if="loading" v-loading="true" style="height: 100%"></div> <el-main v-loading="loading" :style="{ height: mainHeight, minHeight: '100%' }">
<el-main v-else :style="{ height: mainHeight }"> <widgets v-if="dashboard" @on-customizing="onCustomizing" @on-mounted="this.loading = false"></widgets>
<widgets v-if="dashboard" @on-customizing="onCustomizing"></widgets> <work v-if="myapp" @on-mounted="this.loading = false"></work>
<work v-else></work>
</el-main> </el-main>
<el-tour v-model="tour.open" @close="$TOOL.data.set('TOUR_TIP_READ_INDEX', true)"> <el-tour v-model="tour.open" @close="$TOOL.data.set('TOUR_TIP_READ_INDEX', true)">
@ -34,13 +33,14 @@ export default {
loading: true, loading: true,
mainHeight: 'auto', mainHeight: 'auto',
dashboard: false, dashboard: false,
myapp: false,
} }
}, },
async created() { async created() {
// //
await this.$TOOL.data.downloadConfig() await this.$TOOL.data.downloadConfig()
this.dashboard = this.$GLOBAL.user.roles.findIndex((x) => x.displayDashboard) >= 0 this.dashboard = this.$GLOBAL.user.roles.findIndex((x) => x.displayDashboard) >= 0
this.loading = false this.myapp = !this.dashboard
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -153,7 +153,7 @@ export default {
this.loadGrid() this.loadGrid()
}, },
mounted() { mounted() {
this.$emit('on-mounted') this.$nextTick(() => this.$emit('on-mounted'))
}, },
computed: { computed: {
allCompsList() { allCompsList() {

View File

@ -15,7 +15,7 @@ export default {
return {} return {}
}, },
mounted() { mounted() {
this.$emit('on-mounted') this.$nextTick(() => this.$emit('on-mounted'))
}, },
methods: {}, methods: {},
} }

View File

@ -245,7 +245,7 @@
</template> </template>
<script> <script>
import { defineAsyncComponent } from 'vue' import { defineAsyncComponent, h } from 'vue'
import table from '@/config/table' import table from '@/config/table'
import naColOperation from '@/config/naColOperation' import naColOperation from '@/config/naColOperation'
import naIndicator from '@/components/naIndicator/index.vue' import naIndicator from '@/components/naIndicator/index.vue'
@ -380,7 +380,7 @@ export default {
await this.$API.sys_job.execute.post({ id: row.id }) await this.$API.sys_job.execute.post({ id: row.id })
this.$notify.success({ this.$notify.success({
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
message: `<div id="countdown">${this.$t('已发起执行请求5 秒后弹出执行结果')}</div>`, message: h('div', { id: 'countdown' }, this.$t('已发起执行请求5 秒后弹出执行结果')),
onClose: async () => { onClose: async () => {
clearInterval(this.timer) clearInterval(this.timer)
this.dialog.save = { row, mode: 'view', tabId: 'record' } this.dialog.save = { row, mode: 'view', tabId: 'record' }