You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.vue 1.5 KiB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view>
  3. <block v-if="mtype==2">
  4. <view class="zan-loadmore zan-loadmore--nomore" :hidden="hidden">
  5. <view class="zan-loadmore__tips" :style="'background-color:' + tipcolor">
  6. <view class="zan-loadmore__dot"></view>
  7. </view>
  8. </view>
  9. </block>
  10. <block v-else-if="mtype==3">
  11. <view class="zan-loadmore zan-loadmore--nodata" :hidden="hidden">
  12. <view class="zan-loadmore__tips" :style="'background-color:' + tipcolor">{{ nodata_str}}</view>
  13. </view>
  14. </block>
  15. <block v-else-if="mtype==1">
  16. <view class="zan-loadmore" :hidden="hidden">
  17. <image class="zan-loading" src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/loadmore.png"></image>
  18. <view class="zan-loadmore__tips" :style="'background-color:' + tipcolor">加载中...</view>
  19. </view>
  20. </block>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {};
  27. },
  28. components: {},
  29. props: {
  30. mtype: {
  31. type: Number,
  32. default: 1
  33. },
  34. nodata_str: {
  35. type: String,
  36. default: '暂无数据'
  37. },
  38. hidden: {
  39. type: Boolean,
  40. default: true
  41. },
  42. tipcolor: {
  43. type: String,
  44. default: "#F5F5F5"
  45. }
  46. },
  47. watch: {
  48. mtype: function (newVal, oldVal) {
  49. this.setData({
  50. mtype: newVal
  51. });
  52. },
  53. nodata_str: function (newVal, oldVal) {
  54. this.setData({
  55. nodata_str: newVal
  56. });
  57. },
  58. hidden: function (newVal, oldVal) {
  59. this.setData({
  60. hidden: newVal
  61. });
  62. }
  63. },
  64. methods: {}
  65. };
  66. </script>
  67. <style>
  68. @import "./index.css";
  69. </style>