You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/WebMVC/wwwroot/router/shared/edit/boolean.html

21 lines
603 B

<template>
<div :data-model="mode">
<input type="checkbox" :style="'height:16px;width:16px;'+(mode==='query'?'margin:11px 0;':'margin:6px 0;')" :name="name" v-model="currentValue" />
</div>
</template>
<script>
export default {
props: ['mode','name', 'value', 'data'],
data: function () {
return {
currentValue: this.value
};
},
watch: {
currentValue(val) {
this.$emit('update:value', val);
this.$emit('change', this.name);
}
}
};
</script>