fix(Progress): should resize when window size changed (#9757)

This commit is contained in:
neverland
2021-10-30 20:22:47 +08:00
committed by GitHub
parent 2a8c9cb1b5
commit 527d589ef9

View File

@@ -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,