mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix: fix style
This commit is contained in:
parent
c515965358
commit
2baef3a62b
@ -3,9 +3,9 @@ import Vue from 'vue';
|
|||||||
const ToastConstructor = Vue.extend(require('./toast.vue'));
|
const ToastConstructor = Vue.extend(require('./toast.vue'));
|
||||||
let toastQueue = [];
|
let toastQueue = [];
|
||||||
|
|
||||||
let getInstance = () => {
|
const getInstance = () => {
|
||||||
if (toastQueue.length > 0) {
|
if (toastQueue.length > 0) {
|
||||||
let instance = toastQueue[0];
|
const instance = toastQueue[0];
|
||||||
toastQueue.splice(0, 1);
|
toastQueue.splice(0, 1);
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
@ -26,7 +26,6 @@ const removeDom = event => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var Toast = (options = {}) => {
|
var Toast = (options = {}) => {
|
||||||
const duration = options.duration || 3000;
|
const duration = options.duration || 3000;
|
||||||
|
|
||||||
@ -41,7 +40,6 @@ var Toast = (options = {}) => {
|
|||||||
Vue.nextTick(function() {
|
Vue.nextTick(function() {
|
||||||
instance.visible = true;
|
instance.visible = true;
|
||||||
instance.$el.removeEventListener('transitionend', removeDom);
|
instance.$el.removeEventListener('transitionend', removeDom);
|
||||||
|
|
||||||
instance.timer = setTimeout(function() {
|
instance.timer = setTimeout(function() {
|
||||||
if (instance.closed) return;
|
if (instance.closed) return;
|
||||||
instance.visible = false;
|
instance.visible = false;
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
@component-namespace zan {
|
@component-namespace zan {
|
||||||
@b toast {
|
@b toast {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
z-index: 3000;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: #272727;
|
background-color: #272727;
|
||||||
opacity: 0.7;
|
opacity: .7;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate3d(-50%, -50%, 0);
|
transform: translate3d(-50%, -50%, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user