1234567891011121314151617181920212223242526272829 |
- // components/house-item/house-item.js
- Component({
- options: {
- styleIsolation: 'shared'
- },
- /**
- * 组件的属性列表
- */
- properties: {
- tabs: Array
- },
- /**
- * 组件的初始数据
- */
- data: {
- active: 0
- },
- /**
- * 组件的方法列表
- */
- methods: {
- onChange (e) {
- const index = e.detail.index
- this.triggerEvent('change', this.properties.tabs[index])
- }
- }
- })
|