|
|
@@ -1,5 +1,7 @@
|
|
|
<template>
|
|
|
- <div class="com-remind-box" v-show="showBox">{{title}}</div>
|
|
|
+ <div class="com-remind-box" v-show="showBox">
|
|
|
+ <div>{{title}}</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
export default {
|
|
|
@@ -24,25 +26,36 @@
|
|
|
setTimer: function () {
|
|
|
let _this = this
|
|
|
_this.showBox = true
|
|
|
+ let timeout = 1000
|
|
|
+ if (_this.title === '收藏成功' || _this.title === '取消成功') {
|
|
|
+ timeout = 1000
|
|
|
+ } else {
|
|
|
+ timeout = 2000
|
|
|
+ }
|
|
|
_this.timer = setTimeout(function () {
|
|
|
_this.showBox = false
|
|
|
- }, 1000)
|
|
|
+ }, timeout)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-<style>
|
|
|
+<style lang="scss" scoped>
|
|
|
.com-remind-box{
|
|
|
position: fixed;
|
|
|
top: 50%;
|
|
|
- left: 50%;
|
|
|
- margin-left: -1.07rem;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
margin-top: -.6rem;
|
|
|
z-index: 100;
|
|
|
- background: rgba(0,0,0,.6);
|
|
|
- color: #fff;
|
|
|
- font-size: .28rem;
|
|
|
- padding: .44rem .51rem;
|
|
|
- border-radius: .1rem;
|
|
|
+ div {
|
|
|
+ background: rgba(0,0,0,.6);
|
|
|
+ color: #fff;
|
|
|
+ font-size: .28rem;
|
|
|
+ padding: .44rem .51rem;
|
|
|
+ border-radius: .1rem;
|
|
|
+ width: max-content;
|
|
|
+ margin: 0 auto;
|
|
|
+ max-width: 70%;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|