index.js 586 B

1234567891011121314151617181920212223242526272829303132
  1. import { VantComponent } from '../common/component';
  2. VantComponent({
  3. relation: {
  4. type: 'descendant',
  5. name: 'goods-action-button',
  6. current: 'goods-action',
  7. linked() {
  8. this.updateStyle();
  9. },
  10. unlinked() {
  11. this.updateStyle();
  12. },
  13. linkChanged() {
  14. this.updateStyle();
  15. },
  16. },
  17. props: {
  18. safeAreaInsetBottom: {
  19. type: Boolean,
  20. value: true,
  21. },
  22. },
  23. methods: {
  24. updateStyle() {
  25. wx.nextTick(() => {
  26. this.children.forEach((child) => {
  27. child.updateStyle();
  28. });
  29. });
  30. },
  31. },
  32. });