feat: 按钮增加white类型
This commit is contained in:
@@ -8,11 +8,16 @@
|
|||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
|
|
||||||
&-title {
|
&-title {
|
||||||
|
position: absolute;
|
||||||
|
top: 52rpx;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: rgba(255, 235, 59, 0.95);
|
color: rgba(255, 235, 59, 0.95);
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 52rpx;
|
width: 100%;
|
||||||
|
// margin-top: 52rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip-box {
|
.tip-box {
|
||||||
@@ -21,15 +26,19 @@
|
|||||||
|
|
||||||
.tip-text {
|
.tip-text {
|
||||||
color: rgba(255, 235, 59, 0.95);
|
color: rgba(255, 235, 59, 0.95);
|
||||||
|
// color: #fff;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.first-step {
|
.first-step {
|
||||||
position: relative;
|
position: absolute;
|
||||||
|
top: 128rpx;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.tip-box {
|
.tip-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 18rpx;
|
top: 0;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 342px;
|
width: 342px;
|
||||||
@@ -40,7 +49,7 @@
|
|||||||
|
|
||||||
.guide-icon {
|
.guide-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 66rpx;
|
top: 48rpx;
|
||||||
left: 106rpx;
|
left: 106rpx;
|
||||||
width: 22px;
|
width: 22px;
|
||||||
height: 39px;
|
height: 39px;
|
||||||
@@ -49,7 +58,7 @@
|
|||||||
|
|
||||||
.tip-text {
|
.tip-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 156rpx;
|
top: 138rpx;
|
||||||
left: 110rpx;
|
left: 110rpx;
|
||||||
width: 550rpx;
|
width: 550rpx;
|
||||||
height: 94rpx;
|
height: 94rpx;
|
||||||
@@ -57,4 +66,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-next-step {
|
||||||
|
color: rgba(255, 235, 59, 0.95);
|
||||||
|
border-radius: 28rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 260rpx;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,5 +11,12 @@
|
|||||||
<view class="tip-text">
|
<view class="tip-text">
|
||||||
这里请输入你想让小朋友熟悉的汉字、字母、数字等,点击“确定”
|
这里请输入你想让小朋友熟悉的汉字、字母、数字等,点击“确定”
|
||||||
</view>
|
</view>
|
||||||
|
<toy-button
|
||||||
|
type="white"
|
||||||
|
plain
|
||||||
|
bind:click="toNextStep"
|
||||||
|
custom-class="btn-next-step">
|
||||||
|
下一步
|
||||||
|
</toy-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
@button-default-font-size: 32rpx;
|
@button-default-font-size: 32rpx;
|
||||||
@button-default-color: #fff;
|
@button-default-color: #fff;
|
||||||
|
|
||||||
|
wx-button:not([size=mini]) {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.toy-button {
|
.toy-button {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@@ -13,6 +19,9 @@
|
|||||||
border-radius: @button-border-radius;
|
border-radius: @button-border-radius;
|
||||||
font-size: @button-default-font-size;
|
font-size: @button-default-font-size;
|
||||||
color: @button-default-color;
|
color: @button-default-color;
|
||||||
|
padding: 0 44rpx;
|
||||||
|
width: auto !important;
|
||||||
|
|
||||||
|
|
||||||
&--primary {
|
&--primary {
|
||||||
background: rgba(255, 215, 25, 1);
|
background: rgba(255, 215, 25, 1);
|
||||||
@@ -46,6 +55,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--white {
|
||||||
|
color: rgba(34, 36, 37, 0.9);
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 10rpx 0 rgba(255, 255, 255, 0.7);
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
box-shadow: 0px 3px 0px rgba(255, 255, 255, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.plain {
|
||||||
|
color: #fff;
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 1);
|
||||||
|
box-shadow: 0px 3px 0px rgba(255, 255, 255, 0.88);
|
||||||
|
|
||||||
|
// &.disabled {
|
||||||
|
// background: rgba(255, 255, 255, 0.2);
|
||||||
|
// border: 1px solid rgba(255, 255, 255, 0.6);
|
||||||
|
// box-shadow: 0px 3px 0px rgba(255, 255, 255, 0.6);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.loading-class,
|
.loading-class,
|
||||||
&__icon {
|
&__icon {
|
||||||
margin-right: 24rpx;
|
margin-right: 24rpx;
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ Component({
|
|||||||
type: String,
|
type: String,
|
||||||
value: 'default', // primary, green, white
|
value: 'default', // primary, green, white
|
||||||
},
|
},
|
||||||
|
plain: {
|
||||||
|
type: Boolean,
|
||||||
|
value: false, // 是否朴素按钮
|
||||||
|
},
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
value: 'normal', // large, normal, small, mini
|
value: 'normal', // large, normal, small, mini
|
||||||
@@ -88,4 +92,5 @@ Component({
|
|||||||
this.triggerEvent('click', e);
|
this.triggerEvent('click', e);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
externalClasses: ['custom-class'],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
data-id="test-toy-button-id"
|
data-id="test-toy-button-id"
|
||||||
class="toy-button toy-button--{{type}} {{ disabled ? 'toy-button--disabled' : '' }} {{Utils.classNames({disabled: disabled, loading: loading })}}"
|
class="toy-button toy-button--{{type}} {{Utils.classNames({disabled: disabled, loading: loading, plain: plain })}} custom-class"
|
||||||
data-disabled="{{disabled}}"
|
data-disabled="{{disabled}}"
|
||||||
data-loading="{{loading}}"
|
data-loading="{{loading}}"
|
||||||
style="{{style}};{{width ? 'width:' + width + ';' : ''}};{{height ? 'height:' + height + ';' : ''}}"
|
style="{{style}};{{width ? 'width:' + width + ';' : ''}};{{height ? 'height:' + height + ';' : ''}}"
|
||||||
|
|||||||
Reference in New Issue
Block a user