style: fix code format
parent
f5471713f2
commit
76d8491b66
|
@ -212,7 +212,15 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { prefixCls: customizePrefixCls, offsetTop, affix, showInkInFixed, activeLink, $slots, getContainer } = this;
|
const {
|
||||||
|
prefixCls: customizePrefixCls,
|
||||||
|
offsetTop,
|
||||||
|
affix,
|
||||||
|
showInkInFixed,
|
||||||
|
activeLink,
|
||||||
|
$slots,
|
||||||
|
getContainer,
|
||||||
|
} = this;
|
||||||
|
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('anchor', customizePrefixCls);
|
const prefixCls = getPrefixCls('anchor', customizePrefixCls);
|
||||||
|
|
|
@ -81,7 +81,14 @@ const AutoComplete = {
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { size, prefixCls: customizePrefixCls, optionLabelProp, dataSource, $slots, $listeners } = this;
|
const {
|
||||||
|
size,
|
||||||
|
prefixCls: customizePrefixCls,
|
||||||
|
optionLabelProp,
|
||||||
|
dataSource,
|
||||||
|
$slots,
|
||||||
|
$listeners,
|
||||||
|
} = this;
|
||||||
|
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
||||||
|
|
|
@ -68,7 +68,7 @@ describe('Avatar Render', () => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const wrapper = mount(Foo, { sync: false, attachToDocument: true },);
|
const wrapper = mount(Foo, { sync: false, attachToDocument: true });
|
||||||
await asyncExpect(() => {
|
await asyncExpect(() => {
|
||||||
// mock img load Error, since jsdom do not load resource by default
|
// mock img load Error, since jsdom do not load resource by default
|
||||||
// https://github.com/jsdom/jsdom/issues/1816
|
// https://github.com/jsdom/jsdom/issues/1816
|
||||||
|
|
|
@ -151,7 +151,9 @@ export default {
|
||||||
const iconNode = iconType ? <Icon type={iconType} /> : null;
|
const iconNode = iconType ? <Icon type={iconType} /> : null;
|
||||||
const children = filterEmpty($slots.default);
|
const children = filterEmpty($slots.default);
|
||||||
const autoInsertSpace = this.configProvider.autoInsertSpaceInButton !== false;
|
const autoInsertSpace = this.configProvider.autoInsertSpaceInButton !== false;
|
||||||
const kids = children.map(child => this.insertSpace(child, this.isNeedInserted() && autoInsertSpace));
|
const kids = children.map(child =>
|
||||||
|
this.insertSpace(child, this.isNeedInserted() && autoInsertSpace),
|
||||||
|
);
|
||||||
|
|
||||||
if ($attrs.href !== undefined) {
|
if ($attrs.href !== undefined) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -167,7 +167,12 @@ const Calendar = {
|
||||||
if (value && localeCode) {
|
if (value && localeCode) {
|
||||||
value.locale(localeCode);
|
value.locale(localeCode);
|
||||||
}
|
}
|
||||||
const { prefixCls: customizePrefixCls, fullscreen, dateFullCellRender, monthFullCellRender } = props;
|
const {
|
||||||
|
prefixCls: customizePrefixCls,
|
||||||
|
fullscreen,
|
||||||
|
dateFullCellRender,
|
||||||
|
monthFullCellRender,
|
||||||
|
} = props;
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('fullcalendar', customizePrefixCls);
|
const prefixCls = getPrefixCls('fullcalendar', customizePrefixCls);
|
||||||
const type = mode === 'year' ? 'month' : 'date';
|
const type = mode === 'year' ? 'month' : 'date';
|
||||||
|
|
|
@ -136,7 +136,6 @@ const Carousel = {
|
||||||
props.fade = true;
|
props.fade = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
let className = getPrefixCls('carousel', props.prefixCls);
|
let className = getPrefixCls('carousel', props.prefixCls);
|
||||||
|
|
||||||
|
|
|
@ -380,10 +380,9 @@ const Cascader = {
|
||||||
...otherProps
|
...otherProps
|
||||||
} = props;
|
} = props;
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const renderEmpty = (
|
const renderEmpty =
|
||||||
this.configProvider.renderEmpty &&
|
(this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
|
||||||
this.configProvider.renderEmpty()
|
ConfigConsumerProps.renderEmpty;
|
||||||
) || ConfigConsumerProps.renderEmpty;
|
|
||||||
const prefixCls = getPrefixCls('cascader', customizePrefixCls);
|
const prefixCls = getPrefixCls('cascader', customizePrefixCls);
|
||||||
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import animation from '../_util/openAnimation';
|
import animation from '../_util/openAnimation';
|
||||||
import { getOptionProps, initDefaultProps, getComponentFromProp, isValidElement } from '../_util/props-util';
|
import {
|
||||||
|
getOptionProps,
|
||||||
|
initDefaultProps,
|
||||||
|
getComponentFromProp,
|
||||||
|
isValidElement,
|
||||||
|
} from '../_util/props-util';
|
||||||
import { cloneElement } from '../_util/vnode';
|
import { cloneElement } from '../_util/vnode';
|
||||||
import VcCollapse, { collapseProps } from '../vc-collapse';
|
import VcCollapse, { collapseProps } from '../vc-collapse';
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
|
@ -22,7 +27,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
renderExpandIcon(panelProps, prefixCls) {
|
renderExpandIcon(panelProps, prefixCls) {
|
||||||
const expandIcon = getComponentFromProp(this, 'expandIcon', panelProps);
|
const expandIcon = getComponentFromProp(this, 'expandIcon', panelProps);
|
||||||
const icon = expandIcon || <Icon type="right" rotate={panelProps.isActive ? 90 : undefined} />;
|
const icon = expandIcon || (
|
||||||
|
<Icon type="right" rotate={panelProps.isActive ? 90 : undefined} />
|
||||||
|
);
|
||||||
return isValidElement(expandIcon ? icon[0] : icon)
|
return isValidElement(expandIcon ? icon[0] : icon)
|
||||||
? cloneElement(icon, {
|
? cloneElement(icon, {
|
||||||
class: `${prefixCls}-arrow`,
|
class: `${prefixCls}-arrow`,
|
||||||
|
@ -42,7 +49,7 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
...getOptionProps(this),
|
...getOptionProps(this),
|
||||||
prefixCls,
|
prefixCls,
|
||||||
expandIcon: (panelProps) => this.renderExpandIcon(panelProps, prefixCls),
|
expandIcon: panelProps => this.renderExpandIcon(panelProps, prefixCls),
|
||||||
},
|
},
|
||||||
class: collapseClassName,
|
class: collapseClassName,
|
||||||
on: $listeners,
|
on: $listeners,
|
||||||
|
|
|
@ -38,11 +38,7 @@ const ConfigProvider = {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
...getWatch([
|
...getWatch(['prefixCls', 'csp', 'autoInsertSpaceInButton']),
|
||||||
'prefixCls',
|
|
||||||
'csp',
|
|
||||||
'autoInsertSpaceInButton',
|
|
||||||
]),
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
renderEmptyComponent() {
|
renderEmptyComponent() {
|
||||||
|
|
|
@ -14,7 +14,8 @@ const RenderEmpty = {
|
||||||
render(createElement, context) {
|
render(createElement, context) {
|
||||||
const { props, injections } = context;
|
const { props, injections } = context;
|
||||||
function renderHtml(componentName) {
|
function renderHtml(componentName) {
|
||||||
const getPrefixCls = injections.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls =
|
||||||
|
injections.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefix = getPrefixCls('empty');
|
const prefix = getPrefixCls('empty');
|
||||||
switch (componentName) {
|
switch (componentName) {
|
||||||
case 'Table':
|
case 'Table':
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps }
|
||||||
const DatePicker = wrapPicker(
|
const DatePicker = wrapPicker(
|
||||||
{ ...createPicker(VcCalendar, DatePickerProps()), name: 'ADatePicker' },
|
{ ...createPicker(VcCalendar, DatePickerProps()), name: 'ADatePicker' },
|
||||||
DatePickerProps(),
|
DatePickerProps(),
|
||||||
'date'
|
'date',
|
||||||
);
|
);
|
||||||
|
|
||||||
const MonthPicker = wrapPicker(
|
const MonthPicker = wrapPicker(
|
||||||
|
|
|
@ -142,9 +142,7 @@ const Drawer = {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
this.destroyClose = false;
|
this.destroyClose = false;
|
||||||
const {
|
const { placement } = this.$props;
|
||||||
placement,
|
|
||||||
} = this.$props;
|
|
||||||
|
|
||||||
const containerStyle =
|
const containerStyle =
|
||||||
placement === 'left' || placement === 'right'
|
placement === 'left' || placement === 'right'
|
||||||
|
@ -179,8 +177,12 @@ const Drawer = {
|
||||||
const props = getOptionProps(this);
|
const props = getOptionProps(this);
|
||||||
const {
|
const {
|
||||||
prefixCls: customizePrefixCls,
|
prefixCls: customizePrefixCls,
|
||||||
width, height, visible,
|
width,
|
||||||
placement, wrapClassName, ...rest
|
height,
|
||||||
|
visible,
|
||||||
|
placement,
|
||||||
|
wrapClassName,
|
||||||
|
...rest
|
||||||
} = props;
|
} = props;
|
||||||
const haveMask = rest.mask ? '' : 'no-mask';
|
const haveMask = rest.mask ? '' : 'no-mask';
|
||||||
const offsetStyle = {};
|
const offsetStyle = {};
|
||||||
|
|
|
@ -73,7 +73,13 @@ export default {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ButtonGroup {...restProps} class={prefixCls}>
|
<ButtonGroup {...restProps} class={prefixCls}>
|
||||||
<Button type={type} disabled={disabled} onClick={this.onClick} htmlType={htmlType} href={href}>
|
<Button
|
||||||
|
type={type}
|
||||||
|
disabled={disabled}
|
||||||
|
onClick={this.onClick}
|
||||||
|
htmlType={htmlType}
|
||||||
|
href={href}
|
||||||
|
>
|
||||||
{this.$slots.default}
|
{this.$slots.default}
|
||||||
</Button>
|
</Button>
|
||||||
<Dropdown {...dropdownProps}>
|
<Dropdown {...dropdownProps}>
|
||||||
|
|
|
@ -25,10 +25,7 @@ const Empty = {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
renderEmpty(contentLocale) {
|
renderEmpty(contentLocale) {
|
||||||
const {
|
const { prefixCls: customizePrefixCls, ...restProps } = this.$props;
|
||||||
prefixCls: customizePrefixCls,
|
|
||||||
...restProps
|
|
||||||
} = this.$props;
|
|
||||||
const prefixCls = ConfigConsumerProps.getPrefixCls('empty', customizePrefixCls);
|
const prefixCls = ConfigConsumerProps.getPrefixCls('empty', customizePrefixCls);
|
||||||
const image = getComponentFromProp(this, 'image');
|
const image = getComponentFromProp(this, 'image');
|
||||||
const description = getComponentFromProp(this, 'description');
|
const description = getComponentFromProp(this, 'description');
|
||||||
|
@ -57,9 +54,7 @@ const Empty = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
return (
|
return <LocaleReceiver componentName="Empty" scopedSlots={{ default: this.renderEmpty }} />;
|
||||||
<LocaleReceiver componentName="Empty" scopedSlots={{ default: this.renderEmpty }} />
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -407,7 +407,7 @@ export default {
|
||||||
prefixCls,
|
prefixCls,
|
||||||
this.slotDefault,
|
this.slotDefault,
|
||||||
this.renderHelp(prefixCls),
|
this.renderHelp(prefixCls),
|
||||||
this.renderExtra(prefixCls)
|
this.renderExtra(prefixCls),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
|
@ -121,7 +121,7 @@ function renderIcon(h, locale, context) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let iconTabIndex = tabIndex;
|
let iconTabIndex = tabIndex;
|
||||||
if (iconTabIndex === undefined && ('click' in listeners)) {
|
if (iconTabIndex === undefined && 'click' in listeners) {
|
||||||
iconTabIndex = -1;
|
iconTabIndex = -1;
|
||||||
}
|
}
|
||||||
const { attrs, ...restDataProps } = data;
|
const { attrs, ...restDataProps } = data;
|
||||||
|
@ -158,7 +158,7 @@ const Icon = {
|
||||||
return (
|
return (
|
||||||
<LocaleReceiver
|
<LocaleReceiver
|
||||||
componentName="Icon"
|
componentName="Icon"
|
||||||
scopedSlots={{ default: (locale) => renderIcon(h, locale, context) }}
|
scopedSlots={{ default: locale => renderIcon(h, locale, context) }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default {
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
[iconTrigger]: this.onChange,
|
[iconTrigger]: this.onChange,
|
||||||
onMouseDown: (e) => {
|
onMouseDown: e => {
|
||||||
// Prevent focused state lost
|
// Prevent focused state lost
|
||||||
// https://github.com/ant-design/ant-design/issues/15173
|
// https://github.com/ant-design/ant-design/issues/15173
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -60,14 +60,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { prefixCls, inputPrefixCls, size, suffix, visibilityToggle, ...restProps } = this.$props;
|
||||||
prefixCls,
|
|
||||||
inputPrefixCls,
|
|
||||||
size,
|
|
||||||
suffix,
|
|
||||||
visibilityToggle,
|
|
||||||
...restProps
|
|
||||||
} = this.$props;
|
|
||||||
const suffixIcon = visibilityToggle && this.getIcon();
|
const suffixIcon = visibilityToggle && this.getIcon();
|
||||||
const inputClassName = classNames(prefixCls, {
|
const inputClassName = classNames(prefixCls, {
|
||||||
[`${prefixCls}-${size}`]: !!size,
|
[`${prefixCls}-${size}`]: !!size,
|
||||||
|
|
|
@ -47,12 +47,7 @@ export default {
|
||||||
if (enterButton) return suffix;
|
if (enterButton) return suffix;
|
||||||
|
|
||||||
const node = (
|
const node = (
|
||||||
<Icon
|
<Icon class={`${prefixCls}-icon`} type="search" key="searchIcon" onClick={this.onSearch} />
|
||||||
class={`${prefixCls}-icon`}
|
|
||||||
type="search"
|
|
||||||
key="searchIcon"
|
|
||||||
onClick={this.onSearch}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (suffix) {
|
if (suffix) {
|
||||||
|
|
|
@ -179,7 +179,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { prefixCls: customizePrefixCls, theme, collapsible, reverseArrow, width, collapsedWidth } = getOptionProps(this);
|
const {
|
||||||
|
prefixCls: customizePrefixCls,
|
||||||
|
theme,
|
||||||
|
collapsible,
|
||||||
|
reverseArrow,
|
||||||
|
width,
|
||||||
|
collapsedWidth,
|
||||||
|
} = getOptionProps(this);
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('layout-sider', customizePrefixCls);
|
const prefixCls = getPrefixCls('layout-sider', customizePrefixCls);
|
||||||
|
|
||||||
|
@ -190,9 +197,12 @@ export default {
|
||||||
// special trigger when collapsedWidth == 0
|
// special trigger when collapsedWidth == 0
|
||||||
const zeroWidthTrigger =
|
const zeroWidthTrigger =
|
||||||
parseFloat(String(collapsedWidth || 0)) === 0 ? (
|
parseFloat(String(collapsedWidth || 0)) === 0 ? (
|
||||||
<span onClick={this.toggle} class={`${prefixCls}-zero-width-trigger ${prefixCls}-zero-width-trigger-${
|
<span
|
||||||
|
onClick={this.toggle}
|
||||||
|
class={`${prefixCls}-zero-width-trigger ${prefixCls}-zero-width-trigger-${
|
||||||
reverseArrow ? 'right' : 'left'
|
reverseArrow ? 'right' : 'left'
|
||||||
}`}>
|
}`}
|
||||||
|
>
|
||||||
<Icon type="bars" />
|
<Icon type="bars" />
|
||||||
</span>
|
</span>
|
||||||
) : null;
|
) : null;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { Col } from '../grid';
|
||||||
import { ConfigConsumerProps } from '../config-provider';
|
import { ConfigConsumerProps } from '../config-provider';
|
||||||
import { ListGridType } from './index';
|
import { ListGridType } from './index';
|
||||||
|
|
||||||
|
|
||||||
export const ListItemProps = {
|
export const ListItemProps = {
|
||||||
prefixCls: PropTypes.string,
|
prefixCls: PropTypes.string,
|
||||||
extra: PropTypes.any,
|
extra: PropTypes.any,
|
||||||
|
|
|
@ -222,10 +222,9 @@ const List = {
|
||||||
|
|
||||||
childrenContent = grid ? <Row gutter={grid.gutter}>{childrenList}</Row> : childrenList;
|
childrenContent = grid ? <Row gutter={grid.gutter}>{childrenList}</Row> : childrenList;
|
||||||
} else if (!children.length && !isLoading) {
|
} else if (!children.length && !isLoading) {
|
||||||
const renderEmpty = (
|
const renderEmpty =
|
||||||
this.configProvider.renderEmpty &&
|
(this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
|
||||||
this.configProvider.renderEmpty()
|
ConfigConsumerProps.renderEmpty;
|
||||||
) || ConfigConsumerProps.renderEmpty;
|
|
||||||
childrenContent = this.renderEmpty(prefixCls, renderEmpty);
|
childrenContent = this.renderEmpty(prefixCls, renderEmpty);
|
||||||
}
|
}
|
||||||
const paginationPosition = paginationProps.position || 'bottom';
|
const paginationPosition = paginationProps.position || 'bottom';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import Icon from '../icon';
|
||||||
const info = function(props) {
|
const info = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
icon: (h) => {
|
icon: h => {
|
||||||
return <Icon type="info-circle" />;
|
return <Icon type="info-circle" />;
|
||||||
},
|
},
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
|
@ -20,7 +20,7 @@ const info = function(props) {
|
||||||
const success = function(props) {
|
const success = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
icon: (h) => {
|
icon: h => {
|
||||||
return <Icon type="check-circle" />;
|
return <Icon type="check-circle" />;
|
||||||
},
|
},
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
|
@ -32,7 +32,7 @@ const success = function(props) {
|
||||||
const error = function(props) {
|
const error = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
icon: (h) => {
|
icon: h => {
|
||||||
return <Icon type="close-circle" />;
|
return <Icon type="close-circle" />;
|
||||||
},
|
},
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
|
@ -44,7 +44,7 @@ const error = function(props) {
|
||||||
const warning = function(props) {
|
const warning = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: (h) => {
|
icon: h => {
|
||||||
return <Icon type="exclamation-circle" />;
|
return <Icon type="exclamation-circle" />;
|
||||||
},
|
},
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
|
|
|
@ -144,7 +144,9 @@ const Popconfirm = {
|
||||||
<LocaleReceiver
|
<LocaleReceiver
|
||||||
componentName="Popconfirm"
|
componentName="Popconfirm"
|
||||||
defaultLocale={defaultLocale.Popconfirm}
|
defaultLocale={defaultLocale.Popconfirm}
|
||||||
scopedSlots={{ default: (popconfirmLocale) => this.renderOverlay(prefixCls, popconfirmLocale) }}
|
scopedSlots={{
|
||||||
|
default: popconfirmLocale => this.renderOverlay(prefixCls, popconfirmLocale),
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -93,8 +93,8 @@ export default {
|
||||||
const prefixCls = getPrefixCls('progress', customizePrefixCls);
|
const prefixCls = getPrefixCls('progress', customizePrefixCls);
|
||||||
|
|
||||||
const progressStatus =
|
const progressStatus =
|
||||||
parseInt(successPercent !== undefined ? successPercent.toString() : percent.toString(), 10) >= 100 &&
|
parseInt(successPercent !== undefined ? successPercent.toString() : percent.toString(), 10) >=
|
||||||
!('status' in props)
|
100 && !('status' in props)
|
||||||
? 'success'
|
? 'success'
|
||||||
: status || 'normal';
|
: status || 'normal';
|
||||||
let progress;
|
let progress;
|
||||||
|
@ -108,11 +108,7 @@ export default {
|
||||||
prefixCls,
|
prefixCls,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
progress = (
|
progress = <Line {...lineProps}>{progressInfo}</Line>;
|
||||||
<Line {...lineProps}>
|
|
||||||
{progressInfo}
|
|
||||||
</Line>
|
|
||||||
);
|
|
||||||
} else if (type === 'circle' || type === 'dashboard') {
|
} else if (type === 'circle' || type === 'dashboard') {
|
||||||
const circleProps = {
|
const circleProps = {
|
||||||
props: {
|
props: {
|
||||||
|
@ -121,11 +117,7 @@ export default {
|
||||||
progressStatus,
|
progressStatus,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
progress = (
|
progress = <Circle {...circleProps}>{progressInfo}</Circle>;
|
||||||
<Circle {...circleProps}>
|
|
||||||
{progressInfo}
|
|
||||||
</Circle>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const classString = classNames(prefixCls, {
|
const classString = classNames(prefixCls, {
|
||||||
|
|
|
@ -5,4 +5,4 @@ export function validProgress(progress) {
|
||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
return progress;
|
return progress;
|
||||||
};
|
}
|
||||||
|
|
|
@ -19,10 +19,13 @@ export default {
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('radio-button', customizePrefixCls);
|
const prefixCls = getPrefixCls('radio-button', customizePrefixCls);
|
||||||
|
|
||||||
const radioProps = { props: {
|
const radioProps = {
|
||||||
|
props: {
|
||||||
...otherProps,
|
...otherProps,
|
||||||
prefixCls,
|
prefixCls,
|
||||||
}, on: { ...this.$listeners } };
|
},
|
||||||
|
on: { ...this.$listeners },
|
||||||
|
};
|
||||||
if (this.radioGroupContext) {
|
if (this.radioGroupContext) {
|
||||||
radioProps.on.change = this.radioGroupContext.onRadioChange;
|
radioProps.on.change = this.radioGroupContext.onRadioChange;
|
||||||
radioProps.props.checked = this.$props.value === this.radioGroupContext.stateValue;
|
radioProps.props.checked = this.$props.value === this.radioGroupContext.stateValue;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import omit from 'omit.js';
|
import omit from 'omit.js';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import { getOptionProps, getComponentFromProp } from '../_util/props-util';
|
import { getOptionProps, getComponentFromProp } from '../_util/props-util';
|
||||||
|
|
|
@ -165,10 +165,9 @@ const Select = {
|
||||||
} = getOptionProps(this);
|
} = getOptionProps(this);
|
||||||
|
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const renderEmpty = (
|
const renderEmpty =
|
||||||
this.configProvider.renderEmpty &&
|
(this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
|
||||||
this.configProvider.renderEmpty()
|
ConfigConsumerProps.renderEmpty;
|
||||||
) || ConfigConsumerProps.renderEmpty;
|
|
||||||
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
||||||
|
|
||||||
const { getPopupContainer: getContextPopupContainer } = this.configProvider;
|
const { getPopupContainer: getContextPopupContainer } = this.configProvider;
|
||||||
|
|
|
@ -556,7 +556,7 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-shadow: 0 0.1px 0, 0.1px 0 0, 0 -0.1px 0, -0.1px 0;
|
text-shadow: 0 0.1px 0, 0.1px 0 0, 0 -0.1px 0, -0.1px 0;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
transition: all .2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover .@{select-prefix-cls}-selected-icon {
|
&:hover .@{select-prefix-cls}-selected-icon {
|
||||||
|
|
|
@ -117,7 +117,13 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render(h) {
|
render(h) {
|
||||||
const { size, prefixCls: customizePrefixCls, tip, wrapperClassName, ...restProps } = this.$props;
|
const {
|
||||||
|
size,
|
||||||
|
prefixCls: customizePrefixCls,
|
||||||
|
tip,
|
||||||
|
wrapperClassName,
|
||||||
|
...restProps
|
||||||
|
} = this.$props;
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('spin', customizePrefixCls);
|
const prefixCls = getPrefixCls('spin', customizePrefixCls);
|
||||||
|
|
||||||
|
|
|
@ -30,12 +30,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { prefixCls: customizePrefixCls, value = 0, valueStyle, valueRender } = this.$props;
|
||||||
prefixCls: customizePrefixCls,
|
|
||||||
value = 0,
|
|
||||||
valueStyle,
|
|
||||||
valueRender,
|
|
||||||
} = this.$props;
|
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
|
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
|
||||||
|
|
||||||
|
|
|
@ -14,16 +14,26 @@ exports[`renders ./components/statistic/demo/basic.md correctly 1`] = `
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/statistic/demo/card.md correctly 1`] = `
|
exports[`renders ./components/statistic/demo/card.md correctly 1`] = `
|
||||||
<div>
|
<div style="background: rgb(236, 236, 236); padding: 30px;">
|
||||||
<div class="ant-card ant-card-bordered" style="padding: 30px;">
|
<div class="ant-row" style="margin-left: -8px; margin-right: -8px;">
|
||||||
|
<div class="ant-col-12" style="padding-left: 8px; padding-right: 8px;">
|
||||||
|
<div class="ant-card ant-card-bordered">
|
||||||
<div class="ant-card-body">
|
<div class="ant-card-body">
|
||||||
<div class="ant-statistic" style="margin-right: 50px;">
|
<div class="ant-statistic" style="margin-right: 50px;">
|
||||||
<div class="ant-statistic-title">Feedback</div>
|
<div class="ant-statistic-title">Feedback</div>
|
||||||
<div class="ant-statistic-content"><span class="ant-statistic-content-prefix"><i slot="prefix" aria-label="icon: like" class="anticon anticon-like"><svg viewBox="64 64 896 896" data-icon="like" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 0 0-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 0 0 471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 0 1 6.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 0 1 6.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 0 1 6.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0 1 42.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"></path></svg></i></span><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">1,128</span></span></div>
|
<div class="ant-statistic-content" style="color: rgb(63, 134, 0);"><span class="ant-statistic-content-prefix"><i aria-label="icon: arrow-up" class="anticon anticon-arrow-up"><svg viewBox="64 64 896 896" data-icon="arrow-up" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M868 545.5L536.1 163a31.96 31.96 0 0 0-48.3 0L156 545.5a7.97 7.97 0 0 0 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"></path></svg></i></span><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">11</span><span class="ant-statistic-content-value-decimal">.28</span></span><span class="ant-statistic-content-suffix">%</span></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ant-col-12" style="padding-left: 8px; padding-right: 8px;">
|
||||||
|
<div class="ant-card ant-card-bordered">
|
||||||
|
<div class="ant-card-body">
|
||||||
<div class="ant-statistic" valueclass="demo-class">
|
<div class="ant-statistic" valueclass="demo-class">
|
||||||
<div class="ant-statistic-title">Unmerged</div>
|
<div class="ant-statistic-title">Idle</div>
|
||||||
<div class="ant-statistic-content"><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">1,234,567,890</span></span><span class="ant-statistic-content-suffix"><span> / 100</span></span></div>
|
<div class="ant-statistic-content" style="color: rgb(207, 19, 34);"><span class="ant-statistic-content-prefix"><i aria-label="icon: arrow-down" class="anticon anticon-arrow-down"><svg viewBox="64 64 896 896" data-icon="arrow-down" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0 0 48.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"></path></svg></i></span><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">9</span><span class="ant-statistic-content-value-decimal">.30</span></span><span class="ant-statistic-content-suffix">%</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,27 +41,41 @@ exports[`renders ./components/statistic/demo/card.md correctly 1`] = `
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/statistic/demo/countdown.md correctly 1`] = `
|
exports[`renders ./components/statistic/demo/countdown.md correctly 1`] = `
|
||||||
<div>
|
<div class="ant-row" style="margin-left: -8px; margin-right: -8px;">
|
||||||
|
<div class="ant-col-12" style="padding-left: 8px; padding-right: 8px;">
|
||||||
<div class="ant-statistic" style="margin-right: 50px;">
|
<div class="ant-statistic" style="margin-right: 50px;">
|
||||||
<div class="ant-statistic-title">Countdown</div>
|
<div class="ant-statistic-title">Countdown</div>
|
||||||
<div class="ant-statistic-content"><span class="ant-statistic-content-value">48:00:30</span></div>
|
<div class="ant-statistic-content"><span class="ant-statistic-content-value">48:00:30</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-statistic">
|
</div>
|
||||||
|
<div class="ant-col-12" style="padding-left: 8px; padding-right: 8px;">
|
||||||
|
<div class="ant-statistic" style="margin-right: 50px;">
|
||||||
<div class="ant-statistic-title">Million Seconds</div>
|
<div class="ant-statistic-title">Million Seconds</div>
|
||||||
<div class="ant-statistic-content"><span class="ant-statistic-content-value">48:00:30:000</span></div>
|
<div class="ant-statistic-content"><span class="ant-statistic-content-value">48:00:30:000</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ant-col-24" style="padding-left: 8px; padding-right: 8px; margin-top: 32px;">
|
||||||
|
<div class="ant-statistic">
|
||||||
|
<div class="ant-statistic-title">Day Level</div>
|
||||||
|
<div class="ant-statistic-content"><span class="ant-statistic-content-value">2 天 0 时 0 分 30 秒</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/statistic/demo/unit.md correctly 1`] = `
|
exports[`renders ./components/statistic/demo/unit.md correctly 1`] = `
|
||||||
<div>
|
<div class="ant-row" style="margin-left: -8px; margin-right: -8px;">
|
||||||
|
<div class="ant-col-12" style="padding-left: 8px; padding-right: 8px;">
|
||||||
<div class="ant-statistic" style="margin-right: 50px;">
|
<div class="ant-statistic" style="margin-right: 50px;">
|
||||||
<div class="ant-statistic-title">Feedback</div>
|
<div class="ant-statistic-title">Feedback</div>
|
||||||
<div class="ant-statistic-content" style="color: rgb(63, 134, 0);"><span class="ant-statistic-content-prefix"><i slot="prefix" aria-label="icon: arrow-up" class="anticon anticon-arrow-up"><svg viewBox="64 64 896 896" data-icon="arrow-up" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M868 545.5L536.1 163a31.96 31.96 0 0 0-48.3 0L156 545.5a7.97 7.97 0 0 0 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"></path></svg></i></span><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">11</span><span class="ant-statistic-content-value-decimal">.28</span></span><span class="ant-statistic-content-suffix">%</span></div>
|
<div class="ant-statistic-content"><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">1,128</span></span><span class="ant-statistic-content-suffix"><i aria-label="icon: like" class="anticon anticon-like"><svg viewBox="64 64 896 896" data-icon="like" width="1em" height="1em" fill="currentColor" aria-hidden="true" class=""><path d="M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 0 0-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 0 0 471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 0 1 6.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 0 1 6.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 0 1 6.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0 1 42.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"></path></svg></i></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ant-col-12" style="padding-left: 8px; padding-right: 8px;">
|
||||||
<div class="ant-statistic" valueclass="demo-class">
|
<div class="ant-statistic" valueclass="demo-class">
|
||||||
<div class="ant-statistic-title">Unmerged</div>
|
<div class="ant-statistic-title">Unmerged</div>
|
||||||
<div class="ant-statistic-content"><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">78</span></span><span class="ant-statistic-content-suffix"><span> / 100</span></span></div>
|
<div class="ant-statistic-content"><span class="ant-statistic-content-value"><span class="ant-statistic-content-value-int">93</span></span><span class="ant-statistic-content-suffix"><span> / 100</span></span></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
@body-background: #fff;
|
@body-background: #fff;
|
||||||
// Base background color for most components
|
// Base background color for most components
|
||||||
@component-background: #fff;
|
@component-background: #fff;
|
||||||
@font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
|
@font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
|
||||||
'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif,
|
'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
||||||
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||||
@code-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
@code-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||||
@heading-color: fade(@black, 85%);
|
@heading-color: fade(@black, 85%);
|
||||||
@text-color: fade(@black, 65%);
|
@text-color: fade(@black, 65%);
|
||||||
|
|
|
@ -37,7 +37,9 @@ const Switch = {
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { prefixCls: customizePrefixCls, size, loading, disabled, ...restProps } = getOptionProps(this);
|
const { prefixCls: customizePrefixCls, size, loading, disabled, ...restProps } = getOptionProps(
|
||||||
|
this,
|
||||||
|
);
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
||||||
|
|
||||||
|
|
|
@ -869,10 +869,7 @@ export default {
|
||||||
[`${prefixCls}-column-sort`]: isSortColumn && sortOrder,
|
[`${prefixCls}-column-sort`]: isSortColumn && sortOrder,
|
||||||
}),
|
}),
|
||||||
title: [
|
title: [
|
||||||
<div
|
<div key="title" class={sortButton ? `${prefixCls}-column-sorters` : undefined}>
|
||||||
key="title"
|
|
||||||
class={sortButton ? `${prefixCls}-column-sorters` : undefined}
|
|
||||||
>
|
|
||||||
{this.renderColumnTitle(column.title)}
|
{this.renderColumnTitle(column.title)}
|
||||||
{sortButton}
|
{sortButton}
|
||||||
</div>,
|
</div>,
|
||||||
|
@ -1151,10 +1148,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const { prefixCls: customizePrefixCls, dropdownPrefixCls: customizeDropdownPrefixCls } = this;
|
||||||
prefixCls: customizePrefixCls,
|
|
||||||
dropdownPrefixCls: customizeDropdownPrefixCls,
|
|
||||||
} = this;
|
|
||||||
const data = this.getCurrentPageData();
|
const data = this.getCurrentPageData();
|
||||||
|
|
||||||
let loading = this.loading;
|
let loading = this.loading;
|
||||||
|
@ -1170,10 +1164,9 @@ export default {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const renderEmpty = (
|
const renderEmpty =
|
||||||
this.configProvider.renderEmpty &&
|
(this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
|
||||||
this.configProvider.renderEmpty()
|
ConfigConsumerProps.renderEmpty;
|
||||||
) || ConfigConsumerProps.renderEmpty;
|
|
||||||
|
|
||||||
const prefixCls = getPrefixCls('table', customizePrefixCls);
|
const prefixCls = getPrefixCls('table', customizePrefixCls);
|
||||||
const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
|
const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
|
||||||
|
@ -1182,7 +1175,9 @@ export default {
|
||||||
<LocaleReceiver
|
<LocaleReceiver
|
||||||
componentName="Table"
|
componentName="Table"
|
||||||
defaultLocale={defaultLocale.Table}
|
defaultLocale={defaultLocale.Table}
|
||||||
children={locale => this.renderTable(prefixCls, renderEmpty, dropdownPrefixCls, locale, loading)}
|
children={locale =>
|
||||||
|
this.renderTable(prefixCls, renderEmpty, dropdownPrefixCls, locale, loading)
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,9 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const menus = filterDropdown ? (
|
const menus = filterDropdown ? (
|
||||||
<FilterDropdownMenuWrapper class={`${prefixCls}-dropdown`}>{filterDropdown}</FilterDropdownMenuWrapper>
|
<FilterDropdownMenuWrapper class={`${prefixCls}-dropdown`}>
|
||||||
|
{filterDropdown}
|
||||||
|
</FilterDropdownMenuWrapper>
|
||||||
) : (
|
) : (
|
||||||
<FilterDropdownMenuWrapper class={`${prefixCls}-dropdown`}>
|
<FilterDropdownMenuWrapper class={`${prefixCls}-dropdown`}>
|
||||||
<Menu
|
<Menu
|
||||||
|
|
|
@ -43,14 +43,11 @@ describe('TimePicker', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('not render clean icon when allowClear is false', () => {
|
it('not render clean icon when allowClear is false', () => {
|
||||||
const wrapper = mount(
|
const wrapper = mount({
|
||||||
{
|
|
||||||
render() {
|
render() {
|
||||||
return <TimePicker defaultValue={moment('2000-01-01 00:00:00')} allowClear={false} />;
|
return <TimePicker defaultValue={moment('2000-01-01 00:00:00')} allowClear={false} />;
|
||||||
},
|
},
|
||||||
}
|
});
|
||||||
);
|
|
||||||
expect(wrapper.html()).toMatchSnapshot();
|
expect(wrapper.html()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -175,12 +175,7 @@ const TimePicker = {
|
||||||
let props = getOptionProps(this);
|
let props = getOptionProps(this);
|
||||||
props = omit(props, ['defaultValue', 'suffixIcon', 'allowEmpty', 'allowClear']);
|
props = omit(props, ['defaultValue', 'suffixIcon', 'allowEmpty', 'allowClear']);
|
||||||
|
|
||||||
const {
|
const { prefixCls: customizePrefixCls, getPopupContainer, placeholder, size } = props;
|
||||||
prefixCls: customizePrefixCls,
|
|
||||||
getPopupContainer,
|
|
||||||
placeholder,
|
|
||||||
size,
|
|
||||||
} = props;
|
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('time-picker', customizePrefixCls);
|
const prefixCls = getPrefixCls('time-picker', customizePrefixCls);
|
||||||
|
|
||||||
|
|
|
@ -348,10 +348,9 @@ const Transfer = {
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('transfer', customizePrefixCls);
|
const prefixCls = getPrefixCls('transfer', customizePrefixCls);
|
||||||
|
|
||||||
const renderEmpty = (
|
const renderEmpty =
|
||||||
this.configProvider.renderEmpty &&
|
(this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
|
||||||
this.configProvider.renderEmpty()
|
ConfigConsumerProps.renderEmpty;
|
||||||
) || ConfigConsumerProps.renderEmpty;
|
|
||||||
const locale = this.getLocale(transferLocale, renderEmpty);
|
const locale = this.getLocale(transferLocale, renderEmpty);
|
||||||
const {
|
const {
|
||||||
leftFilter,
|
leftFilter,
|
||||||
|
|
|
@ -243,8 +243,7 @@ export default {
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{search}
|
{search}
|
||||||
{
|
{!searchNotFound && (
|
||||||
!searchNotFound &&
|
|
||||||
<transition-group
|
<transition-group
|
||||||
{...transitionProps}
|
{...transitionProps}
|
||||||
tag="ul"
|
tag="ul"
|
||||||
|
@ -253,7 +252,7 @@ export default {
|
||||||
>
|
>
|
||||||
{showItems}
|
{showItems}
|
||||||
</transition-group>
|
</transition-group>
|
||||||
}
|
)}
|
||||||
{searchNotFound}
|
{searchNotFound}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -97,10 +97,9 @@ const TreeSelect = {
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
||||||
|
|
||||||
const renderEmpty = (
|
const renderEmpty =
|
||||||
this.configProvider.renderEmpty &&
|
(this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
|
||||||
this.configProvider.renderEmpty()
|
ConfigConsumerProps.renderEmpty;
|
||||||
) || ConfigConsumerProps.renderEmpty;
|
|
||||||
const notFoundContent = getComponentFromProp(this, 'notFoundContent');
|
const notFoundContent = getComponentFromProp(this, 'notFoundContent');
|
||||||
const { getPopupContainer: getContextPopupContainer } = this.configProvider;
|
const { getPopupContainer: getContextPopupContainer } = this.configProvider;
|
||||||
const rest = omit(restProps, [
|
const rest = omit(restProps, [
|
||||||
|
@ -133,12 +132,10 @@ const TreeSelect = {
|
||||||
|
|
||||||
const removeIcon = <Icon type="close" class={`${prefixCls}-remove-icon`} />;
|
const removeIcon = <Icon type="close" class={`${prefixCls}-remove-icon`} />;
|
||||||
|
|
||||||
const clearIcon = (
|
const clearIcon = <Icon type="close-circle" class={`${prefixCls}-clear-icon`} theme="filled" />;
|
||||||
<Icon type="close-circle" class={`${prefixCls}-clear-icon`} theme="filled" />
|
|
||||||
);
|
|
||||||
const VcTreeSelectProps = {
|
const VcTreeSelectProps = {
|
||||||
props: {
|
props: {
|
||||||
switcherIcon: (nodeProps) => this.renderSwitcherIcon(prefixCls, nodeProps),
|
switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, nodeProps),
|
||||||
inputIcon,
|
inputIcon,
|
||||||
removeIcon,
|
removeIcon,
|
||||||
clearIcon,
|
clearIcon,
|
||||||
|
|
|
@ -2,7 +2,13 @@ import warning from 'warning';
|
||||||
import { Tree as VcTree, TreeNode } from '../vc-tree';
|
import { Tree as VcTree, TreeNode } from '../vc-tree';
|
||||||
import animation from '../_util/openAnimation';
|
import animation from '../_util/openAnimation';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import { initDefaultProps, getOptionProps, filterEmpty, getComponentFromProp, getClass } from '../_util/props-util';
|
import {
|
||||||
|
initDefaultProps,
|
||||||
|
getOptionProps,
|
||||||
|
filterEmpty,
|
||||||
|
getComponentFromProp,
|
||||||
|
getClass,
|
||||||
|
} from '../_util/props-util';
|
||||||
import { cloneElement } from '../_util/vnode';
|
import { cloneElement } from '../_util/vnode';
|
||||||
import { ConfigConsumerProps } from '../config-provider';
|
import { ConfigConsumerProps } from '../config-provider';
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
|
@ -198,7 +204,7 @@ export default {
|
||||||
checkable: checkable ? <span class={`${prefixCls}-checkbox-inner`} /> : checkable,
|
checkable: checkable ? <span class={`${prefixCls}-checkbox-inner`} /> : checkable,
|
||||||
children: filterEmpty(this.$slots.default || []),
|
children: filterEmpty(this.$slots.default || []),
|
||||||
__propsSymbol__: Symbol(),
|
__propsSymbol__: Symbol(),
|
||||||
switcherIcon: (nodeProps) => this.renderSwitcherIcon(prefixCls, switcherIcon, nodeProps),
|
switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, switcherIcon, nodeProps),
|
||||||
},
|
},
|
||||||
on: this.$listeners,
|
on: this.$listeners,
|
||||||
ref: 'tree',
|
ref: 'tree',
|
||||||
|
|
|
@ -219,7 +219,13 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const { prefixCls: customizePrefixCls, showUploadList, listType, type, disabled } = getOptionProps(this);
|
const {
|
||||||
|
prefixCls: customizePrefixCls,
|
||||||
|
showUploadList,
|
||||||
|
listType,
|
||||||
|
type,
|
||||||
|
disabled,
|
||||||
|
} = getOptionProps(this);
|
||||||
|
|
||||||
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
|
||||||
const prefixCls = getPrefixCls('upload', customizePrefixCls);
|
const prefixCls = getPrefixCls('upload', customizePrefixCls);
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
font-family: 'anticon';
|
font-family: 'anticon';
|
||||||
src: url('//at.alicdn.com/t/font_1434092639_4910953.eot');
|
src: url('//at.alicdn.com/t/font_1434092639_4910953.eot');
|
||||||
/* IE9*/
|
/* IE9*/
|
||||||
src: url('//at.alicdn.com/t/font_1434092639_4910953.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('//at.alicdn.com/t/font_1434092639_4910953.woff') format('woff'), /* chrome、firefox */ url('//at.alicdn.com/t/font_1434092639_4910953.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('//at.alicdn.com/t/font_1434092639_4910953.svg#iconfont') format('svg');
|
src: url('//at.alicdn.com/t/font_1434092639_4910953.eot?#iefix') format('embedded-opentype'),
|
||||||
|
/* IE6-IE8 */ url('//at.alicdn.com/t/font_1434092639_4910953.woff') format('woff'),
|
||||||
|
/* chrome、firefox */ url('//at.alicdn.com/t/font_1434092639_4910953.ttf') format('truetype'),
|
||||||
|
/* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
||||||
|
url('//at.alicdn.com/t/font_1434092639_4910953.svg#iconfont') format('svg');
|
||||||
/* iOS 4.1- */
|
/* iOS 4.1- */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +18,7 @@
|
||||||
top: -9999px;
|
top: -9999px;
|
||||||
z-index: 1070;
|
z-index: 1070;
|
||||||
display: block;
|
display: block;
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
@ -42,7 +46,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -4px;
|
top: -4px;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -62,7 +66,9 @@
|
||||||
color: #666666;
|
color: #666666;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
&:hover, &-active, &-selected {
|
&:hover,
|
||||||
|
&-active,
|
||||||
|
&-selected {
|
||||||
background-color: #ebfaff;
|
background-color: #ebfaff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +81,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 6px;
|
top: 6px;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
color: #3CB8F0;
|
color: #3cb8f0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +124,8 @@
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-slide-up-enter,&-slide-up-appear {
|
&-slide-up-enter,
|
||||||
|
&-slide-up-appear {
|
||||||
.effect();
|
.effect();
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
|
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
|
||||||
|
|
|
@ -19,11 +19,7 @@ export default {
|
||||||
<div style="margin: 100px">
|
<div style="margin: 100px">
|
||||||
<div style="height: 100px" />
|
<div style="height: 100px" />
|
||||||
<div>
|
<div>
|
||||||
<Dropdown
|
<Dropdown trigger={['click']} animation="slide-up" onVisibleChange={this.onVisibleChange}>
|
||||||
trigger={['click']}
|
|
||||||
animation="slide-up"
|
|
||||||
onVisibleChange={this.onVisibleChange}
|
|
||||||
>
|
|
||||||
<Menu slot="overlay" onSelect={this.onSelect}>
|
<Menu slot="overlay" onSelect={this.onSelect}>
|
||||||
<MenuItem disabled>disabled</MenuItem>
|
<MenuItem disabled>disabled</MenuItem>
|
||||||
<MenuItem key="1">one</MenuItem>
|
<MenuItem key="1">one</MenuItem>
|
||||||
|
|
|
@ -18,10 +18,7 @@ export default {
|
||||||
align: PropTypes.object,
|
align: PropTypes.object,
|
||||||
overlayStyle: PropTypes.object.def({}),
|
overlayStyle: PropTypes.object.def({}),
|
||||||
placement: PropTypes.string.def('bottomLeft'),
|
placement: PropTypes.string.def('bottomLeft'),
|
||||||
overlay: PropTypes.oneOfType([
|
overlay: PropTypes.oneOfType([PropTypes.any, PropTypes.func]),
|
||||||
PropTypes.any,
|
|
||||||
PropTypes.func,
|
|
||||||
]),
|
|
||||||
trigger: PropTypes.array.def(['hover']),
|
trigger: PropTypes.array.def(['hover']),
|
||||||
alignPoint: PropTypes.bool,
|
alignPoint: PropTypes.bool,
|
||||||
showAction: PropTypes.array.def([]),
|
showAction: PropTypes.array.def([]),
|
||||||
|
@ -153,7 +150,9 @@ export default {
|
||||||
renderChildren() {
|
renderChildren() {
|
||||||
const children = this.$slots.default && this.$slots.default[0];
|
const children = this.$slots.default && this.$slots.default[0];
|
||||||
const { sVisible } = this;
|
const { sVisible } = this;
|
||||||
return (sVisible && children) ? cloneElement(children, { class: this.getOpenClassName() }) : children;
|
return sVisible && children
|
||||||
|
? cloneElement(children, { class: this.getOpenClassName() })
|
||||||
|
: children;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -93,12 +93,14 @@ function updatableFn() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let notification2 = null;
|
let notification2 = null;
|
||||||
const clearPath = 'M793 242H366v-74c0-6.7-7.7-10.4-12.9' +
|
const clearPath =
|
||||||
|
'M793 242H366v-74c0-6.7-7.7-10.4-12.9' +
|
||||||
'-6.3l-142 112c-4.1 3.2-4.1 9.4 0 12.6l142 112c' +
|
'-6.3l-142 112c-4.1 3.2-4.1 9.4 0 12.6l142 112c' +
|
||||||
'5.2 4.1 12.9 0.4 12.9-6.3v-74h415v470H175c-4.4' +
|
'5.2 4.1 12.9 0.4 12.9-6.3v-74h415v470H175c-4.4' +
|
||||||
' 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-' +
|
' 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-' +
|
||||||
'28.7 64-64V306c0-35.3-28.7-64-64-64z';
|
'28.7 64-64V306c0-35.3-28.7-64-64-64z';
|
||||||
Notification.newInstance({
|
Notification.newInstance(
|
||||||
|
{
|
||||||
closeIcon: h => {
|
closeIcon: h => {
|
||||||
return (
|
return (
|
||||||
<i>
|
<i>
|
||||||
|
@ -114,9 +116,11 @@ Notification.newInstance({
|
||||||
</i>
|
</i>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
}, (n) => {
|
},
|
||||||
|
n => {
|
||||||
notification2 = n;
|
notification2 = n;
|
||||||
});
|
},
|
||||||
|
);
|
||||||
function customCloseIconFn() {
|
function customCloseIconFn() {
|
||||||
notification2.notice({
|
notification2.notice({
|
||||||
content: 'It is using custom close icon...',
|
content: 'It is using custom close icon...',
|
||||||
|
|
|
@ -53,7 +53,17 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const { onHover, onClick, onKeyDown, disabled, prefixCls, characterRender, index, count, value } = this;
|
const {
|
||||||
|
onHover,
|
||||||
|
onClick,
|
||||||
|
onKeyDown,
|
||||||
|
disabled,
|
||||||
|
prefixCls,
|
||||||
|
characterRender,
|
||||||
|
index,
|
||||||
|
count,
|
||||||
|
value,
|
||||||
|
} = this;
|
||||||
|
|
||||||
const character = getComponentFromProp(this, 'character');
|
const character = getComponentFromProp(this, 'character');
|
||||||
let star = (
|
let star = (
|
||||||
|
|
|
@ -3,7 +3,6 @@ import Tooltip from '../../vc-tooltip';
|
||||||
import '../assets/index.less';
|
import '../assets/index.less';
|
||||||
import '../../vc-tooltip/assets/bootstrap.less';
|
import '../../vc-tooltip/assets/bootstrap.less';
|
||||||
|
|
||||||
|
|
||||||
const { createSliderWithTooltip } = Slider;
|
const { createSliderWithTooltip } = Slider;
|
||||||
|
|
||||||
function log(value) {
|
function log(value) {
|
||||||
|
|
|
@ -28,7 +28,10 @@ export default {
|
||||||
children={(saveRef, getRef) => (
|
children={(saveRef, getRef) => (
|
||||||
<TabBarRootNode saveRef={saveRef} {...{ props, on: listeners }}>
|
<TabBarRootNode saveRef={saveRef} {...{ props, on: listeners }}>
|
||||||
<ScrollableTabBarNode saveRef={saveRef} getRef={getRef} {...{ props, on: listeners }}>
|
<ScrollableTabBarNode saveRef={saveRef} getRef={getRef} {...{ props, on: listeners }}>
|
||||||
<TabBarTabsNode saveRef={saveRef} {...{ props: {...props, renderTabBarNode}, on: listeners }} />
|
<TabBarTabsNode
|
||||||
|
saveRef={saveRef}
|
||||||
|
{...{ props: { ...props, renderTabBarNode }, on: listeners }}
|
||||||
|
/>
|
||||||
<InkTabBarNode saveRef={saveRef} getRef={getRef} {...{ props, on: listeners }} />
|
<InkTabBarNode saveRef={saveRef} getRef={getRef} {...{ props, on: listeners }} />
|
||||||
</ScrollableTabBarNode>
|
</ScrollableTabBarNode>
|
||||||
</TabBarRootNode>
|
</TabBarRootNode>
|
||||||
|
|
|
@ -181,11 +181,7 @@ const Header = {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { prefixCls } = this;
|
const { prefixCls } = this;
|
||||||
return (
|
return <div class={`${prefixCls}-input-wrap`}>{this.getInput()}</div>;
|
||||||
<div class={`${prefixCls}-input-wrap`}>
|
|
||||||
{this.getInput()}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
import { initDefaultProps, hasProp, getComponentFromProp,isValidElement, getEvents } from '../_util/props-util';
|
import {
|
||||||
|
initDefaultProps,
|
||||||
|
hasProp,
|
||||||
|
getComponentFromProp,
|
||||||
|
isValidElement,
|
||||||
|
getEvents,
|
||||||
|
} from '../_util/props-util';
|
||||||
import { cloneElement } from '../_util/vnode';
|
import { cloneElement } from '../_util/vnode';
|
||||||
import Trigger from '../vc-trigger';
|
import Trigger from '../vc-trigger';
|
||||||
import Panel from './Panel';
|
import Panel from './Panel';
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
&-icon:after {
|
&-icon:after {
|
||||||
content: "x";
|
content: 'x';
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
|
|
|
@ -118,7 +118,7 @@ export function parseSimpleTreeData(treeData, { id, pId, rootPId }) {
|
||||||
const rootNodeList = [];
|
const rootNodeList = [];
|
||||||
|
|
||||||
// Fill in the map
|
// Fill in the map
|
||||||
const nodeList = treeData.map((node) => {
|
const nodeList = treeData.map(node => {
|
||||||
const clone = { ...node };
|
const clone = { ...node };
|
||||||
const key = clone[id];
|
const key = clone[id];
|
||||||
keyNodes[key] = clone;
|
keyNodes[key] = clone;
|
||||||
|
@ -239,7 +239,7 @@ export function formatInternalValue(value, props) {
|
||||||
|
|
||||||
// Parse label in value
|
// Parse label in value
|
||||||
if (isLabelInValue(props)) {
|
if (isLabelInValue(props)) {
|
||||||
return valueList.map((val) => {
|
return valueList.map(val => {
|
||||||
if (typeof val !== 'object' || !val) {
|
if (typeof val !== 'object' || !val) {
|
||||||
return {
|
return {
|
||||||
value: '',
|
value: '',
|
||||||
|
|
|
@ -42,7 +42,7 @@ export declare class Statistic extends AntdComponent {
|
||||||
* suffix node of value
|
* suffix node of value
|
||||||
* @type string | VNode
|
* @type string | VNode
|
||||||
*/
|
*/
|
||||||
suffix: string | VNode;;
|
suffix: string | VNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display title
|
* Display title
|
||||||
|
@ -55,5 +55,4 @@ export declare class Statistic extends AntdComponent {
|
||||||
* @type string or number
|
* @type string or number
|
||||||
*/
|
*/
|
||||||
value: string | number;
|
value: string | number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue