欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
<template>
 
  <div class="chat-checkbox">
 
    <input
 
      :id="id"
 
      :name="name"
 
      v-model="value"
 
      @change="check"
 
      class="checklist"
 
      type="checkbox"
 
    />
 
    <label :for="forId"></label>
 
  </div>
 
</template>
 
<script>
 
export default {
 
  name: 'chatCheckBox',
 
  props: {
 
    id: {
 
      type: String,
 
    },
 
    forId: {
 
      type: String,
 
    },
 
    name: {
 
      type: String
 
    },
 
    vModelValue: {
 
      type: Boolean
 
    }
 
  },
 
  data() {
 
    return {
 
      value: this.vModelValue
 
    }
 
  },
 
  methods: {
 
    check(e) {
 
      this.$emit('change', e)
 
    }
 
  }
 
}
 
</script>
 
<style lang="scss" scoped>
 
@import '@css/globalCite/defaultVariable.scss';
 
@import '@css/globalCite/defaultThemeVariable.scss';
 
@import '@css/globalCite/themeMixin.scss';
 
@import '@css/globalCite/bgImageMixin.scss';
 
@import '@css/vux/chatCheckbox.scss'; 
 
</style>

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h63516.shtml