购物车历史订单增加,代码优化
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user