|
@@ -17,6 +17,12 @@ interface IMainData {
|
|
dataList: any[]
|
|
dataList: any[]
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+interface IMainChildData {
|
|
|
|
+ count?: number
|
|
|
|
+ score?: number
|
|
|
|
+ extraScore?: number
|
|
|
|
+}
|
|
|
|
+
|
|
const subjectInfo = ref({
|
|
const subjectInfo = ref({
|
|
name: '广度训练',
|
|
name: '广度训练',
|
|
})
|
|
})
|
|
@@ -44,9 +50,7 @@ const selectiveIndex = ref(-1) // 选择的索引
|
|
*/
|
|
*/
|
|
function generateBaseData() {
|
|
function generateBaseData() {
|
|
// 生成选项组
|
|
// 生成选项组
|
|
- const selectDataList: number[][] = [
|
|
|
|
- // [3, 4, 5, 6, 7], [3, 4, 5, 6, 7], ...,
|
|
|
|
- // [4, 5, 6, 7, 8], [4, 5, 6, 7, 8], ...,
|
|
|
|
|
|
+ const selectDataList = [
|
|
...Array.from({ length: 10 }).fill([3, 4, 5, 6, 7]),
|
|
...Array.from({ length: 10 }).fill([3, 4, 5, 6, 7]),
|
|
...Array.from({ length: 10 }).fill([4, 5, 6, 7, 8]),
|
|
...Array.from({ length: 10 }).fill([4, 5, 6, 7, 8]),
|
|
...Array.from({ length: 10 }).fill([5, 6, 7, 8, 9]),
|
|
...Array.from({ length: 10 }).fill([5, 6, 7, 8, 9]),
|
|
@@ -56,7 +60,7 @@ function generateBaseData() {
|
|
...Array.from({ length: 10 }).fill([9, 10, 11, 12, 13]),
|
|
...Array.from({ length: 10 }).fill([9, 10, 11, 12, 13]),
|
|
...Array.from({ length: 10 }).fill([10, 11, 12, 13, 14]),
|
|
...Array.from({ length: 10 }).fill([10, 11, 12, 13, 14]),
|
|
]
|
|
]
|
|
- selectArray = selectDataList.map((item) => {
|
|
|
|
|
|
+ selectArray = selectDataList.map((item: number[]) => {
|
|
return shuffle(item)
|
|
return shuffle(item)
|
|
})
|
|
})
|
|
|
|
|
|
@@ -74,7 +78,7 @@ function generateBaseData() {
|
|
...Array.from({ length: 10 }).fill({ count: 12, score: 80, extraScore: 0 }),
|
|
...Array.from({ length: 10 }).fill({ count: 12, score: 80, extraScore: 0 }),
|
|
]
|
|
]
|
|
|
|
|
|
- mainData.dataList = baseDataList.map((item, index) => {
|
|
|
|
|
|
+ mainData.dataList = baseDataList.map((item: IMainChildData, index) => {
|
|
return {
|
|
return {
|
|
index,
|
|
index,
|
|
...item,
|
|
...item,
|