diff --git a/src/views/SellerDashboard/MyListings/main/content.vue b/src/views/SellerDashboard/MyListings/main/content.vue index 63b8f9cd..601c05bf 100644 --- a/src/views/SellerDashboard/MyListings/main/content.vue +++ b/src/views/SellerDashboard/MyListings/main/content.vue @@ -3,7 +3,7 @@ import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue"; import { VueDraggable } from "vue-draggable-plus" import contentItem from "./contentItem.vue" import selectMenu from '@/component/modules/selectMenu.vue' - +import deleteDrafts from './deleteDrafts.vue' //const props = defineProps({ //}) @@ -22,11 +22,6 @@ const list = ref([ { id: "7" }, { id: "8" }, { id: "9" }, - { id: "9" }, - { id: "9" }, - { id: "9" }, - { id: "9" }, - { id: "9" }, { id: "10" } ]) const list2 = ref([ @@ -72,6 +67,31 @@ const domSizeList = ref([ value:'Large', }, ]) + +const visible = ref(false) +const deleteDraftsRef = ref(null) + +const deleteDraft = (item: any)=>{ + deleteDraftsRef.value.open(()=>{ + list2.value = list2.value.filter((v: any)=>v.id != item.id) + }) +} + +const draftListing = (item: any)=>{ + //数组前面添加item + list2.value.unshift(item) + list.value = list.value.filter((v: any)=>v.id != item.id) +} + +const publishListing = (item: any)=>{ + list.value.unshift(item) + list2.value = list2.value.filter((v: any)=>v.id != item.id) +} + +const editListing = (item: any)=>{ +} + + const listingsBoxRef = ref(null) as any let resizeObserver = null as any @@ -81,7 +101,6 @@ const gap = ref({ Large: '30px', }) - //根据宽度设置列表宽度 let upDataDomWidthTime = null const setDomSize = (width: number)=>{ @@ -197,7 +216,15 @@ const { showDrafts } = toRefs(data); }" > - +
@@ -222,10 +249,20 @@ const { showDrafts } = toRefs(data); put: true }" > - +
+ \ No newline at end of file