feat:修改大屏设计顶部样式

main
liu.shiyi 2 years ago
parent 1907da2cf2
commit b42c591560

@ -78,7 +78,7 @@ export default {
const inputIcon = document.querySelector(`.${config.customize.icon.name}`) const inputIcon = document.querySelector(`.${config.customize.icon.name}`)
inputIcon.style.fontSize = config.customize.inputStyle.fontSize + 'px' inputIcon.style.fontSize = config.customize.inputStyle.fontSize + 'px'
} }
// //
if (!isUpdateTheme) { if (!isUpdateTheme) {
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme) config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
this.changeChartConfig(config) this.changeChartConfig(config)

@ -63,6 +63,7 @@ export default {
// changeStyle // changeStyle
changeStyle (config) { changeStyle (config) {
}, },
//
handleChange (val) { handleChange (val) {
const pageInfo = this.pageInfo const pageInfo = this.pageInfo
pageInfo.chartList = themeToSetting(pageInfo.chartList, val) pageInfo.chartList = themeToSetting(pageInfo.chartList, val)

@ -66,6 +66,7 @@
popper-class="bs-el-select" popper-class="bs-el-select"
placeholder="请选择主题" placeholder="请选择主题"
clearable clearable
@change="changeTheme"
> >
<el-option <el-option
v-for="themeItem in themeOptions" v-for="themeItem in themeOptions"
@ -191,6 +192,7 @@ import { getThemeConfig } from 'data-room-ui/js/api/bigScreenApi'
// import _ from 'lodash' // import _ from 'lodash'
import cloneDeep from 'lodash/cloneDeep' import cloneDeep from 'lodash/cloneDeep'
import { G2 } from '@antv/g2plot' import { G2 } from '@antv/g2plot'
import { themeToSetting } from 'data-room-ui/js/utils/themeFormatting'
export default { export default {
name: 'OverallSetting', name: 'OverallSetting',
components: { components: {
@ -270,15 +272,15 @@ export default {
{ {
value: 'light', value: 'light',
label: '明亮' label: '明亮'
},
{
value: 'auto',
label: '透明'
},
{
value: 'custom',
label: '自定义'
} }
// {
// value: 'auto',
// label: ''
// },
// {
// value: 'custom',
// label: ''
// }
], ],
form: { form: {
w: 1920, w: 1920,
@ -286,7 +288,7 @@ export default {
bg: '', bg: '',
bgColor: '#151a26', // bgColor: '#151a26', //
opacity: 100, opacity: 100,
customTheme: 'auto', customTheme: 'dark',
themeJson: {}, themeJson: {},
cacheDataSets: [], cacheDataSets: [],
refreshConfig: [], refreshConfig: [],
@ -361,6 +363,12 @@ export default {
'changeChartKey', 'changeChartKey',
'changeRefreshConfig' 'changeRefreshConfig'
]), ]),
//
changeTheme (theme) {
const pageInfo = this.pageInfo
pageInfo.chartList = themeToSetting(pageInfo.chartList, theme)
this.changePageInfo(pageInfo)
},
init () { init () {
if (!this.pageInfo.pageConfig.refreshConfig) { if (!this.pageInfo.pageConfig.refreshConfig) {
this.pageInfo.pageConfig.refreshConfig = [] this.pageInfo.pageConfig.refreshConfig = []

@ -51,7 +51,7 @@
<span class="el-dropdown-link menu-dropdown-link"> <span class="el-dropdown-link menu-dropdown-link">
<i class="el-icon-more" /> <i class="el-icon-more" />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="handleDropdownClick('edit',data,node)">编辑 </el-dropdown-item> <el-dropdown-item @click.native="handleDropdownClick('edit',data,node)">编辑 </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
v-if="data.type!=='catalog'" v-if="data.type!=='catalog'"

Loading…
Cancel
Save