vue -js 点击一个按钮 触发 另外一个按钮的方法

<a-button type="primary" html-type="submit"  id="submit" v-show="false"> 提交</a-button>
<a-button type="primary" html-type="submit" @click="clickSubmit"> 
用户创建 
 </a-button>
    

clickSubmit(){
    
      document.getElementById('submit').click();

      console.log(123123)
}

 

 

v-show是渲染了但是没展示

v-if 是直接不渲染了

posted @ 2022-02-23 20:37  凯宾斯基  阅读(2574)  评论(0)    收藏  举报