31abad41cda48a523f9aa51b754ea1017a1c517d38a84f589734c961b84d318419f422a9084ea692490a32a629b452c3fba62b1d40bb98fbe2f3fbfa95f158 895 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <script>
  2. import Emitter from 'element-ui/src/mixins/emitter';
  3. export default {
  4. name: 'ElCheckboxGroup',
  5. componentName: 'ElCheckboxGroup',
  6. mixins: [Emitter],
  7. inject: {
  8. elFormItem: {
  9. default: ''
  10. }
  11. },
  12. props: {
  13. value: {},
  14. disabled: Boolean,
  15. min: Number,
  16. max: Number,
  17. size: String,
  18. fill: String,
  19. textColor: String
  20. },
  21. computed: {
  22. _elFormItemSize() {
  23. return (this.elFormItem || {}).elFormItemSize;
  24. },
  25. checkboxGroupSize() {
  26. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  27. }
  28. },
  29. watch: {
  30. value(value) {
  31. this.dispatch('ElFormItem', 'el.form.change', [value]);
  32. }
  33. }
  34. };
  35. </script>
  36. <template>
  37. <div class="el-checkbox-group" role="group" aria-label="checkbox-group">
  38. <slot></slot>
  39. </div>
  40. </template>