交互
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
})
|
||||
const emit = defineEmits(['explore'])
|
||||
const handleClick = () => {
|
||||
console.log('emit("explore")')
|
||||
emit('explore')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
:show-button="!isMini"
|
||||
title="Your Cart is empty"
|
||||
tip="Discover new fashion assets and add them to your cart."
|
||||
@explore="handleExplore"
|
||||
/>
|
||||
<sc-item
|
||||
v-for="v in list"
|
||||
@@ -83,6 +84,8 @@
|
||||
import { FormatBytes, FormatDate } from '@/utils/tools'
|
||||
import scItem from './sc-item.vue'
|
||||
import scListNull from './sc-list-null.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const emit = defineEmits(['close', 'selected-change'])
|
||||
const props = defineProps({
|
||||
title: { type: String, default: '' },
|
||||
@@ -126,7 +129,9 @@
|
||||
return list_.value.filter(() => true).sort((a, b) => a.amount - b.amount)
|
||||
}
|
||||
if (sortBy.value === 'SelectedFirst') {
|
||||
return list_.value.filter(() => true).sort((a, b) => (b.checked ? 1 : 0) - (a.checked ? 1 : 0))
|
||||
return list_.value
|
||||
.filter(() => true)
|
||||
.sort((a, b) => (b.checked ? 1 : 0) - (a.checked ? 1 : 0))
|
||||
}
|
||||
if (sortBy.value === 'DateAdded') {
|
||||
return list_.value.filter(() => true).sort((a, b) => b.date - a.date)
|
||||
@@ -180,8 +185,8 @@
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
const handleExploreClick = () => {
|
||||
console.log('探索')
|
||||
const handleExplore = () => {
|
||||
router.push({ name: 'brand' })
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user