index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <uni-shadow-root class="weapp-lib-row-index"><view class="van-row custom-class" :style="computed.rootStyle({ gutter })">
  3. <slot></slot>
  4. </view></uni-shadow-root>
  5. </template>
  6. <wxs src="./index.wxs" module="computed"></wxs>
  7. <script>
  8. global['__wxRoute'] = 'weapp/lib/row/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. relation: (0, relation_1.useChildren)('col', function (target) {
  15. var gutter = this.data.gutter;
  16. if (gutter) {
  17. target.setData({ gutter: gutter });
  18. }
  19. }),
  20. props: {
  21. gutter: {
  22. type: Number,
  23. observer: 'setGutter',
  24. },
  25. },
  26. methods: {
  27. setGutter: function () {
  28. var _this = this;
  29. this.children.forEach(function (col) {
  30. col.setData(_this.data);
  31. });
  32. },
  33. },
  34. });
  35. export default global['__wxComponents']['weapp/lib/row/index']
  36. </script>
  37. <style platform="mp-weixin">
  38. @import '../common/index.css';.van-row:after{clear:both;content:"";display:table}
  39. </style>