Skip to content

Commit

Permalink
feat: 新增矩形圆角属性功能 (#407)
Browse files Browse the repository at this point in the history
* feat: 新增矩形圆角属性功能

* fix: 删除没用的注释

---------

Co-authored-by: pengzhijian <13087545742>
  • Loading branch information
pengzhijian authored Jun 3, 2024
1 parent 75dc67e commit 057a0ef
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
26 changes: 25 additions & 1 deletion src/components/attributePostion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,30 @@
></InputNumber>
</Col>
</Row>

<Row :gutter="10">
<Col flex="1">
<InputNumber
v-model="baseAttr.rx"
@on-change="(value) => changeCommon('rx', value)"
:append="$t('attributes.borderRadiusX')"
></InputNumber>
</Col>
<Col flex="1">
<InputNumber
v-model="baseAttr.ry"
@on-change="(value) => changeCommon('ry', value)"
:append="$t('attributes.borderRadiusY')"
></InputNumber>
</Col>
</Row>
<Form :label-width="40" class="form-wrap">
<FormItem :label="$t('attributes.angle')">
<Slider
v-model="baseAttr.angle"
:max="360"
@on-input="(value) => changeCommon('angle', value)"
></Slider>
</FormItem>
<FormItem :label="$t('attributes.angle')">
<Slider
v-model="baseAttr.angle"
Expand Down Expand Up @@ -77,6 +99,8 @@ const baseAttr = reactive({
angle: 0,
left: 0,
top: 0,
rx: 0,
ry: 0,
});

// 属性获取
Expand Down
4 changes: 3 additions & 1 deletion src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@
"shadow": "Shadow",
"blur": "Blur",
"offset_x": "X",
"offset_y": "Y"
"offset_y": "Y",
"borderRadiusX": "Horizontal borderRadius",
"borderRadiusY": "Vertical borderRadius"
},
"setSizeTip": "Resize canvas",
"tip": "tip",
Expand Down
4 changes: 3 additions & 1 deletion src/language/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@
"shadow": "阴影",
"blur": "模糊",
"offset_x": "X轴",
"offset_y": "Y轴"
"offset_y": "Y轴",
"borderRadiusX": "圆角水平半径",
"borderRadiusY": "圆角垂直半径"
},
"setSizeTip": "调整画布尺寸",
"tip": "提示",
Expand Down

0 comments on commit 057a0ef

Please sign in to comment.