|
@@ -4,7 +4,7 @@
|
|
<SlotMachine
|
|
<SlotMachine
|
|
ref="myLucky"
|
|
ref="myLucky"
|
|
width="300px"
|
|
width="300px"
|
|
- height="300px"
|
|
|
|
|
|
+ :height="height + 'px'"
|
|
:prizes="prizes"
|
|
:prizes="prizes"
|
|
:blocks="blocks"
|
|
:blocks="blocks"
|
|
:slots="slots"
|
|
:slots="slots"
|
|
@@ -30,7 +30,7 @@ import { getPrizeByLotteryId } from '@/api/mall/prize'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
const emit = defineEmits(['start', 'end'])
|
|
const emit = defineEmits(['start', 'end'])
|
|
-const props = defineProps({ lotteryId: [Number, String] })
|
|
|
|
|
|
+const props = defineProps({ lotteryId: [Number, String], height: [Number, String] })
|
|
|
|
|
|
const myLucky = ref()
|
|
const myLucky = ref()
|
|
// 背景样式
|
|
// 背景样式
|
|
@@ -39,10 +39,10 @@ const blocks = [
|
|
]
|
|
]
|
|
// 转速与方向
|
|
// 转速与方向
|
|
const slots = [
|
|
const slots = [
|
|
- { speed: 15, direction: -1 },
|
|
|
|
- { speed: 15, direction: 1 },
|
|
|
|
- { speed: 15, direction: -1 },
|
|
|
|
- ]
|
|
|
|
|
|
+ { speed: 15, direction: -1 },
|
|
|
|
+ { speed: 15, direction: 1 },
|
|
|
|
+ { speed: 15, direction: -1 },
|
|
|
|
+]
|
|
const prizes = ref([])
|
|
const prizes = ref([])
|
|
const defaultConfig = {
|
|
const defaultConfig = {
|
|
rowSpacing: '10px',
|
|
rowSpacing: '10px',
|