We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如下例子
父组件:
<attr-test first-name="aaa" last-name="bbb"></attr-test>
子组件
<template> <div @click="foo">{{ firstName }} {{ $attrs.lastName }}</div> </template> <script> export default { name: 'attr-test', props: { firstName: String, }, methods: { foo() { console.info(this.firstName) // aaa console.info(this.$attrs.lastName) // undefined console.info(this.$attrs['last-name']) // bbb } } } </script>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如下例子
父组件:
子组件
The text was updated successfully, but these errors were encountered: