Skip to content

Commit 5631599

Browse files
committed
feat: update vc-xxx
1 parent 663d00f commit 5631599

File tree

11 files changed

+36
-26
lines changed

11 files changed

+36
-26
lines changed

components/progress/__tests__/__snapshots__/demo.test.js.snap

+12-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`renders ./components/progress/demo/circle.md correctly 1`] = `
66
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
77
<path d="M 50,50 m 0,-47
88
a 47,47 0 1 1 0,94
9-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
9+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
1010
<path d="M 50,50 m 0,-47
1111
a 47,47 0 1 1 0,94
1212
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 221.48228207808043px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -16,7 +16,7 @@ exports[`renders ./components/progress/demo/circle.md correctly 1`] = `
1616
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
1717
<path d="M 50,50 m 0,-47
1818
a 47,47 0 1 1 0,94
19-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
19+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
2020
<path d="M 50,50 m 0,-47
2121
a 47,47 0 1 1 0,94
2222
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #ff5500; stroke-dasharray: 206.7167966062084px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -26,7 +26,7 @@ exports[`renders ./components/progress/demo/circle.md correctly 1`] = `
2626
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
2727
<path d="M 50,50 m 0,-47
2828
a 47,47 0 1 1 0,94
29-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
29+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
3030
<path d="M 50,50 m 0,-47
3131
a 47,47 0 1 1 0,94
3232
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -41,7 +41,7 @@ exports[`renders ./components/progress/demo/circle-dynamic.md correctly 1`] = `
4141
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
4242
<path d="M 50,50 m 0,-47
4343
a 47,47 0 1 1 0,94
44-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
44+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
4545
<path d="M 50,50 m 0,-47
4646
a 47,47 0 1 1 0,94
4747
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="0" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 0px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -61,7 +61,7 @@ exports[`renders ./components/progress/demo/circle-mini.md correctly 1`] = `
6161
<div class="ant-progress-inner" style="width: 80px; height: 80px; font-size: 18px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
6262
<path d="M 50,50 m 0,-47
6363
a 47,47 0 1 1 0,94
64-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
64+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
6565
<path d="M 50,50 m 0,-47
6666
a 47,47 0 1 1 0,94
6767
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 88.59291283123217px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -71,7 +71,7 @@ exports[`renders ./components/progress/demo/circle-mini.md correctly 1`] = `
7171
<div class="ant-progress-inner" style="width: 80px; height: 80px; font-size: 18px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
7272
<path d="M 50,50 m 0,-47
7373
a 47,47 0 1 1 0,94
74-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
74+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
7575
<path d="M 50,50 m 0,-47
7676
a 47,47 0 1 1 0,94
7777
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #ff5500; stroke-dasharray: 206.7167966062084px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -81,7 +81,7 @@ exports[`renders ./components/progress/demo/circle-mini.md correctly 1`] = `
8181
<div class="ant-progress-inner" style="width: 80px; height: 80px; font-size: 18px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
8282
<path d="M 50,50 m 0,-47
8383
a 47,47 0 1 1 0,94
84-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
84+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
8585
<path d="M 50,50 m 0,-47
8686
a 47,47 0 1 1 0,94
8787
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -96,7 +96,7 @@ exports[`renders ./components/progress/demo/dashboard.md correctly 1`] = `
9696
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
9797
<path d="M 50,50 m 0,47
9898
a 47,47 0 1 1 0,-94
99-
a 47,47 0 1 1 0,94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
99+
a 47,47 0 1 1 0,94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
100100
<path d="M 50,50 m 0,47
101101
a 47,47 0 1 1 0,-94
102102
a 47,47 0 1 1 0,94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 165.23228207808043px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
@@ -130,7 +130,7 @@ exports[`renders ./components/progress/demo/format.md correctly 1`] = `
130130
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
131131
<path d="M 50,50 m 0,-47
132132
a 47,47 0 1 1 0,94
133-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
133+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
134134
<path d="M 50,50 m 0,-47
135135
a 47,47 0 1 1 0,94
136136
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 221.48228207808043px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -140,7 +140,7 @@ exports[`renders ./components/progress/demo/format.md correctly 1`] = `
140140
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
141141
<path d="M 50,50 m 0,-47
142142
a 47,47 0 1 1 0,94
143-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
143+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
144144
<path d="M 50,50 m 0,-47
145145
a 47,47 0 1 1 0,94
146146
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #87d068; stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -255,7 +255,7 @@ exports[`renders ./components/progress/demo/linecap.md correctly 1`] = `
255255
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
256256
<path d="M 50,50 m 0,-47
257257
a 47,47 0 1 1 0,94
258-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
258+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="square" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
259259
<path d="M 50,50 m 0,-47
260260
a 47,47 0 1 1 0,94
261261
a 47,47 0 1 1 0,-94" stroke-linecap="square" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 221.48228207808043px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
@@ -265,7 +265,7 @@ exports[`renders ./components/progress/demo/linecap.md correctly 1`] = `
265265
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
266266
<path d="M 50,50 m 0,47
267267
a 47,47 0 1 1 0,-94
268-
a 47,47 0 1 1 0,94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
268+
a 47,47 0 1 1 0,94" stroke="#f3f3f3" stroke-linecap="square" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 220.30970943744057px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>
269269
<path d="M 50,50 m 0,47
270270
a 47,47 0 1 1 0,-94
271271
a 47,47 0 1 1 0,94" stroke-linecap="square" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: #108ee9; stroke-dasharray: 165.23228207808043px 295.3097094374406px; stroke-dashoffset: -37.5px;"></path>

components/progress/__tests__/__snapshots__/index.test.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Progress render format 1`] = `
55
<div class="ant-progress-inner" style="width: 120px; height: 120px; font-size: 24px;"><svg viewBox="0 0 100 100" class="ant-progress-circle">
66
<path d="M 50,50 m 0,-47
77
a 47,47 0 1 1 0,94
8-
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
8+
a 47,47 0 1 1 0,-94" stroke="#f3f3f3" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-trail" style="stroke-dasharray: 295.3097094374406px 295.3097094374406px; stroke-dashoffset: -0px;"></path>
99
<path d="M 50,50 m 0,-47
1010
a 47,47 0 1 1 0,94
1111
a 47,47 0 1 1 0,-94" stroke-linecap="round" stroke-width="6" fill-opacity="0" class="ant-progress-circle-path" style="stroke: red; stroke-dasharray: 147.6548547187203px 295.3097094374406px; stroke-dashoffset: -0px;"></path>

components/vc-form/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// based on rc-form 2.4.0
1+
// based on rc-form 2.4.1
22
import { createForm, createFormField } from './src/';
33
export { createForm, createFormField };

components/vc-form/src/createBaseForm.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,12 @@ function createBaseForm(option = {}, mixins = []) {
592592
callback,
593593
);
594594
});
595-
pending.catch(e => e);
595+
pending.catch((e) => {
596+
if (console.error) { // eslint-disable-line
597+
console.error(e); // eslint-disable-line
598+
}
599+
return e;
600+
});
596601
return pending;
597602
},
598603

components/vc-input-number/src/index.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on rc-input-number 4.3.7
1+
// based on rc-input-number 4.3.8
22
import PropTypes from '../../_util/vue-types';
33
import BaseMixin from '../../_util/BaseMixin';
44
import { initDefaultProps, hasProp, getOptionProps } from '../../_util/props-util';
@@ -140,14 +140,16 @@ export default {
140140
// Trigger onChange when max or min change
141141
// https://github.com/ant-design/ant-design/issues/11574
142142
const nextValue = 'value' in props ? props.value : this.sValue;
143-
if (nextValue > val) {
143+
// ref: null < 20 === true
144+
// https://github.com/ant-design/ant-design/issues/14277
145+
if (typeof nextValue === 'number' && nextValue > val) {
144146
this.__emit('change', val);
145147
}
146148
},
147149
min(val) {
148150
const props = getOptionProps(this);
149151
const nextValue = 'value' in props ? props.value : this.sValue;
150-
if (nextValue < val) {
152+
if (typeof nextValue === 'number' && nextValue < val) {
151153
this.__emit('change', val);
152154
}
153155
},

components/vc-progress/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on rc-progress 2.2.6
1+
// based on rc-progress 2.2.7
22
import Progress, { Line, Circle } from './src/';
33

44
export { Line, Circle };

components/vc-progress/src/Circle.js

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ const Circle = {
8181
attrs: {
8282
d: pathString,
8383
stroke: trailColor,
84+
'stroke-linecap': strokeLinecap,
8485
'stroke-width': trailWidth || strokeWidth,
8586
'fill-opacity': '0',
8687
},

components/vc-table/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// base rc-table 6.4.2
1+
// base rc-table 6.4.3
22
import T from './src/Table';
33
import Column from './src/Column';
44
import ColumnGroup from './src/ColumnGroup';

components/vc-table/src/ExpandableRow.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const ExpandableRow = {
1010
prefixCls: PropTypes.string.isRequired,
1111
rowKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
1212
fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
13-
record: PropTypes.object.isRequired,
13+
record: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
1414
indentSize: PropTypes.number,
1515
needIndentSpaced: PropTypes.bool.isRequired,
1616
expandRowByClick: PropTypes.bool,

components/vc-tree/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on rc-tree 1.14.8
1+
// based on rc-tree 1.14.9
22
'use strict';
33

44
module.exports = require('./src/');

components/vc-tree/src/Tree.jsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PropTypes from '../../_util/vue-types';
22
import classNames from 'classnames';
33
import warning from 'warning';
4-
import { initDefaultProps, getOptionProps, getSlots } from '../../_util/props-util';
4+
import { hasProp, initDefaultProps, getOptionProps, getSlots } from '../../_util/props-util';
55
import { cloneElement } from '../../_util/vnode';
66
import BaseMixin from '../../_util/BaseMixin';
77
import proxyComponent from '../../_util/proxyComponent';
@@ -304,9 +304,11 @@ const Tree = {
304304
});
305305
this.delayedDragEnterLogic[pos] = setTimeout(() => {
306306
const newExpandedKeys = arrAdd(expandedKeys, eventKey);
307-
this.setState({
308-
_expandedKeys: newExpandedKeys,
309-
});
307+
if (!hasProp(this, 'expandedKeys')) {
308+
this.setState({
309+
_expandedKeys: newExpandedKeys,
310+
});
311+
}
310312
this.__emit('dragenter', { event, node, expandedKeys: newExpandedKeys });
311313
}, 400);
312314
}, 0);

0 commit comments

Comments
 (0)