index.js 545B

1234567891011121314151617181920212223
  1. import { VantComponent } from '../common/component';
  2. import { useChildren } from '../common/relation';
  3. VantComponent({
  4. field: true,
  5. relation: useChildren('radio'),
  6. props: {
  7. value: {
  8. type: null,
  9. observer: 'updateChildren',
  10. },
  11. direction: String,
  12. disabled: {
  13. type: Boolean,
  14. observer: 'updateChildren',
  15. },
  16. },
  17. methods: {
  18. updateChildren() {
  19. this.children.forEach((child) => child.updateFromParent());
  20. },
  21. },
  22. });