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 中 name 的 作用 #6

Open
yym-yumeng123 opened this issue Dec 11, 2018 · 0 comments
Open

Vue 中 name 的 作用 #6

yym-yumeng123 opened this issue Dec 11, 2018 · 0 comments
Assignees

Comments

@yym-yumeng123
Copy link
Owner

Vue name 的两个作用

  • 可以在 Vue Devtools中命名自己组件的名字

1544532141(1).png

  • 可以通过钩子函数来查看$option的名字
	mounted () {
		this.$children.forEach((vm) => {
			if(vm.$options.name === 'ElementSider') {
				this.layoutClass.hasSider = true
			}
		})
	}

@yym-yumeng123 yym-yumeng123 self-assigned this Dec 13, 2018
@yym-yumeng123 yym-yumeng123 reopened this Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant