perf: 优化界面设置页面主题Logo预览的背景颜色

This commit is contained in:
Bai
2024-03-06 17:27:16 +08:00
committed by Bryan
parent faf1fb60b7
commit 45b8c622bc
2 changed files with 11 additions and 4 deletions

View File

@@ -8,7 +8,7 @@
<div v-if="tip !== ''" class="help-block">{{ tip }}</div>
<input v-model="value" hidden type="text" v-on="$listeners">
<div>
<img :src="preview" v-bind="$attrs">
<img :class="showBG ? 'show-bg' : ''" :src="preview" v-bind="$attrs">
</div>
</div>
</template>
@@ -27,6 +27,10 @@ export default {
accept: {
type: String,
default: '*'
},
showBG: {
type: Boolean,
default: false
}
},
data() {
@@ -74,6 +78,8 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
.show-bg {
background-color: var(--banner-bg);
}
</style>

View File

@@ -140,7 +140,8 @@ export default {
width: '10%',
height: '10%',
accept: 'image/jpg, image/png, image/jpeg',
tip: this.$t('xpack.logoIndexTip')
tip: this.$t('xpack.logoIndexTip'),
showBG: true
},
on: {
fileChange: ([value], updateForm) => {