<script>
import { ref } from 'vue';
import LuckyGrid from './components/packages/LuckyGrid.vue';
const prizes = [{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
},
{
img: 'https://img.yzcdn.cn/vant/apple-1.jpg',
name: '苹果'
}]
const luckyGrid = ref(null)
const start = () => {
console.log('start')
luckyGrid.value.start()
setTimeout(() => {
luckyGrid.value.stop()
}, 3000);
}
const luckyStop = (reward) => {
console.log('stop', reward)
}
</script>
<template>
<LuckyGrid ref="luckyGrid" :prizes="prizes" @stop="luckyStop" />
<button @click="start">开始</button>
</template>
-
Notifications
You must be signed in to change notification settings - Fork 0
topul/horse-race-lamp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
跑马灯抽奖效果
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published