<mt-swipe ref="swipe" class="swipe" :auto="0">
<mt-swipe-item v-for="img in images" :key="img.id">
<img :src="img.url"/>
</mt-swipe-item>
</mt-swipe>
this.$refs.swipe.next() // 转到下一张轮播图 this.$refs.swipe.prev() // 转到前一张轮播图
beforeUpdate () {
this.activeIndex = this.$refs.swipe.index
}
watch: {
activeIndex: function (val, oldVal) {
console.log('newIndex: %s, oldIndex: %s', val, oldVal)
// TODO
}
}
addressSlots: [
{
flex: 1,
values: Object.keys(address),
className: 'slot1',
textAlign: 'center'
}, {
divider: true,
content: '-',
className: 'slot2'
}, {
flex: 1,
values: ['北京'],
className: 'slot3',
textAlign: 'center'
}
]
mounted () {
this.$nextTick(() => {
setTimeout(() => {
// 利用索引初始化默认选中的省份和城市
this.areaSlots[0].defaultIndex = provinceIndex // Number类型
this.areaSlots[2].defaultIndex = cityIndex
}, 20)
})
}
loadMore () {
this.loading = true
setTimeout(() => {
// TODO
this.loading = false
}, 2500)
}
loadMore () {
// 防止多次加载
if (this.loading) {
return false
}
this.loading = true
setTimeout(() => {
// TODO
this.loading = false
}, 2500)
}
.mint-tab-container-wrap{
min-height: 617px; // 需要设置最小高度
}
<mt-popup v-model="activePicker" position="bottom">
<mt-datetime-picker :style="{ display: showOrHide }" ref="picker" type="date" v-model="date" :start-date="new Date('2010-01-01')" @cancel="cancelPicker" @confirm="cancelPicker"></mt-datetime-picker>
</mt-popup>
computed: {
showOrHide: function () {
if (this.activePicker) {
return 'block'
} else {
return 'none'
}
}
},
methods: {
cancelPicker () {
this.activePicker = false
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有