From 4868da0564dec7d15860d60ed8994d67321bee33 Mon Sep 17 00:00:00 2001 From: wangxueliang Date: Tue, 31 Mar 2020 00:02:28 +0800 Subject: [PATCH] feat: update switch steps icon --- .../__tests__/__snapshots__/demo.test.js.snap | 28 +++++++++---------- components/steps/index.jsx | 7 +++-- .../__tests__/__snapshots__/demo.test.js.snap | 10 ++----- components/switch/index.jsx | 4 +-- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/components/steps/__tests__/__snapshots__/demo.test.js.snap b/components/steps/__tests__/__snapshots__/demo.test.js.snap index a3063b6a7..ebb9ec8c5 100644 --- a/components/steps/__tests__/__snapshots__/demo.test.js.snap +++ b/components/steps/__tests__/__snapshots__/demo.test.js.snap @@ -122,7 +122,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/error.md correctly 1`] = `
-
+
Finished
This is a description.
@@ -132,7 +132,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/error.md correctly 1`] = `
-
+
In Progress
This is a description.
@@ -157,7 +157,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/icon.md correctly 1`] = `
-
+
Login
@@ -166,7 +166,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/icon.md correctly 1`] = `
-
+
Verification
@@ -175,7 +175,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/icon.md correctly 1`] = `
-
+
Pay
@@ -184,7 +184,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/icon.md correctly 1`] = `
-
+
Done
@@ -199,7 +199,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/nav.md correctly 1`] = `
-
+
Step 1
00:00:05
@@ -234,7 +234,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/nav.md correctly 1`] = `
-
+
Step 1
@@ -272,7 +272,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/nav.md correctly 1`] = `
-
+
finish 1
@@ -281,7 +281,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/nav.md correctly 1`] = `
-
+
finish 2
@@ -404,7 +404,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/simple.md correctly 1`] = `
-
+
Finished @@ -442,7 +442,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/small-size.md correctly 1`] = `
-
+
Finished
@@ -513,7 +513,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/vertical.md correctly 1`] = `
-
+
Finished
This is a description.
@@ -548,7 +548,7 @@ exports[`renders ./antdv-demo/docs/steps/demo/vertical-small.md correctly 1`] =
-
+
Finished
This is a description.
diff --git a/components/steps/index.jsx b/components/steps/index.jsx index 6d50e5755..2c60e6c81 100644 --- a/components/steps/index.jsx +++ b/components/steps/index.jsx @@ -1,7 +1,8 @@ +import CloseOutlined from '@ant-design/icons-vue/CloseOutlined'; +import CheckOutlined from '@ant-design/icons-vue/CheckOutlined'; import PropTypes from '../_util/vue-types'; import { initDefaultProps, getOptionProps, getListeners } from '../_util/props-util'; import VcSteps from '../vc-steps'; -import Icon from '../icon'; import { ConfigConsumerProps } from '../config-provider'; import Base from '../base'; @@ -42,8 +43,8 @@ const Steps = { const iconPrefix = getPrefixCls('', customizeIconPrefixCls); const icons = { - finish: , - error: , + finish: , + error: , }; const stepsProps = { props: { diff --git a/components/switch/__tests__/__snapshots__/demo.test.js.snap b/components/switch/__tests__/__snapshots__/demo.test.js.snap index f6de9f256..196bc8e51 100644 --- a/components/switch/__tests__/__snapshots__/demo.test.js.snap +++ b/components/switch/__tests__/__snapshots__/demo.test.js.snap @@ -4,14 +4,8 @@ exports[`renders ./antdv-demo/docs/switch/demo/basic.md correctly 1`] = `

`; -exports[`renders ./antdv-demo/docs/switch/demo/loading.md correctly 1`] = ` -

-`; +exports[`renders ./antdv-demo/docs/switch/demo/loading.md correctly 1`] = `

`; exports[`renders ./antdv-demo/docs/switch/demo/size.md correctly 1`] = `

`; -exports[`renders ./antdv-demo/docs/switch/demo/text.md correctly 1`] = `


`; +exports[`renders ./antdv-demo/docs/switch/demo/text.md correctly 1`] = `


`; diff --git a/components/switch/index.jsx b/components/switch/index.jsx index fae809549..cbf7e9435 100644 --- a/components/switch/index.jsx +++ b/components/switch/index.jsx @@ -1,8 +1,8 @@ +import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined'; import PropTypes from '../_util/vue-types'; import hasProp, { getOptionProps, getComponentFromProp, getListeners } from '../_util/props-util'; import VcSwitch from '../vc-switch'; import Wave from '../_util/wave'; -import Icon from '../icon'; import { ConfigConsumerProps } from '../config-provider'; import Base from '../base'; import warning from '../_util/warning'; @@ -58,7 +58,7 @@ const Switch = { [`${prefixCls}-loading`]: loading, }; const loadingIcon = loading ? ( - + ) : null; const switchProps = { props: {