mand-mobile/components/popup
moyus 3df11539e1 feat(code clean up): 2018-09-24 15:48:57 +08:00
..
demo feat(popup): layouts refactor 2018-09-14 22:27:20 +08:00
test Initial commit 2018-03-26 16:04:04 +08:00
README.en-US.md feat(popup): add fade-zoom transition 2018-09-03 16:51:17 +08:00
README.md feat(popup): add fade-zoom transition 2018-09-03 16:51:17 +08:00
component.js Initial commit 2018-03-26 16:04:04 +08:00
index.vue feat(code clean up): 2018-09-24 15:48:57 +08:00
title-bar.vue fix(dialog,landscape,popup): change default transition 2018-09-15 20:52:20 +08:00

README.en-US.md

title preview
Popup https://didi.github.io/mand-mobile/examples/#/popup

A customized content area slides out or pops up on the screen, triggered by other controls.

Import

import { Popup, PopupTitleBar } from 'mand-mobile'

Vue.component(Popup.name, Popup)
Vue.component(PopupTitleBar.name, PopupTitleBar)

Code Examples

API

Popup Props

Props Description Type Default Note
v-model display popup or not Boolean false -
has-mask has mask or not Boolean true -
mask-closable if the popup will be closed when clicking mask Boolean true -
position the position of popup String center center, top, bottom, left, right
transition the animation effect of popup String fade/fade-bounce/fade-slide/fade-zoom, slide-up/slide-down/slide-left/slide-right -
prevent-scroll whether to prevent from scrolling or not Boolean false this program still has scrolling penetration at the top and bottom of the content, recommend to use ScrollView as the scrolling area
prevent-scroll-exclude excluded elements of prevented scrolling String/HTMLElement - -

PopupTitleBar Props

Props Description Type Default Note
title title of popup String - -
ok-text confirmation text String - no confirmation button if empty
cancel-text cancellation text String - no cancellation button if empty

Popup Events

@beforeShow()

Popup will be shown

@show()

Show popup

@beforeHide()

Popup will be hiden

@hide()

Hide popup

PopupTitleBar Events

@confirm()

Confirm selection

@cancel()

Cancel selection