登录
This commit is contained in:
39
unpackage/dist/dev/mp-weixin/components/mySwiper.js
vendored
Normal file
39
unpackage/dist/dev/mp-weixin/components/mySwiper.js
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
__name: "mySwiper",
|
||||
props: ["lbt_list", "height", "isRadius", "indicatorDots"],
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const interval = common_vendor.ref(2e3);
|
||||
const autoplay = common_vendor.ref(true);
|
||||
common_vendor.watch(() => {
|
||||
return props.lbt_list;
|
||||
}, (val1, val2) => {
|
||||
});
|
||||
function lbtFunc(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: item.url
|
||||
});
|
||||
return;
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(__props.lbt_list, (item, i, i0) => {
|
||||
return {
|
||||
a: item.image,
|
||||
b: common_vendor.o(($event) => lbtFunc(item))
|
||||
};
|
||||
}),
|
||||
b: __props.isRadius ? 1 : "",
|
||||
c: common_vendor.s("height: " + __props.height * 2 + "rpx;"),
|
||||
d: __props.indicatorDots,
|
||||
e: autoplay.value,
|
||||
f: interval.value,
|
||||
g: _ctx.duration
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/项目2023/视力表/vision-record/components/mySwiper.vue"]]);
|
||||
wx.createComponent(Component);
|
4
unpackage/dist/dev/mp-weixin/components/mySwiper.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/components/mySwiper.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
1
unpackage/dist/dev/mp-weixin/components/mySwiper.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/components/mySwiper.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="swiper-box"><view class="uni-margin-wrap"><swiper class="{{['swiper', b && 'radiuscss']}}" style="{{c}}" circular indicator-dots="{{d}}" autoplay="{{e}}" interval="{{f}}" duration="{{g}}"><swiper-item wx:for="{{a}}" wx:for-item="item" bindtap="{{item.b}}"><view class="swiper-item uni-bg-red"><image src="{{item.a}}" style="width:100%" mode="widthFix"></image></view></swiper-item></swiper></view></view>
|
39
unpackage/dist/dev/mp-weixin/components/mySwiper.wxss
vendored
Normal file
39
unpackage/dist/dev/mp-weixin/components/mySwiper.wxss
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
.radiuscss{
|
||||
border-radius:30rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.swiper-box{
|
||||
}
|
||||
.swiper-item>img{
|
||||
width: 100%;
|
||||
}
|
||||
.uni-margin-wrap {
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
}
|
||||
.swiper-item {
|
||||
display: block;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.swiper-list {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.uni-common-mt {
|
||||
margin-top: 60rpx;
|
||||
position: relative;
|
||||
}
|
||||
.info {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
}
|
||||
.uni-padding-wrap {
|
||||
width: 550rpx;
|
||||
padding: 0 100rpx;
|
||||
}
|
Reference in New Issue
Block a user