<template>
  <div>
    <div v-if="urlFilter == 'app'" ref="commodityList" class="commodity_card">
      <commodity-card
        v-for="item in datas"
        :key="item.id"
        :cellData="item"
        :url="url"
      ></commodity-card>
    </div>
    <div v-else class="commodity_cell">
      <commodity-cell
        v-for="item in datas"
        :cellData="item"
        :url="url"
        :key="item.id"
        :urlFilter="urlFilter"
      ></commodity-cell>
    </div>
  </div>
</template>

<script>
import CommodityCell from "@/components/service-list/commodity-cell-new.vue";
import CommodityCard from "@/components/service-list/commodity-card-new.vue";
export default {
  components: {
    "commodity-cell": CommodityCell,
    "commodity-card": CommodityCard,
  },
  props: {
    datas: {
      type: Array,
      default: () => {
        [];
      },
    },
    total: {
      type: Number,
      default: 0,
    },
    url: { type: String, default: "" },
    urlFilter: { type: String, default: "" },
  },
  data: () => ({
    
  }),
  computed: {},
  methods: {

  },
  mounted() {},
  watch: {
    datas: {
      handler(val) {},
    },
    url: {
      handler() {
        
      },
    },
  },
};
</script>

<style scoped>
.com-pagination {
  margin-top: 20px;
  font-size: 14px;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.com_page_num {
  width: 140px;
  margin-right: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.com_page_num_sel {
  width: 50px;
  font-size: 14px;
  position: relative;
  top: 1px;
}
.com_page_item {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.commodity_card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.commodity_card_list {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}
.commodity_card_item {
  margin: 10px 0;
}
.commodity_card_item_in {
  margin: 0 auto;
}
.commodity_cell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
</style>
<style>
.com_page_control .el-button {
  border: 0;
}
.com_page_num .el-input__inner {
  border: 0;
  padding: 0;
}
</style>