swiper-page.nvue 667 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="uni-swiper-page">
  3. <text>Tab View {{ pid}}</text>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. props: {
  9. pid: {
  10. type: [Number, String],
  11. default: ''
  12. }
  13. },
  14. data() {
  15. return {
  16. dataList: []
  17. }
  18. },
  19. created() {},
  20. methods: {
  21. loadData() {
  22. // 首次激活时被调用
  23. },
  24. clear() {
  25. // 释放数据时被调用,参考 swiper-list 缓存配置
  26. this.dataList.length = 0;
  27. }
  28. }
  29. }
  30. </script>
  31. <style scoped>
  32. .uni-swiper-page {
  33. flex: 1;
  34. flex-direction: column;
  35. position: absolute;
  36. left: 0;
  37. top: 0;
  38. right: 0;
  39. bottom: 0;
  40. align-items: center;
  41. justify-content: center;
  42. }
  43. </style>