fix:saas模式下,里程碑颜色匹配逻辑 (#3568)
This commit is contained in:
parent
266c96c46c
commit
7f7e780573
|
@ -2,16 +2,16 @@ export default {
|
|||
renderless: (props, hooks, { constants }, api) => {
|
||||
return {
|
||||
getMileIcon: (node) => {
|
||||
const status = node[props.statusField]
|
||||
const statusColor = props.milestonesStatus[status]
|
||||
const isCompleted = status === constants.STATUS_COMPLETED
|
||||
const status = props.milestonesStatus[node[props.statusField]] || constants.DEFAULT_COLOR
|
||||
|
||||
const isCompleted = node[props.statusField] === props.completedField
|
||||
const switchColor = isCompleted && !props.solid
|
||||
const { r, g, b } = api.hexToRgb(status)
|
||||
|
||||
if (statusColor) {
|
||||
return {
|
||||
background: props.solid ? statusColor : '',
|
||||
color: props.solid && !isCompleted ? '#ffffff' : statusColor,
|
||||
'border-color': statusColor
|
||||
}
|
||||
background: (switchColor ? constants.DEFAULT_BACK_COLOR : status) + '!important',
|
||||
color: (switchColor ? status : constants.DEFAULT_BACK_COLOR) + '!important',
|
||||
boxShadow: `rgba(${r},${g},${b},.4) ${constants.BOX_SHADOW_PX}`
|
||||
}
|
||||
},
|
||||
getFlagStyle: ({ index, idx }) => {
|
||||
|
|
|
@ -79,7 +79,7 @@ export const clickOutside =
|
|||
// 优先使用 event.composedPath() 来判断事件源是否在组件内部,以兼容 Shadow DOM。
|
||||
// 在 Shadow DOM 中,事件冒泡穿过 Shadow Root 后,event.target 会被重定向为 host 元素,
|
||||
// 导致传统的 contains 判断失效。composedPath 则能提供真实的事件路径。
|
||||
const path = event.composedPath && event.composedPath()
|
||||
const path = event?.composedPath && event.composedPath()
|
||||
if (path ? !path.includes(parent.$el) : !parent.$el.contains(event.target)) {
|
||||
state.show = false
|
||||
props.mini && !state.currentValue && (state.collapse = true)
|
||||
|
|
Loading…
Reference in New Issue