fix
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
:class="{ 'is-download': download }"
|
||||
v-if="props.showPrice && props.price"
|
||||
>
|
||||
{{ props.price }}
|
||||
HK${{ props.price }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn" @click="addShopping">
|
||||
@@ -89,16 +89,17 @@
|
||||
color: #232323;
|
||||
> .name {
|
||||
font-family: 'KaiseiOpti-Regular';
|
||||
font-weight: 400;
|
||||
font-size: var(--commodity-name-fontSize, 1.6rem);
|
||||
font-weight: 700;
|
||||
font-size: var(--commodity-name-fontSize, 2rem);
|
||||
line-height: var(--commodity-name-lineHeight, 2.3rem);
|
||||
margin-bottom: var(--commodity-name-marginBottom, 0rem);
|
||||
}
|
||||
> .price {
|
||||
font-family: 'KaiseiOpti-Regular';
|
||||
font-weight: 400;
|
||||
font-size: var(--commodity-price-fontSize, 1.4rem);
|
||||
font-size: var(--commodity-price-fontSize, 1.6rem);
|
||||
line-height: var(--commodity-price-lineHeight, 2.3rem);
|
||||
margin-top: .8rem;
|
||||
&.is-download {
|
||||
color: #979797;
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@ const emit = defineEmits([
|
||||
])
|
||||
const checkList = computed(()=>{
|
||||
if(props.selected[0] === 'all'){
|
||||
return props.list.map(item => item.value)
|
||||
return []
|
||||
}else{
|
||||
return [...props.selected]
|
||||
}
|
||||
})
|
||||
const handleChange = (val) => {
|
||||
let data = val.filter(item => item !== 'all')
|
||||
if(data.length == props.list.length){
|
||||
if(data.length == props.list.length || data.length == 0){
|
||||
data = ['all']
|
||||
}else{
|
||||
data = [...val]
|
||||
@@ -31,18 +31,19 @@ const handleChange = (val) => {
|
||||
emit('change', data)
|
||||
}
|
||||
const checkAll = computed(()=>{
|
||||
return checkList.value.length === props.list.length
|
||||
return props.selected?.[0] == 'all'
|
||||
})
|
||||
const handleCheckAllChange = (val) => {
|
||||
let data = []
|
||||
if(val && props.selected[0] !== 'all'){
|
||||
data = ['all']
|
||||
// data = props.list.map(item => item.value)
|
||||
emit('update:selected', data)
|
||||
emit('change', data)
|
||||
}else{
|
||||
data = []
|
||||
}
|
||||
emit('update:selected', data)
|
||||
emit('change', data)
|
||||
|
||||
}
|
||||
let data = reactive({
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user