Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vue] 64.指令 v-el 的作用是什么? #455

Open
qiilee opened this issue Oct 9, 2019 · 1 comment
Open

[vue] 64.指令 v-el 的作用是什么? #455

qiilee opened this issue Oct 9, 2019 · 1 comment
Labels

Comments

@qiilee
Copy link
Member

qiilee commented Oct 9, 2019

答案:提供一个在页面上已存在的 DOM 元素作为 Vue 实例的挂载目标.可以是 CSS 选择器,也可以是一个 HTMLElement 实例

@qiilee qiilee added the VUE label Oct 9, 2019
@qinjr163
Copy link

v-el 和 v-ref 在2.0已经被废弃了,所以2.0中如果需要此功能要通过ref属性写法不是 ref: 而是 ref="名字"

在js中用 $refs 获取元素

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants