ref 获取组件的信息

vue ref操作

 



<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
    <title>Title</title>
<script src="../vue.js"></script>
</head>
<body>
<div
},
methods: {
getEl() {
console.log(this.$refs.myh3.innerHTML);
console.log(this.$refs.mylogin.mes);
this.$refs.mylogin.show();
}
},
components:{
login
}
});
</script>
</html>

相关文章:

  • 2023-01-25
  • 2021-07-05
  • 2021-11-06
  • 2021-08-14
  • 2021-05-20
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案