对接添加购物车
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
<el-button plain style="width: 100%;" @click="dialogVisible = false">取消</el-button>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="primary" style="width: 100%;" :disabled="!goodsInfo.id">确认</el-button>
|
||||
<el-button type="primary" style="width: 100%;" :disabled="!goodsInfo.id"
|
||||
@click="submitSku">确认</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -34,10 +35,12 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useUser } from "@/store/user.js"
|
||||
const store = useUser();
|
||||
|
||||
import { queryProductSku } from '@/api/product'
|
||||
|
||||
const store = useUser();
|
||||
const emit = defineEmits(['success'])
|
||||
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const goods = ref({})
|
||||
|
||||
@@ -48,6 +51,12 @@ const goodsInfo = ref({})
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
// 确认选择规格
|
||||
function submitSku() {
|
||||
dialogVisible.value = false
|
||||
emit('success', goodsInfo.value)
|
||||
}
|
||||
|
||||
// 选择规格
|
||||
function selectedSku(index, i) {
|
||||
goods.value.tbProductSpec.specList[index].value.map(item => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- 取餐号组件 -->
|
||||
<template>
|
||||
<el-dialog title="修改取餐号" width="600" v-model="dialogVisible" @open="opne">
|
||||
<el-input v-model="number" placeholder="请输入取餐号" readonly></el-input>
|
||||
<el-dialog :title="props.title" width="600" v-model="dialogVisible" @open="opne">
|
||||
<el-input v-model="number" :placeholder="props.placeholder" readonly></el-input>
|
||||
<div class="keybord_wrap">
|
||||
<div v-for="item in 9" :key="item">
|
||||
<el-button plain type="info" style="width: 100%;" @click="inputHandle(item)">{{ item }}</el-button>
|
||||
@@ -25,6 +25,17 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '标题'
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '提示'
|
||||
}
|
||||
})
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const number = ref('')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user