|
@@ -16,7 +16,7 @@
|
|
|
size="small"
|
|
|
label
|
|
|
density="comfortable"
|
|
|
- color="primary"
|
|
|
+ color="grey"
|
|
|
variant="outlined"
|
|
|
:disabled="value.disabled === true"
|
|
|
@click="onSelectSku(property.id, value.id)"
|
|
@@ -72,6 +72,7 @@ const props = defineProps({
|
|
|
});
|
|
|
|
|
|
const propertyList = convertProductPropertyList(props.goodsInfo.skus);
|
|
|
+
|
|
|
// SKU 列表
|
|
|
const skuList = computed(() => {
|
|
|
let skuPrices = props.goodsInfo.skus;
|
|
@@ -263,7 +264,13 @@ const props = defineProps({
|
|
|
}
|
|
|
|
|
|
changeDisabled(false);
|
|
|
- // TODO 芋艿:待讨论的优化点:1)单规格,要不要默认选中;2)默认要不要选中第一个规格
|
|
|
+
|
|
|
+ // 默认选中第一个规格
|
|
|
+ if (propertyList && propertyList.length) {
|
|
|
+ propertyList.forEach((e) => {
|
|
|
+ if (e.values && e.values.length) onSelectSku(e.id, e.values[0].id)
|
|
|
+ })
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|