Files
Aida_Purchaser_Front/src/views/shopping-drawer.vue
X1627315083@163.com 66b019eb2a fix
2026-04-23 14:30:09 +08:00

40 lines
926 B
Vue

<script setup lang="ts">
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
import myEvent from '@/utils/myEvent'
import scList from '@/views/shoppingCart/sc-list.vue'
//const props = defineProps({
//})
//const emit = defineEmits([
//])
let data = reactive({
})
const isShoppingShow = ref(false)
const shoppingClose = () => {
isShoppingShow.value = false
}
onMounted(()=>{
myEvent.add('addShopping', (item) => {
isShoppingShow.value = true
console.log(item)
})
})
onUnmounted(()=>{
myEvent.remove('addShopping')
})
defineExpose({})
const {} = toRefs(data);
</script>
<template>
<el-drawer v-model="isShoppingShow" width="50rem" :close-on-click-modal="false" title="I am the title" :with-header="false">
<sc-list is-mini style="flex: 0.6;" @close="shoppingClose"/>
</el-drawer>
</template>
<style lang="less" scoped>
.homeNavBox{
width: 100%;
height: 100%;
position: relative;
}
</style>