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
878ee200
Commit
878ee200
authored
Mar 28, 2025
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增xmlDOM的ref变量导出
parent
88d3f29c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/views/editor/components/ContentTree.vue
+3
-2
src/views/editor/constants/index.ts
+1
-0
No files found.
src/views/editor/components/ContentTree.vue
View file @
878ee200
...
...
@@ -10,7 +10,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
searchKey
,
treeData
,
realComposableData
}
from
'../constants'
import
{
searchKey
,
treeData
,
realComposableData
,
xmlDOM
}
from
'../constants'
import
FileXML
from
"@/assets/file/CES-QEC-V250-A.xml?raw"
import
type
{
TreeOption
}
from
'naive-ui'
...
...
@@ -43,7 +43,8 @@ const expandedKeys = ref<string[]>([])
onMounted
(
function
()
{
const
res
=
xmlProcessing
.
processXML
(
FileXML
,
nodeSet
)
treeData
.
value
=
res
.
treeData
console
.
log
(
'all-node'
,
res
)
xmlDOM
.
value
=
res
.
xmlDOM
console
.
log
(
'all-node'
,
xmlDOM
.
value
)
})
function
getAllKeys
(
item
:
TreeOption
[])
{
return
item
.
reduce
(
function
(
q
,
w
)
{
...
...
src/views/editor/constants/index.ts
View file @
878ee200
...
...
@@ -5,6 +5,7 @@ import { TreeRenderResult } from '@/lib/XMLProcessor/src/typing'
// 菜单相关
export
const
searchKey
=
ref
(
''
)
export
const
treeData
:
Ref
<
TreeOption
[]
>
=
ref
([])
export
const
xmlDOM
:
Ref
<
Document
>=
ref
()
//编辑器相关
export
const
editorRef
=
ref
()
export
const
formData
=
reactive
({
...
...
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