A story about a play button?

clipboard.png


::vue

clipboard.png

clipboard.png

now I want to add the function is to click the play button to hide, pause to show
I have tried to add subtracted classes to it, but it does not work, is there any good way to solve this problem?

Mar.07,2021

you can add a status value on your basis. For example, pauseBtnShow, is bound to this pause button, and you can switch according to your pause and playback status


.

bind a tag in data:

data:{
    visible: false
}
// 
this.visibleturevideo.pause()

htmlvisible

style control, this.isActive =! this.isActive;
html: < p vBind class= "{'f-btnActive':isActive}" >

code >
initialize state: isActive: false


you have a pasued attribute that can be used as a status flag to show it when it exists, otherwise it will be hidden (but there is a problem, how do you click if hidden? )

Menu