Merge pull request #118 from chenjiahan/dev

Toast: fix background color
This commit is contained in:
neverland 2017-09-07 02:50:30 -05:00 committed by GitHub
commit 3d090745cb
4 changed files with 6 additions and 9 deletions

View File

@ -29,9 +29,7 @@ router.beforeEach((route, redirect, next) => {
}); });
router.afterEach(() => { router.afterEach(() => {
if (!isMobile) { window.scrollTo(0, 0);
window.scrollTo(0, 0);
}
window.syncPath(); window.syncPath();
}); });

View File

@ -58,5 +58,5 @@ Dialog.close = () => {
export default Dialog; export default Dialog;
export { export {
Dialog DialogComponent as Dialog
}; };

View File

@ -1,6 +1,8 @@
<template> <template>
<div class="van-pay-order"> <div class="van-pay-order">
<div class="van-pay-order__tip" v-show="tip || hasTipSlot">{{ tip }}<slot name="tip" /></div> <div class="van-pay-order__tip" v-show="tip || $slots.tip">
<slot name="tip">{{ tip }}</slot>
</div>
<div class="van-pay-order__bar"> <div class="van-pay-order__bar">
<div class="van-pay-order__price"> <div class="van-pay-order__price">
<template v-if="hasPrice"> <template v-if="hasPrice">
@ -49,9 +51,6 @@ export default {
priceDecimal() { priceDecimal() {
const decimal = this.price % 100; const decimal = this.price % 100;
return (decimal < 10 ? '0' : '') + decimal; return (decimal < 10 ? '0' : '') + decimal;
},
hasTipSlot () {
return !!this.$slots['tip']
} }
}, },

View File

@ -14,7 +14,7 @@
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
transform: translate3d(-50%, -50%, 0); transform: translate3d(-50%, -50%, 0);
background-color: rgb(39, 39, 39, .7); background-color: rgba(39, 39, 39, .7);
&-wrapper { &-wrapper {
transition: opacity .2s; transition: opacity .2s;