feat:修改主题默认配置

main
liu.shiyi 2 years ago
parent 6e28e876ef
commit d9369ce1ec

@ -113,7 +113,7 @@ export default {
methods: {
init () {
this.dialogVisible = true
this.imgUrl = this.form.customTheme === 'dark' ? this.form.bg : this.form.lightBg
this.imgUrl = this.form.customTheme === 'light' ? this.form.bg : this.form.lightBg
this.fileList = this.imgUrl
? [{
name: '背景图',

@ -318,10 +318,10 @@ export default {
},
//
currentBgColor () {
return this.form.customTheme === 'dark' ? 'bgColor' : 'lightBgColor'
return this.form.customTheme === 'light' ? 'lightBgColor' : 'bgColor'
},
currentBg () {
return this.form.customTheme === 'dark' ? 'bg' : 'lightBgColor'
return this.form.customTheme === 'light' ? 'lightBgColor' : 'bg'
},
dsValue () {
return this.form.cacheDataSets?.map(dSet => ({

@ -94,8 +94,8 @@ export default {
previewWrapStyle () {
const bg = this.fitMode !== 'none'
? {
backgroundColor: this.fitPageConfig.customTheme === 'dark' ? this.fitPageConfig.bgColor : this.fitPageConfig.lightBgColor,
backgroundImage: this.fitPageConfig.customTheme === 'dark' ? `url(${this.fitPageConfig.bg})` : `url(${this.fitPageConfig.lightBg})`,
backgroundColor: this.fitPageConfig.customTheme === 'light' ? this.fitPageConfig.lightBgColor : this.fitPageConfig.bgColor,
backgroundImage: this.fitPageConfig.customTheme === 'light' ? `url(${this.fitPageConfig.lightBg})` : `url(${this.fitPageConfig.bg})`,
backgroundSize: 'cover'
}
: {}
@ -116,8 +116,8 @@ export default {
const bg = this.fitMode === 'none'
? {
backgroundColor: this.fitPageConfig.customTheme === 'dark' ? this.fitPageConfig.bgColor : this.fitPageConfig.lightBgColor,
backgroundImage: this.fitPageConfig.customTheme === 'dark' ? `url(${this.fitPageConfig.bg})` : `url(${this.fitPageConfig.lightBg})`,
backgroundColor: this.fitPageConfig.customTheme === 'light' ? this.fitPageConfig.lightBgColor : this.fitPageConfig.bgColor,
backgroundImage: this.fitPageConfig.customTheme === 'light' ? `url(${this.fitPageConfig.lightBg})` : `url(${this.fitPageConfig.bg})`,
backgroundSize: 'cover'
}
: {}

@ -6,8 +6,8 @@
:style="{
width: pageInfo.pageConfig.w + 'px',
height: pageInfo.pageConfig.h + 'px',
backgroundColor:pageInfo.pageConfig.customTheme ==='dark' ? pageInfo.pageConfig.bgColor : pageInfo.pageConfig.lightBgColor,
backgroundImage:pageInfo.pageConfig.customTheme ==='dark' ? `url(${pageInfo.pageConfig.bg})`:`url(${pageInfo.pageConfig.lightBg})`
backgroundColor:pageInfo.pageConfig.customTheme ==='light' ? pageInfo.pageConfig.lightBgColor:pageInfo.pageConfig.bgColor ,
backgroundImage:pageInfo.pageConfig.customTheme ==='light' ? `url(${pageInfo.pageConfig.lightBg})`:`url(${pageInfo.pageConfig.bg})`
}"
@drop="drop($event)"
@dragover.prevent

Loading…
Cancel
Save