index.js 983 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var component_1 = require("../common/component");
  4. component_1.VantComponent({
  5. classes: ['title-class'],
  6. props: {
  7. title: String,
  8. fixed: Boolean,
  9. leftText: String,
  10. rightText: String,
  11. leftArrow: Boolean,
  12. border: {
  13. type: Boolean,
  14. value: true
  15. },
  16. zIndex: {
  17. type: Number,
  18. value: 1
  19. },
  20. safeAreaInsetTop: {
  21. type: Boolean,
  22. value: true
  23. },
  24. },
  25. data: {
  26. statusBarHeight: 0
  27. },
  28. created: function () {
  29. var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
  30. this.setData({ statusBarHeight: statusBarHeight });
  31. },
  32. methods: {
  33. onClickLeft: function () {
  34. this.$emit('click-left');
  35. },
  36. onClickRight: function () {
  37. this.$emit('click-right');
  38. }
  39. }
  40. });