forked from opentiny/tiny-vue
fix(grid): [grid] fix context menu Display abnormality
This commit is contained in:
parent
e8a3a66747
commit
65e089f53d
|
@ -42,45 +42,43 @@ export default {
|
|||
return h(
|
||||
'ul',
|
||||
{
|
||||
style: { left: '-9999999px' },
|
||||
class: ['tiny-grid-menu__clild-wrapper', { show }]
|
||||
},
|
||||
item.children.map((child, cIndex) =>
|
||||
// prettier-ignore
|
||||
child.visible === false
|
||||
? [null]
|
||||
: h(
|
||||
'li',
|
||||
{
|
||||
class: { 'link__disabled': child.disabled, 'link__active': child === ctxMenuStore.selectChild },
|
||||
key: `${gIndex}_${index}_${cIndex}`
|
||||
},
|
||||
[
|
||||
h(
|
||||
'a',
|
||||
{
|
||||
class: `tiny-grid-menu__link ${toKebab(item.code)}`,
|
||||
on: {
|
||||
click(event) {
|
||||
tableInstance.ctxMenuLinkEvent(event, child)
|
||||
},
|
||||
mouseover(event) {
|
||||
tableInstance.ctxMenuMouseoverEvent(event, item, child)
|
||||
},
|
||||
mouseout(event) {
|
||||
if (!getEventTargetNode(event, document.body, toKebab(item.code)).flag) {
|
||||
tableInstance.ctxMenuMouseoutEvent(event, item, child)
|
||||
'li',
|
||||
{
|
||||
class: { 'link__disabled': child.disabled, 'link__active': child === ctxMenuStore.selectChild },
|
||||
key: `${gIndex}_${index}_${cIndex}`
|
||||
},
|
||||
[
|
||||
h(
|
||||
'a',
|
||||
{
|
||||
class: `tiny-grid-menu__link ${toKebab(item.code)}`,
|
||||
on: {
|
||||
click(event) {
|
||||
tableInstance.ctxMenuLinkEvent(event, child)
|
||||
},
|
||||
mouseover(event) {
|
||||
tableInstance.ctxMenuMouseoverEvent(event, item, child)
|
||||
},
|
||||
mouseout(event) {
|
||||
if (!getEventTargetNode(event, document.body, toKebab(item.code)).flag) {
|
||||
tableInstance.ctxMenuMouseoutEvent(event, item, child)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
[
|
||||
child.prefixIcon ? h(child.prefixIcon, { class: 'tiny-grid-menu__link-prefix' }) : [null],
|
||||
h('span', { class: 'tiny-grid-menu__link-content' }, getFuncText(child.name))
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
},
|
||||
[
|
||||
child.prefixIcon ? h(child.prefixIcon, { class: 'tiny-grid-menu__link-prefix' }) : [null],
|
||||
h('span', { class: 'tiny-grid-menu__link-content' }, getFuncText(child.name))
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue