feat:修改主题默认配置

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

@ -113,7 +113,7 @@ export default {
methods: { methods: {
init () { init () {
this.dialogVisible = true 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 this.fileList = this.imgUrl
? [{ ? [{
name: '背景图', name: '背景图',

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

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

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

Loading…
Cancel
Save