forked from github/dataease
refactor(数据大屏): 数据大屏批量设置样式调整
This commit is contained in:
parent
fb3fbf339b
commit
2e21e38cf9
@ -34,7 +34,7 @@ const props = withDefaults(
|
||||
|
||||
const { themes, element, showStyle } = toRefs(props)
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { dvInfo } = storeToRefs(dvMainStore)
|
||||
const { dvInfo, batchOptStatus } = storeToRefs(dvMainStore)
|
||||
const activeName = ref(element.value.collapseName)
|
||||
|
||||
const styleKeys = computed(() => {
|
||||
@ -53,6 +53,11 @@ const onChange = () => {
|
||||
const isIncludesColor = str => {
|
||||
return str.toLowerCase().includes('color')
|
||||
}
|
||||
|
||||
const positionComponentShow = computed(() => {
|
||||
return !batchOptStatus.value && !dashboardActive.value
|
||||
})
|
||||
|
||||
const dashboardActive = computed(() => {
|
||||
return dvInfo.value.type === 'dashboard'
|
||||
})
|
||||
@ -123,7 +128,7 @@ const stopEvent = e => {
|
||||
<template>
|
||||
<div class="v-common-attr" ref="containerRef">
|
||||
<el-collapse v-model="activeName" @change="onChange()">
|
||||
<el-collapse-item :effect="themes" title="位置" name="position" v-if="!dashboardActive">
|
||||
<el-collapse-item :effect="themes" title="位置" name="position" v-if="positionComponentShow">
|
||||
<component-position :themes="themes" />
|
||||
</el-collapse-item>
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
:element="batchOptComponentInfo"
|
||||
:show-style="mixProperties.includes('common-style')"
|
||||
@onAttrChange="onStyleAttrChange"
|
||||
themes="light"
|
||||
:themes="themes"
|
||||
></common-attr>
|
||||
<el-row v-else class="view-selected-message-class">
|
||||
<span class="select-view">请选择组件...</span>
|
||||
|
Loading…
Reference in New Issue
Block a user