index.js 676 B

1234567891011121314151617181920212223242526272829
  1. import { VantComponent } from '../common/component';
  2. import { safeArea } from '../mixins/safe-area';
  3. VantComponent({
  4. mixins: [safeArea({ safeAreaInsetTop: true })],
  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: 120
  19. }
  20. },
  21. methods: {
  22. onClickLeft() {
  23. this.$emit('click-left');
  24. },
  25. onClickRight() {
  26. this.$emit('click-right');
  27. }
  28. }
  29. });