feat(前端界面): 优化电子公文注引编辑
build.yaml / build (push) Successful in 48s

This commit is contained in:
xiaoqidun committed 2026-10-13 08:49:13 +08:00
1 parent e91c30ca3c
commit 078c4e0736
3 files changed
+17 -10

No files matched your search

+2 -2
View File
@@ -272,11 +272,11 @@
<div class="form-row"><label for="structureName">名称</label><input id="structureName" type="text" required></div> <div class="form-row"><label for="structureName">名称</label><input id="structureName" type="text" required></div>
<div class="form-row"><label for="structureNamespace">命名空间</label><input id="structureNamespace" type="text"></div> <div class="form-row"><label for="structureNamespace">命名空间</label><input id="structureNamespace" type="text"></div>
<div class="form-row"><label for="structureText">内容</label><textarea id="structureText" rows="2"></textarea></div> <div class="form-row"><label for="structureText">内容</label><textarea id="structureText" rows="2"></textarea></div>
<div class="panel-row"><span>属性</span><button id="structureAttributeAdd" class="small-button" type="button" title="添加属性">添加</button></div> <div class="panel-row"><span>属性</span><button id="structureAttributeAdd" class="icon-button" type="button" title="添加属性" aria-label="添加属性">+</button></div>
<div id="structureAttributes" class="structure-edit-list"></div> <div id="structureAttributes" class="structure-edit-list"></div>
</div> </div>
<div id="structureBinding" hidden> <div id="structureBinding" hidden>
<div class="panel-row"><span>引用</span><div class="panel-actions"><button id="structureSelection" class="small-button" type="button" title="绑定选区">选区</button><button id="structureReferenceAdd" class="small-button" type="button" title="添加引用">添加</button></div></div> <div class="panel-row"><span>引用</span><div class="panel-actions"><button id="structureSelection" class="button" type="button" title="绑定选区" aria-label="绑定选区">选区</button><button id="structureReferenceAdd" class="icon-button" type="button" title="添加引用" aria-label="添加引用">+</button></div></div>
<div id="structureReferences" class="structure-edit-list"></div> <div id="structureReferences" class="structure-edit-list"></div>
</div> </div>
<div class="form-actions"><div id="structureStatus" class="form-status" role="status"></div><button id="structureCancel" class="button" type="button">取消</button><button id="structureSubmit" class="button" type="submit">确定</button></div> <div class="form-actions"><div id="structureStatus" class="form-status" role="status"></div><button id="structureCancel" class="button" type="button">取消</button><button id="structureSubmit" class="button" type="submit">确定</button></div>
+12 -5
View File
@@ -3059,6 +3059,10 @@ audio.page-media {
text-align-last: justify; text-align-last: justify;
} }
.structure-dialog .panel-actions {
gap: 8px;
}
.structure-dialog .form-actions { .structure-dialog .form-actions {
margin-top: 12px; margin-top: 12px;
} }
@@ -3086,9 +3090,6 @@ audio.page-media {
.structure-attribute > button { .structure-attribute > button {
grid-column: -2; grid-column: -2;
grid-row: 1; grid-row: 1;
width: var(--control-height);
height: var(--control-height);
padding: 0;
} }
@media (max-width: 480px) { @media (max-width: 480px) {
@@ -3103,12 +3104,18 @@ audio.page-media {
.structure-reference + .structure-reference { .structure-reference + .structure-reference {
border-top: 1px solid var(--line); border-top: 1px solid var(--line);
padding-top: 8px; padding-top: 12px;
}
.structure-reference .form-row:last-child {
margin-bottom: 0;
} }
.structure-reference .form-unit { .structure-reference .form-unit {
display: grid;
grid-template-columns: minmax(0, 1fr) var(--control-height);
min-width: 0; min-width: 0;
gap: 6px; gap: 8px;
} }
.structure-reference .form-unit > input, .structure-reference .form-unit > input,
+3 -3
View File
@@ -8353,7 +8353,7 @@ function addStructureAttribute(attribute = {}) {
} }
const remove = document.createElement("button"); const remove = document.createElement("button");
remove.type = "button"; remove.type = "button";
remove.className = "small-button"; remove.className = "icon-button";
remove.textContent = "×"; remove.textContent = "×";
remove.title = "删除属性"; remove.title = "删除属性";
remove.setAttribute("aria-label", remove.title); remove.setAttribute("aria-label", remove.title);
@@ -8373,9 +8373,9 @@ function addStructureReference(reference = {}) {
for (const [index, item] of state.doc.pages.entries()) page.add(new Option(`第${index + 1}页`, item.id)); for (const [index, item] of state.doc.pages.entries()) page.add(new Option(`第${index + 1}页`, item.id));
if (reference.pageId) page.value = reference.pageId; if (reference.pageId) page.value = reference.pageId;
const remove = document.createElement("button"), add = document.createElement("button"); const remove = document.createElement("button"), add = document.createElement("button");
for (const [button, label, text] of [[remove, "删除引用", "×"], [add, "添加图元", "添加"]]) { for (const [button, label, text] of [[remove, "删除引用", "×"], [add, "添加图元", "+"]]) {
button.type = "button"; button.type = "button";
button.className = "small-button"; button.className = "icon-button";
button.textContent = text; button.textContent = text;
button.title = label; button.title = label;
button.setAttribute("aria-label", label); button.setAttribute("aria-label", label);