File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ const VueContainer = React.forwardRef((props, ref) => {
63
63
const TargetComponent = reactRouterInfo . withRouter ( GetReactRouterPropsCom )
64
64
// withRouter方法是通过wrappedComponentRef来传递ref的
65
65
return (
66
- < TargetComponent { ...{ ...props , [ optionsName ] : globalOptions } } forwardRef = { ref } />
66
+ < TargetComponent { ...{ ...props , [ optionsName ] : globalOptions } } forwardRef = { ref } />
67
67
)
68
68
} else {
69
69
return < VueComponentLoader { ...{ ...props , [ optionsName ] : globalOptions } } ref = { ref } />
@@ -440,7 +440,9 @@ class VueComponentLoader extends React.Component {
440
440
Vue . nextTick ( ( ) => {
441
441
const targetId = '__vue_wrapper_container_' + ( Math . random ( ) + '' ) . substr ( 2 )
442
442
targetElement . id = targetId
443
- let parentInstance = this . _reactInternals . return
443
+ // 获取react的fiber实例
444
+ const fiberNode = this . _reactInternals || this . _reactInternalFiber
445
+ let parentInstance = fiberNode . return
444
446
let vueWrapperRef
445
447
// 向上查找react包囊层
446
448
while ( parentInstance ) {
You can’t perform that action at this time.
0 commit comments