index.js 753 B

1234567891011121314151617181920212223242526272829303132333435
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var component_1 = require('../common/component');
  4. component_1.VantComponent({
  5. relation: {
  6. type: 'descendant',
  7. name: 'goods-action-button',
  8. current: 'goods-action',
  9. linked: function () {
  10. this.updateStyle();
  11. },
  12. unlinked: function () {
  13. this.updateStyle();
  14. },
  15. linkChanged: function () {
  16. this.updateStyle();
  17. },
  18. },
  19. props: {
  20. safeAreaInsetBottom: {
  21. type: Boolean,
  22. value: true,
  23. },
  24. },
  25. methods: {
  26. updateStyle: function () {
  27. var _this = this;
  28. wx.nextTick(function () {
  29. _this.children.forEach(function (child) {
  30. child.updateStyle();
  31. });
  32. });
  33. },
  34. },
  35. });