<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>