+
-
`;
diff --git a/components/style/themes/default.less b/components/style/themes/default.less
index d80425490..07d809d16 100644
--- a/components/style/themes/default.less
+++ b/components/style/themes/default.less
@@ -38,9 +38,9 @@
@body-background: #fff;
// Base background color for most components
@component-background: #fff;
-@font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
- 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif,
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
+@font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
+ 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
+ 'Segoe UI Emoji', 'Segoe UI Symbol';
@code-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
@heading-color: fade(@black, 85%);
@text-color: fade(@black, 65%);
diff --git a/components/switch/index.jsx b/components/switch/index.jsx
index 7e55ae7c4..30a6e32f5 100644
--- a/components/switch/index.jsx
+++ b/components/switch/index.jsx
@@ -37,7 +37,9 @@ const Switch = {
},
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 prefixCls = getPrefixCls('switch', customizePrefixCls);
diff --git a/components/table/Table.jsx b/components/table/Table.jsx
index 0bc0b606f..fef139822 100755
--- a/components/table/Table.jsx
+++ b/components/table/Table.jsx
@@ -92,7 +92,7 @@ export default {
selectedRowKeys: getRowSelection(this.$props).selectedRowKeys || [],
selectionDirty: false,
});
- this.prevRowSelection = this.rowSelection ? {...this.rowSelection} : this.rowSelection;
+ this.prevRowSelection = this.rowSelection ? { ...this.rowSelection } : this.rowSelection;
return {
...this.getDefaultSortOrder(this.columns),
// 减少状态
@@ -127,12 +127,12 @@ export default {
if (rowSelection && val.getCheckboxProps !== rowSelection.getCheckboxProps) {
this.CheckboxPropsCache = {};
}
- } else if(val && !this.prevRowSelection) {
+ } else if (val && !this.prevRowSelection) {
this.store.setState({
selectedRowKeys: [],
});
}
- this.prevRowSelection = val ? {...val} : val;
+ this.prevRowSelection = val ? { ...val } : val;
},
deep: true,
},
@@ -379,7 +379,7 @@ export default {
// 按照sortDirections的内容依次切换排序状态
const methodIndex = sortDirections.indexOf(sortOrder) + 1;
newSortOrder =
- methodIndex === sortDirections.length ? undefined : sortDirections[methodIndex];
+ methodIndex === sortDirections.length ? undefined : sortDirections[methodIndex];
} else {
newSortOrder = sortDirections[0];
}
@@ -869,10 +869,7 @@ export default {
[`${prefixCls}-column-sort`]: isSortColumn && sortOrder,
}),
title: [
-
);
diff --git a/components/tree-select/index.jsx b/components/tree-select/index.jsx
index 429e68347..6a088a06f 100644
--- a/components/tree-select/index.jsx
+++ b/components/tree-select/index.jsx
@@ -86,77 +86,74 @@ const TreeSelect = {
render(h) {
const props = getOptionProps(this);
- const {
- prefixCls: customizePrefixCls,
- size,
- dropdownStyle,
- dropdownClassName,
- getPopupContainer,
- ...restProps
- } = props;
- const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
- const prefixCls = getPrefixCls('select', customizePrefixCls);
+ const {
+ prefixCls: customizePrefixCls,
+ size,
+ dropdownStyle,
+ dropdownClassName,
+ getPopupContainer,
+ ...restProps
+ } = props;
+ const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
+ const prefixCls = getPrefixCls('select', customizePrefixCls);
- const renderEmpty = (
- this.configProvider.renderEmpty &&
- this.configProvider.renderEmpty()
- ) || ConfigConsumerProps.renderEmpty;
- const notFoundContent = getComponentFromProp(this, 'notFoundContent');
- const { getPopupContainer: getContextPopupContainer } = this.configProvider;
- const rest = omit(restProps, [
- 'inputIcon',
- 'removeIcon',
- 'clearIcon',
- 'switcherIcon',
- 'suffixIcon',
- ]);
- let suffixIcon = getComponentFromProp(this, 'suffixIcon');
- suffixIcon = Array.isArray(suffixIcon) ? suffixIcon[0] : suffixIcon;
- let treeData = props.treeData;
- if (treeData) {
- treeData = this.updateTreeData(treeData);
- }
- const cls = {
- [`${prefixCls}-lg`]: size === 'large',
- [`${prefixCls}-sm`]: size === 'small',
- };
+ const renderEmpty =
+ (this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
+ ConfigConsumerProps.renderEmpty;
+ const notFoundContent = getComponentFromProp(this, 'notFoundContent');
+ const { getPopupContainer: getContextPopupContainer } = this.configProvider;
+ const rest = omit(restProps, [
+ 'inputIcon',
+ 'removeIcon',
+ 'clearIcon',
+ 'switcherIcon',
+ 'suffixIcon',
+ ]);
+ let suffixIcon = getComponentFromProp(this, 'suffixIcon');
+ suffixIcon = Array.isArray(suffixIcon) ? suffixIcon[0] : suffixIcon;
+ let treeData = props.treeData;
+ if (treeData) {
+ treeData = this.updateTreeData(treeData);
+ }
+ const cls = {
+ [`${prefixCls}-lg`]: size === 'large',
+ [`${prefixCls}-sm`]: size === 'small',
+ };
- let checkable = getComponentFromProp(this, 'treeCheckable');
- if (checkable) {
- checkable =
;
- }
+ let checkable = getComponentFromProp(this, 'treeCheckable');
+ if (checkable) {
+ checkable =
;
+ }
- const inputIcon = (suffixIcon &&
- (isValidElement(suffixIcon) ? cloneElement(suffixIcon) : suffixIcon)) || (
-
- );
+ const inputIcon = (suffixIcon &&
+ (isValidElement(suffixIcon) ? cloneElement(suffixIcon) : suffixIcon)) || (
+
+ );
- const removeIcon =
;
+ const removeIcon =
;
- const clearIcon = (
-
- );
- const VcTreeSelectProps = {
- props: {
- switcherIcon: (nodeProps) => this.renderSwitcherIcon(prefixCls, nodeProps),
- inputIcon,
- removeIcon,
- clearIcon,
- ...rest,
- getPopupContainer: getPopupContainer || getContextPopupContainer,
- dropdownClassName: classNames(dropdownClassName, `${prefixCls}-tree-dropdown`),
- prefixCls,
- dropdownStyle: { maxHeight: '100vh', overflow: 'auto', ...dropdownStyle },
- treeCheckable: checkable,
- notFoundContent: notFoundContent || renderEmpty(h, 'Select'),
- __propsSymbol__: Symbol(),
- },
- class: cls,
- on: { ...this.$listeners, change: this.onChange },
- ref: 'vcTreeSelect',
- scopedSlots: this.$scopedSlots,
- };
- return
{filterEmpty(this.$slots.default)};
+ const clearIcon =
;
+ const VcTreeSelectProps = {
+ props: {
+ switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, nodeProps),
+ inputIcon,
+ removeIcon,
+ clearIcon,
+ ...rest,
+ getPopupContainer: getPopupContainer || getContextPopupContainer,
+ dropdownClassName: classNames(dropdownClassName, `${prefixCls}-tree-dropdown`),
+ prefixCls,
+ dropdownStyle: { maxHeight: '100vh', overflow: 'auto', ...dropdownStyle },
+ treeCheckable: checkable,
+ notFoundContent: notFoundContent || renderEmpty(h, 'Select'),
+ __propsSymbol__: Symbol(),
+ },
+ class: cls,
+ on: { ...this.$listeners, change: this.onChange },
+ ref: 'vcTreeSelect',
+ scopedSlots: this.$scopedSlots,
+ };
+ return
{filterEmpty(this.$slots.default)};
},
};
diff --git a/components/tree/Tree.jsx b/components/tree/Tree.jsx
index fc70ae3e3..11af040ae 100644
--- a/components/tree/Tree.jsx
+++ b/components/tree/Tree.jsx
@@ -2,7 +2,13 @@ import warning from 'warning';
import { Tree as VcTree, TreeNode } from '../vc-tree';
import animation from '../_util/openAnimation';
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 { ConfigConsumerProps } from '../config-provider';
import Icon from '../icon';
@@ -131,7 +137,7 @@ export default {
const switcherCls = `${prefixCls}-switcher-icon`;
if (isLeaf) {
return null;
- }else if (switcherIcon) {
+ } else if (switcherIcon) {
const switcherOriginCls = getClass(switcherIcon[0]);
return cloneElement(switcherIcon, {
class: {
@@ -198,7 +204,7 @@ export default {
checkable: checkable ?
: checkable,
children: filterEmpty(this.$slots.default || []),
__propsSymbol__: Symbol(),
- switcherIcon: (nodeProps) => this.renderSwitcherIcon(prefixCls, switcherIcon, nodeProps),
+ switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, switcherIcon, nodeProps),
},
on: this.$listeners,
ref: 'tree',
diff --git a/components/upload/Upload.jsx b/components/upload/Upload.jsx
index ce8df496d..50b8eb788 100644
--- a/components/upload/Upload.jsx
+++ b/components/upload/Upload.jsx
@@ -161,7 +161,7 @@ export default {
});
},
handleManualRemove(file) {
- if(this.$refs.uploadRef) {
+ if (this.$refs.uploadRef) {
this.$refs.uploadRef.abort(file);
}
this.handleRemove(file);
@@ -219,7 +219,13 @@ export default {
},
},
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 prefixCls = getPrefixCls('upload', customizePrefixCls);
diff --git a/components/vc-calendar/src/date/DateInput.jsx b/components/vc-calendar/src/date/DateInput.jsx
index 6cabb2c79..819517ed0 100644
--- a/components/vc-calendar/src/date/DateInput.jsx
+++ b/components/vc-calendar/src/date/DateInput.jsx
@@ -141,7 +141,7 @@ const DateInput = {
const { value, disabledDate } = this.$props;
if (keyCode === KeyCode.ENTER) {
const validateDate = !disabledDate || !disabledDate(value);
- if(validateDate) {
+ if (validateDate) {
this.__emit('select', value.clone());
}
}
diff --git a/components/vc-dropdown/assets/index.less b/components/vc-dropdown/assets/index.less
index 531cbda9c..14a8e3f39 100644
--- a/components/vc-dropdown/assets/index.less
+++ b/components/vc-dropdown/assets/index.less
@@ -4,7 +4,11 @@
font-family: 'anticon';
src: url('//at.alicdn.com/t/font_1434092639_4910953.eot');
/* 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- */
}
@@ -14,7 +18,7 @@
top: -9999px;
z-index: 1070;
display: block;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12px;
font-weight: normal;
line-height: 1.5;
@@ -42,7 +46,7 @@
}
&:before {
- content: "";
+ content: '';
position: absolute;
top: -4px;
left: 0;
@@ -62,7 +66,9 @@
color: #666666;
white-space: nowrap;
- &:hover, &-active, &-selected {
+ &:hover,
+ &-active,
+ &-selected {
background-color: #ebfaff;
}
@@ -75,7 +81,7 @@
position: absolute;
top: 6px;
right: 16px;
- color: #3CB8F0;
+ color: #3cb8f0;
}
}
@@ -118,7 +124,8 @@
display: block !important;
}
- &-slide-up-enter,&-slide-up-appear {
+ &-slide-up-enter,
+ &-slide-up-appear {
.effect();
opacity: 0;
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
diff --git a/components/vc-dropdown/demo/simple.jsx b/components/vc-dropdown/demo/simple.jsx
index 0e98e3a11..ccccb0121 100644
--- a/components/vc-dropdown/demo/simple.jsx
+++ b/components/vc-dropdown/demo/simple.jsx
@@ -17,13 +17,9 @@ export default {
render() {
return (
-
+
-
+