Skip to content

Commit 6f05a98

Browse files
committed
Merge branch 'master' into feat-1.4.0
2 parents 495db37 + c897d32 commit 6f05a98

File tree

8 files changed

+72
-14
lines changed

8 files changed

+72
-14
lines changed

components/carousel/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const CarouselProps = {
6565
variableWidth: PropTypes.bool,
6666
useCSS: PropTypes.bool,
6767
slickGoTo: PropTypes.number,
68+
responsive: PropTypes.array.def(null),
6869
};
6970

7071
const Carousel = {

components/tooltip/Tooltip.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939
},
4040
data() {
4141
return {
42-
sVisible: !!this.$props.visible,
42+
sVisible: !!this.$props.visible || !!this.$props.defaultVisible,
4343
};
4444
},
4545
watch: {

components/vc-slick/src/default-props.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const defaultProps = {
3131
pauseOnFocus: PropTypes.bool.def(false),
3232
// hover是否暂停
3333
pauseOnHover: PropTypes.bool.def(true),
34-
responsive: PropTypes.any.def(null),
34+
responsive: PropTypes.array.def(null),
3535
rows: PropTypes.number.def(1),
3636
rtl: PropTypes.bool.def(false),
3737
slide: PropTypes.string.def('div'),

components/vc-time-picker/Header.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const Header = {
2828
currentSelectPanel: PropTypes.string,
2929
focusOnOpen: PropTypes.bool,
3030
// onKeyDown: PropTypes.func,
31-
showStr: PropTypes.bool.def(true),
3231
clearIcon: PropTypes.any,
3332
},
3433
data() {
@@ -70,7 +69,6 @@ const Header = {
7069
return;
7170
}
7271

73-
this.showStr = true;
7472
this.setState({
7573
str,
7674
});
@@ -169,14 +167,14 @@ const Header = {
169167
},
170168

171169
getInput() {
172-
const { prefixCls, placeholder, inputReadOnly, invalid, str, showStr } = this;
170+
const { prefixCls, placeholder, inputReadOnly, invalid, str } = this;
173171
const invalidClass = invalid ? `${prefixCls}-input-invalid` : '';
174172
return (
175173
<input
176174
class={`${prefixCls}-input ${invalidClass}`}
177175
ref="input"
178176
onKeydown={this.onKeyDown}
179-
value={showStr ? str : ''}
177+
value={str}
180178
placeholder={placeholder}
181179
onInput={this.onInputChange}
182180
readOnly={!!inputReadOnly}

components/vc-time-picker/Panel.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,13 @@ const Panel = {
7171
sValue: this.value,
7272
selectionRange: [],
7373
currentSelectPanel: '',
74-
showStr: true,
7574
};
7675
},
7776
watch: {
7877
value(val) {
7978
if (val) {
8079
this.setState({
8180
sValue: val,
82-
showStr: true,
83-
});
84-
} else {
85-
this.setState({
86-
showStr: false,
8781
});
8882
}
8983
},
@@ -150,7 +144,6 @@ const Panel = {
150144
inputReadOnly,
151145
sValue,
152146
currentSelectPanel,
153-
showStr,
154147
$listeners = {},
155148
} = this;
156149
const clearIcon = getComponentFromProp(this, 'clearIcon');
@@ -203,7 +196,6 @@ const Panel = {
203196
focusOnOpen={focusOnOpen}
204197
onKeydown={keydown}
205198
inputReadOnly={inputReadOnly}
206-
showStr={showStr}
207199
clearIcon={clearIcon}
208200
/>
209201
<Combobox

types/ant-design-vue.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Button } from './button/button';
1616
import { Calendar } from './calendar';
1717
import { Card } from './card';
1818
import { Collapse } from './collapse/collapse';
19+
import { Comment } from './comment';
1920
import { Carousel } from './carousel';
2021
import { Cascader } from './cascader';
2122
import { Checkbox } from './checkbox/checkbox';

types/carousel.d.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,51 @@
44

55
import { AntdComponent } from './component';
66

7+
export interface Settings {
8+
accessibility?: boolean;
9+
adaptiveHeight?: boolean;
10+
arrows?: boolean;
11+
autoplaySpeed?: number;
12+
autoplay?: boolean;
13+
centerMode?: boolean;
14+
centerPadding?: string;
15+
className?: string;
16+
cssEase?: string;
17+
dotsClass?: string;
18+
dots?: boolean;
19+
draggable?: boolean;
20+
easing?: string;
21+
edgeFriction?: number;
22+
fade?: boolean;
23+
focusOnSelect?: boolean;
24+
infinite?: boolean;
25+
initialSlide?: number;
26+
pauseOnDotsHover?: boolean;
27+
pauseOnFocus?: boolean;
28+
pauseOnHover?: boolean;
29+
responsive?: ResponsiveObject[];
30+
rows?: number;
31+
rtl?: boolean;
32+
slide?: string;
33+
slidesPerRow?: number;
34+
slidesToScroll?: number;
35+
slidesToShow?: number;
36+
speed?: number;
37+
swipeToSlide?: boolean;
38+
swipe?: boolean;
39+
touchMove?: boolean;
40+
touchThreshold?: number;
41+
useCSS?: boolean;
42+
useTransform?: boolean;
43+
variableWidth?: boolean;
44+
vertical?: boolean;
45+
verticalSwiping?: boolean;
46+
waitForAnimate?: boolean;
47+
}
48+
export interface ResponsiveObject {
49+
breakpoint: number;
50+
settings: 'unslick' | Settings;
51+
}
752
export declare class Carousel extends AntdComponent {
853
/**
954
* Callback function called after the current index changes
@@ -52,6 +97,8 @@ export declare class Carousel extends AntdComponent {
5297
*/
5398
vertical: boolean;
5499

100+
responsive: ResponsiveObject[];
101+
55102
/**
56103
* Go to slide index, if dontAnimate=true, it happens without animation
57104
* @param slideNumber slide number to go

types/comment.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Project: https://github.com/vueComponent/ant-design-vue
2+
// Definitions: https://github.com/vueComponent/ant-design-vue/types
3+
4+
import { AntdComponent } from './component';
5+
6+
export declare class Comment extends AntdComponent {
7+
/** List of action items rendered below the comment content */
8+
actions?: Array<any>;
9+
/** The element to display as the comment author. */
10+
author?: any;
11+
/** The element to display as the comment avatar - generally an antd Avatar */
12+
avatar?: any;
13+
/** The main content of the comment */
14+
content: any;
15+
/** Comment prefix defaults to '.ant-comment' */
16+
prefixCls?: string;
17+
/** A datetime element containing the time to be displayed */
18+
datetime?: any;
19+
}

0 commit comments

Comments
 (0)