vue开关始终第一次显示为true,始终显示为false。代码是
<div class="field-switch">
<d-switch label="Enable" id="is_state_enabled" name="is_state_enabled" v-model="form.is_state_enabled" :checked = "form.is_state_enabled"></d-switch>
</div>
<script>
export default {
name: 'stateEdit',
data () {
return {
isStateEditVisible: false,
form :{
state_name: '',
is_state_enabled: true,
ISO_Code: '',
country_id: '',
zone_id: '',
Countries: [],
Zones: [],
}
}
},
</script>
我为HTML分配了正确性吗?