JNoData.vue 752 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <view class="j-no-data">
  3. <JIcon :width="width" :height="height" :type="type"></JIcon>
  4. <view class="text">{{ text || "暂无数据" }}</view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. props: {
  10. type: {
  11. type: String,
  12. default: "empty",
  13. },
  14. width: {
  15. type: [String, Number],
  16. default: 200,
  17. },
  18. height: {
  19. type: [String, Number],
  20. default: 200,
  21. },
  22. text: String,
  23. },
  24. };
  25. </script>
  26. <style lang="less" scoped>
  27. .j-no-data {
  28. display: flex;
  29. align-items: center;
  30. justify-content: center;
  31. flex-direction: column;
  32. margin: 30upx 0;
  33. min-height: 300px;
  34. }
  35. .text {
  36. color: rgb(173, 173, 173);
  37. font-size: 28upx;
  38. letter-spacing: 2px;
  39. margin-top: 20px;
  40. }
  41. </style>