Is there any method or prop that I can use to open swipeout?
I want to open swipeout when user click the list item.
hi @enylin,
i didnt try, but reading the doc;
app.swipeout.open(el, side, callback) - reveal swipeout actions on specified element
el - HTMLElement or string (with CSS Selector) of list (
) element with âswipeoutâ class. Required
side - string (could be âleftâ or ârightâ) swipeout actions to open. Should be specified if item has both left and right swipeout actions. Optional
callback - function - callback function will be executed after swipeout element completes its opening animation
you can make a function to open the swipeout when the user click the list itme
...
< li class='list-item' @click='openSwipeout'>my list item</li>
...
...
openSwipeout() {
this.$f7.swipeout.open(el, side, callback)
}
...
I was expecting that I can control the list-item open/close by passing different values into props like sheet-model, action sheet.
But it seems that this is the only way.
Thank you
i dont understand what you need, sry english its no my language.
you need like a dynamic swipeout?
I donât want to set an id or class on component, so I need a vue component prop for list-item which can control swipeout (open/close).
For example,
http://framework7.io/vue/action-sheet.html
The prop âopenedâ allow users to open/close Action Sheet
and
http://framework7.io/vue/sheet-modal.html
There is also a prop called âopenedâ which allows users to open/close Action Sheet.
ok still dont understand fully what you need.
but you can add a v-if=âopenedâ to the vue-component where you have your swipeout, then just add an event listener and emit that event to change what you need.
It canât be changed by prop at the moment, only using API