摘要: 方法一: 通过ref属性,父组件调用子组件的方法,把要传的数据作为参数传给子组件,子组件获取该参数,并使用。 父组件: //第一步:添加ref属性<project-content ref="project_page"></project-cont>//第二步:调用子组件的方法this.$refs.p 阅读全文
posted @ 2021-06-10 19:11 最初的样子 阅读(862) 评论(0) 推荐(0) 编辑
摘要: 当btnStatus 为 true 时,按钮样式为半透明 <button :style="{ opacity: btnStatus == true ? 0.6 : 1 }" ></button> 阅读全文
posted @ 2021-06-10 18:53 最初的样子 阅读(3626) 评论(2) 推荐(0) 编辑