-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
77 lines (77 loc) · 1.8 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>vue-barousel</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./dist/vue-barousel.js"></script>
<style>
html,body{
width: 100%;
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
}
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin: 0 ;
padding: 0;
width: 100%;
height: 100%;
}
h1, h2 {
font-weight: normal;
}
a{
color: #009960;
text-decoration: none;
}
.barousel {
margin: 0px auto!important;
background-color: #f2f2f2;
}
</style>
</head>
<body>
<div id="app">
<img src="./src/assets/logo.png" />
<h1>{{ msg }}</h1>
<h2><a href="https://github.com/boenfu/vue-barousel">https://github.com/boenfu/vue-barousel</a></h2>
<barousel class="barousel"
:list="setList()"
:width="800"
:height="280"
:interval="3000"
@barousel="cb">
</barousel>
</div>
<script>
var app = new Vue({
el: '#app',
data:{
msg: 'Welcome to Your Vue.js App'
},
methods:{
setList() {
let list = [];
for(let i =1 ; i<= 8;i++){
list.push({
title: i,
src: './static/img/'+i+'.jpg'
})
}
return list;
},
cb (i) {
alert(i);
}
}
})
</script>
</body>
</html>