Skip to content

Commit

Permalink
feat: 公司名称增加开始角度
Browse files Browse the repository at this point in the history
  • Loading branch information
xxss0903 committed Dec 28, 2024
1 parent c1f7056 commit 7559581
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
22 changes: 21 additions & 1 deletion src/DrawStampUtilsDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,26 @@
{{ t('stamp.company.margin') }}:
<input type="number" v-model.number="company.borderOffset" min="-10" max="10" step="0.05" />
</label>
<label>
{{ t('stamp.company.startAngle') }}:
<div class="range-container">
<input
type="range"
v-model.number="company.startAngle"
min="-3.14"
max="3.14"
step="0.01"
/>
<span>{{ (company.startAngle * 180 / Math.PI).toFixed(0) }}°</span>
</div>
</label>
<label>
{{ t('stamp.company.rotateDirection') }}:
<select v-model="company.rotateDirection">
<option value="clockwise">{{ t('stamp.company.clockwise') }}</option>
<option value="counterclockwise">{{ t('stamp.company.counterclockwise') }}</option>
</select>
</label>
</div>
<button class="add-button" @click="addNewCompany">{{ t('stamp.common.addNew') }}</button>
</div>
Expand Down Expand Up @@ -722,7 +742,7 @@ const textDistributionFactor = ref(3)
const adjustEllipseText = ref(false)
// 调整椭圆文字因子
const adjustEllipseTextFactor = ref(0.5)
// 文字边距,控制公司名称文字距离椭圆边缘的距离(单位:毫米)
// 文字边距,控制公���名称文字距离椭圆边缘的距离(单位:毫米)
const textMarginMM = ref(1) // 默认值为1mm
// 编码边距,控制印章编码距离椭圆边缘的距离(单位毫米)
const codeMarginMM = ref(1) // 默认值为1mm
Expand Down
8 changes: 6 additions & 2 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const messages = {
fontWeight: '字体粗细',
compression: '压缩比例',
distribution: '分布因子',
margin: '边距 (mm)'
margin: '边距 (mm)',
startAngle: '起始角度 (°)',
rotateDirection: '旋转方向'
},
stampType: {
title: '印章类型列表设置',
Expand Down Expand Up @@ -192,7 +194,9 @@ const messages = {
fontWeight: 'Font Weight',
compression: 'Compression Ratio',
distribution: 'Distribution Factor',
margin: 'Margin (mm)'
margin: 'Margin (mm)',
startAngle: 'Start Angle (°)',
rotateDirection: 'Rotate Direction'
},
stampType: {
title: 'Stamp Type List Settings',
Expand Down

0 comments on commit 7559581

Please sign in to comment.