|
@@ -37,6 +37,9 @@
|
|
|
<el-color-picker v-model="bibForm.fontColor" @change="handleFontColorChange"></el-color-picker>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="赛事名称">
|
|
|
+ <el-input v-model="bibForm.eventName" placeholder="请输入赛事名称" maxlength="50" show-word-limit />
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
|
|
@@ -97,6 +100,7 @@
|
|
|
|
|
|
<!-- 赛事名称预览 -->
|
|
|
<div
|
|
|
+ v-if="bibForm.eventName"
|
|
|
class="event-name-preview"
|
|
|
:style="{
|
|
|
fontSize: Math.min(28, Math.max(18, bibForm.fontSize * 0.7)) + 'px',
|
|
@@ -104,7 +108,7 @@
|
|
|
fontFamily: '黑体'
|
|
|
}"
|
|
|
>
|
|
|
- 赛事名称
|
|
|
+ {{ bibForm.eventName }}
|
|
|
</div>
|
|
|
|
|
|
<!-- 示例数字 1234 -->
|
|
@@ -169,7 +173,8 @@ const bibForm = reactive({
|
|
|
fontName: 'simhei',
|
|
|
fontSize: 36,
|
|
|
fontColor: '#000000',
|
|
|
- fontColorHex: '#000000'
|
|
|
+ fontColorHex: '#000000',
|
|
|
+ eventName: '',
|
|
|
});
|
|
|
|
|
|
const bgImageFile = ref<File | null>(null);
|
|
@@ -216,6 +221,7 @@ const resetBibForm = () => {
|
|
|
bibForm.fontSize = 36;
|
|
|
bibForm.fontColor = '#000000';
|
|
|
bibForm.fontColorHex = '#000000';
|
|
|
+ bibForm.eventName = '';
|
|
|
bgImageFile.value = null;
|
|
|
logoImageFile.value = null;
|
|
|
bgImageUrl.value = '';
|
|
@@ -470,7 +476,8 @@ const handleGenerateBibFile = async () => {
|
|
|
qRCodeY: qrCoords.y,
|
|
|
fontName: bibForm.fontName || 'simhei',
|
|
|
fontSize: Math.round((bibForm.fontSize || 36) * 0.75), // 字体大小转换为PDF点并四舍五入为整数
|
|
|
- fontColor: parseInt((bibForm.fontColor || '#000000').replace('#', ''), 16)
|
|
|
+ fontColor: parseInt((bibForm.fontColor || '#000000').replace('#', ''), 16),
|
|
|
+ eventName: bibForm.eventName || '',
|
|
|
};
|
|
|
|
|
|
// 显示进度提示
|