-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
25 lines (25 loc) · 1.23 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lucky Draw</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Schoolbell">
</head>
<body>
<div id="display">
<h1 v-if="winners.length"><span class="name" v-for="winner in winners">{{ winner }}</span></h1>
<h1 v-else class="welcome">Who's feeling lucky?</h1>
</div>
<div id="control">
<form @submit.prevent="setup">
<p><label>导入:<input type="file" @change="upload" :disabled="isSetup" v-el:upload></label></p>
<p><label>总人数:<input type="number" required min="1" max="999" v-model="total" number :disabled="isSetup" v-el:total></label><button :disabled="isSetup">确定</button></p>
</form>
<form @reset="reset" @submit.prevent="draw">
<p><label>本轮抽:<input type="number" v-model="round" number required :disabled="!this.isSetup || this.isRolling" required min="1" max="50" @input="checkRemaining" v-el:round></label><button :disabled="!isSetup" name="begin" v-text="isRolling ? '停止' : '开始'" v-el:begin></button></p>
<p>剩余人数:<span v-text="remaining"></span> <button type="reset" :disabled="!isSetup">重置</button></p>
</form>
</div>
<script src="bundle.js"></script>
</body>
</html>