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
d11c0554
Commit
d11c0554
authored
Jul 06, 2026
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert: 撤销在 prepareCleanedHtml 中对 EFFECT 节点的清理逻辑
parent
0a57dc1b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
21 deletions
+10
-21
src/layouts/components/SettingsDrawer.vue
+1
-1
src/views/editor/components/DocNodeRenderer/functionals/index.ts
+0
-1
src/views/editor/components/DocNodeRenderer/index.vue
+8
-13
src/views/editor/functionals/index.ts
+1
-6
No files found.
src/layouts/components/SettingsDrawer.vue
View file @
d11c0554
<
template
>
<
template
>
<!-- 触发按钮 -->
<!-- 触发按钮 -->
<slot
name=
"trigger"
:open=
"() =>
appStore.settingsOpen = true
"
>
<slot
name=
"trigger"
:open=
"() =>
(appStore.settingsOpen = true)
"
>
<CommonButton
quaternary
circle
@
click=
"appStore.settingsOpen = true"
>
<CommonButton
quaternary
circle
@
click=
"appStore.settingsOpen = true"
>
<template
#
icon
>
<template
#
icon
>
<n-icon><settings-outline
/></n-icon>
<n-icon><settings-outline
/></n-icon>
...
...
src/views/editor/components/DocNodeRenderer/functionals/index.ts
View file @
d11c0554
...
@@ -56,7 +56,6 @@ export function useDocNodeRenderer(props: { node: XmlNode; parent?: XmlNode | nu
...
@@ -56,7 +56,6 @@ export function useDocNodeRenderer(props: { node: XmlNode; parent?: XmlNode | nu
provide
(
'insideChinese'
,
true
)
provide
(
'insideChinese'
,
true
)
}
}
const
renderInline
=
computed
(()
=>
{
const
renderInline
=
computed
(()
=>
{
return
props
.
isInline
||
INLINE_ELEMENTS_SET
.
has
(
props
.
node
.
tagName
)
return
props
.
isInline
||
INLINE_ELEMENTS_SET
.
has
(
props
.
node
.
tagName
)
})
})
...
...
src/views/editor/components/DocNodeRenderer/index.vue
View file @
d11c0554
...
@@ -100,10 +100,7 @@
...
@@ -100,10 +100,7 @@
<component
<component
:is=
"renderInline ? 'span' : 'div'"
:is=
"renderInline ? 'span' : 'div'"
class=
"text-sm leading-relaxed py-1 flex flex-wrap items-center"
class=
"text-sm leading-relaxed py-1 flex flex-wrap items-center"
:class=
"[
:class=
"[isInsideAlert ? 'text-inherit' : 'text-color2', renderInline ? 'inline mx-0.5' : 'flex']"
isInsideAlert ? 'text-inherit' : 'text-color2',
renderInline ? 'inline mx-0.5' : 'flex'
]"
:style=
"
{ justifyContent: 'var(--cell-align, flex-start)' }"
:style=
"
{ justifyContent: 'var(--cell-align, flex-start)' }"
>
>
<template
v-if=
"node.mixedContent && node.mixedContent.length > 0"
>
<template
v-if=
"node.mixedContent && node.mixedContent.length > 0"
>
...
@@ -680,13 +677,7 @@
...
@@ -680,13 +677,7 @@
<div
class=
"my-1 py-1"
>
<div
class=
"my-1 py-1"
>
<div
class=
"flex flex-wrap items-center gap-1.5 text-sm text-color2"
>
<div
class=
"flex flex-wrap items-center gap-1.5 text-sm text-color2"
>
<template
v-if=
"node.children && node.children.length > 0"
>
<template
v-if=
"node.children && node.children.length > 0"
>
<DocNodeRenderer
<DocNodeRenderer
v-for=
"child in node.children"
:key=
"child.id"
:node=
"child"
:parent=
"node"
is-inline
/>
v-for=
"child in node.children"
:key=
"child.id"
:node=
"child"
:parent=
"node"
is-inline
/>
</
template
>
</
template
>
<
template
v-else-if=
"node.textContent && node.textContent.trim()"
>
<
template
v-else-if=
"node.textContent && node.textContent.trim()"
>
<span
<span
...
@@ -707,7 +698,11 @@
...
@@ -707,7 +698,11 @@
contenteditable=
"true"
contenteditable=
"true"
class=
"inline-block border-b border-color3 hover:border-primary focus:border-primary min-w-[80px] text-center focus:outline-none focus:bg-fill-2 px-1 mx-1 text-sm font-mono text-primary font-bold transition-all"
class=
"inline-block border-b border-color3 hover:border-primary focus:border-primary min-w-[80px] text-center focus:outline-none focus:bg-fill-2 px-1 mx-1 text-sm font-mono text-primary font-bold transition-all"
:style=
"
{
:style=
"
{
width: node.attributes.WIDTH ? (node.attributes.WIDTH.includes('px') || node.attributes.WIDTH.includes('%') ? node.attributes.WIDTH : `${node.attributes.WIDTH}px`) : 'auto',
width: node.attributes.WIDTH
? node.attributes.WIDTH.includes('px') || node.attributes.WIDTH.includes('%')
? node.attributes.WIDTH
: `${node.attributes.WIDTH}px`
: 'auto',
minWidth: node.attributes.WIDTH ? '0' : '80px'
minWidth: node.attributes.WIDTH ? '0' : '80px'
}"
}"
@blur="handleTextBlur"
@blur="handleTextBlur"
...
@@ -1076,7 +1071,7 @@ const {
...
@@ -1076,7 +1071,7 @@ const {
background
-
color
:
var
(
--
n
-
color
-
hover
);
background
-
color
:
var
(
--
n
-
color
-
hover
);
}
}
.
inline
-
ref
-
block
>
*
:
not
(:
first
-
child
)::
before
{
.
inline
-
ref
-
block
>
*
:
not
(:
first
-
child
)::
before
{
content
:
", "
;
content
:
', '
;
color
:
inherit
;
color
:
inherit
;
}
}
<
/style
>
<
/style
>
src/views/editor/functionals/index.ts
View file @
d11c0554
...
@@ -119,12 +119,7 @@ export function useEditor() {
...
@@ -119,12 +119,7 @@ export function useEditor() {
el
.
remove
()
el
.
remove
()
})
})
// 0.5. 移除所有评估为 'ALL' 且非必填显示的 applicability 标签 (避免在导出的 HTML 中重复出现大量的 ** ON A/C: ALL)
clone
.
querySelectorAll
(
'[data-tag-name="EFFECT"], [data-tag-name="CONEFFECT"]'
).
forEach
((
el
)
=>
{
if
(
el
.
textContent
?.
includes
(
'ALL'
))
{
el
.
remove
()
}
})
// 1. 去除 contenteditable 属性,防止打印时显示光标或被编辑
// 1. 去除 contenteditable 属性,防止打印时显示光标或被编辑
clone
.
querySelectorAll
(
'[contenteditable]'
).
forEach
((
el
)
=>
{
clone
.
querySelectorAll
(
'[contenteditable]'
).
forEach
((
el
)
=>
{
...
...
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