diff --git a/src/components/ConfigurationMenu.vue b/src/components/ConfigurationMenu.vue index ac52edb..b5f5d4b 100644 --- a/src/components/ConfigurationMenu.vue +++ b/src/components/ConfigurationMenu.vue @@ -431,7 +431,8 @@ export default { }, // 修改面板视图背景 changeBackground(reset = false) { - this.$root.profile.backgroundImg = reset ? null : this.selectFile.path; + let base64 = window.getBase64Ico(this.selectFile.path); + this.$root.profile.backgroundImg = reset ? null : base64; this.configurationPage.$forceUpdate(); }, // 取消收藏 diff --git a/src/pages/ConfigurationPage.vue b/src/pages/ConfigurationPage.vue index dd79328..957685c 100644 --- a/src/pages/ConfigurationPage.vue +++ b/src/pages/ConfigurationPage.vue @@ -47,7 +47,7 @@ left: tabBarWidth, background: commandCardStyle === 'mini' && $root.profile.backgroundImg - ? 'url(file:///' + $root.profile.backgroundImg + ')' + ? `url('${$root.profile.backgroundImg}')` : 'none', backgroundSize: 'cover', }"