Prechádzať zdrojové kódy

fix: 修复大屏在有背景图的情况下,打开背景图选择弹窗再关闭会把已有背景图清空的情况

wu.jian2 1 rok pred
rodič
commit
8fd965934f

+ 2 - 7
data-room-ui/packages/BigScreenDesign/OverallSetting/BgImgDialog.vue

@@ -115,13 +115,8 @@ export default {
   methods: {
     init () {
       this.dialogVisible = true
-      this.imgUrl = this.form.customTheme === 'light' ? this.form.bg : this.form.lightBg
-      this.fileList = this.getCoverPicture(this.imgUrl)
-        ? [{
-            name: '背景图',
-            url: this.getCoverPicture(this.imgUrl)
-          }]
-        : []
+      this.imgUrl = this.form.customTheme === 'light' ? this.form.lightBg : this.form.bg
+      this.fileList = this.getCoverPicture(this.imgUrl) ? [{ name: '背景图', url: this.getCoverPicture(this.imgUrl) }] : []
       this.hideUploadImgBtn = this.fileList.length !== 0
       this.$dataRoomAxios.get('/bigScreen/design/bg/list').then(list => {
         this.bgImgList = list

+ 2 - 2
data-room-ui/packages/BigScreenDesign/OverallSetting/index.vue

@@ -196,10 +196,10 @@
 <script>
 import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
 import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
-import BgImg from './BgImgDialog.vue'
+import BgImg from 'data-room-ui/BigScreenDesign/OverallSetting/BgImgDialog.vue'
 import { mapState, mapMutations } from 'vuex'
 import { themeToSetting } from 'data-room-ui/js/utils/themeFormatting'
-import {predefineColors} from 'data-room-ui/js/utils/colorList'
+import { predefineColors } from 'data-room-ui/js/utils/colorList'
 import { getFileUrl } from 'data-room-ui/js/utils/file'
 export default {
   name: 'OverallSetting',