forked from github/dataease
fix: 修复过滤组件不同状态初始化 位置设置不生效 以及下拉框和下拉树 多选时tag 标签样式不生效问题
This commit is contained in:
parent
06e6297109
commit
7105c6a405
@ -1,7 +1,7 @@
|
|||||||
import { sin, cos } from '@/components/canvas/utils/translate'
|
import { sin, cos } from '@/components/canvas/utils/translate'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { colorReverse } from '@/components/canvas/utils/utils'
|
import { colorReverse } from '@/components/canvas/utils/utils'
|
||||||
|
import Vue from 'vue'
|
||||||
export const LIGHT_THEME_COLOR_MAIN = '#000000'
|
export const LIGHT_THEME_COLOR_MAIN = '#000000'
|
||||||
export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC'
|
export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC'
|
||||||
export const LIGHT_THEME_PANEL_BACKGROUND = '#F1F3F5'
|
export const LIGHT_THEME_PANEL_BACKGROUND = '#F1F3F5'
|
||||||
@ -352,7 +352,7 @@ export function adaptCurThemeCommonStyle(component) {
|
|||||||
if (isFilterComponent(component.component)) {
|
if (isFilterComponent(component.component)) {
|
||||||
const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle
|
const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle
|
||||||
for (const styleKey in filterStyle) {
|
for (const styleKey in filterStyle) {
|
||||||
component.style[styleKey] = filterStyle[styleKey]
|
Vue.set(component.style, styleKey, filterStyle[styleKey])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (component.style.color) {
|
if (component.style.color) {
|
||||||
|
@ -231,6 +231,12 @@ export default {
|
|||||||
},
|
},
|
||||||
visualChange(value) {
|
visualChange(value) {
|
||||||
this.value = value
|
this.value = value
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (!this.element.options.attrs.multiple) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.handleElTagStyle()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
changeValue(value) {
|
changeValue(value) {
|
||||||
if (!this.inDraw) {
|
if (!this.inDraw) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
@check="changeCheckNode"
|
@check="changeCheckNode"
|
||||||
@select-clear="selectClear"
|
@select-clear="selectClear"
|
||||||
@onFoucs="onFoucs"
|
@onFoucs="onFoucs"
|
||||||
@treeCheckChange="change"
|
@treeCheckChange="handleElTagStyle"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -221,7 +221,7 @@ export default {
|
|||||||
this.handleCoustomStyle()
|
this.handleCoustomStyle()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
change() {
|
handleElTagStyle() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
textSelectWidget(this.$refs.deSelectTree.$refs.select.$el, this.element.style)
|
textSelectWidget(this.$refs.deSelectTree.$refs.select.$el, this.element.style)
|
||||||
}, 50)
|
}, 50)
|
||||||
@ -383,8 +383,21 @@ export default {
|
|||||||
.el-tree {
|
.el-tree {
|
||||||
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
||||||
color: var(--SelectTreeColor, #606266) !important;
|
color: var(--SelectTreeColor, #606266) !important;
|
||||||
|
|
||||||
|
.el-tree-node.is-current {
|
||||||
|
background-color: rgb(245, 247, 250, .5) !important;
|
||||||
|
}
|
||||||
|
.el-tree-node:focus>.el-tree-node__content {
|
||||||
|
background-color: rgb(245, 247, 250, .5) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-tree-node__content:hover {
|
||||||
|
background-color: rgb(245, 247, 250, .5) !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.el-input-group--append {
|
.el-input-group--append {
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// 通过控制css变量控制过滤组件弹框样式 de-select-grid除外
|
// 通过控制css变量控制过滤组件弹框样式 de-select-grid除外
|
||||||
import { attrsMap, styleAttrs } from '@/components/widget/DeWidget/serviceNameFn.js'
|
import { attrsMap, styleAttrs } from '@/components/widget/DeWidget/serviceNameFn.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -16,6 +16,25 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
cssArr: {
|
||||||
|
handler() {
|
||||||
|
if (['de-select', 'de-select-tree'].includes(this.element.component)) {
|
||||||
|
if (!this.element.options.attrs.multiple) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.handleElTagStyle()
|
||||||
|
};
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
cssArr() {
|
||||||
|
const { brColor, wordColor, innerBgColor } = this.element.style;
|
||||||
|
return { brColor, wordColor, innerBgColor }
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.handleCoustomStyle()
|
this.handleCoustomStyle()
|
||||||
},
|
},
|
||||||
@ -32,7 +51,7 @@ export default {
|
|||||||
const newValue = { brColor, wordColor, innerBgColor };
|
const newValue = { brColor, wordColor, innerBgColor };
|
||||||
const cssVar = this.typeTransform();
|
const cssVar = this.typeTransform();
|
||||||
this.styleAttrs.forEach((ele, index) => {
|
this.styleAttrs.forEach((ele, index) => {
|
||||||
document.documentElement.style.setProperty(cssVar[index], !isPanelDe ? '' : newValue[ele])
|
document.documentElement.style.setProperty(cssVar[index], !isPanelDe ? '' : newValue[ele])
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user