vueComponent / ant-design-vue-nuxt

MIT License
68 stars 7 forks source link

开发环境中 a-menu 组件控制台报警告 #35

Open nigiwen opened 9 months ago

nigiwen commented 9 months ago
chunk-VWWL2I6E.js?v=35981333:1449 [Vue warn]: Hydration node mismatch:
- Client vnode: Symbol(v-cmt) 
- Server rendered DOM: "" (text) 
  at <AMenuItem> 
  at <Anonymous> 
  at <ResizeObserver disabled=true onResize=fn<onOverflowResize> > 
  at <Overflow onMousedown=undefined prefixCls="ant-dropdown-menu-overflow" component="ul"  ... > 
  at <AMenu mode="vertical" selectable=false expandIcon=fn<expandIcon>  ... > 
  at <Align target=fn<bound getRootDomNode> key="popup" ref=Ref< undefined >  ... > 
  at <BaseTransition onBeforeEnter=fn<onBeforeEnter> appear=false persisted=false  ... > 
  at <Transition ref=Ref< undefined > onBeforeEnter=fn<onShowPrepare> > 
  at <PopupInner prefixCls="ant-dropdown" point=null align= {points: Array(2), overflow: {…}, offset: Array(2), targetOffset: Array(2), ignoreShake: true}  ... > 
  at <Popup prefixCls="ant-dropdown" destroyPopupOnHide=false visible=true  ... > 
  at <Portal getContainer=fn<getContainer3> ref=Ref< undefined > didUpdate=fn<bound handlePortalUpdate> > 
  at <PortalWrapper key="portal" getContainer=fn didUpdate=fn<bound handlePortalUpdate>  ... > 
  at <Trigger openClassName=undefined minOverlayWidthMatchTrigger=undefined alignPoint=undefined  ... > 
  at <Anonymous arrow=true trigger="hover" menu=undefined  ... > 
  at <ADropdown key="bottomLeft" placement="bottomLeft" arrow="" > 
  at <ASpace style= {display: 'flex', flex-wrap: 'wrap'} > 
  at <Index onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy(Object) {__v_skip: true} > > 
  at <RouteProvider key="/" vnode= {__v_isVNode: true, __v_skip: true, type: {…}, props: {…}, key: null, …} route= {fullPath: '/', hash: '', query: {…}, name: 'index', path: '/', …}  ... > 
  at <RouterView name=undefined route=undefined > 
  at <NuxtPage> 
  at <Anonymous hasSider=undefined prefixCls="ant-layout-content" tagName="main"  ... > 
  at <ALayoutContent bg="#ffffff" m="t-6 x-4 b-0" min-h-70=""  ... > 
  at <Anonymous hasSider=undefined prefixCls="ant-layout" tagName="section" > 
  at <ALayout> 
  at <Anonymous hasSider=undefined prefixCls="ant-layout" tagName="section"  ... > 
  at <ALayout id="classic-layout" min-h="100vh" > 
  at <Default ref=Ref< Proxy(Object) {__v_skip: true} > > 
  at <AsyncComponentWrapper ref=Ref< Proxy(Object) {__v_skip: true} > > 
  at <NuxtLayoutProvider layoutProps= {ref: RefImpl} key="default" name="default"  ... > 
  at <NuxtLayout> 
  at <App key=3 > 
  at <NuxtRoot>
aibayanyu20 commented 9 months ago

改用items的模式试一下呢

nigiwen commented 9 months ago

改用items的模式试一下呢

我没明白你说的什么意思

aibayanyu20 commented 9 months ago

看antdv4中的例子

nigiwen commented 9 months ago

改用items的模式试一下呢

依旧报错

<a-menu :items="items" />
ezewu commented 5 months ago

我的也这样,解决没有?