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.

44 lines
787 B

7 months ago
  1. <template>
  2. <u-checkbox-group
  3. v-model="value"
  4. placement="row"
  5. @change="checkboxChange"
  6. >
  7. <u-checkbox
  8. :customStyle="{marginRight: '8px'}"
  9. v-for="(item, index) in checkData"
  10. :key="index"
  11. :label="item.name"
  12. :name="item.id"
  13. >
  14. </u-checkbox>
  15. </u-checkbox-group>
  16. </template>
  17. <script>
  18. export default {
  19. props: {
  20. checkData: {
  21. type: Array,
  22. default: []
  23. }
  24. },
  25. data() {
  26. return {
  27. value: []
  28. }
  29. },
  30. mounted() {
  31. this.$on('upDateCheck',(val)=>{
  32. this.value = val
  33. })
  34. },
  35. methods: {
  36. checkboxChange(val) {
  37. this.$emit('changeCheck', val)
  38. }
  39. }
  40. }
  41. </script>
  42. <style>
  43. </style>