增加小程序,修改游戏前端
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<view class="container">
|
||||
<view class="header-tip">
|
||||
<text>输入名字,看看今天谁是天选打工人</text>
|
||||
</view>
|
||||
|
||||
<view class="input-area">
|
||||
<input class="input" placeholder="输入名字 (如: 小明)" value="{{newName}}" bindinput="onInput" bindconfirm="addName" />
|
||||
<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>
|
||||
</block>
|
||||
<view wx:if="{{names.length === 0}}" class="empty-tip">
|
||||
<text>还没有候选人,快去添加吧</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="result-area">
|
||||
<view class="result-box {{isRolling ? 'rolling' : ''}}">
|
||||
<text class="result-text">{{result || '?'}}</text>
|
||||
</view>
|
||||
<button class="btn-start" bindtap="startDraw" disabled="{{isRolling || names.length < 2}}">
|
||||
{{isRolling ? '随机抽取中...' : '开始抽取'}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user