From 527d589ef9b663feee4ed8cc582bed62e76d2a03 Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 30 Oct 2021 20:22:47 +0800 Subject: [PATCH] fix(Progress): should resize when window size changed (#9757) --- src/progress/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/progress/index.js b/src/progress/index.js index 1aef1dc4b..23b668f4b 100644 --- a/src/progress/index.js +++ b/src/progress/index.js @@ -1,8 +1,16 @@ import { createNamespace, addUnit } from '../utils'; +import { BindEventMixin } from '../mixins/bind-event'; const [createComponent, bem] = createNamespace('progress'); export default createComponent({ + mixins: [ + BindEventMixin(function (bind) { + bind(window, 'resize', this.resize, true); + bind(window, 'orientationchange', this.resize, true); + }), + ], + props: { color: String, inactive: Boolean,