graceFixedMsg.nvue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="grace-fixed-msg" :style="{width:width+'rpx', bottom:bottom+'rpx', left:(( 750 - width ) / 2) + 'rpx'}" v-if="show" @tap.stop="tapme">
  3. <text class="grace-fixed-msg-icon grace-icons" :style="{color:color}">&#xe666;</text>
  4. <text class="grace-fixed-msg-text" :style="{color:color}">{{msg}}</text>
  5. <text class="grace-fixed-msg-icon grace-icons" :style="{color:color}">&#xe601;</text>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. props:{
  11. msg : {
  12. type : String,
  13. default : ""
  14. },
  15. color : {
  16. type : String,
  17. default : "#008CFF"
  18. },
  19. width : {
  20. type : Number,
  21. default : 300
  22. },
  23. bottom : {
  24. type : Number,
  25. default : 80
  26. },
  27. show : {
  28. type : Boolean,
  29. default : true
  30. }
  31. },
  32. methods:{
  33. tapme : function(){
  34. this.$emit('tapme');
  35. }
  36. }
  37. }
  38. </script>
  39. <style scoped>
  40. .grace-fixed-msg{width:300rpx; flex-direction:row; flex-wrap:nowrap; align-items:center; padding:0rpx 20rpx; height:70rpx; border-radius:50rpx; background-color:#F6F7F8; position:fixed; bottom:60rpx;}
  41. .grace-fixed-msg-icon{width:40rpx; height:40rpx; line-height:40rpx; font-size:30rpx; color:#3688FF; opacity:0.6; text-align:center;}
  42. .grace-fixed-msg-text{width:500rpx; line-height:70rpx; font-size:28rpx; color:#008CFF; height:70rpx; text-align:center; flex: 1;}
  43. </style>