ax-ios-indicator.vue 642 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <view class="ax ax-ios-indicator" :style="[style]"></view>
  3. </template>
  4. <script>
  5. export default {
  6. name:"ax-ios-indicator",
  7. props:{
  8. // 偏差调整
  9. offset:{type:[Number,String],default:10},
  10. // 最小值
  11. min:{type:[Number,String],default:0},
  12. },
  13. computed:{
  14. height(){
  15. const e = uni.getSystemInfoSync();
  16. var h = e.screenHeight - e.safeArea.bottom - (Number(this.offset) || 0);
  17. return Math.max( Number(this.min) || 0,h);
  18. },
  19. style(){
  20. return {
  21. height: `${this.height}px`
  22. }
  23. }
  24. }
  25. }
  26. </script>
  27. <style scoped>
  28. @import url(../ax/ax.css);
  29. .ax-ios-indicator{
  30. height: 34px;
  31. }
  32. </style>