index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="empty-box">
  3. <!-- <u--image :src="emptyImg" :width="imgSize" :height="imgSize"></u--image> -->
  4. <view>暂无数据</view>
  5. <text class="empty-txt" :style="getTitleStyle">{{emptytxt}}</text>
  6. <text class="empty-desc" :style="getTitleStyle">换个关键词试试~</text>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. // 缺省页
  12. name: "empty",
  13. props: {
  14. emptyImg: {
  15. type: String,
  16. // default: `${this.$getImgBaseUrl()}ic_empty.png`,
  17. },
  18. emptytxt: {
  19. type: String,
  20. default: "没有找到内容",
  21. },
  22. imgSize: {
  23. type: String,
  24. default: "213rpx",
  25. },
  26. fontSize: {
  27. type: String,
  28. default: "28rpx",
  29. },
  30. },
  31. computed: {
  32. getTitleStyle() {
  33. return "font-size:" + this.fontSize + ";"
  34. },
  35. },
  36. data() {
  37. return {
  38. };
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .empty-box {
  44. width: 100%;
  45. height: 70vh;
  46. display: flex;
  47. flex-direction: column;
  48. justify-content: center;
  49. align-items: center;
  50. }
  51. .empty-txt {
  52. font-family: 'PingFang SC';
  53. font-style: normal;
  54. font-weight: 400;
  55. display: flex;
  56. align-items: center;
  57. text-align: center;
  58. letter-spacing: 0.02em;
  59. margin: 16rpx 0 0 0;
  60. /* 输入框默认文字 */
  61. color: #000000;
  62. }
  63. .empty-desc {
  64. font-family: 'PingFang SC';
  65. font-style: normal;
  66. font-weight: 400;
  67. display: flex;
  68. align-items: center;
  69. text-align: center;
  70. letter-spacing: 0.02em;
  71. /* 输入框默认文字 */
  72. color: #BBBFC4;
  73. }
  74. </style>