init : 初始化仓库
This commit is contained in:
25
src/views/custom-query/topo/utils/anchor/set-state.js
Normal file
25
src/views/custom-query/topo/utils/anchor/set-state.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @author: clay
|
||||
* @data: 2019/08/15
|
||||
* @description: set anchor state
|
||||
*/
|
||||
import theme from '@/views/custom-query/topo/top/theme'
|
||||
|
||||
export default function (name, value, item) {
|
||||
const themeStyle = theme.defaultStyle
|
||||
if (name === 'hover') {
|
||||
let group = item.getContainer()
|
||||
let children = group.get('children')
|
||||
for (let i = 0, len = children.length; i < len; i++) {
|
||||
let child = children[i]
|
||||
// 处理锚点状态
|
||||
if (child.attrs.name === 'anchorBg') {
|
||||
if (value) {
|
||||
child.attr(themeStyle.anchorStyle.hover)
|
||||
} else {
|
||||
child.attr(themeStyle.anchorStyle.unhover)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user