更换版本

This commit is contained in:
2024-01-22 18:48:00 +08:00
parent 9f65ea8fd9
commit 00e6dcaec0
1158 changed files with 70609 additions and 51780 deletions

View File

@@ -0,0 +1,18 @@
Component({
properties: {
items: { type: Array, value: [] },
color: { type: Array, value: ["#333333", "#999999", "#999999"] },
fontSize: { type: Array, value: ["36rpx", "24rpx", "24rpx"] },
background: { type: String, value: "" },
padding: { type: String, value: "25rpx" },
border: { type: Array, value: ["none", "", ""] },
borderRadius: { type: String, value: "10rpx" },
lineHeight: { type: String, value: "1.5em" },
},
methods: {
taped: function (e) {
var r = e.currentTarget.dataset.index;
this.triggerEvent("taped", r);
},
},
});

View File

@@ -0,0 +1 @@
{ "component": true, "usingComponents": {} }

View File

@@ -0,0 +1,11 @@
<view class="grace-box-banner" style="background:{{background}}; padding-top:{{padding}}; padding-bottom:{{padding}}; border-radius:{{borderRadius}};">
<view catchtap="taped" class="grace-box-items" data-index="{{index}}" style="border-right:{{index+1>=items.length?'0rpx':border[0]+' '+border[1]+' '+border[2]}};" wx:for="{{items}}" wx:key="index">
<view class="grace-box-banner-line" style="line-height:{{lineHeight}};">
<text class="grace-box-banner-line-text1" style="color:{{color[0]}}; font-size:{{fontSize[0]}};">{{item[0]}}</text>
<text class="grace-box-banner-line-text2" style="color:{{color[1]}}; font-size:{{fontSize[1]}};">{{item[1]}}</text>
</view>
<view class="grace-box-banner-line" style="padding-bottom:3px">
<text style="color:{{color[2]}}; font-size:{{fontSize[2]}};">{{item[2]}}</text>
</view>
</view>
</view>

View File

@@ -0,0 +1,22 @@
.grace-box-banner {
display: -webkit-flex;
display: flex;
flex-wrap: nowrap;
overflow: hidden;
padding: 26rpx 0;
}
.grace-box-items {
width: 100%;
}
.grace-box-banner-line {
align-items: center;
display: -webkit-flex;
display: flex;
justify-content: center;
overflow: hidden;
padding-top: 8rpx;
width: 100%;
}
.grace-box-banner-line-text2 {
margin-left: 3px;
}

View File

@@ -0,0 +1,16 @@
Component({
properties: {
items: { type: Array, value: new Array() },
height: { type: String, value: "60rpx" },
bgColor: { type: String, default: "#F8F8F8" },
color: { type: String, value: "#3688FF" },
fontSize: { type: String, value: "26rpx" },
current: { type: Number, value: 0 },
},
methods: {
changeSC: function (e) {
var t = Number(e.currentTarget.dataset.index);
this.triggerEvent("change", t), this.setData({ current: t });
},
},
});

View File

@@ -0,0 +1 @@
{ "component": true, "usingComponents": {} }

View File

@@ -0,0 +1,3 @@
<view class="gui-segmented-Control" style="height:{{height}}; background:{{bgColor}};">
<view catchtap="changeSC" class="gui-segmented-Control-item" data-index="{{index}}" style="height:{{height}}; line-height:{{height}}; color:{{current==index?'#FFFFFF':color}}; background:{{current==index?color:''}}; fontSize:{{fontSize}};" wx:for="{{items}}" wx:key="index">{{item}}</view>
</view>

View File

@@ -0,0 +1,15 @@
.gui-segmented-Control {
background-color: #f5f6f8;
border-radius: 10rpx;
display: -webkit-flex;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
padding: 6rpx;
width: 100%;
}
.gui-segmented-Control-item {
border-radius: 8rpx;
text-align: center;
width: 700rpx;
}