feat:重构按钮和icon组件
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../components3.0/nav-bar/nav-bar",
|
||||
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
|
||||
"draw-ad": "../../components/draw-ad/draw-ad"
|
||||
"draw-ad": "../../components/draw-ad/draw-ad",
|
||||
"preview-footer-actions": "../../components3.0/preview-footer-actions/preview-footer-actions",
|
||||
"toy-button": "../../toy/button/button",
|
||||
"toy-icon": "../../toy/icon/icon"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
@import '../../style/theme3.less';
|
||||
|
||||
@lt-share-green: #9cd343;
|
||||
@import '../../style/theme.less';
|
||||
|
||||
page {
|
||||
background-color: @bg-page;
|
||||
@@ -208,100 +206,14 @@ page {
|
||||
box-shadow: @shadow;
|
||||
}
|
||||
|
||||
/* ===== 换一批 ===== */
|
||||
/* ===== 换一批(toy-button outlined 覆盖) ===== */
|
||||
.lt-shuffle-btn {
|
||||
width: 100%;
|
||||
padding: 28rpx 24rpx;
|
||||
margin: 0;
|
||||
border-radius: @radius;
|
||||
border: 6rpx solid @bg-header;
|
||||
background: transparent;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: @text-secondary;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.lt-shuffle-btn:active {
|
||||
background: @bg-header;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* ===== 底栏 ===== */
|
||||
.lt-bottom-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
padding: 24rpx @page-padding-x;
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
border-top: @border;
|
||||
box-shadow: 0 -8rpx 32rpx rgba(50, 46, 37, 0.06);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.lt-bottom-share,
|
||||
.lt-bottom-save {
|
||||
margin: 0;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
border-radius: @radius-sm;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.lt-bottom-share {
|
||||
flex: 0 0 35%;
|
||||
width: 35%;
|
||||
background: @lt-share-green;
|
||||
color: @text-white;
|
||||
box-shadow: @shadow;
|
||||
}
|
||||
|
||||
.lt-bottom-save {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
background: @brand;
|
||||
color: @text-selected-btn;
|
||||
font-weight: 800;
|
||||
box-shadow: @shadow-lg;
|
||||
}
|
||||
|
||||
.lt-bottom-save[disabled] {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.lt-bottom-icon {
|
||||
font-size: 36rpx;
|
||||
line-height: 1;
|
||||
border-width: 6rpx !important;
|
||||
border-color: @bg-header !important;
|
||||
height: 96rpx !important;
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.lt-spacer-bottom {
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
@@ -66,33 +66,30 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button
|
||||
<toy-button
|
||||
wx:if="{{showNextLetter}}"
|
||||
hover-class="none"
|
||||
class="lt-shuffle-btn"
|
||||
bindtap="onNextLetter">
|
||||
🔄 换一批
|
||||
</button>
|
||||
type="default"
|
||||
variant="outlined"
|
||||
block
|
||||
icon="refresh"
|
||||
custom-class="lt-shuffle-btn"
|
||||
bind:click="onNextLetter">
|
||||
换一批
|
||||
</toy-button>
|
||||
|
||||
<draw-ad type="mathDraw"></draw-ad>
|
||||
<view class="lt-spacer-bottom"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="lt-bottom-bar">
|
||||
<button class="lt-bottom-share" hover-class="none" open-type="share">
|
||||
<text class="lt-bottom-icon">↗</text>
|
||||
分享
|
||||
</button>
|
||||
<button
|
||||
class="lt-bottom-save"
|
||||
hover-class="none"
|
||||
disabled="{{!hasContent}}"
|
||||
bindtap="exportToPrint">
|
||||
<text class="lt-bottom-icon">⬇</text>
|
||||
保存到相册
|
||||
</button>
|
||||
</view>
|
||||
<preview-footer-actions
|
||||
primary-text="保存到相册"
|
||||
primary-icon="download"
|
||||
secondary-text="分享"
|
||||
secondary-icon="wechat"
|
||||
disabled="{{!hasContent}}"
|
||||
bind:primary="exportToPrint"
|
||||
bind:secondary="onShare" />
|
||||
|
||||
<share-guide-popup
|
||||
show="{{showShareDialog}}"
|
||||
|
||||
Reference in New Issue
Block a user