element icon indicating copy to clipboard operation
element copied to clipboard

$refs is empty when el-dialog is first opened

Open zzzgit opened this issue 9 years ago • 2 comments

Element UI version

1.3.7

OS/Browsers version

all

Vue version

2.3.4

Reproduction Link

https://github.com/zzzgit/somethingwrong

Steps to reproduce

  1. npm run dev
  2. click on the button
  3. a dialog will be shown,but $refs is empty
  4. close the dialog
  5. click the button again
  6. now $refs is not empty

What is Expected?

don't be empty when @show is emited

What is actually happening?

zzzgit avatar Jul 03 '17 04:07 zzzgit

https://jsfiddle.net/5qvjkrps/

The content inside Dialog won't be rendered until Dialog pops up. So handle it in the next tick.

Leopoldthecoder avatar Jul 03 '17 06:07 Leopoldthecoder

so that

AlenWang avatar Sep 22 '17 06:09 AlenWang