diff --git a/antdv-demo b/antdv-demo index 42118ce95..21cd58ca9 160000 --- a/antdv-demo +++ b/antdv-demo @@ -1 +1 @@ -Subproject commit 42118ce953ddcaf9a470b5e9c8c9980f01d5c628 +Subproject commit 21cd58ca984d96916ff9c4a2f34bb5e245d9a324 diff --git a/components/page-header/index.jsx b/components/page-header/index.jsx index 5579cf322..a22d0b2ce 100644 --- a/components/page-header/index.jsx +++ b/components/page-header/index.jsx @@ -56,7 +56,12 @@ const renderTitle = (h, prefixCls, instance) => { const subTitle = getComponentFromProp(instance, 'subTitle'); const tags = getComponentFromProp(instance, 'tags'); const extra = getComponentFromProp(instance, 'extra'); - const backIcon = getComponentFromProp(instance, 'backIcon') !== undefined ? getComponentFromProp(instance, 'backIcon') : ; + const backIcon = + getComponentFromProp(instance, 'backIcon') !== undefined ? ( + getComponentFromProp(instance, 'backIcon') + ) : ( + + ); const onBack = instance.$listeners.back; const headingPrefixCls = `${prefixCls}-heading`; if (title || subTitle || tags || extra) { diff --git a/components/tabs/tabs.jsx b/components/tabs/tabs.jsx index 362e5d3c8..4d4677013 100644 --- a/components/tabs/tabs.jsx +++ b/components/tabs/tabs.jsx @@ -49,7 +49,7 @@ export default { methods: { removeTab(targetKey, e) { e.stopPropagation(); - if(isValid(targetKey)) { + if (isValid(targetKey)) { this.$emit('edit', targetKey, 'remove'); } }, diff --git a/components/upload/Upload.jsx b/components/upload/Upload.jsx index 705562bb0..d77f02365 100644 --- a/components/upload/Upload.jsx +++ b/components/upload/Upload.jsx @@ -261,7 +261,7 @@ export default { reject: this.onReject, }, ref: 'uploadRef', - attrs: {...this.$attrs}, + attrs: { ...this.$attrs }, }; const children = this.$slots.default; // Remove id to avoid open by label when trigger is hidden @@ -308,8 +308,6 @@ export default { [`${prefixCls}-disabled`]: disabled, }); - - const uploadButton = (
{children} diff --git a/components/vc-calendar/src/Calendar.jsx b/components/vc-calendar/src/Calendar.jsx index 920008afe..a35888ed2 100644 --- a/components/vc-calendar/src/Calendar.jsx +++ b/components/vc-calendar/src/Calendar.jsx @@ -25,7 +25,11 @@ const Calendar = { name: 'Calendar', props: { locale: PropTypes.object.def(enUs), - format: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.func]), + format: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.arrayOf(PropTypes.string), + PropTypes.func, + ]), visible: PropTypes.bool.def(true), prefixCls: PropTypes.string.def('rc-calendar'), // prefixCls: PropTypes.string, diff --git a/components/vc-calendar/src/RangeCalendar.jsx b/components/vc-calendar/src/RangeCalendar.jsx index c6f22e9b9..f8b273b26 100644 --- a/components/vc-calendar/src/RangeCalendar.jsx +++ b/components/vc-calendar/src/RangeCalendar.jsx @@ -110,7 +110,11 @@ const RangeCalendar = { // onValueChange: PropTypes.func, // onHoverChange: PropTypes.func, // onPanelChange: PropTypes.func, - format: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.func]), + format: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.arrayOf(PropTypes.string), + PropTypes.func, + ]), // onClear: PropTypes.func, type: PropTypes.any.def('both'), disabledDate: PropTypes.func, diff --git a/components/vc-calendar/src/date/DateInput.jsx b/components/vc-calendar/src/date/DateInput.jsx index f6da213f0..b16074681 100644 --- a/components/vc-calendar/src/date/DateInput.jsx +++ b/components/vc-calendar/src/date/DateInput.jsx @@ -16,7 +16,11 @@ const DateInput = { timePicker: PropTypes.object, value: PropTypes.object, disabledTime: PropTypes.any, - format: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.func]), + format: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.arrayOf(PropTypes.string), + PropTypes.func, + ]), locale: PropTypes.object, disabledDate: PropTypes.func, // onChange: PropTypes.func, diff --git a/components/vc-table/src/BaseTable.jsx b/components/vc-table/src/BaseTable.jsx index 0a63b02a6..640a34331 100644 --- a/components/vc-table/src/BaseTable.jsx +++ b/components/vc-table/src/BaseTable.jsx @@ -158,11 +158,11 @@ const BaseTable = { tableStyle.width = typeof tableStyle.width === 'number' ? `${tableStyle.width}px` : tableStyle.width; } - if(fixed) { - const width = columns.reduce((sum, {width: w})=>{ + if (fixed) { + const width = columns.reduce((sum, { width: w }) => { return sum + parseFloat(w, 10); }, 0); - if(width > 0) { + if (width > 0) { tableStyle.width = width + 'px'; } } diff --git a/types/color-picker.d.ts b/types/color-picker.d.ts index bfd393ba7..ba8fedae6 100644 --- a/types/color-picker.d.ts +++ b/types/color-picker.d.ts @@ -6,13 +6,13 @@ import Pickr from '@simonwep/pickr'; export declare class ColorPicker extends AntdComponent { /** simonwep/pickr's options */ - config?:Pickr.Options + config?: Pickr.Options; /**prefix class name */ - prefixCls?: string + prefixCls?: string; /** default color value */ - defaultValue?: string + defaultValue?: string; /** color value */ - value?: string + value?: string; /** * language package setting * @type object @@ -23,7 +23,7 @@ export declare class ColorPicker extends AntdComponent { * @default 0 * @type number * */ - colorRounded?:number + colorRounded?: number; /** * descriptions size type * @default 'default' @@ -42,10 +42,10 @@ export declare class ColorPicker extends AntdComponent { * @default false * @type boolean */ - disabled: boolean + disabled: boolean; /** * to set the color format * @default "HEXA" */ - format: Pickr.Representation + format: Pickr.Representation; } diff --git a/types/message.d.ts b/types/message.d.ts index 46bb4a495..0fe764819 100644 --- a/types/message.d.ts +++ b/types/message.d.ts @@ -2,7 +2,7 @@ // Definitions by: akki-jat // Definitions: https://github.com/vueComponent/ant-design-vue/types -import { VNode, CreateElement } from 'vue' +import { VNode, CreateElement } from 'vue'; export interface ThenableArgument { (val: any): void; @@ -12,7 +12,7 @@ export interface MessageType { then: (fill: ThenableArgument, reject: ThenableArgument) => Promise; promise: Promise; } -export type ConfigType = string | VNode | ((h: CreateElement) => VNode); +export type ConfigType = string | VNode | ((h: CreateElement) => VNode); export type ConfigDuration = number | (() => void); export type ConfigOnClose = () => void; diff --git a/types/table/column.d.ts b/types/table/column.d.ts index fff7e2210..2e4a4ef56 100644 --- a/types/table/column.d.ts +++ b/types/table/column.d.ts @@ -21,16 +21,15 @@ export declare class Column extends AntdComponent { * @type string */ align?: 'left' | 'right' | 'center'; - + /** - * ellipsize cell content, not working with sorter and filters for now. + * ellipsize cell content, not working with sorter and filters for now. * tableLayout would be fixed when ellipsis is true. * @default false * @type boolean */ ellipsis?: boolean; - /** * Span of this column's title * @type number @@ -42,11 +41,11 @@ export declare class Column extends AntdComponent { * @type string */ dataIndex?: string; - + /** - * Default filtered values - * @type string[] - */ + * Default filtered values + * @type string[] + */ defaultFilteredValue?: string[]; /** @@ -130,14 +129,14 @@ export declare class Column extends AntdComponent { * @type boolean | string */ sortOrder?: boolean | SortOrder; - + /** - * supported sort way, could be 'ascend', 'descend' - * @default ['ascend', 'descend'] - * @type string[] - */ + * supported sort way, could be 'ascend', 'descend' + * @default ['ascend', 'descend'] + * @type string[] + */ sortDirections?: string[]; - + /** * Title of this column * @type any (string | slot)