diff --git a/src/packages/__VUE/avatarcropper/__tests__/avatarcropper.spec.ts b/src/packages/__VUE/avatarcropper/__tests__/avatarcropper.spec.ts
index a99cd612f8..b074cf42af 100644
--- a/src/packages/__VUE/avatarcropper/__tests__/avatarcropper.spec.ts
+++ b/src/packages/__VUE/avatarcropper/__tests__/avatarcropper.spec.ts
@@ -60,6 +60,9 @@ test('AvatarCropper: Select the image to open the crop window', async () => {
expect(wrapper.vm.angle).toBe(90);
setAngle.trigger('click');
expect(wrapper.vm.angle).toBe(180);
+ setAngle.trigger('click');
+ setAngle.trigger('click');
+ expect(wrapper.vm.angle).toBe(0);
const confirm = btns[3];
confirm.trigger('click');
diff --git a/src/packages/__VUE/avatarcropper/demo.vue b/src/packages/__VUE/avatarcropper/demo.vue
index 5b2ffbb89a..4d404a96ff 100644
--- a/src/packages/__VUE/avatarcropper/demo.vue
+++ b/src/packages/__VUE/avatarcropper/demo.vue
@@ -10,7 +10,7 @@
裁剪区域bottom插槽
-
+
diff --git a/src/packages/__VUE/avatarcropper/doc.en-US.md b/src/packages/__VUE/avatarcropper/doc.en-US.md
index fccd2b4b45..5247dc5634 100644
--- a/src/packages/__VUE/avatarcropper/doc.en-US.md
+++ b/src/packages/__VUE/avatarcropper/doc.en-US.md
@@ -49,7 +49,7 @@ Customize the clipping area toolbar, and BNs-position controls the toolbar posit
```vue
-
+
@@ -94,6 +94,7 @@ const cutImage = (url: string) => {
| maxZoom | Maximum zoom | number | 3 |
| space | The gap reserved on both sides of the clipping area | number | 20 |
| btnsPosition | Location of the toolbar in the clipping area. The optional value is:`top` `bottom` | string | bottom |
+| editText | The text content in the middle | string | 编辑 |
| cancelText | Cancel button text | string | 取消 |
| cancelConfirm | Confirm button text | string | 确认 |
diff --git a/src/packages/__VUE/avatarcropper/doc.md b/src/packages/__VUE/avatarcropper/doc.md
index f6c2a87836..75b0ee4030 100644
--- a/src/packages/__VUE/avatarcropper/doc.md
+++ b/src/packages/__VUE/avatarcropper/doc.md
@@ -49,7 +49,7 @@ const cutImage = (url: string) => {
```vue
-
+
@@ -94,6 +94,7 @@ const cutImage = (url: string) => {
| maxZoom | 最大缩放倍数 | number | 3 |
| space | 裁剪区域两边预留的间隙 | number | 10 |
| btnsPosition | 裁剪区域工具栏位置,可选值为:`top` `bottom` | string | bottom |
+| editText | 中间的文字内容 | string | 编辑 |
| cancelText | 取消按钮的文字 | string | 取消 |
| cancelConfirm | 确认按钮的文字 | string | 确认 |
diff --git a/src/packages/__VUE/avatarcropper/index.scss b/src/packages/__VUE/avatarcropper/index.scss
index 825a8dc8be..9d132cf74b 100644
--- a/src/packages/__VUE/avatarcropper/index.scss
+++ b/src/packages/__VUE/avatarcropper/index.scss
@@ -1,7 +1,7 @@
.nut-avatar-cropper {
position: relative;
&::after {
- content: '编辑';
+ content: attr(data-edit-text);
position: absolute;
top: 0;
left: 0;
@@ -53,6 +53,7 @@
bottom: inherit;
}
.flex-sb {
+ width: 100%;
display: flex;
justify-content: space-between;
}
diff --git a/src/packages/__VUE/avatarcropper/index.vue b/src/packages/__VUE/avatarcropper/index.vue
index 4c89e59396..2754f303e6 100644
--- a/src/packages/__VUE/avatarcropper/index.vue
+++ b/src/packages/__VUE/avatarcropper/index.vue
@@ -1,5 +1,5 @@
-
+
,
default: 'bottom'
},
+ editText: {
+ type: String,
+ default: '编辑'
+ },
cancelText: {
type: String,
default: '取消'