请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

控制台报错

  1. runtime-core.esm-bundler.js?5c40:6875 [Vue warn]: Extraneous non-props attributes (tabindex, aria-describedby, class, style) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
    at <Index icon=“language” tabindex=“0” aria-describedby=“el-popper-7260” … >
    at <ElPopper arrowOffset=5 appendToBody=true autoClose=0 … >
    at
    at <ElPopper ref=“triggerVnode” visible=false onUpdate:visible=fn … >
    at <ElDropdown trigger=“click” onCommand=fn class=“international” >
    at
    at
    at <Index onVnodeUnmounted=fn ref=Ref< undefined > >
    at
    at

  2. [Vue warn]: Extraneous non-emits event listeners (mouseenter, mouseleave) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the “emits” option.
    at <Index icon=“language” tabindex=“0” aria-describedby=“el-popper-7260” … >

  3. Runtime directive used on component with non-element root node. The directives will not function as intended.
    at <Index icon=“language” tabindex=“0” aria-describedby=“el-popper-7260” … >

  4. [Vue warn]: A plugin must either be a function or an object with an “install” function.

  5. Component “default” in record with path “/” is a function that does not return a Promise. If you were passing a functional component, make sure to add a “displayName” to the component. This will break in production if not fixed.

正在回答 回答被采纳积分+3

1回答

Sunday 2022-02-16 11:56:16

你好

这是一个 vue 的警告。建议你 给组件仅呈现一个根元素

0 回复 有任何疑惑可以回复我~
  • 我也出現這個問題
    我試著在 <svg-icon icon="language"></svg-icon> 把icon="language"去除 但會報其他警告
    vue3不是不限制單節點的嗎? 這問題該如何清除 謝謝
    回复 有任何疑惑可以回复我~ 2022-02-22 10:47:04
  • Sunday 回复 林威廉 #2
    vue3 确实是不限制单节点,但是在某些情况下(比如 为一个组件赋值 class 或其他的 attrs 时)多节点会使的 attr 无法被准确的放入指定的元素
    回复 有任何疑惑可以回复我~ 2022-02-22 17:13:20
  • Ex_Life 回复 林威廉 #3
    请问怎么解决?我也遇到了
    回复 有任何疑惑可以回复我~ 2022-05-19 15:23:21
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信