Optimize UI for unit converter and random draw, remove relative calculator page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user