当前位置:   article > 正文

【Element】按钮 el-button_el-button @click

el-button @click

ElementUI

带图标按钮

  1. <el-button type="primary" icon="el-icon-search">带图标按钮</el-button>
  2. <el-button type="primary">
  3. 图标在右侧<i class="el-icon-arrow-right el-icon--right"></i>
  4. </el-button>

手动触发click事件

<el-button ref="btn" @click="handleBtn()"></el-button>
  1. created() {
  2. // 触发按钮的点击事件
  3. this.$nextTick(()=>{
  4. this.$refs.btn.$emit('click')
  5. })
  6. },
  7. methods: {
  8. handleBtn() {
  9. alert(1111)
  10. }
  11. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/106177?site
推荐阅读
相关标签
  

闽ICP备14008679号