145 lines
3.4 KiB
Vue
145 lines
3.4 KiB
Vue
<template>
|
|
<div class="searchResult">
|
|
<!-- <div class="wrapper">
|
|
<sort-select
|
|
v-if="showSort"
|
|
:filters="sorts"
|
|
@filter-change="sortChange"
|
|
></sort-select>
|
|
<button class="general-btn btnFilter" v-if="showSort" @click="showFilter">
|
|
<span>FILTERS</span>
|
|
</button>
|
|
</div> -->
|
|
<!-- <result-no title="COMING SOON." desc=""></result-no> -->
|
|
<CardList
|
|
:nftList="nftList"
|
|
:isType="isType"
|
|
@getMarketNftList="getMarketNftList"
|
|
:currencyTypeList="currencyTypeList"
|
|
v-if="selectIdx - 1 == 0"
|
|
></CardList>
|
|
<DunList
|
|
:nftList="nftList"
|
|
:isType="isType"
|
|
@getMarketNftList="getMarketNftList"
|
|
:currencyTypeList="currencyTypeList"
|
|
v-else-if="selectIdx - 1 == 1"
|
|
></DunList>
|
|
<ChipList
|
|
:nftList="nftList"
|
|
:isType="isType"
|
|
@getMarketNftList="getMarketNftList"
|
|
:currencyTypeList="currencyTypeList"
|
|
v-else-if="selectIdx - 1 == 2"
|
|
></ChipList>
|
|
<PieceList
|
|
:nftList="nftList"
|
|
:isType="isType"
|
|
@getMarketNftList="getMarketNftList"
|
|
:currencyTypeList="currencyTypeList"
|
|
v-else-if="selectIdx - 1 == 3"
|
|
></PieceList>
|
|
<!-- <PieceList
|
|
:nftList="nftList"
|
|
:isType="isType"
|
|
v-if="selectIdx - 1 == 3"
|
|
></PieceList> -->
|
|
</div>
|
|
</template>
|
|
<script lang="ts">
|
|
import { Component, Vue, Prop } from "vue-property-decorator";
|
|
import SortSelect from "@/components/market/SortSelect.vue";
|
|
import CardList from "@/components/market/HeroCardList.vue";
|
|
import DunList from "@/components/market/DunList.vue";
|
|
import ChipList from "@/components/market/ChipCardList.vue";
|
|
import PieceList from "@/components/market/nft/PieceNft.vue";
|
|
import ResultNo from "@/components/market/ResultNo.vue";
|
|
|
|
declare module "vue/types/vue" {
|
|
interface Vue {
|
|
showSort?: boolean;
|
|
}
|
|
}
|
|
|
|
@Component({
|
|
name: "SearchResult",
|
|
components: {
|
|
ResultNo,
|
|
CardList,
|
|
ChipList,
|
|
SortSelect,
|
|
DunList,
|
|
PieceList,
|
|
},
|
|
props: ["showSort", "selectIdx", "nftList", "isType",'currencyTypeList'],
|
|
})
|
|
export default class extends Vue {
|
|
@Prop() public nftList: [];
|
|
// get List() {
|
|
// return this.nftList;
|
|
// }
|
|
created() {
|
|
// console.log(this.nftList, "nftlist1");
|
|
}
|
|
private sorts = ["None", "Latest", "Cheapest Item", "Most Expensive"];
|
|
showFilter() {
|
|
this.$emit("filter-show", true);
|
|
}
|
|
|
|
sortChange(id: number) {
|
|
// console.log("sort change: ", id);
|
|
}
|
|
handclick(){
|
|
// console.log(this.nftList, "nftlist1");
|
|
}
|
|
getMarketNftList(){
|
|
this.$emit('getMarketNftList')
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.searchResult {
|
|
display: flex;
|
|
-ms-flex: 1;
|
|
flex: 1;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: column;
|
|
flex-direction: column;
|
|
//padding: 2.5em;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.searchResult .wrapper {
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-pack: justify;
|
|
-ms-flex-pack: justify;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.searchResult .wrapper .btnFilter {
|
|
width: 14.5em;
|
|
font-size: inherit;
|
|
height: 40px;
|
|
padding: 1em 0;
|
|
display: none;
|
|
line-height: 18px;
|
|
border-radius: 0.5em;
|
|
background: #3b2a8b;
|
|
}
|
|
|
|
.searchResult .wrapper .btnFilter span {
|
|
font-size: 1.125em;
|
|
line-height: 1.33;
|
|
}
|
|
@media (max-width: 767px) {
|
|
.searchResult .wrapper .btnFilter {
|
|
clip-path: none;
|
|
display: block;
|
|
}
|
|
}
|
|
</style>
|