Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proof Assistant with Solver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhang, Jenny
Proof Assistant with Solver
Commits
8c100ffa
Commit
8c100ffa
authored
9 months ago
by
Jenny Zhang
Browse files
Options
Downloads
Patches
Plain Diff
fixed the visibility of dialog
parent
71b3fca3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.vue
+12
-9
12 additions, 9 deletions
src/App.vue
src/components/ProofStepDialog.vue
+1
-1
1 addition, 1 deletion
src/components/ProofStepDialog.vue
with
13 additions
and
10 deletions
src/App.vue
+
12
−
9
View file @
8c100ffa
...
...
@@ -23,8 +23,7 @@
</div>
</el-main>
</el-container>
<proof-step-dialog
v-model:visible=
"isDialogVisible"
@
submit-answer=
"handleSubmitAnswer"
@
next-answer=
"handleNextAnswer"
/>
<proof-step-dialog
v-model:visible=
"isDialogVisible"
@
submit-answer=
"handleSubmitAnswer"
@
next-answer=
"handleNextAnswer"
/>
</el-container>
</
template
>
...
...
@@ -51,9 +50,9 @@ export default {
},
methods
:
{
submitStatement
()
{
//
处理提交逻辑,渲染
proof tree
//
Handle submission logic and render
proof tree
//
接受parse的报错信息
//
Catch parsing error messages
try
{
const
targetAst
=
parse
(
this
.
givenStatement
);
this
.
latexStatement
=
ast
.
astsToLateX
(
targetAst
);
...
...
@@ -63,15 +62,15 @@ export default {
this
.
errorMsg
=
'
Parsing error:
'
+
error
.
message
;
// Handle the error here, such as displaying an error message to the user
}
},
renderProofTree
()
{
//
使用该函数生成
HTML
},
renderProofTree
()
{
//
Use this function to generate
HTML
const
proofTreeHTML
=
generateProofTreeHTML
(
this
.
proofTree
);
//
将生成的HTML插入到页面中
//
Insert the generated HTML into the page
document
.
getElementById
(
'
proof-tree
'
).
innerHTML
=
proofTreeHTML
;
//
直接调用KaTeX渲染
//
Call KaTeX directly to render
renderMathInElement
(
document
.
getElementById
(
'
proof-tree
'
),
{
delimiters
:
[
{
left
:
"
\\
(
"
,
right
:
"
\\
)
"
,
display
:
false
},
...
...
@@ -79,10 +78,12 @@ export default {
]
});
// Replace the rendered turnstile character
const
mrelElements
=
document
.
querySelectorAll
(
'
.katex .mrel
'
);
mrelElements
.
forEach
(
element
=>
{
if
(
element
.
textContent
===
'
⊢
'
)
{
element
.
classList
.
add
(
'
turnstile
'
);
element
.
addEventListener
(
'
click
'
,
this
.
openProofStepDialog
);
}
});
...
...
@@ -140,6 +141,8 @@ export default {
.turnstile
{
transition
:
background-color
0.3s
;
cursor
:
pointer
;
/* 添加手型鼠标指针 */
}
.turnstile
:hover
{
...
...
This diff is collapsed.
Click to expand it.
src/components/ProofStepDialog.vue
+
1
−
1
View file @
8c100ffa
<
template
>
<el-dialog
title=
"Proof Step"
:visible
=
"localVisible"
@
update:visible=
"handleVisibleChange"
>
<el-dialog
title=
"Proof Step"
v-model
=
"localVisible"
@
update:visible=
"handleVisibleChange"
>
<el-form>
<el-form-item
label=
"Rule"
>
<el-select
v-model=
"selectedRule"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment