|
|
@@ -41,6 +41,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { message } from 'ant-design-vue'
|
|
|
import { reactive, ref, watch } from 'vue'
|
|
|
+import { CardController } from '@/controller'
|
|
|
|
|
|
interface IProps {
|
|
|
config: API.CardJson
|
|
|
@@ -156,11 +157,24 @@ function generateButtonJson () {
|
|
|
const selected = slide_knob['score' + row] === value
|
|
|
// 找到当前颜色的key
|
|
|
const colorObj = colors.find(c => c.value === value)
|
|
|
- result[colorKey].push({
|
|
|
- music_name: 'hnyx.mp3',
|
|
|
- is_break: 1,
|
|
|
- key: selected ? (colorObj?.key || '') : ''
|
|
|
- })
|
|
|
+
|
|
|
+ if (selected) {
|
|
|
+ //
|
|
|
+ // new Array(6 - row)
|
|
|
+ const key = [0, 0, 0, 0, 0, 0]
|
|
|
+ key.splice(row - 1, 1, CardController.slideKnobMap.get(colorKey)!.number)
|
|
|
+ result[colorKey].push({
|
|
|
+ music_name: 'hnyx.mp3',
|
|
|
+ is_break: 1,
|
|
|
+ key: key.reverse().join('')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ result[colorKey].push({
|
|
|
+ music_name: 'hnyx.mp3',
|
|
|
+ is_break: 1,
|
|
|
+ key: ''
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
|