feat: 返回list列表

This commit is contained in:
2026-04-27 17:23:31 +08:00
parent 04ad920590
commit 5cfccabcd7

View File

@@ -17,62 +17,66 @@
<div class="desc"> <div class="desc">
{{ $t(desc) }} {{ $t(desc) }}
</div> </div>
<div class="btn">Back to My Listings</div> <div class="btn" @click="handleBack">Back to My Listings</div>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed } from "vue" import { ref, computed } from "vue"
import { useRoute } from "vue-router" import { useRoute, useRouter } from "vue-router"
import SellerHeader from "../../seller-header.vue" import SellerHeader from "../../seller-header.vue"
const ROUTE = useRoute() const ROUTE = useRoute()
const title = computed(() => { const ROUTER = useRouter()
if (ROUTE.params.status === "publish") return "SellerListEdit.listingLive" const title = computed(() => {
if (ROUTE.params.status === "draft") return "SellerListEdit.draftSaved" if (ROUTE.params.status === "publish") return "SellerListEdit.listingLive"
}) if (ROUTE.params.status === "draft") return "SellerListEdit.draftSaved"
})
const desc = computed(() => { const desc = computed(() => {
if (ROUTE.params.status === "publish") return "SellerListEdit.publishDesc" if (ROUTE.params.status === "publish") return "SellerListEdit.publishDesc"
if (ROUTE.params.status === "draft") return "SellerListEdit.draftDesc" if (ROUTE.params.status === "draft") return "SellerListEdit.draftDesc"
}) })
const handleBack = () => {
ROUTER.push({ name: "myListingsIndex" })
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.status-wrapper { .status-wrapper {
.status-container { .status-container {
row-gap: 2.4rem; row-gap: 2.4rem;
font-weight: 400; font-weight: 400;
.title { .title {
font-size: 2.2rem; font-size: 2.2rem;
} }
.icon { .icon {
width: 8.33rem; width: 8.33rem;
height: 8.33rem; height: 8.33rem;
} }
.desc { .desc {
width: 58.2rem; width: 58.2rem;
text-align: center; text-align: center;
white-space: pre-line; white-space: pre-line;
color: #585858; color: #585858;
font-size: 1.8rem; font-size: 1.8rem;
} }
.btn { .btn {
margin-top: 3.6rem; margin-top: 3.6rem;
height: 6rem; height: 6rem;
width: 30rem; width: 30rem;
border-radius: 4rem; border-radius: 4rem;
text-align: center; text-align: center;
line-height: 6rem; line-height: 6rem;
padding: 0 2rem; padding: 0 2rem;
font-size: 1.6rem; font-size: 1.6rem;
column-gap: 0.8rem; column-gap: 0.8rem;
cursor: pointer; cursor: pointer;
background-color: #000; background-color: #000;
color: #fff; color: #fff;
}
} }
} }
}
</style> </style>