Merge pull request #3917 from dataease/pr@dev@style_dark_filter_reset_button

style(仪表板): 暗色主题下仪表板中清空按钮样式
This commit is contained in:
xuwei-fit2cloud 2022-11-29 11:48:50 +08:00 committed by GitHub
commit a58a8a1e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
:round="element.options.attrs.round"
:plain="element.options.attrs.plain"
:size="size"
class="de-search-button"
:class="'de-search-button' + (useDarkClass ? ' dark-reset-button' : '')"
@click="triggerReset"
>
{{ element.options.value }}
@ -15,6 +15,7 @@
<script>
import bus from '@/utils/bus'
import { mapState } from 'vuex'
export default {
props: {
@ -34,6 +35,21 @@ export default {
values: null
}
},
computed: {
useDarkClass() {
if (this.canvasStyleData.openCommonStyle && this.canvasStyleData.panel.backgroundType === 'color') {
const themeColor = this.canvasStyleData.panel.themeColor
if (themeColor !== 'light') {
return true
}
}
return false
},
...mapState([
'canvasStyleData'
])
},
created() {
},
methods: {
@ -49,4 +65,14 @@ export default {
height: 100%;
width: 100%;
}
.dark-reset-button {
color: #f2f6fc !important;
background-color: #21333b !important;
border-color: #bbbfc4 !important;
border: 1px solid;
&:hover {
background: #bec2c7 !important;
border-color: #bbbfc4 !important;
}
}
</style>