forked from github/dataease
fix(仪表板-查询按钮): 按钮样式跟随仪表板主题
This commit is contained in:
parent
80e235b348
commit
fb6309d85a
@ -6,7 +6,7 @@
|
|||||||
:round="element.options.attrs.round"
|
:round="element.options.attrs.round"
|
||||||
:plain="element.options.attrs.plain"
|
:plain="element.options.attrs.plain"
|
||||||
:size="size"
|
:size="size"
|
||||||
class="de-search-button"
|
:class="'de-search-button' + (useDarkClass ? ' dark-search-button' : '')"
|
||||||
@click="triggerSearch"
|
@click="triggerSearch"
|
||||||
>
|
>
|
||||||
{{ element.options.value }}
|
{{ element.options.value }}
|
||||||
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -28,12 +29,28 @@ export default {
|
|||||||
},
|
},
|
||||||
size: String
|
size: String
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
operator: 'eq',
|
operator: 'eq',
|
||||||
values: null
|
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() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -49,4 +66,14 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.dark-search-button {
|
||||||
|
color: #21333B !important;
|
||||||
|
background-color: #2681FF !important;
|
||||||
|
border-color: #2681FF !important;
|
||||||
|
&:hover {
|
||||||
|
background: rgb(81, 154, 255) !important;
|
||||||
|
border-color: rgb(81, 154, 255) !important;
|
||||||
|
color: #21333B !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user