index.js 833 B

12345678910111213141516171819202122232425262728293031323334353637
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var component_1 = require("../common/component");
  4. component_1.VantComponent({
  5. relation: {
  6. name: 'tabs',
  7. type: 'ancestor'
  8. },
  9. props: {
  10. dot: Boolean,
  11. info: null,
  12. title: String,
  13. disabled: Boolean,
  14. titleStyle: String
  15. },
  16. data: {
  17. width: null,
  18. inited: false,
  19. active: false,
  20. animated: false
  21. },
  22. watch: {
  23. title: 'update',
  24. disabled: 'update',
  25. dot: 'update',
  26. info: 'update',
  27. titleStyle: 'update'
  28. },
  29. methods: {
  30. update: function () {
  31. var parent = this.getRelationNodes('../tabs/index')[0];
  32. if (parent) {
  33. parent.updateTabs();
  34. }
  35. }
  36. }
  37. });