Files
aida_front/src/views/SellerDashboard/MyListings/main/index.vue

98 lines
2.0 KiB
Vue
Raw Normal View History

2026-04-09 10:31:29 +08:00
<script setup lang="ts">
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
2026-04-09 10:39:02 +08:00
import sellerHeader from "../../seller-header.vue"
2026-04-09 13:36:03 +08:00
import sellerContent from "./content.vue"
2026-04-10 14:40:48 +08:00
import myEvent from "@/tool/myEvents.js"
2026-04-27 09:50:20 +08:00
import { Https } from '@/tool/https'
2026-04-27 09:39:26 +08:00
import { useStore } from "vuex";
2026-04-09 10:31:29 +08:00
//const props = defineProps({
//})
//const emit = defineEmits([
//])
2026-04-27 09:39:26 +08:00
const store = useStore()
2026-04-09 10:31:29 +08:00
let data = reactive({
2026-04-27 09:39:26 +08:00
listingPopup: true,
2026-04-09 10:31:29 +08:00
})
2026-04-10 14:40:48 +08:00
const newListing = ()=>{
2026-04-27 09:39:26 +08:00
myEvent.emit('newListing',)
}
const getListingPopup = ()=>{
store.commit("set_loading", true)
Https.getListingPopup().then(res=>{
store.commit("set_loading", false)
data.listingPopup = res.data
}).catch(()=>{
store.commit("set_loading", false)
})
2026-04-10 14:40:48 +08:00
}
2026-04-09 10:31:29 +08:00
onMounted(()=>{
2026-04-27 09:39:26 +08:00
let listingPopup = sessionStorage.getItem('listingPopup')
2026-04-09 10:31:29 +08:00
})
onUnmounted(()=>{
})
defineExpose({})
const {} = toRefs(data);
</script>
<template>
<div class="myListings-seller">
<seller-header
title="My Listings"
tip="Active listings and unpublished inventory."
>
<template #right>
2026-04-10 14:40:48 +08:00
<div class="button" @click="newListing">
2026-04-09 10:31:29 +08:00
<span>New Listing</span>
<div class="icon">
<i class="fi fi-br-plus"></i>
</div>
</div>
</template>
</seller-header>
<div class="content">
2026-04-09 13:36:03 +08:00
<sellerContent></sellerContent>
2026-04-09 10:31:29 +08:00
</div>
</div>
</template>
<style scoped lang="less">
.myListings-seller {
2026-04-09 13:36:03 +08:00
flex: 1;
// overflow: hidden;
2026-04-09 10:31:29 +08:00
position: relative;
display: flex;
flex-direction: column;
.button {
width: 16rem;
2026-04-09 13:36:03 +08:00
height: 6rem;
2026-04-09 10:31:29 +08:00
border-radius: 4rem;
display: flex;
border: 1.5px solid #000000;
background-color: #000;
color: #fff;
transition: all .3s;
gap: .8rem;
align-items: center;
justify-content: center;
font-size: 1.6rem;
cursor: pointer;
i{
color: #fff;
display: flex;
font-size: 1.6rem;
}
&:hover{
background-color: #fff;
color: #000;
i{
color: #000;
}
}
}
> .content {
margin-top: 2rem;
flex: 1;
2026-04-09 13:48:46 +08:00
position: relative;
2026-04-09 10:31:29 +08:00
}
}
</style>