Merge branch 'master' into feat-1.4.0
commit
6f05a983c4
|
@ -65,6 +65,7 @@ export const CarouselProps = {
|
|||
variableWidth: PropTypes.bool,
|
||||
useCSS: PropTypes.bool,
|
||||
slickGoTo: PropTypes.number,
|
||||
responsive: PropTypes.array.def(null),
|
||||
};
|
||||
|
||||
const Carousel = {
|
||||
|
|
|
@ -39,7 +39,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
sVisible: !!this.$props.visible,
|
||||
sVisible: !!this.$props.visible || !!this.$props.defaultVisible,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -31,7 +31,7 @@ const defaultProps = {
|
|||
pauseOnFocus: PropTypes.bool.def(false),
|
||||
// hover是否暂停
|
||||
pauseOnHover: PropTypes.bool.def(true),
|
||||
responsive: PropTypes.any.def(null),
|
||||
responsive: PropTypes.array.def(null),
|
||||
rows: PropTypes.number.def(1),
|
||||
rtl: PropTypes.bool.def(false),
|
||||
slide: PropTypes.string.def('div'),
|
||||
|
|
|
@ -28,7 +28,6 @@ const Header = {
|
|||
currentSelectPanel: PropTypes.string,
|
||||
focusOnOpen: PropTypes.bool,
|
||||
// onKeyDown: PropTypes.func,
|
||||
showStr: PropTypes.bool.def(true),
|
||||
clearIcon: PropTypes.any,
|
||||
},
|
||||
data() {
|
||||
|
@ -70,7 +69,6 @@ const Header = {
|
|||
return;
|
||||
}
|
||||
|
||||
this.showStr = true;
|
||||
this.setState({
|
||||
str,
|
||||
});
|
||||
|
@ -169,14 +167,14 @@ const Header = {
|
|||
},
|
||||
|
||||
getInput() {
|
||||
const { prefixCls, placeholder, inputReadOnly, invalid, str, showStr } = this;
|
||||
const { prefixCls, placeholder, inputReadOnly, invalid, str } = this;
|
||||
const invalidClass = invalid ? `${prefixCls}-input-invalid` : '';
|
||||
return (
|
||||
<input
|
||||
class={`${prefixCls}-input ${invalidClass}`}
|
||||
ref="input"
|
||||
onKeydown={this.onKeyDown}
|
||||
value={showStr ? str : ''}
|
||||
value={str}
|
||||
placeholder={placeholder}
|
||||
onInput={this.onInputChange}
|
||||
readOnly={!!inputReadOnly}
|
||||
|
|
|
@ -71,7 +71,6 @@ const Panel = {
|
|||
sValue: this.value,
|
||||
selectionRange: [],
|
||||
currentSelectPanel: '',
|
||||
showStr: true,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -79,11 +78,6 @@ const Panel = {
|
|||
if (val) {
|
||||
this.setState({
|
||||
sValue: val,
|
||||
showStr: true,
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
showStr: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -150,7 +144,6 @@ const Panel = {
|
|||
inputReadOnly,
|
||||
sValue,
|
||||
currentSelectPanel,
|
||||
showStr,
|
||||
$listeners = {},
|
||||
} = this;
|
||||
const clearIcon = getComponentFromProp(this, 'clearIcon');
|
||||
|
@ -203,7 +196,6 @@ const Panel = {
|
|||
focusOnOpen={focusOnOpen}
|
||||
onKeydown={keydown}
|
||||
inputReadOnly={inputReadOnly}
|
||||
showStr={showStr}
|
||||
clearIcon={clearIcon}
|
||||
/>
|
||||
<Combobox
|
||||
|
|
|
@ -16,6 +16,7 @@ import { Button } from './button/button';
|
|||
import { Calendar } from './calendar';
|
||||
import { Card } from './card';
|
||||
import { Collapse } from './collapse/collapse';
|
||||
import { Comment } from './comment';
|
||||
import { Carousel } from './carousel';
|
||||
import { Cascader } from './cascader';
|
||||
import { Checkbox } from './checkbox/checkbox';
|
||||
|
|
|
@ -4,6 +4,51 @@
|
|||
|
||||
import { AntdComponent } from './component';
|
||||
|
||||
export interface Settings {
|
||||
accessibility?: boolean;
|
||||
adaptiveHeight?: boolean;
|
||||
arrows?: boolean;
|
||||
autoplaySpeed?: number;
|
||||
autoplay?: boolean;
|
||||
centerMode?: boolean;
|
||||
centerPadding?: string;
|
||||
className?: string;
|
||||
cssEase?: string;
|
||||
dotsClass?: string;
|
||||
dots?: boolean;
|
||||
draggable?: boolean;
|
||||
easing?: string;
|
||||
edgeFriction?: number;
|
||||
fade?: boolean;
|
||||
focusOnSelect?: boolean;
|
||||
infinite?: boolean;
|
||||
initialSlide?: number;
|
||||
pauseOnDotsHover?: boolean;
|
||||
pauseOnFocus?: boolean;
|
||||
pauseOnHover?: boolean;
|
||||
responsive?: ResponsiveObject[];
|
||||
rows?: number;
|
||||
rtl?: boolean;
|
||||
slide?: string;
|
||||
slidesPerRow?: number;
|
||||
slidesToScroll?: number;
|
||||
slidesToShow?: number;
|
||||
speed?: number;
|
||||
swipeToSlide?: boolean;
|
||||
swipe?: boolean;
|
||||
touchMove?: boolean;
|
||||
touchThreshold?: number;
|
||||
useCSS?: boolean;
|
||||
useTransform?: boolean;
|
||||
variableWidth?: boolean;
|
||||
vertical?: boolean;
|
||||
verticalSwiping?: boolean;
|
||||
waitForAnimate?: boolean;
|
||||
}
|
||||
export interface ResponsiveObject {
|
||||
breakpoint: number;
|
||||
settings: 'unslick' | Settings;
|
||||
}
|
||||
export declare class Carousel extends AntdComponent {
|
||||
/**
|
||||
* Callback function called after the current index changes
|
||||
|
@ -52,6 +97,8 @@ export declare class Carousel extends AntdComponent {
|
|||
*/
|
||||
vertical: boolean;
|
||||
|
||||
responsive: ResponsiveObject[];
|
||||
|
||||
/**
|
||||
* Go to slide index, if dontAnimate=true, it happens without animation
|
||||
* @param slideNumber slide number to go
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent } from './component';
|
||||
|
||||
export declare class Comment extends AntdComponent {
|
||||
/** List of action items rendered below the comment content */
|
||||
actions?: Array<any>;
|
||||
/** The element to display as the comment author. */
|
||||
author?: any;
|
||||
/** The element to display as the comment avatar - generally an antd Avatar */
|
||||
avatar?: any;
|
||||
/** The main content of the comment */
|
||||
content: any;
|
||||
/** Comment prefix defaults to '.ant-comment' */
|
||||
prefixCls?: string;
|
||||
/** A datetime element containing the time to be displayed */
|
||||
datetime?: any;
|
||||
}
|
Loading…
Reference in New Issue