How to open a sheet modal from javascript code?


#1

I use vue + f7 v2 and below html code line opens a popup, and I want to either open the popup or open a sheet modal according to some state value, how can I do that ?

I see 2 possible solutions

  • I want either do selective operation (open popup or sheet modal) in html
  • or I want to do that in the method, I will decide whether to open popup or sheet modal
li.my-class(v-for="contact in groups" @click='openContactDetailsPopup(contact)', oncontextmenu="openContextMenuPopup()",)

normaly I can open a sheet with this html code, how can I do it within code ?

a.tab-link.tab-link-active.b.sheet-open(href='#tab-5', data-sheet=".my-sheet2")

#2

http://framework7.io/docs/sheet-modal.html#sheet-app-methods

app.sheet.open