nodata.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="atWorkBox">
  3. <div class="atWorkStyle1" v-if="dataStyle == 1" :style="{width: dataWidth + 'px', height: dataHeight + 'px'}">
  4. <div class="atWorkImgBox">
  5. <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1749025503443518.png" alt="当前板块暂无内容!" >
  6. <div class="atWorkTitle">对不起,当前板块暂无内容!</div>
  7. </div>
  8. </div>
  9. <div class="atWorkStyle2" v-if="dataStyle == 2" :style="{width: dataWidth + 'px', height: dataHeight + 'px'}">
  10. <div class="atWorkImgBox">
  11. <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1749025503443518.png" alt="当前板块暂无内容!" v-show="dataHeight>80">
  12. <div class="atWorkTitle">对不起,当前板块暂无内容!</div>
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup>
  18. //引入vue
  19. import { ref } from 'vue';
  20. //获得数据
  21. const props = defineProps({
  22. dataStyle: Number,//样式
  23. dataWidth: Number,//宽度
  24. dataHeight: Number,//高度
  25. });
  26. const dataStyle = ref(props.dataStyle);
  27. const dataWidth = ref(props.dataWidth);
  28. const dataHeight = ref(props.dataHeight);
  29. </script>
  30. <style lang="less">
  31. .atWorkBox {
  32. width: 100%;
  33. height: 100%;
  34. background: #fff;
  35. .atWorkStyle1 {
  36. display:flex;
  37. align-items: center;
  38. justify-content: center;
  39. img {
  40. display: block;
  41. margin: 0 auto;
  42. margin-bottom: 20px;
  43. }
  44. .atWorkTitle {
  45. font-size: 16px;
  46. color: #999;
  47. text-align: center;
  48. }
  49. }
  50. .atWorkStyle2 {
  51. display:flex;
  52. align-items: center;
  53. justify-content: center;
  54. .atWorkImgBox {
  55. display:flex;
  56. align-items: center;
  57. justify-content: center;
  58. }
  59. img {
  60. display: block;
  61. margin-right: 20px;
  62. }
  63. .atWorkTitle {
  64. font-size: 16px;
  65. color: #999;
  66. text-align: center;
  67. }
  68. }
  69. }
  70. </style>