Commit c4dac8dac79a7b9c3d30fa1694aacb48897dca3a

Authored by xp.Huang
2 parents f857c38b 08d4e4ed

Merge branch 'ww' into 'main'

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

See merge request huang/yun-teng-iot-front!426
@@ -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">