File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 9
9
:key =" type.id"
10
10
:id =" type.id"
11
11
:label =" type.name"
12
- :checked =" type.checked"
13
- @change =" () => toggleProductType(type.id)"
12
+ :modelValue =" type.checked"
13
+ @change =" (checked ) => toggleProductType(type.id)"
14
14
/>
15
15
</div >
16
16
</div >
24
24
:max =" 1000"
25
25
:value =" priceRange[1]"
26
26
:startValue =" priceRange[0]"
27
- :disabled =" false"
28
27
@input =" (value) => setPriceRange([priceRange[0], value])"
29
28
/>
30
29
</div >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<label class =" flex items-center space-x-2 cursor-pointer" >
3
- <input type =" checkbox" class =" form-checkbox h-4 w-4 text-blue-600 rounded" disabled />
3
+ <input
4
+ type =" checkbox"
5
+ class =" form-checkbox h-4 w-4 text-blue-600 rounded"
6
+ :checked =" modelValue"
7
+ @change =" $emit('change', $event.target.checked)"
8
+ />
4
9
<span class =" text-sm" >{{ label }}</span >
5
10
</label >
6
11
</template >
@@ -11,5 +16,10 @@ defineProps({
11
16
type: String ,
12
17
default: ' ' ,
13
18
},
19
+ modelValue: {
20
+ type: Boolean ,
21
+ default: false ,
22
+ },
14
23
});
24
+ defineEmits ([' change' ]);
15
25
</script >
You can’t perform that action at this time.
0 commit comments