html a onclick vue,vue.js - How to replace div with html onclick using Vue js? - Stack Overflow

I have a Respond Button inside a div with a Modal attached to it.

Respond

If a User clicks the 'Confirm Interview' button, The Respond Button should be replaced with this Confirmed.

I have a method called createConfirmedInterviewRequest() that gets called when the User clicks on the 'Confirm Interview' button. So I'd like to create a method that will change the contents and then I would just call that method inside my createConfirmedInterviewRequest() method upon Success, but I don't know how to create this method or how this can be done.

Attached is a scrrenshot of my page with the Respond Button and Modal.

How can I do change the contents of the div using Vue?

fjQ7w.jpg

UPDATED:

data() {

return {

notifications: {

noti: false

},

}

},

computed:{

computedConfirm(){

return this.notifications.noti ? true:false;

}

},

methods: {

confirmProcess(){

this.notifications.noti = true;

},

}

My method:

createConfirmedInterviewRequest: async function() {

this.confirmProcess(`data`);

}

Modal with button:

Confirm Interview

Respond button I want to disappear and substitute with Confirmed.

Respond

Let me know if you need to know what data properties are inside of notifications.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值