江西小程序管理端
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.

45 lines
737 B

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