添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
忐忑的爆米花  ·  android通知这么关闭 ...·  1 年前    · 
要出家的火车  ·  AISHELL-4 ...·  1 年前    · 
细心的毛巾  ·  sqlite str to int-掘金·  1 年前    · 
咆哮的小蝌蚪  ·  RabbitMQ ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have a vue bootstrap modal and I am trying to capture the ok event, but seems that is not been triggered, what am I missing?

<b-modal class="modal-md"
          ok-title="Invite"
          ref="myModal"
          title="Hellow world"
          @hidden="onHidden"
          @ok="myMethod"
         :ok-disabled="!validForm">
methods:{ 
    myMethod() {
        console.log('ok')

I have updated your code in my answer here is my code please use in your code and let me know

<b-modal class="modal-md"
          ok-title="Invite"
          ref="myModal"
          title="Hellow world"
          @hidden="onHidden"
          @ok="myMethod"
         :ok-disabled="false">
         My Modal
  </b-modal>

For open this

this.$refs['myModal'].show()

Methods

methods: {
 onHidden(){
      console.log("hide")
    myMethod(){
      console.log("myMethod")
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.