float-btn.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="botView" >
  3. <view class="floatBox" @tap="clickAddCustomer">
  4. <image src="@/static/images/customer/add_customer.png" class="bicon"></image>
  5. <view class="text" >添加用户</view>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default{
  11. props:{
  12. isShowMsgPop:{
  13. type:Boolean,
  14. default:false
  15. }
  16. },
  17. data(){
  18. return{
  19. }
  20. },
  21. methods:{
  22. clickAddCustomer(){
  23. console.log("clickAddCustomer");
  24. return this.$emit('clickAddCustomer');
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. .botView{
  31. position: fixed;
  32. right: 31rpx;
  33. z-index: 999;
  34. display: flex;
  35. width:204rpx;
  36. height:98rpx ;
  37. align-items: center;
  38. // top:var(--window-top);
  39. bottom:calc(var(--window-bottom) + 32rpx);
  40. }
  41. .floatBox{
  42. display: flex;
  43. flex-direction: row;
  44. flex-wrap: wrap;
  45. flex: 1;
  46. justify-content: center;
  47. height: 80rpx;
  48. align-items: center;
  49. margin:0 0;
  50. .bicon{
  51. width: 100%;
  52. height: 100%;
  53. position: absolute;
  54. left: 0;
  55. top: 0;
  56. right: 0;
  57. bottom: 0;
  58. z-index: 10;
  59. }
  60. .text{
  61. color: #fff;
  62. font-size: 28rpx;
  63. text-align: center;
  64. margin-left: 34rpx;
  65. z-index: 11;
  66. margin-bottom: 8rpx;
  67. }
  68. }
  69. </style>