Commit 08d4e4ed14544828bb642f21f09dbf3239a8b301

Authored by ww
1 parent 929af653

fix: data component control compoent value type is string not transform to number

@@ -35,9 +35,9 @@ @@ -35,9 +35,9 @@
35 <div class="flex flex-col justify-center"> 35 <div class="flex flex-col justify-center">
36 <label class="sliding-switch"> 36 <label class="sliding-switch">
37 <input 37 <input
38 - :value="props.value?.value" 38 + :value="!!Number(props.value?.value)"
39 type="checkbox" 39 type="checkbox"
40 - :checked="props.value?.value" 40 + :checked="!!Number(props.value?.value)"
41 @change="handleChange" 41 @change="handleChange"
42 /> 42 />
43 <span class="slider"></span> 43 <span class="slider"></span>
@@ -41,9 +41,9 @@ @@ -41,9 +41,9 @@
41 > 41 >
42 <label class="switch"> 42 <label class="switch">
43 <input 43 <input
44 - :value="!!props.value?.value" 44 + :value="!!Number(props.value?.value)"
45 type="checkbox" 45 type="checkbox"
46 - :checked="!!props.value?.value" 46 + :checked="!!Number(props.value?.value)"
47 @change="handleChange" 47 @change="handleChange"
48 /> 48 />
49 <div class="button"> 49 <div class="button">