foot_toolbar.vue 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view>
  3. <view
  4. class="dt-foot-toolbar"
  5. :style="footToolbar"
  6. >
  7. <slot name="main"></slot>
  8. </view>
  9. <view class="foot-toolbar-fix" :style="footToolbar2"></view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. props:{
  15. bgColor:{
  16. type:String,
  17. default:''
  18. }
  19. },
  20. data() {
  21. return {};
  22. },
  23. computed:{
  24. footToolbar2(){
  25. return `padding-bottom:${this.safeAreaBottom}px`;
  26. },
  27. footToolbar(){
  28. return `
  29. padding-bottom:${this.safeAreaBottom}px;
  30. background-color:${this.bgColor};
  31. `;
  32. },
  33. },
  34. };
  35. </script>
  36. <style lang="scss">
  37. .dt-foot-toolbar {
  38. position: fixed;
  39. bottom: 0;
  40. left: 0;
  41. width: 100%;
  42. height: 100upx;
  43. background-color: #fff;
  44. display: flex;
  45. align-items: center;
  46. z-index: 200;
  47. }
  48. .foot-toolbar-fix{
  49. height:100upx;
  50. }
  51. </style>