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 是直接不渲染了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM