feat: 返回list列表

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

View File

@@ -17,30 +17,34 @@
<div class="desc">
{{ $t(desc) }}
</div>
<div class="btn">Back to My Listings</div>
<div class="btn" @click="handleBack">Back to My Listings</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, computed } from "vue"
import { useRoute } from "vue-router"
import SellerHeader from "../../seller-header.vue"
const ROUTE = useRoute()
const title = computed(() => {
import { ref, computed } from "vue"
import { useRoute, useRouter } from "vue-router"
import SellerHeader from "../../seller-header.vue"
const ROUTE = useRoute()
const ROUTER = useRouter()
const title = computed(() => {
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 === "draft") return "SellerListEdit.draftDesc"
})
})
const handleBack = () => {
ROUTER.push({ name: "myListingsIndex" })
}
</script>
<style lang="less" scoped>
.status-wrapper {
.status-wrapper {
.status-container {
row-gap: 2.4rem;
font-weight: 400;
@@ -74,5 +78,5 @@ const desc = computed(() => {
color: #fff;
}
}
}
}
</style>