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