-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
43 lines (43 loc) · 1.27 KB
/
example.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./dist/vue-dice-roller.css"/>
<script src="https://unpkg.com/vue"></script>
<script src="./dist/vue-dice-roller.browser.js"></script>
<title> Example of the vue roll dice component </title>
</head>
<body>
<h1> Example of the vue roll dice component </h1>
<div id="app">
<button @click="roll">ROLL</button>
<select v-model="diceCount">
<option v-for="index in 10" :value="index">{{index}}</option>
</select>
<dice-roller ref="diceroller" :count="diceCount"/>
</div>
<br><br>
Made by <a href="http://vitomd.com">vitomd</a>
<br><br>
<div style="font-size:11px">
Icons are from <a href="http://game-icons.net/"> http://game-icons.net/ </a>. <br>
Icon's author is <a href="https://github.com/Delapouite">Delapouite<a/>
<div>
<script>
Vue.use(VueDiceRoller)
new Vue({
el: '#app',
data () {
return {
diceCount: 6
}
},
methods: {
roll() {
console.log("this.$refs",this.$refs)
this.$refs.diceroller.roll();
}
}
})
</script>
</body>
</html>