新增部分优惠券页面
This commit is contained in:
@@ -141,10 +141,6 @@ function updateSelectGoods() {
|
||||
}
|
||||
|
||||
// 确定
|
||||
const foods = defineModel('foods', {
|
||||
type: [Array, String],
|
||||
default: []
|
||||
});
|
||||
function confirmHandle() {
|
||||
confirmSelectGoods();
|
||||
popupShow.value = false;
|
||||
@@ -162,7 +158,7 @@ function confirmSelectGoods() {
|
||||
});
|
||||
});
|
||||
|
||||
foods.value = selectGoodsCount.value.map((item) => item.id);
|
||||
modelValue.value = selectGoodsCount.value.map((item) => item.id);
|
||||
}
|
||||
|
||||
// 获取商品列表
|
||||
@@ -170,8 +166,8 @@ async function getProductListAjax() {
|
||||
try {
|
||||
const res = await getProductList();
|
||||
res.forEach((item, index) => {
|
||||
console.log('modelValue.value===', modelValue.value);
|
||||
console.log('index===', item.id.includes(modelValue.value));
|
||||
// console.log('modelValue.value===', modelValue.value);
|
||||
// console.log('index===', item.id.includes(modelValue.value));
|
||||
if (modelValue.value.includes(item.id)) {
|
||||
item.selected = true;
|
||||
} else {
|
||||
@@ -226,6 +222,13 @@ onMounted(async () => {
|
||||
font-size: 28upx;
|
||||
color: #999;
|
||||
}
|
||||
.t {
|
||||
display: block;
|
||||
max-width: 400upx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user