tabs-house-list.js 426 B

1234567891011121314151617181920212223242526272829
  1. // components/house-item/house-item.js
  2. Component({
  3. options: {
  4. styleIsolation: 'shared'
  5. },
  6. /**
  7. * 组件的属性列表
  8. */
  9. properties: {
  10. tabs: Array
  11. },
  12. /**
  13. * 组件的初始数据
  14. */
  15. data: {
  16. active: 0
  17. },
  18. /**
  19. * 组件的方法列表
  20. */
  21. methods: {
  22. onChange (e) {
  23. const index = e.detail.index
  24. this.triggerEvent('change', this.properties.tabs[index])
  25. }
  26. }
  27. })