element-plus / element-plus-nuxt-starter

🌰 A starter example for element-plus with Nuxt 3.
https://element-plus-nuxt.vercel.app
MIT License
300 stars 83 forks source link

Component inside <Transition> renders non-element root node that cannot be animated. #11

Closed 209 closed 2 years ago

209 commented 3 years ago

https://github.com/209/element-plus-nuxt-starter

<el-dropdown>
    <span>
      test
    </span>
    <template #dropdown>
      <div>
        <el-dropdown-menu>
          <el-dropdown-item>Action 1</el-dropdown-item>
          <el-dropdown-item>Action 2</el-dropdown-item>
          <el-dropdown-item>Action 3</el-dropdown-item>
          <el-dropdown-item disabled>Action 4</el-dropdown-item>
          <el-dropdown-item divided>Action 5</el-dropdown-item>
        </el-dropdown-menu>
      </div>
    </template>
  </el-dropdown>
Снимок экрана 2021-10-24 в 01 12 37

If add root <div> then we haven't warn

oooplz commented 2 years ago

Its seems like el-dropdown is not single dom. so you should wrapper it by div

xiaoxian521 commented 2 years ago

fix: https://github.com/element-plus/element-plus-nuxt-starter/commit/98aa178d5031359d67653e1b5f5f7611ab94ca1f