checkMapList.vue 733 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <view class="check-map-list">
  3. <view class="item"
  4. v-for="(item, index) in checkMap.list"
  5. v-if="item.status !== 'disable'"
  6. :key="index">
  7. <tm-check-map-list :item="item"></tm-check-map-list>
  8. </view>
  9. <view class="null" v-if="dataIsNull">暂无数据</view>
  10. </view>
  11. </template>
  12. <script>
  13. import { mapState } from "vuex";
  14. export default {
  15. computed: {
  16. ...mapState({
  17. checkMap: state => state.creatingSituations.checkMap,
  18. }),
  19. dataIsNull() {
  20. let data = this.checkMap.list.filter((item)=> item.status !== 'disable');
  21. return data.length === 0;
  22. }
  23. },
  24. }
  25. </script>
  26. <style lang="less">
  27. .check-map-list {
  28. padding: 25rpx;
  29. }
  30. .null {
  31. text-align: center;
  32. color: #999;
  33. }
  34. </style>