diff --git a/src/goods-action-icon/index.js b/src/goods-action-icon/index.js
index 588e040e6..27c982e7e 100644
--- a/src/goods-action-icon/index.js
+++ b/src/goods-action-icon/index.js
@@ -1,6 +1,7 @@
import { createNamespace } from '../utils';
import { route, routeProps } from '../utils/router';
import { ChildrenMixin } from '../mixins/relation';
+import Info from '../info';
import Icon from '../icon';
const [createComponent, bem] = createNamespace('goods-action-icon');
@@ -27,7 +28,12 @@ export default createComponent({
const slot = this.slots('icon');
if (slot) {
- return
{slot}
;
+ return (
+
+ {slot}
+
+
+ );
}
return (
diff --git a/src/goods-action-icon/index.less b/src/goods-action-icon/index.less
index 1b4f32ad2..d331e731a 100644
--- a/src/goods-action-icon/index.less
+++ b/src/goods-action-icon/index.less
@@ -18,6 +18,7 @@
}
&__icon {
+ position: relative;
width: 1em;
margin: 0 auto 5px;
color: @goods-action-icon-color;
diff --git a/src/goods-action/test/__snapshots__/index.spec.js.snap b/src/goods-action/test/__snapshots__/index.spec.js.snap
index fdaef8b25..1d3c01a30 100644
--- a/src/goods-action/test/__snapshots__/index.spec.js.snap
+++ b/src/goods-action/test/__snapshots__/index.spec.js.snap
@@ -12,6 +12,15 @@ exports[`Icon render default slot 1`] = `
exports[`Icon render icon slot 1`] = `
-
Custom Icon
Text
+
Custom Icon
+
+
Text
+
+`;
+
+exports[`Icon render icon slot with info 1`] = `
+
`;
diff --git a/src/goods-action/test/index.spec.js b/src/goods-action/test/index.spec.js
index 71f21d360..4b475e61e 100644
--- a/src/goods-action/test/index.spec.js
+++ b/src/goods-action/test/index.spec.js
@@ -48,3 +48,21 @@ test('Icon render icon slot', () => {
expect(wrapper).toMatchSnapshot();
});
+
+test('Icon render icon slot with info', () => {
+ const wrapper = mount({
+ render(h) {
+ return h(Icon, {
+ props: {
+ info: '1',
+ },
+ scopedSlots: {
+ default: () => 'Text',
+ icon: () => 'Custom Icon',
+ },
+ });
+ },
+ });
+
+ expect(wrapper).toMatchSnapshot();
+});