This commit is contained in:
weipengfei 2024-04-06 17:35:48 +08:00
parent 7ee4083570
commit 8320e247b6
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,11 @@ const handleEnter = () => {
bar_code: bar_code.value, bar_code: bar_code.value,
}); });
}; };
defineExpose({
bar_code
})
</script> </script>
<template> <template>

View File

@ -40,6 +40,7 @@ const getStoreList = (data) => {
}); });
storeList.value = storeList.value.concat(list); storeList.value = storeList.value.concat(list);
if (data.bar_code && storeList.value.length == 1 && isAllDigits(data.bar_code)) { if (data.bar_code && storeList.value.length == 1 && isAllDigits(data.bar_code)) {
shopRef.value.bar_code = ''
cartAddInfo(storeList.value[0], storeList.value[0].attr[0]); cartAddInfo(storeList.value[0], storeList.value[0].attr[0]);
} }
}); });