增加一個新的報名牌位編輯功能

This commit is contained in:
2026-04-07 18:04:08 +08:00
parent 36174834a8
commit 83a7c67439
7 changed files with 1085 additions and 47 deletions
+18 -13
View File
@@ -345,15 +345,15 @@
}
.ancestor-wrapper {
/* 重置為橫向流,這樣 column 才會是真正的上下堆疊 */
writing-mode: horizontal-tb;
display: flex;
flex-direction: column;
align-items: center; /* 水平置中 */
justify-content: center;
width: fit-content;
}
// .ancestor-wrapper {
// /* 重置為橫向流,這樣 column 才會是真正的上下堆疊 */
// writing-mode: horizontal-tb;
// display: flex;
// flex-direction: column;
// align-items: center; /* 水平置中 */
// justify-content: flex-start;
// width: fit-content;
//}
.main-name {
line-height: 1.2;
@@ -690,7 +690,7 @@
// 2. 正名合併置中
else if (el.type === 'combined-center') {
const parts = el.text.split('\n');
html = `<div class="ancestor-wrapper" >
html = `<div class="ancestor-wrapper" style="width:${el.width}px !important;height:${el.height}px !important;" >
<span class="main-name" >${parts[0] || ''}</span>
<span class="sub-text">${parts[1] || ''}</span>
</div>`;
@@ -878,8 +878,8 @@
else if (key === '2offset') el.twoOffset = parseFloat(val);
else if (key === '3offset') el.threeOffset = parseFloat(val);
else if (key === '4offset') el.fourOffset = parseFloat(val);
else if (key === 'height') el.height = parseFloat(val);
else el[key] = val;
console.log("activeId:",this.activeId)
if (el.type == "roster") {
const names = el.text.split('\n').filter(s => s.trim());
@@ -887,13 +887,18 @@
position: "absolute", left: el.startX + "mm", top: el.startY + "mm", fontSize: el.style.fontSize + 'pt', fontFamily: el.fontFamily, "z-index": 9999, visibility: el.style.isActive
}).html(this.renderRoster(names.slice(0 * this.rosterLimit, (0 + 1) * this.rosterLimit), el));
} else if (el.type == "combined-center") {
console.log("combined-center");
const parts = el.text.split('\n');
html = `<div class="ancestor-wrapper" >
html = `<div class="ancestor-wrapper" style='width:${el.width}px !important;height:${el.height}px !important' >
<span class="main-name" >${parts[0] || ''}</span>
<span class="sub-text">${parts[1] || ''}</span>
</div>`;
$(`.tablet-element[id="${this.activeId}"]`).css({
position: "absolute", left: el.startX + "mm", top: el.startY + "mm", fontSize: el.style.fontSize + 'pt', fontFamily: el.fontFamily, "z-index": 9999, visibility: el.style.isActive
position: "absolute", left: el.startX + "mm", top: el.startY + "mm",
fontSize: el.style.fontSize + 'pt', fontFamily: el.fontFamily,
"z-index": 9999, visibility: el.style.isActive,
}).html(html);
} else if (this.activeId === "title1") {
let names = el.text.split('\n').filter(s => s.trim());