[new feature] toast add mask option (#296)
* [bugfix] CouponList always show empty info * [bugfix] add click feedback of buttons in components * [Doc] add custom theme document * [new feature] Notice bar support more props * [bugfix] PullRefresh test cases * [bugfix] unused NoticeBar style * [bugfix] Swipe width calc error * [Doc] english document of all action components * [Doc] change document site path to /zanui/vant * [Doc] fix * [bugfix] uploader style error * [bugfix] tabs document demo * [new feature] Cell support vue-router target route * [bugfix] add cell test cases * update yarn.lock * [bugfix] Tabbar cann't display info when use icon slot * [Doc] update document title * [bugfix] Dialog should reset button text when showed * [new feature] CouponList add showCloseButton prop * [new feature] Swipe add 'initialSwipe' prop * [bugfix] NoticeBar text disappeared when page back * [new feature] ImagePreview support startPosition * fix: improve imagePreview test cases * [bugfix] Steps style error when has more than 4 items * [new feature] normalize size of all icons * [new feature] Stepper add plus & minus event * fix: yarn.lock * [bugfix] addressEdit icon render failed * [new feature] toast add mask option
This commit is contained in:
@@ -8,6 +8,7 @@ const defaultOptions = {
|
||||
type: 'text',
|
||||
position: 'middle',
|
||||
duration: 3000,
|
||||
mask: false,
|
||||
forbidClick: false,
|
||||
clear: () => {
|
||||
instance.visible = false;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div v-if="message" class="van-toast__text">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="van-toast__overlay" v-if="forbidClick" />
|
||||
<div :class="['van-toast__overlay', { 'van-toast__overlay--mask': mask }]" v-if="forbidClick || mask" />
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
@@ -50,6 +50,10 @@ export default {
|
||||
position: {
|
||||
type: String,
|
||||
default: 'middle'
|
||||
},
|
||||
mask: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -28,7 +28,11 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 3000;
|
||||
background: transparent;
|
||||
background-color: transparent;
|
||||
|
||||
&--mask {
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
}
|
||||
}
|
||||
|
||||
&--text {
|
||||
|
||||
Reference in New Issue
Block a user