index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <uni-shadow-root class="weapp-lib-radio-group-index"><view :class="utils.bem('radio-group', [direction])">
  3. <slot></slot>
  4. </view></uni-shadow-root>
  5. </template>
  6. <wxs src="../wxs/utils.wxs" module="utils"></wxs>
  7. <script>
  8. global['__wxRoute'] = 'weapp/lib/radio-group/index'
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", { value: true });
  11. var component_1 = require("../common/component");
  12. var relation_1 = require("../common/relation");
  13. (0, component_1.VantComponent)({
  14. field: true,
  15. relation: (0, relation_1.useChildren)('radio'),
  16. props: {
  17. value: {
  18. type: null,
  19. observer: 'updateChildren',
  20. },
  21. direction: String,
  22. disabled: {
  23. type: Boolean,
  24. observer: 'updateChildren',
  25. },
  26. },
  27. methods: {
  28. updateChildren: function () {
  29. this.children.forEach(function (child) { return child.updateFromParent(); });
  30. },
  31. },
  32. });
  33. export default global['__wxComponents']['weapp/lib/radio-group/index']
  34. </script>
  35. <style platform="mp-weixin">
  36. @import '../common/index.css';.van-radio-group--horizontal{display:flex;flex-wrap:wrap}
  37. </style>