MEmpty.vue 709 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div class="mempty">
  3. <div :class="[icon ? icon : 'icon_nodata', 'icon']"></div>
  4. <div class="msg">{{ msg ? msg : '暂无内容' }}</div>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. name: 'mempty',
  10. props: {
  11. icon: String, // icon名称
  12. msg: String
  13. }
  14. }
  15. </script>
  16. <style lang="less" scoped>
  17. @import url('../assets/commonLess/variable');
  18. .icon {
  19. width: 2rem;
  20. height: 2rem;
  21. margin: .5rem auto .05rem;
  22. }
  23. .icon_nodata {
  24. background: url('../assets/images/icon_nodata.png') no-repeat center;
  25. background-size: contain;
  26. }
  27. .msg {
  28. color: @sFontColor;
  29. font-size: .16rem;
  30. text-align: center;
  31. line-height: .22rem;
  32. }
  33. </style>