fix
This commit is contained in:
@@ -4,6 +4,8 @@ import CommodityList from "./commodity-list.vue";
|
||||
import MerchantInfo from "./merchant-info.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import scListNull from '@/views/shoppingCart/sc-list-null.vue'
|
||||
import { getListingMallListApi } from '@/api/listing'
|
||||
import { get } from "http";
|
||||
|
||||
// 定义组件名称
|
||||
defineOptions({
|
||||
@@ -16,8 +18,6 @@ defineOptions({
|
||||
const digitalItemRef = ref(null)
|
||||
const scrollTop = ref(0)
|
||||
const router = useRouter()
|
||||
let data = reactive({
|
||||
})
|
||||
|
||||
const categoriesList = ref([
|
||||
{
|
||||
@@ -39,6 +39,17 @@ const openDetail = (item) => {
|
||||
path: '/digitalItem/' + 123,
|
||||
})
|
||||
}
|
||||
const handleChange = (val) => {
|
||||
|
||||
}
|
||||
const getListingMallList = ()=>{
|
||||
let data = {
|
||||
// designFor
|
||||
}
|
||||
getListingMallListApi().then(res => {
|
||||
|
||||
})
|
||||
}
|
||||
onActivated(()=>{
|
||||
digitalItemRef.value.scrollTop = scrollTop.value
|
||||
})
|
||||
@@ -47,7 +58,6 @@ onMounted(()=>{
|
||||
onUnmounted(()=>{
|
||||
})
|
||||
defineExpose({})
|
||||
const {} = toRefs(data);
|
||||
</script>
|
||||
<template>
|
||||
<div class="digitalItem" ref="digitalItemRef">
|
||||
@@ -76,7 +86,7 @@ const {} = toRefs(data);
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="merchant-info">
|
||||
<MerchantInfo></MerchantInfo>
|
||||
<MerchantInfo @change="handleChange"></MerchantInfo>
|
||||
</div>
|
||||
<div class="commodity-list">
|
||||
<CommodityList v-if="true" @addShopping="addShopping" @openDetail="openDetail"></CommodityList>
|
||||
|
||||
@@ -1,46 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
|
||||
import { ref, onMounted, onUnmounted, computed, toRefs } from "vue";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useClothesCategories } from '@/utils/ClothesCategory'
|
||||
//const props = defineProps({
|
||||
//})
|
||||
//const emit = defineEmits([
|
||||
//])
|
||||
let data = reactive({
|
||||
})
|
||||
const categoriesList = ref([
|
||||
{
|
||||
label: 'Outwear',
|
||||
value: 'Outwear'
|
||||
},
|
||||
{
|
||||
label: 'Dress',
|
||||
value: 'Dress'
|
||||
},
|
||||
{
|
||||
label: 'Trousers',
|
||||
value: 'Trousers'
|
||||
},
|
||||
{
|
||||
label: 'Blouse',
|
||||
value: 'Blouse'
|
||||
},
|
||||
{
|
||||
label: 'Skirt',
|
||||
value: 'Skirt'
|
||||
},
|
||||
{
|
||||
label: 'Accessories',
|
||||
value: 'Accessories'
|
||||
},
|
||||
]);
|
||||
const genderList = ref([
|
||||
{
|
||||
label: 'Male',
|
||||
value: 'Male'
|
||||
},
|
||||
{
|
||||
label: 'Female',
|
||||
value: 'Female'
|
||||
},
|
||||
const emit = defineEmits([
|
||||
'change'
|
||||
])
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const categoriesList = useClothesCategories();
|
||||
|
||||
const genderList = computed(() => [
|
||||
{ label: t('Wardrobe.assets.genders.male'), value: 'male' },
|
||||
{ label: t('Wardrobe.assets.genders.female'), value: 'female' }
|
||||
])
|
||||
const categories = ref([''])
|
||||
const gender = ref([''])
|
||||
@@ -48,13 +22,16 @@ const gender = ref([''])
|
||||
const clearFilters = () => {
|
||||
categories.value = ['']
|
||||
gender.value = ['']
|
||||
handleChange()
|
||||
}
|
||||
const handleChange = () => {
|
||||
emit('change', {categories:categories.value, gender:gender.value})
|
||||
}
|
||||
onMounted(()=>{
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
})
|
||||
defineExpose({})
|
||||
const {} = toRefs(data);
|
||||
</script>
|
||||
<template>
|
||||
<div class="filters">
|
||||
@@ -65,12 +42,12 @@ const {} = toRefs(data);
|
||||
<div class="categories">Categories</div>
|
||||
<div class="line"></div>
|
||||
<div class="multiple">
|
||||
<checked :list="categoriesList" v-model:selected="categories" />
|
||||
<checked :list="categoriesList" @change="handleChange" v-model:selected="categories" />
|
||||
</div>
|
||||
<div class="categories">Gender</div>
|
||||
<div class="line"></div>
|
||||
<div class="multiple">
|
||||
<checked :list="genderList" v-model:selected="gender" />
|
||||
<checked :list="genderList" @change="handleChange" v-model:selected="gender" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user