Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
Ifar-Xml-Edtor
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
Ifar-Xml-Edtor
Commits
45e708d4
Commit
45e708d4
authored
Jul 27, 2026
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: create CommonXmlEditor component with CodeMirror 6 and custom theme support
parent
bc1ecc6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/components/CommonXmlEditor.vue
+5
-4
No files found.
src/components/CommonXmlEditor.vue
View file @
45e708d4
...
@@ -379,7 +379,8 @@ const xmlCompletionSource = (context: CompletionContext) => {
...
@@ -379,7 +379,8 @@ const xmlCompletionSource = (context: CompletionContext) => {
return {
return {
from: wordMatch.from,
from: wordMatch.from,
options
options,
validFor: /^[a-zA-Z0-9_-]*$/
}
}
}
}
}
}
...
@@ -602,9 +603,9 @@ const initCodeMirror = () => {
...
@@ -602,9 +603,9 @@ const initCodeMirror = () => {
emit
(
'update:modelValue'
,
newValue
)
emit
(
'update:modelValue'
,
newValue
)
}
}
// 如果是用户
输入
导致的变化,且当前正处于可能需要提示的上下文中,自动激活提示
// 如果是用户
编辑(输入或删除)
导致的变化,且当前正处于可能需要提示的上下文中,自动激活提示
const
is
Type
=
update
.
transactions
.
some
((
tr
)
=>
tr
.
isUserEvent
(
'input.typ
e'
))
const
is
UserEdit
=
update
.
transactions
.
some
((
tr
)
=>
tr
.
isUserEvent
(
'input'
)
||
tr
.
isUserEvent
(
'delet
e'
))
if
(
is
Type
)
{
if
(
is
UserEdit
)
{
const
mainSelection
=
update
.
state
.
selection
.
main
const
mainSelection
=
update
.
state
.
selection
.
main
if
(
mainSelection
.
empty
)
{
if
(
mainSelection
.
empty
)
{
const
pos
=
mainSelection
.
head
const
pos
=
mainSelection
.
head
...
...
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