Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue3_onlineEditor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
pangchong
vue3_onlineEditor
Commits
9a133f87
Commit
9a133f87
authored
Apr 11, 2025
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 想继续添加完毕
parent
8b3c04d5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
0 deletions
+35
-0
src/assets/file/Trans-Convert.xml
+0
-0
src/router/index.ts
+6
-0
src/views/Compare/index.vue
+29
-0
src/views/Compare/lib/CodeMirror.js
+0
-0
No files found.
src/assets/file/Trans-Convert.xml
View file @
9a133f87
This diff is collapsed.
Click to expand it.
src/router/index.ts
View file @
9a133f87
...
...
@@ -30,6 +30,12 @@ const routes: Array<RouteRecordRaw> = [
name
:
'Editor'
,
component
:
()
=>
import
(
/* webpackChunkName: "Editor" */
'@/views/editor/index.vue'
),
meta
:
{
title
:
'在线编辑器'
}
},
{
path
:
'/cpt'
,
name
:
'CPT'
,
component
:
()
=>
import
(
/* webpackChunkName: "Editor" */
'@/views/Compare/index.vue'
),
meta
:
{
title
:
'示例对比'
}
}
]
},
...
...
src/views/Compare/index.vue
View file @
9a133f87
<
template
>
<div
ref=
"view"
class=
"w-full h-full"
></div>
</
template
>
<
script
lang=
"ts"
setup
>
const
view
=
ref
()
import
TextA
from
'@/assets/file/Trans-Convert.xml?raw'
import
TextB
from
'@/assets/file/CES-QEC-V250-A.xml?raw'
import
{
CodeMirror
,
vkbeautify
}
from
'./lib/CodeMirror.js'
;
onMounted
(
function
()
{
console
.
log
(
'the code mirror'
,
CodeMirror
)
const
mv
=
CodeMirror
.
MergeView
(
view
.
value
,
{
value
:
TextA
,
origLeft
:
null
,
orig
:
TextB
,
lineNumbers
:
true
,
mode
:
'application/xml'
,
showDifferences
:
true
,
connect
:
'align'
,
collapseIdentical
:
false
,
revertButtons
:
true
,
allowEditingOriginals
:
true
,
chunkClassLocation
:
[
'background'
,
'wrap'
,
'gutter'
]
});
mv
.
editor
().
setValue
(
vkbeautify
.
xml
(
TextA
));
mv
.
rightOriginal
().
setValue
(
vkbeautify
.
xml
(
TextB
));
})
</
script
>
src/views/Compare/lib/CodeMirror.js
View file @
9a133f87
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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