Skip to content

Commit

Permalink
Refactor examples/* (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Nov 12, 2020
1 parent 262bd56 commit dbd3d31
Show file tree
Hide file tree
Showing 12 changed files with 433 additions and 333 deletions.
332 changes: 0 additions & 332 deletions dev/serve.vue

This file was deleted.

42 changes: 42 additions & 0 deletions examples/auto-play.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<div>
<h2>Autoplay</h2>
<vue-horizontal-list :items="items" :options="options">
<template v-slot:default="{ item }">
<div class="item">
<h3>{{ item.title }}</h3>
<p>{{ item.content }}</p>
</div>
</template>
</vue-horizontal-list>
</div>
</template>

<script>
import VueHorizontalList from "@/vue-horizontal-list.vue";
export default {
name: "auto-play",
components: {
VueHorizontalList,
},
data() {
return {
items: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => {
return { title: `Auto play ${i}`, content: `Auto play, 3000ms.` };
}),
options: {
autoplay: { play: true, repeat: true, speed: 3000 },
},
};
},
};
</script>

<style scoped>
.item {
padding: 24px;
border-radius: 3px;
background: #f5f5f5;
}
</style>
Loading

0 comments on commit dbd3d31

Please sign in to comment.