first add files

This commit is contained in:
2025-08-15 14:05:08 +08:00
parent c58f74bcc0
commit b6216570d9
2451 changed files with 29056 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
const imageCdn = 'https://tdesign.gtimg.com/mobile/demos';
const swiperList = [
`${imageCdn}/swiper1.png`,
`${imageCdn}/swiper2.png`,
`${imageCdn}/swiper1.png`,
`${imageCdn}/swiper2.png`,
`${imageCdn}/swiper1.png`,
];
Component({
data: {
current: 0,
autoplay: false,
duration: 500,
interval: 5000,
swiperList,
},
methods: {
onChange(e) {
const {
detail: { current, source },
} = e;
console.log(current, source);
},
},
});

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"t-swiper": "tdesign-miniprogram/swiper/swiper"
}
}

View File

@@ -0,0 +1,34 @@
<view class="card-theme">
<t-swiper
current="{{current}}"
autoplay="{{autoplay}}"
duration="{{duration}}"
interval="{{interval}}"
bindchange="onChange"
navigation="{{ { type: 'dots' } }}"
list="{{swiperList}}"
image-props="{{ { shape: 'round' } }}"
previousMargin="34px"
nextMargin="34px"
t-class-nav="card-theme-nav"
/>
<view class="box" style="height: 42px" />
<t-swiper
class="scale-card-theme"
current="{{current}}"
autoplay="{{autoplay}}"
duration="{{duration}}"
interval="{{interval}}"
bindchange="onChange"
navigation="{{ { type: 'dots' } }}"
list="{{swiperList}}"
image-props="{{ { shape: 'round' } }}"
previousMargin="34px"
nextMargin="34px"
t-class-nav="card-theme-nav"
t-class-prev-image="scale-candidate"
t-class-next-image="scale-candidate"
/>
</view>

View File

@@ -0,0 +1,16 @@
.card-theme {
--td-swiper-radius: 0;
--td-swiper-item-padding: 0 12rpx;
--td-swiper-nav-dot-color: var(--td-bg-color-component, #e7e7e7);
--td-swiper-nav-dot-active-color: var(--td-brand-color, #0052d9);
padding-bottom: 18px;
}
.card-theme .card-theme-nav {
bottom: -18px;
}
.scale-candidate {
height: 126px !important;
}