|
Menu
×
×
正确!
VUE - 代码练习:Refs 用于引用特定的 DOM 元素。 提供缺少的代码,以便在安装应用程序时在第二个 <p> 标签中显示“Hello World”。 <template> <p>This is just some text.</p> <p @(9)>This is the initial text</p> </template> <script> export default { mounted() { this.@(5).pEl.innerHTML = "Hello World!"; } }; </script> <template> <p>This is just some text.</p> <p ref="pEl">This is the initial text</p> </template> <script> export default { mounted() { this.$refs.pEl.innerHTML = "Hello World!"; } }; </script> <template> <p>This is just some text.</p> <p ref='pEl'>This is the initial text</p> </template> <script> export default { mounted() { this.$refs.pEl.innerHTML = "Hello World!"; } }; </script> 不正确点击 这里 再试一次。 正确!下一个 ❯ |
这将重置所有 88 个练习测验的分数。
您确定要继续吗?