mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-17 23:59:02 +00:00
perf: 优化界面设置页面主题Logo预览的背景颜色
This commit is contained in:
@@ -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>
|
||||
|
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user