File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -2220,6 +2220,19 @@ export default {
22202220 } ,
22212221 } ;
22222222
2223+ // 直接在组件上写单元测试无法通过。如 on={{"on-node-click":()=>{}}}
2224+ const contextmenuProps = {
2225+ props : {
2226+ eventTarget : this . contextmenuEventTarget ,
2227+ options : contextmenus ,
2228+ } ,
2229+ on : {
2230+ "on-node-click" : ( type ) => {
2231+ this . contextmenuCallBack ( type ) ;
2232+ } ,
2233+ } ,
2234+ } ;
2235+
22232236 return (
22242237 < VueDomResizeObserver { ...wrapperContainerProps } >
22252238 < div { ...containerProps } >
@@ -2239,15 +2252,7 @@ export default {
22392252 { /* edit input */ }
22402253 { this . hasEditColumn && < EditInput { ...editInputProps } /> }
22412254 { /* contextmenu */ }
2242- { this . hasContextmenu && (
2243- < VeContextmenu
2244- eventTarget = { this . contextmenuEventTarget }
2245- options = { contextmenus }
2246- on = { {
2247- "on-node-click" : this . contextmenuCallBack ,
2248- } }
2249- />
2250- ) }
2255+ { this . hasContextmenu && < VeContextmenu { ...contextmenuProps } /> }
22512256 </ VueDomResizeObserver >
22522257 ) ;
22532258 } ,
You can’t perform that action at this time.
0 commit comments