Optimize UI for unit converter and random draw, remove relative calculator page

This commit is contained in:
2026-02-04 19:56:35 +08:00
parent 8c677908d7
commit 32cdaf44cc
11 changed files with 352 additions and 410 deletions

View File

@@ -1,6 +1,7 @@
<view class="container">
<view class="header-tip">
<text>输入名字,看看今天谁是天选打工人</text>
<view class="title">🎲 天选打工人</view>
<text class="subtitle">输入名字,看看今天谁去拿外卖</text>
</view>
<view class="input-area">
@@ -8,26 +9,31 @@
<view class="btn-add" bindtap="addName">添加</view>
</view>
<scroll-view scroll-y class="list-area">
<view class="name-list">
<block wx:for="{{names}}" wx:key="*this">
<view class="name-item">
<text class="name-text">{{item}}</text>
<view class="btn-delete" bindtap="removeName" data-index="{{index}}">×</view>
<view class="list-container">
<view class="list-header">候选名单 ({{names.length}})</view>
<scroll-view scroll-y class="list-area">
<view class="name-list">
<block wx:for="{{names}}" wx:key="*this">
<view class="name-item color-{{index % 5}}">
<text class="name-text">{{item}}</text>
<view class="btn-delete" bindtap="removeName" data-index="{{index}}">×</view>
</view>
</block>
<view wx:if="{{names.length === 0}}" class="empty-tip">
<text class="empty-icon">🍃</text>
<text>还没有候选人,快去添加吧~</text>
</view>
</block>
<view wx:if="{{names.length === 0}}" class="empty-tip">
<text>还没有候选人,快去添加吧</text>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
<view class="result-area">
<view class="result-box {{isRolling ? 'rolling' : ''}}">
<text class="result-label">🎉 天选之人</text>
<text class="result-text">{{result || '?'}}</text>
</view>
<button class="btn-start" bindtap="startDraw" disabled="{{isRolling || names.length < 2}}">
{{isRolling ? '随机抽取中...' : '开始抽取'}}
<button class="btn-start" hover-class="btn-start-hover" bindtap="startDraw" disabled="{{isRolling || names.length < 2}}">
{{isRolling ? '🤞 随机抽取中...' : '🚀 开始抽取'}}
</button>
</view>
</view>