购物车历史订单增加,代码优化

This commit is contained in:
GaoHao
2025-04-02 09:20:26 +08:00
parent 5a655ba09e
commit 5e6646b574
31 changed files with 418 additions and 357 deletions

View File

@@ -36,7 +36,7 @@
</template>
<script setup>
import { computed, getCurrentInstance, reactive, ref, watch } from 'vue';
import { computed, reactive, ref, watch } from 'vue';
import infobox from '@/commons/utils/infoBox.js'
import myModel from '@/components/my-components/my-model.vue'
import myButton from '@/components/my-components/my-button.vue'
@@ -48,6 +48,7 @@
},
})
const model = ref(null)
const popup = ref()
let datas = reactive({
item: "",
title: "",
@@ -75,7 +76,6 @@
})
const emits = defineEmits(['confirm', 'updateSku'])
const instance = getCurrentInstance();
function confirm() {
// 将数据保存进对应的值
@@ -104,7 +104,7 @@
emits('confirm', arr, datas.item)
close()
} else {
instance.ctx.$refs.popup.open()
popup.value.open()
}
}