index.js 900 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = void 0;
  4. var _utils = require("../utils");
  5. var _field = require("../mixins/field");
  6. var _relation = require("../mixins/relation");
  7. var _createNamespace = (0, _utils.createNamespace)('radio-group'),
  8. createComponent = _createNamespace[0],
  9. bem = _createNamespace[1];
  10. var _default = createComponent({
  11. mixins: [(0, _relation.ParentMixin)('vanRadio'), _field.FieldMixin],
  12. props: {
  13. value: null,
  14. disabled: Boolean,
  15. direction: String,
  16. checkedColor: String,
  17. iconSize: [Number, String]
  18. },
  19. watch: {
  20. value: function value(_value) {
  21. this.$emit('change', _value);
  22. }
  23. },
  24. render: function render() {
  25. var h = arguments[0];
  26. return h("div", {
  27. "class": bem([this.direction]),
  28. "attrs": {
  29. "role": "radiogroup"
  30. }
  31. }, [this.slots()]);
  32. }
  33. });
  34. exports.default = _default;