Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
form_upload_folder
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
form_upload_folder
Commits
9b3584a0
Commit
9b3584a0
authored
Jul 02, 2024
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
642da394
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
25 deletions
+31
-25
form.component.ts
form/src/app/form/form.component.ts
+31
-25
No files found.
form/src/app/form/form.component.ts
View file @
9b3584a0
...
@@ -592,12 +592,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -592,12 +592,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ques
.
zh_cn
=
zh_cn
;
ques
.
zh_cn
=
zh_cn
;
ques
.
pos
=
pos
;
ques
.
pos
=
pos
;
console
.
log
(
"
word:
"
,
word
);
console
.
log
(
"
word:
"
,
word
);
console
.
log
(
"
ipa:
"
,
ipa
);
console
.
log
(
"
ipa:
"
,
ipa
);
console
.
log
(
"
zh_cn:
"
,
zh_cn
);
console
.
log
(
"
zh_cn:
"
,
zh_cn
);
console
.
log
(
"
pos:
"
,
pos
);
console
.
log
(
"
pos:
"
,
pos
);
console
.
log
(
"
targetRow:
"
,
targetRow
);
console
.
log
(
"
targetRow:
"
,
targetRow
);
this
.
refresh
();
this
.
refresh
();
};
};
...
@@ -761,7 +761,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -761,7 +761,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if
(
_rightData
)
{
if
(
_rightData
)
{
option
=
_rightData
;
option
=
_rightData
;
}
else
{
}
else
{
const
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
copyData
.
length
);
const
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
copyData
.
length
);
option
=
copyData
[
randomIndex
];
option
=
copyData
[
randomIndex
];
copyData
.
splice
(
randomIndex
,
1
);
copyData
.
splice
(
randomIndex
,
1
);
}
}
...
@@ -795,6 +795,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -795,6 +795,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
oneOption
oneOption
)
)
for
(
let
i
=
optionArr
.
length
-
1
;
i
>
0
;
i
--
)
{
const
j
=
Math
.
floor
(
Math
.
random
()
*
(
i
+
1
));
[
optionArr
[
i
],
optionArr
[
j
]]
=
[
optionArr
[
j
],
optionArr
[
i
]];
// 使用ES6的解构赋值进行交换
}
this
.
refresh
();
this
.
refresh
();
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment