diff --git a/components/_util/PortalWrapper.js b/components/_util/PortalWrapper.js index 2ae3f6b29..f24868313 100644 --- a/components/_util/PortalWrapper.js +++ b/components/_util/PortalWrapper.js @@ -17,10 +17,10 @@ export default { name: 'PortalWrapper', props: { wrapperClassName: PropTypes.string, - forceRender: PropTypes.bool, + forceRender: PropTypes.looseBool, getContainer: PropTypes.any, children: PropTypes.func, - visible: PropTypes.bool, + visible: PropTypes.looseBool, }, data() { this._component = null; diff --git a/components/_util/transButton.jsx b/components/_util/transButton.jsx index 71da31486..4421996b2 100644 --- a/components/_util/transButton.jsx +++ b/components/_util/transButton.jsx @@ -17,7 +17,7 @@ const TransButton = { name: 'TransButton', inheritAttrs: false, props: { - noStyle: PropTypes.bool, + noStyle: PropTypes.looseBool, onClick: PropTypes.func, }, diff --git a/components/_util/vue-types/index.ts b/components/_util/vue-types/index.ts index 6df1ec0e3..ae85b6fa7 100644 --- a/components/_util/vue-types/index.ts +++ b/components/_util/vue-types/index.ts @@ -8,5 +8,17 @@ const PropTypes = createTypes({ object: undefined, integer: undefined, }); +PropTypes.extend([ + { + name: 'looseBool', + getter: true, + type: Boolean, + default: undefined, + }, +]); +export function withUndefined(type: any) { + type.default = undefined; + return type; +} export default PropTypes; diff --git a/components/alert/index.tsx b/components/alert/index.tsx index b244d3a65..d604dbe7d 100644 --- a/components/alert/index.tsx +++ b/components/alert/index.tsx @@ -37,7 +37,7 @@ export const AlertProps = { */ type: PropTypes.oneOf(['success', 'info', 'warning', 'error']), /** Whether Alert can be closed */ - closable: PropTypes.bool, + closable: PropTypes.looseBool, /** Close text to show */ closeText: PropTypes.any, /** Content of Alert */ @@ -49,9 +49,9 @@ export const AlertProps = { /** Trigger when animation ending of Alert */ afterClose: PropTypes.func.def(noop), /** Whether to show icon */ - showIcon: PropTypes.bool, + showIcon: PropTypes.looseBool, prefixCls: PropTypes.string, - banner: PropTypes.bool, + banner: PropTypes.looseBool, icon: PropTypes.any, onClose: PropTypes.func, }; diff --git a/components/anchor/Anchor.jsx b/components/anchor/Anchor.jsx index 89b8b04aa..01fbe79d4 100644 --- a/components/anchor/Anchor.jsx +++ b/components/anchor/Anchor.jsx @@ -81,8 +81,8 @@ export const AnchorProps = { prefixCls: PropTypes.string, offsetTop: PropTypes.number, bounds: PropTypes.number, - affix: PropTypes.bool, - showInkInFixed: PropTypes.bool, + affix: PropTypes.looseBool, + showInkInFixed: PropTypes.looseBool, getContainer: PropTypes.func, wrapperClass: PropTypes.string, wrapperStyle: PropTypes.object, diff --git a/components/auto-complete/index.jsx b/components/auto-complete/index.jsx index aef2c1e7a..796d5511b 100644 --- a/components/auto-complete/index.jsx +++ b/components/auto-complete/index.jsx @@ -31,7 +31,7 @@ const AutoCompleteProps = { dataSource: PropTypes.array, dropdownMenuStyle: PropTypes.object, optionLabelProp: String, - dropdownMatchSelectWidth: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, // onChange?: (value: SelectValue) => void; // onSelect?: (value: SelectValue, option: Object) => any; }; @@ -42,14 +42,14 @@ const AutoComplete = { props: { ...AutoCompleteProps, prefixCls: PropTypes.string.def('ant-select'), - showSearch: PropTypes.bool.def(false), + showSearch: PropTypes.looseBool.def(false), transitionName: PropTypes.string.def('slide-up'), choiceTransitionName: PropTypes.string.def('zoom'), - autofocus: PropTypes.bool, - backfill: PropTypes.bool, + autofocus: PropTypes.looseBool, + backfill: PropTypes.looseBool, optionLabelProp: PropTypes.string.def('children'), - filterOption: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]).def(false), - defaultActiveFirstOption: PropTypes.bool.def(true), + filterOption: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]).def(false), + defaultActiveFirstOption: PropTypes.looseBool.def(true), }, Option: { ...Option, name: 'AAutoCompleteOption' }, OptGroup: { ...OptGroup, name: 'AAutoCompleteOptGroup' }, diff --git a/components/back-top/backTopTypes.js b/components/back-top/backTopTypes.js index b8cbd4ed3..4807fdacc 100644 --- a/components/back-top/backTopTypes.js +++ b/components/back-top/backTopTypes.js @@ -5,5 +5,5 @@ export default () => ({ target: PropTypes.func, prefixCls: PropTypes.string, onClick: PropTypes.func, - // visible: PropTypes.bool, // Only for test. Don't use it. + // visible: PropTypes.looseBool, // Only for test. Don't use it. }); diff --git a/components/badge/Badge.jsx b/components/badge/Badge.jsx index ed525299f..cfd218b98 100644 --- a/components/badge/Badge.jsx +++ b/components/badge/Badge.jsx @@ -12,11 +12,11 @@ import { inject, Transition } from 'vue'; const BadgeProps = { /** Number to show in badge */ count: PropTypes.any, - showZero: PropTypes.bool, + showZero: PropTypes.looseBool, /** Max count to show */ overflowCount: PropTypes.number, /** whether to show red dot without number */ - dot: PropTypes.bool, + dot: PropTypes.looseBool, prefixCls: PropTypes.string, scrollNumberPrefixCls: PropTypes.string, status: PropTypes.oneOf(['success', 'processing', 'default', 'error', 'warning']), diff --git a/components/button/buttonTypes.js b/components/button/buttonTypes.js index 0e6a97da6..1f27a7dd5 100644 --- a/components/button/buttonTypes.js +++ b/components/button/buttonTypes.js @@ -6,10 +6,10 @@ export default () => ({ // icon: PropTypes.string, shape: PropTypes.oneOf(['circle', 'circle-outline', 'round']), size: PropTypes.oneOf(['small', 'large', 'default']).def('default'), - loading: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), - disabled: PropTypes.bool, - ghost: PropTypes.bool, - block: PropTypes.bool, + loading: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), + disabled: PropTypes.looseBool, + ghost: PropTypes.looseBool, + block: PropTypes.looseBool, icon: PropTypes.any, onClick: PropTypes.func, }); diff --git a/components/calendar/Header.jsx b/components/calendar/Header.jsx index 8b6330a3c..a927c1379 100644 --- a/components/calendar/Header.jsx +++ b/components/calendar/Header.jsx @@ -21,7 +21,7 @@ function getMonthsLocale(value) { export const HeaderProps = { prefixCls: PropTypes.string, locale: PropTypes.any, - fullscreen: PropTypes.boolean, + fullscreen: PropTypes.looseBoolean, yearSelectOffset: PropTypes.number, yearSelectTotal: PropTypes.number, type: PropTypes.string, diff --git a/components/calendar/index.jsx b/components/calendar/index.jsx index da88e6a4c..4b59534a2 100644 --- a/components/calendar/index.jsx +++ b/components/calendar/index.jsx @@ -35,7 +35,7 @@ export const CalendarProps = () => ({ value: TimeType, defaultValue: TimeType, mode: CalendarMode, - fullscreen: PropTypes.bool, + fullscreen: PropTypes.looseBool, locale: PropTypes.object, disabledDate: PropTypes.func, validRange: PropTypes.custom(isMomentArray), diff --git a/components/card/Card.tsx b/components/card/Card.tsx index cf732507b..f42014ffa 100644 --- a/components/card/Card.tsx +++ b/components/card/Card.tsx @@ -16,11 +16,11 @@ export default { prefixCls: PropTypes.string, title: PropTypes.any, extra: PropTypes.any, - bordered: PropTypes.bool.def(true), + bordered: PropTypes.looseBool.def(true), bodyStyle: PropTypes.object, headStyle: PropTypes.object, - loading: PropTypes.bool.def(false), - hoverable: PropTypes.bool.def(false), + loading: PropTypes.looseBool.def(false), + hoverable: PropTypes.looseBool.def(false), type: PropTypes.string, size: PropTypes.oneOf(['default', 'small']), actions: PropTypes.any, diff --git a/components/card/Grid.jsx b/components/card/Grid.jsx index 75ed7af08..ac09660ae 100644 --- a/components/card/Grid.jsx +++ b/components/card/Grid.jsx @@ -8,7 +8,7 @@ export default { __ANT_CARD_GRID: true, props: { prefixCls: PropTypes.string, - hoverable: PropTypes.bool, + hoverable: PropTypes.looseBool, }, setup() { return { diff --git a/components/carousel/index.jsx b/components/carousel/index.jsx index e6af9b1a9..b19a54333 100644 --- a/components/carousel/index.jsx +++ b/components/carousel/index.jsx @@ -11,43 +11,43 @@ export const CarouselEffect = PropTypes.oneOf(['scrollx', 'fade']); // Carousel export const CarouselProps = { effect: CarouselEffect, - dots: PropTypes.bool, - vertical: PropTypes.bool, - autoplay: PropTypes.bool, + dots: PropTypes.looseBool, + vertical: PropTypes.looseBool, + autoplay: PropTypes.looseBool, easing: PropTypes.string, beforeChange: PropTypes.func, afterChange: PropTypes.func, // style: PropTypes.React.CSSProperties, prefixCls: PropTypes.string, - accessibility: PropTypes.bool, + accessibility: PropTypes.looseBool, nextArrow: PropTypes.any, prevArrow: PropTypes.any, - pauseOnHover: PropTypes.bool, + pauseOnHover: PropTypes.looseBool, // className: PropTypes.string, - adaptiveHeight: PropTypes.bool, - arrows: PropTypes.bool, + adaptiveHeight: PropTypes.looseBool, + arrows: PropTypes.looseBool, autoplaySpeed: PropTypes.number, - centerMode: PropTypes.bool, + centerMode: PropTypes.looseBool, centerPadding: PropTypes.string, cssEase: PropTypes.string, dotsClass: PropTypes.string, - draggable: PropTypes.bool, - fade: PropTypes.bool, - focusOnSelect: PropTypes.bool, - infinite: PropTypes.bool, + draggable: PropTypes.looseBool, + fade: PropTypes.looseBool, + focusOnSelect: PropTypes.looseBool, + infinite: PropTypes.looseBool, initialSlide: PropTypes.number, - lazyLoad: PropTypes.bool, - rtl: PropTypes.bool, + lazyLoad: PropTypes.looseBool, + rtl: PropTypes.looseBool, slide: PropTypes.string, slidesToShow: PropTypes.number, slidesToScroll: PropTypes.number, speed: PropTypes.number, - swipe: PropTypes.bool, - swipeToSlide: PropTypes.bool, - touchMove: PropTypes.bool, + swipe: PropTypes.looseBool, + swipeToSlide: PropTypes.looseBool, + touchMove: PropTypes.looseBool, touchThreshold: PropTypes.number, - variableWidth: PropTypes.bool, - useCSS: PropTypes.bool, + variableWidth: PropTypes.looseBool, + useCSS: PropTypes.looseBool, slickGoTo: PropTypes.number, responsive: PropTypes.array, dotPosition: PropTypes.oneOf(['top', 'bottom', 'left', 'right']), diff --git a/components/cascader/index.jsx b/components/cascader/index.jsx index 96f5b9299..220ecfec6 100644 --- a/components/cascader/index.jsx +++ b/components/cascader/index.jsx @@ -27,7 +27,7 @@ import { defaultConfigProvider } from '../config-provider'; const CascaderOptionType = PropTypes.shape({ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), label: PropTypes.any, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, children: PropTypes.array, key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }).loose; @@ -44,7 +44,7 @@ const ShowSearchType = PropTypes.shape({ filter: PropTypes.func, render: PropTypes.func, sort: PropTypes.func, - matchInputWidth: PropTypes.bool, + matchInputWidth: PropTypes.looseBool, limit: PropTypes.oneOfType([Boolean, Number]), }).loose; function noop() {} @@ -73,24 +73,24 @@ const CascaderProps = { /** 输入框大小,可选 `large` `default` `small` */ size: PropTypes.oneOf(['large', 'default', 'small']), /** 禁用*/ - disabled: PropTypes.bool.def(false), + disabled: PropTypes.looseBool.def(false), /** 是否支持清除*/ - allowClear: PropTypes.bool.def(true), + allowClear: PropTypes.looseBool.def(true), showSearch: PropTypes.oneOfType([Boolean, ShowSearchType]), notFoundContent: PropTypes.any, loadData: PropTypes.func, /** 次级菜单的展开方式,可选 'click' 和 'hover' */ expandTrigger: CascaderExpandTrigger, /** 当此项为 true 时,点选每级菜单选项值都会发生变化 */ - changeOnSelect: PropTypes.bool, + changeOnSelect: PropTypes.looseBool, /** 浮层可见变化时回调 */ // onPopupVisibleChange?: (popupVisible: boolean) => void; prefixCls: PropTypes.string, inputPrefixCls: PropTypes.string, getPopupContainer: PropTypes.func, - popupVisible: PropTypes.bool, + popupVisible: PropTypes.looseBool, fieldNames: FieldNamesType, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, suffixIcon: PropTypes.any, showSearchRender: PropTypes.any, onChange: PropTypes.func, diff --git a/components/checkbox/Checkbox.jsx b/components/checkbox/Checkbox.jsx index aa75646be..1ba166961 100644 --- a/components/checkbox/Checkbox.jsx +++ b/components/checkbox/Checkbox.jsx @@ -13,16 +13,16 @@ export default { __ANT_CHECKBOX: true, props: { prefixCls: PropTypes.string, - defaultChecked: PropTypes.bool, - checked: PropTypes.bool, - disabled: PropTypes.bool, - isGroup: PropTypes.bool, + defaultChecked: PropTypes.looseBool, + checked: PropTypes.looseBool, + disabled: PropTypes.looseBool, + isGroup: PropTypes.looseBool, value: PropTypes.any, name: PropTypes.string, id: PropTypes.string, - indeterminate: PropTypes.bool, + indeterminate: PropTypes.looseBool, type: PropTypes.string.def('checkbox'), - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, onChange: PropTypes.func, 'onUpdate:checked': PropTypes.func, }, diff --git a/components/checkbox/Group.jsx b/components/checkbox/Group.jsx index c9765d92c..267c5f062 100644 --- a/components/checkbox/Group.jsx +++ b/components/checkbox/Group.jsx @@ -13,7 +13,7 @@ export default { defaultValue: PropTypes.array, value: PropTypes.array, options: PropTypes.array.def([]), - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, onChange: PropTypes.func, }, diff --git a/components/color-picker/ColorPicker.jsx b/components/color-picker/ColorPicker.jsx index f0ecba4e3..e21e65a80 100644 --- a/components/color-picker/ColorPicker.jsx +++ b/components/color-picker/ColorPicker.jsx @@ -25,10 +25,10 @@ export default { colorRounded: PropTypes.number, //颜色数值保留几位小数 size: PropTypes.oneOf(['default', 'small', 'large']).def('default'), //尺寸 getPopupContainer: PropTypes.func, //指定渲染容器 - disabled: PropTypes.bool.def(false), //是否禁用 + disabled: PropTypes.looseBool.def(false), //是否禁用 format: PropTypes.string, //颜色格式设置 - alpha: PropTypes.bool.def(false), //是否开启透明通道 - hue: PropTypes.bool.def(true), //是否开启色彩预选 + alpha: PropTypes.looseBool.def(false), //是否开启透明通道 + hue: PropTypes.looseBool.def(true), //是否开启色彩预选 }, inject: { configProvider: { default: () => defaultConfigProvider }, diff --git a/components/config-provider/index.tsx b/components/config-provider/index.tsx index b1e6d261e..0ad37e5e0 100644 --- a/components/config-provider/index.tsx +++ b/components/config-provider/index.tsx @@ -90,7 +90,7 @@ const ConfigProvider = defineComponent({ csp: { type: Object as PropType, }, - autoInsertSpaceInButton: PropTypes.bool, + autoInsertSpaceInButton: PropTypes.looseBool, locale: { type: Object as PropType, }, @@ -106,8 +106,8 @@ const ConfigProvider = defineComponent({ space: { type: [String, Number] as PropType, }, - virtual: PropTypes.bool, - dropdownMatchSelectWidth: PropTypes.bool, + virtual: PropTypes.looseBool, + dropdownMatchSelectWidth: PropTypes.looseBool, }, setup(props, { slots }) { const getPrefixCls = (suffixCls?: string, customizePrefixCls?: string) => { diff --git a/components/date-picker/interface.js b/components/date-picker/interface.js index a15fbd557..1597c129b 100644 --- a/components/date-picker/interface.js +++ b/components/date-picker/interface.js @@ -8,8 +8,8 @@ export const PickerProps = () => ({ prefixCls: PropTypes.string, inputPrefixCls: PropTypes.string, format: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.func]), - disabled: PropTypes.bool, - allowClear: PropTypes.bool, + disabled: PropTypes.looseBool, + allowClear: PropTypes.looseBool, suffixIcon: PropTypes.any, popupStyle: PropTypes.object, dropdownClassName: PropTypes.string, @@ -17,18 +17,18 @@ export const PickerProps = () => ({ localeCode: PropTypes.string, size: PropTypes.oneOf(['large', 'small', 'default']), getCalendarContainer: PropTypes.func, - open: PropTypes.bool, + open: PropTypes.looseBool, disabledDate: PropTypes.func, - showToday: PropTypes.bool, + showToday: PropTypes.looseBool, dateRender: PropTypes.any, // ({current: moment.Moment, today: moment.Moment}) => vNode, pickerClass: PropTypes.string, pickerInputClass: PropTypes.string, timePicker: PropTypes.any, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, tagPrefixCls: PropTypes.string, tabindex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), align: PropTypes.object.def(() => ({})), - inputReadOnly: PropTypes.bool, + inputReadOnly: PropTypes.looseBool, valueFormat: PropTypes.string, onOpenChange: PropTypes.func, onFocus: PropTypes.func, @@ -50,8 +50,8 @@ export const SinglePickerProps = () => ({ export const DatePickerProps = () => ({ ...PickerProps(), ...SinglePickerProps(), - showTime: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), - open: PropTypes.bool, + showTime: PropTypes.oneOfType([PropTypes.object, PropTypes.looseBool]), + open: PropTypes.looseBool, disabledTime: PropTypes.func, mode: PropTypes.oneOf(['time', 'date', 'month', 'year']), onOpenChange: PropTypes.func, @@ -74,13 +74,13 @@ export const RangePickerProps = () => ({ defaultValue: TimesType, defaultPickerValue: TimesType, timePicker: PropTypes.any, - showTime: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), + showTime: PropTypes.oneOfType([PropTypes.object, PropTypes.looseBool]), ranges: PropTypes.object, placeholder: PropTypes.arrayOf(String), mode: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(String)]), separator: PropTypes.any, disabledTime: PropTypes.func, - showToday: PropTypes.bool, + showToday: PropTypes.looseBool, renderExtraFooter: PropTypes.any, onChange: PropTypes.func, onCalendarChange: PropTypes.func, diff --git a/components/descriptions/index.jsx b/components/descriptions/index.jsx index 64c5bef19..81361afd9 100644 --- a/components/descriptions/index.jsx +++ b/components/descriptions/index.jsx @@ -39,12 +39,12 @@ export const DescriptionsItem = { export const DescriptionsProps = { prefixCls: PropTypes.string, - bordered: PropTypes.bool, + bordered: PropTypes.looseBool, size: PropTypes.oneOf(['default', 'middle', 'small']).def('default'), title: PropTypes.any, column: PropTypes.oneOfType([PropTypes.number, PropTypes.object]), layout: PropTypes.oneOf(['horizontal', 'vertical']), - colon: PropTypes.bool, + colon: PropTypes.looseBool, }; /** diff --git a/components/drawer/index.jsx b/components/drawer/index.jsx index 534ec611c..cbe9cdb27 100644 --- a/components/drawer/index.jsx +++ b/components/drawer/index.jsx @@ -12,18 +12,18 @@ const Drawer = { name: 'ADrawer', inheritAttrs: false, props: { - closable: PropTypes.bool.def(true), - destroyOnClose: PropTypes.bool, + closable: PropTypes.looseBool.def(true), + destroyOnClose: PropTypes.looseBool, getContainer: PropTypes.any, - maskClosable: PropTypes.bool.def(true), - mask: PropTypes.bool.def(true), + maskClosable: PropTypes.looseBool.def(true), + mask: PropTypes.looseBool.def(true), maskStyle: PropTypes.object, wrapStyle: PropTypes.object, bodyStyle: PropTypes.object, headerStyle: PropTypes.object, drawerStyle: PropTypes.object, title: PropTypes.any, - visible: PropTypes.bool, + visible: PropTypes.looseBool, width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).def(256), height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).def(256), zIndex: PropTypes.number, @@ -33,7 +33,7 @@ const Drawer = { wrapClassName: PropTypes.string, // not use class like react, vue will add class to root dom handle: PropTypes.any, afterVisibleChange: PropTypes.func, - keyboard: PropTypes.bool.def(true), + keyboard: PropTypes.looseBool.def(true), onClose: PropTypes.func, 'onUpdate:visible': PropTypes.func, }, diff --git a/components/dropdown/dropdown-button.jsx b/components/dropdown/dropdown-button.jsx index 4b25e3a11..c4e763f21 100644 --- a/components/dropdown/dropdown-button.jsx +++ b/components/dropdown/dropdown-button.jsx @@ -20,7 +20,7 @@ const DropdownButtonProps = { size: PropTypes.oneOf(['small', 'large', 'default']).def('default'), htmlType: ButtonTypesProps.htmlType, href: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, prefixCls: PropTypes.string, placement: DropdownProps.placement.def('bottomRight'), icon: PropTypes.any, diff --git a/components/dropdown/getDropdownProps.js b/components/dropdown/getDropdownProps.js index baefe22e4..a9e880a35 100644 --- a/components/dropdown/getDropdownProps.js +++ b/components/dropdown/getDropdownProps.js @@ -2,8 +2,8 @@ import PropTypes from '../_util/vue-types'; export default () => ({ trigger: PropTypes.array.def(['hover']), overlay: PropTypes.any, - visible: PropTypes.bool, - disabled: PropTypes.bool, + visible: PropTypes.looseBool, + disabled: PropTypes.looseBool, align: PropTypes.object, getPopupContainer: PropTypes.func, prefixCls: PropTypes.string, @@ -18,9 +18,9 @@ export default () => ({ ]), overlayClassName: PropTypes.string, overlayStyle: PropTypes.object, - forceRender: PropTypes.bool, + forceRender: PropTypes.looseBool, mouseEnterDelay: PropTypes.number, mouseLeaveDelay: PropTypes.number, openClassName: PropTypes.string, - minOverlayWidthMatchTrigger: PropTypes.bool, + minOverlayWidthMatchTrigger: PropTypes.looseBool, }); diff --git a/components/form/Form.jsx b/components/form/Form.jsx index 983e05fff..5916757ad 100755 --- a/components/form/Form.jsx +++ b/components/form/Form.jsx @@ -17,16 +17,16 @@ export const FormProps = { layout: PropTypes.oneOf(['horizontal', 'inline', 'vertical']), labelCol: PropTypes.object, wrapperCol: PropTypes.object, - colon: PropTypes.bool, + colon: PropTypes.looseBool, labelAlign: PropTypes.oneOf(['left', 'right']), prefixCls: PropTypes.string, - hideRequiredMark: PropTypes.bool, + hideRequiredMark: PropTypes.looseBool, model: PropTypes.object, rules: PropTypes.object, validateMessages: PropTypes.any, - validateOnRuleChange: PropTypes.bool, + validateOnRuleChange: PropTypes.looseBool, // 提交失败自动滚动到第一个错误字段 - scrollToFirstError: PropTypes.bool, + scrollToFirstError: PropTypes.looseBool, onFinish: PropTypes.func, onFinishFailed: PropTypes.func, name: PropTypes.name, @@ -39,9 +39,9 @@ export const ValidationRule = { /** built-in validation type, available options: https://github.com/yiminghe/async-validator#type */ type: PropTypes.string, /** indicates whether field is required */ - required: PropTypes.boolean, + required: PropTypes.looseBoolean, /** treat required fields that only contain whitespace as errors */ - whitespace: PropTypes.boolean, + whitespace: PropTypes.looseBoolean, /** validate the exact length of a field */ len: PropTypes.number, /** validate the min length of a field */ diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 8895bdca1..960359ad2 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -74,15 +74,15 @@ export const FormItemProps = { extra: PropTypes.any, labelCol: PropTypes.object, wrapperCol: PropTypes.object, - hasFeedback: PropTypes.bool, - colon: PropTypes.bool, + hasFeedback: PropTypes.looseBool, + colon: PropTypes.looseBool, labelAlign: PropTypes.oneOf(['left', 'right']), prop: PropTypes.oneOfType([Array, String, Number]), name: PropTypes.oneOfType([Array, String, Number]), rules: PropTypes.oneOfType([Array, Object]), - autoLink: PropTypes.bool, - required: PropTypes.bool, - validateFirst: PropTypes.bool, + autoLink: PropTypes.looseBool, + required: PropTypes.looseBool, + validateFirst: PropTypes.looseBool, validateStatus: PropTypes.oneOf(['', 'success', 'warning', 'error', 'validating']), validateTrigger: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), }; diff --git a/components/input-number/index.jsx b/components/input-number/index.jsx index b0495b90a..50b40fa51 100644 --- a/components/input-number/index.jsx +++ b/components/input-number/index.jsx @@ -15,7 +15,7 @@ export const InputNumberProps = { step: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), tabindex: PropTypes.number, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, size: PropTypes.oneOf(['large', 'small', 'default']), formatter: PropTypes.func, parser: PropTypes.func, @@ -24,7 +24,7 @@ export const InputNumberProps = { name: PropTypes.string, id: PropTypes.string, precision: PropTypes.number, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, }; const InputNumber = { diff --git a/components/input/ClearableLabeledInput.jsx b/components/input/ClearableLabeledInput.jsx index bbeb170ef..ad82a6c3c 100644 --- a/components/input/ClearableLabeledInput.jsx +++ b/components/input/ClearableLabeledInput.jsx @@ -23,16 +23,16 @@ const ClearableLabeledInput = { inputType: PropTypes.oneOf(ClearableInputType), value: PropTypes.any, defaultValue: PropTypes.any, - allowClear: PropTypes.bool, + allowClear: PropTypes.looseBool, element: PropTypes.any, handleReset: PropTypes.func, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, size: PropTypes.oneOf(['small', 'large', 'default']), suffix: PropTypes.any, prefix: PropTypes.any, addonBefore: PropTypes.any, addonAfter: PropTypes.any, - readonly: PropTypes.bool, + readonly: PropTypes.looseBool, }, methods: { renderClearIcon(prefixCls) { diff --git a/components/input/Password.jsx b/components/input/Password.jsx index 1473d58b9..5a89a5181 100644 --- a/components/input/Password.jsx +++ b/components/input/Password.jsx @@ -21,7 +21,7 @@ export default { prefixCls: PropTypes.string.def('ant-input-password'), inputPrefixCls: PropTypes.string.def('ant-input'), action: PropTypes.string.def('click'), - visibilityToggle: PropTypes.bool.def(true), + visibilityToggle: PropTypes.looseBool.def(true), }, data() { return { diff --git a/components/input/inputProps.js b/components/input/inputProps.js index e95857c53..3aa31fe1c 100644 --- a/components/input/inputProps.js +++ b/components/input/inputProps.js @@ -11,8 +11,8 @@ export default { }, name: String, size: PropTypes.oneOf(['small', 'large', 'default']), - disabled: PropTypes.bool, - readonly: PropTypes.bool, + disabled: PropTypes.looseBool, + readonly: PropTypes.looseBool, addonBefore: PropTypes.any, addonAfter: PropTypes.any, // onPressEnter?: React.FormEventHandler; @@ -31,7 +31,7 @@ export default { type: Boolean, }, maxlength: PropTypes.number, - loading: PropTypes.bool, + loading: PropTypes.looseBool, onPressEnter: PropTypes.func, onKeydown: PropTypes.func, onKeyup: PropTypes.func, diff --git a/components/layout/Sider.jsx b/components/layout/Sider.jsx index 9e94673f1..2edd235f9 100644 --- a/components/layout/Sider.jsx +++ b/components/layout/Sider.jsx @@ -29,10 +29,10 @@ const dimensionMaxMap = { export const SiderProps = { prefixCls: PropTypes.string, - collapsible: PropTypes.bool, - collapsed: PropTypes.bool, - defaultCollapsed: PropTypes.bool, - reverseArrow: PropTypes.bool, + collapsible: PropTypes.looseBool, + collapsed: PropTypes.looseBool, + defaultCollapsed: PropTypes.looseBool, + reverseArrow: PropTypes.looseBool, // onCollapse?: (collapsed: boolean, type: CollapseType) => void; zeroWidthTriggerStyle: PropTypes.object, trigger: PropTypes.any, diff --git a/components/layout/layout.jsx b/components/layout/layout.jsx index e1415962c..ba951dd11 100644 --- a/components/layout/layout.jsx +++ b/components/layout/layout.jsx @@ -6,7 +6,7 @@ import { defaultConfigProvider } from '../config-provider'; export const BasicProps = { prefixCls: PropTypes.string, - hasSider: PropTypes.boolean, + hasSider: PropTypes.looseBoolean, tagName: PropTypes.string, }; diff --git a/components/list/index.jsx b/components/list/index.jsx index ad2ebfa53..76a0b29ff 100644 --- a/components/list/index.jsx +++ b/components/list/index.jsx @@ -32,19 +32,19 @@ export const ListGridType = { export const ListSize = ['small', 'default', 'large']; export const ListProps = () => ({ - bordered: PropTypes.bool, + bordered: PropTypes.looseBool, dataSource: PropTypes.array, extra: PropTypes.any, grid: PropTypes.shape(ListGridType).loose, itemLayout: PropTypes.string, - loading: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), + loading: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), loadMore: PropTypes.any, - pagination: PropTypes.oneOfType([PropTypes.shape(PaginationConfig()).loose, PropTypes.bool]), + pagination: PropTypes.oneOfType([PropTypes.shape(PaginationConfig()).loose, PropTypes.looseBool]), prefixCls: PropTypes.string, rowKey: PropTypes.any, renderItem: PropTypes.any, size: PropTypes.oneOf(ListSize), - split: PropTypes.bool, + split: PropTypes.looseBool, header: PropTypes.any, footer: PropTypes.any, locale: PropTypes.object, diff --git a/components/mentions/index.jsx b/components/mentions/index.jsx index f568c5cfb..3c6efcb4f 100644 --- a/components/mentions/index.jsx +++ b/components/mentions/index.jsx @@ -52,7 +52,7 @@ const Mentions = { getMentions, props: { ...mentionsProps, - loading: PropTypes.bool, + loading: PropTypes.looseBool, onFocus: PropTypes.func, onBlur: PropTypes.func, onSelect: PropTypes.func, diff --git a/components/menu/index.jsx b/components/menu/index.jsx index f7bb29ff3..0cc515f32 100644 --- a/components/menu/index.jsx +++ b/components/menu/index.jsx @@ -24,7 +24,7 @@ export const menuProps = { ...commonPropsType, theme: PropTypes.oneOf(['light', 'dark']).def('light'), mode: MenuMode.def('vertical'), - selectable: PropTypes.bool, + selectable: PropTypes.looseBool, selectedKeys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), defaultSelectedKeys: PropTypes.array, openKeys: PropTypes.array, @@ -32,11 +32,11 @@ export const menuProps = { openAnimation: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), openTransitionName: PropTypes.string, prefixCls: PropTypes.string, - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, inlineIndent: PropTypes.number.def(24), - inlineCollapsed: PropTypes.bool, - isRootMenu: PropTypes.bool.def(true), - focusable: PropTypes.bool.def(false), + inlineCollapsed: PropTypes.looseBool, + isRootMenu: PropTypes.looseBool.def(true), + focusable: PropTypes.looseBool.def(false), onOpenChange: PropTypes.func, onSelect: PropTypes.func, onDeselect: PropTypes.func, diff --git a/components/modal/ActionButton.jsx b/components/modal/ActionButton.jsx index b2bdcd48b..860f4e8df 100644 --- a/components/modal/ActionButton.jsx +++ b/components/modal/ActionButton.jsx @@ -8,7 +8,7 @@ const ActionButtonProps = { type: ButtonType, actionFn: PropTypes.func, closeModal: PropTypes.func, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, buttonProps: PropTypes.object, }; diff --git a/components/modal/Modal.jsx b/components/modal/Modal.jsx index c76ce6b40..27b907f80 100644 --- a/components/modal/Modal.jsx +++ b/components/modal/Modal.jsx @@ -35,13 +35,13 @@ const modalProps = (defaultProps = {}) => { const props = { prefixCls: PropTypes.string, /** 对话框是否可见*/ - visible: PropTypes.bool, + visible: PropTypes.looseBool, /** 确定按钮 loading*/ - confirmLoading: PropTypes.bool, + confirmLoading: PropTypes.looseBool, /** 标题*/ title: PropTypes.any, /** 是否显示右上角的关闭按钮*/ - closable: PropTypes.bool, + closable: PropTypes.looseBool, closeIcon: PropTypes.any, /** 点击确定回调*/ // onOk: (e: React.MouseEvent) => void, @@ -49,7 +49,7 @@ const modalProps = (defaultProps = {}) => { // onCancel: (e: React.MouseEvent) => void, afterClose: PropTypes.func.def(noop), /** 垂直居中 */ - centered: PropTypes.bool, + centered: PropTypes.looseBool, /** 宽度*/ width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** 底部内容*/ @@ -62,12 +62,12 @@ const modalProps = (defaultProps = {}) => { cancelText: PropTypes.any, icon: PropTypes.any, /** 点击蒙层是否允许关闭*/ - maskClosable: PropTypes.bool, + maskClosable: PropTypes.looseBool, /** 强制渲染 Modal*/ - forceRender: PropTypes.bool, + forceRender: PropTypes.looseBool, okButtonProps: PropTypes.object, cancelButtonProps: PropTypes.object, - destroyOnClose: PropTypes.bool, + destroyOnClose: PropTypes.looseBool, wrapClassName: PropTypes.string, maskTransitionName: PropTypes.string, transitionName: PropTypes.string, @@ -75,10 +75,10 @@ const modalProps = (defaultProps = {}) => { zIndex: PropTypes.number, bodyStyle: PropTypes.object, maskStyle: PropTypes.object, - mask: PropTypes.bool, - keyboard: PropTypes.bool, + mask: PropTypes.looseBool, + keyboard: PropTypes.looseBool, wrapProps: PropTypes.object, - focusTriggerAfterClose: PropTypes.bool, + focusTriggerAfterClose: PropTypes.looseBool, }; return initDefaultProps(props, defaultProps); }; diff --git a/components/page-header/index.jsx b/components/page-header/index.jsx index 6c315aad1..2817d8993 100644 --- a/components/page-header/index.jsx +++ b/components/page-header/index.jsx @@ -18,7 +18,7 @@ export const PageHeaderProps = { footer: PropTypes.any, extra: PropTypes.any, avatar: PropTypes.object, - ghost: PropTypes.bool, + ghost: PropTypes.looseBool, onBack: PropTypes.func, }; diff --git a/components/pagination/Pagination.jsx b/components/pagination/Pagination.jsx index f97f25389..3d34780b0 100644 --- a/components/pagination/Pagination.jsx +++ b/components/pagination/Pagination.jsx @@ -16,25 +16,25 @@ import classNames from '../_util/classNames'; export const PaginationProps = () => ({ total: PropTypes.number, defaultCurrent: PropTypes.number, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, current: PropTypes.number, defaultPageSize: PropTypes.number, pageSize: PropTypes.number, - hideOnSinglePage: PropTypes.bool, - showSizeChanger: PropTypes.bool, + hideOnSinglePage: PropTypes.looseBool, + showSizeChanger: PropTypes.looseBool, pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), buildOptionText: PropTypes.func, showSizeChange: PropTypes.func, - showQuickJumper: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), + showQuickJumper: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), showTotal: PropTypes.any, size: PropTypes.string, - simple: PropTypes.bool, + simple: PropTypes.looseBool, locale: PropTypes.object, prefixCls: PropTypes.string, selectPrefixCls: PropTypes.string, itemRender: PropTypes.func, role: PropTypes.string, - showLessItems: PropTypes.bool, + showLessItems: PropTypes.looseBool, }); export const PaginationConfig = () => ({ diff --git a/components/popconfirm/index.jsx b/components/popconfirm/index.jsx index 7fdab5719..8c40c8d2d 100644 --- a/components/popconfirm/index.jsx +++ b/components/popconfirm/index.jsx @@ -24,7 +24,7 @@ const Popconfirm = { title: PropTypes.any, trigger: tooltipProps.trigger.def('click'), okType: btnProps.type.def('primary'), - disabled: PropTypes.bool.def(false), + disabled: PropTypes.looseBool.def(false), okText: PropTypes.any, cancelText: PropTypes.any, icon: PropTypes.any, diff --git a/components/progress/progress.jsx b/components/progress/progress.jsx index a685306e6..a9a8a6d6c 100644 --- a/components/progress/progress.jsx +++ b/components/progress/progress.jsx @@ -22,7 +22,7 @@ export const ProgressProps = { successPercent: PropTypes.number, format: PropTypes.func, status: PropTypes.oneOf(ProgressStatuses), - showInfo: PropTypes.bool, + showInfo: PropTypes.looseBool, strokeWidth: PropTypes.number, strokeLinecap: PropTypes.oneOf(['butt', 'round', 'square']), strokeColor: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), diff --git a/components/rate/index.jsx b/components/rate/index.jsx index b9d116fd4..59fb4fef3 100644 --- a/components/rate/index.jsx +++ b/components/rate/index.jsx @@ -12,12 +12,12 @@ export const RateProps = { count: PropTypes.number, value: PropTypes.value, defaultValue: PropTypes.value, - allowHalf: PropTypes.bool, - allowClear: PropTypes.bool, + allowHalf: PropTypes.looseBool, + allowClear: PropTypes.looseBool, tooltips: PropTypes.arrayOf(PropTypes.string), - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, character: PropTypes.any, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, }; const Rate = { diff --git a/components/select/index.jsx b/components/select/index.jsx index de015b901..774964243 100644 --- a/components/select/index.jsx +++ b/components/select/index.jsx @@ -19,27 +19,27 @@ const AbstractSelectProps = () => ({ notFoundContent: PropTypes.any, transitionName: PropTypes.string, choiceTransitionName: PropTypes.string, - showSearch: PropTypes.bool, - allowClear: PropTypes.bool, - disabled: PropTypes.bool, + showSearch: PropTypes.looseBool, + allowClear: PropTypes.looseBool, + disabled: PropTypes.looseBool, tabindex: PropTypes.number, placeholder: PropTypes.any, - defaultActiveFirstOption: PropTypes.bool, + defaultActiveFirstOption: PropTypes.looseBool, dropdownClassName: PropTypes.string, dropdownStyle: PropTypes.any, dropdownMenuStyle: PropTypes.any, - dropdownMatchSelectWidth: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, // onSearch: (value: string) => any, - filterOption: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), - autofocus: PropTypes.bool, - backfill: PropTypes.bool, - showArrow: PropTypes.bool, + filterOption: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]), + autofocus: PropTypes.looseBool, + backfill: PropTypes.looseBool, + showArrow: PropTypes.looseBool, getPopupContainer: PropTypes.func, - open: PropTypes.bool, - defaultOpen: PropTypes.bool, - autoClearSearchValue: PropTypes.bool, + open: PropTypes.looseBool, + defaultOpen: PropTypes.looseBool, + autoClearSearchValue: PropTypes.looseBool, dropdownRender: PropTypes.func, - loading: PropTypes.bool, + loading: PropTypes.looseBool, }); const Value = PropTypes.shape({ key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), @@ -63,9 +63,9 @@ const SelectProps = { maxTagCount: PropTypes.number, maxTagPlaceholder: PropTypes.any, maxTagTextLength: PropTypes.number, - dropdownMatchSelectWidth: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, optionFilterProp: PropTypes.string, - labelInValue: PropTypes.boolean, + labelInValue: PropTypes.looseBoolean, getPopupContainer: PropTypes.func, tokenSeparators: PropTypes.arrayOf(PropTypes.string), getInputElement: PropTypes.func, @@ -79,9 +79,9 @@ const SelectProps = { const SelectPropTypes = { prefixCls: PropTypes.string, size: PropTypes.oneOf(['default', 'large', 'small']), - // combobox: PropTypes.bool, + // combobox: PropTypes.looseBool, notFoundContent: PropTypes.any, - showSearch: PropTypes.bool, + showSearch: PropTypes.looseBool, optionLabelProp: PropTypes.string, transitionName: PropTypes.string, choiceTransitionName: PropTypes.string, @@ -96,7 +96,7 @@ const Select = { name: 'ASelect', props: { ...SelectProps, - showSearch: PropTypes.bool.def(false), + showSearch: PropTypes.looseBool.def(false), transitionName: PropTypes.string.def('slide-up'), choiceTransitionName: PropTypes.string.def('zoom'), }, diff --git a/components/skeleton/index.jsx b/components/skeleton/index.jsx index bd4f14aad..fd9f31206 100644 --- a/components/skeleton/index.jsx +++ b/components/skeleton/index.jsx @@ -8,13 +8,13 @@ import Title, { SkeletonTitleProps } from './Title'; import Paragraph, { SkeletonParagraphProps } from './Paragraph'; export const SkeletonProps = { - active: PropTypes.bool, - loading: PropTypes.bool, + active: PropTypes.looseBool, + loading: PropTypes.looseBool, prefixCls: PropTypes.string, children: PropTypes.any, - avatar: PropTypes.oneOfType([PropTypes.string, SkeletonAvatarProps, PropTypes.bool]), - title: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, SkeletonTitleProps]), - paragraph: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, SkeletonParagraphProps]), + avatar: PropTypes.oneOfType([PropTypes.string, SkeletonAvatarProps, PropTypes.looseBool]), + title: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.string, SkeletonTitleProps]), + paragraph: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.string, SkeletonParagraphProps]), }; function getComponentProps(prop) { diff --git a/components/slider/index.jsx b/components/slider/index.jsx index 8a816914a..c8c8ccd08 100644 --- a/components/slider/index.jsx +++ b/components/slider/index.jsx @@ -13,20 +13,20 @@ const tooltipProps = abstractTooltipProps(); export const SliderProps = () => ({ prefixCls: PropTypes.string, tooltipPrefixCls: PropTypes.string, - range: PropTypes.bool, - reverse: PropTypes.bool, + range: PropTypes.looseBool, + reverse: PropTypes.looseBool, min: PropTypes.number, max: PropTypes.number, step: PropTypes.oneOfType([PropTypes.number, PropTypes.any]), marks: PropTypes.object, - dots: PropTypes.bool, + dots: PropTypes.looseBool, value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]), defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]), - included: PropTypes.bool, - disabled: PropTypes.bool, - vertical: PropTypes.bool, + included: PropTypes.looseBool, + disabled: PropTypes.looseBool, + vertical: PropTypes.looseBool, tipFormatter: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), - tooltipVisible: PropTypes.bool, + tooltipVisible: PropTypes.looseBool, tooltipPlacement: tooltipProps.placement, getTooltipPopupContainer: PropTypes.func, onChange: PropTypes.func, diff --git a/components/spin/Spin.jsx b/components/spin/Spin.jsx index 0dcb18745..b86d3f1f2 100644 --- a/components/spin/Spin.jsx +++ b/components/spin/Spin.jsx @@ -9,7 +9,7 @@ export const SpinSize = PropTypes.oneOf(['small', 'default', 'large']); export const SpinProps = () => ({ prefixCls: PropTypes.string, - spinning: PropTypes.bool, + spinning: PropTypes.looseBool, size: SpinSize, wrapperClassName: PropTypes.string, tip: PropTypes.string, diff --git a/components/steps/index.jsx b/components/steps/index.jsx index fc688863f..a185b547a 100644 --- a/components/steps/index.jsx +++ b/components/steps/index.jsx @@ -16,7 +16,7 @@ const getStepsProps = (defaultProps = {}) => { status: PropTypes.oneOf(['wait', 'process', 'finish', 'error']), size: PropTypes.oneOf(['default', 'small']), direction: PropTypes.oneOf(['horizontal', 'vertical']), - progressDot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), + progressDot: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]), type: PropTypes.oneOf(['default', 'navigation']), onChange: PropTypes.func, 'onUpdate:current': PropTypes.func, diff --git a/components/switch/index.jsx b/components/switch/index.jsx index 23071aa6e..c575e67fa 100644 --- a/components/switch/index.jsx +++ b/components/switch/index.jsx @@ -15,14 +15,14 @@ const Switch = { prefixCls: PropTypes.string, // size=default and size=large are the same size: PropTypes.oneOf(['small', 'default', 'large']), - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, checkedChildren: PropTypes.any, unCheckedChildren: PropTypes.any, tabindex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - checked: PropTypes.bool, - defaultChecked: PropTypes.bool, - autofocus: PropTypes.bool, - loading: PropTypes.bool, + checked: PropTypes.looseBool, + defaultChecked: PropTypes.looseBool, + autofocus: PropTypes.looseBool, + loading: PropTypes.looseBool, }, setup() { return { diff --git a/components/table/interface.js b/components/table/interface.js index aa0980dcc..2d0efeb12 100644 --- a/components/table/interface.js +++ b/components/table/interface.js @@ -21,24 +21,24 @@ export const ColumnProps = { customCell: PropTypes.func, customHeaderCell: PropTypes.func, align: PropTypes.oneOf(['left', 'right', 'center']), - ellipsis: PropTypes.bool, + ellipsis: PropTypes.looseBool, filters: PropTypes.arrayOf(ColumnFilterItem), - // onFilter: (value: any, record: T) => PropTypes.bool, - filterMultiple: PropTypes.bool, + // onFilter: (value: any, record: T) => PropTypes.looseBool, + filterMultiple: PropTypes.looseBool, filterDropdown: PropTypes.any, - filterDropdownVisible: PropTypes.bool, + filterDropdownVisible: PropTypes.looseBool, // onFilterDropdownVisibleChange?: (visible: boolean) => void; - sorter: PropTypes.oneOfType([PropTypes.boolean, PropTypes.func]), + sorter: PropTypes.oneOfType([PropTypes.looseBoolean, PropTypes.func]), defaultSortOrder: PropTypes.oneOf(['ascend', 'descend']), colSpan: PropTypes.number, width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), className: PropTypes.string, - fixed: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['left', 'right'])]), + fixed: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.oneOf(['left', 'right'])]), filterIcon: PropTypes.any, filteredValue: PropTypes.array, - filtered: PropTypes.bool, + filtered: PropTypes.looseBool, defaultFilteredValue: PropTypes.array, - sortOrder: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['ascend', 'descend'])]), + sortOrder: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.oneOf(['ascend', 'descend'])]), sortDirections: PropTypes.array, // children?: ColumnProps[]; // onCellClick?: (record: T, event: any) => void; @@ -83,9 +83,9 @@ export const TableRowSelection = { // onSelect?: SelectionSelectFn; // onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => any; // onSelectInvert?: (selectedRows: Object[]) => any; - selections: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]), - hideDefaultSelections: PropTypes.bool, - fixed: PropTypes.bool, + selections: PropTypes.oneOfType([PropTypes.array, PropTypes.looseBool]), + hideDefaultSelections: PropTypes.looseBool, + fixed: PropTypes.looseBool, columnWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), selectWay: PropTypes.oneOf(['onSelect', 'onSelectMultiple', 'onSelectAll', 'onSelectInvert']), columnTitle: PropTypes.any, @@ -100,7 +100,7 @@ export const TableProps = { ...PaginationProps, position: PropTypes.oneOf(['top', 'bottom', 'both']), }).loose, - PropTypes.bool, + PropTypes.looseBool, ]), size: PropTypes.oneOf(['default', 'middle', 'small', 'large']), dataSource: PropTypes.array, @@ -109,20 +109,20 @@ export const TableProps = { rowKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), rowClassName: PropTypes.func, expandedRowRender: PropTypes.any, - defaultExpandAllRows: PropTypes.bool, + defaultExpandAllRows: PropTypes.looseBool, defaultExpandedRowKeys: PropTypes.array, expandedRowKeys: PropTypes.array, - expandIconAsCell: PropTypes.bool, + expandIconAsCell: PropTypes.looseBool, expandIconColumnIndex: PropTypes.number, - expandRowByClick: PropTypes.bool, - loading: PropTypes.oneOfType([PropTypes.shape(SpinProps).loose, PropTypes.bool]), + expandRowByClick: PropTypes.looseBool, + loading: PropTypes.oneOfType([PropTypes.shape(SpinProps).loose, PropTypes.looseBool]), locale: TableLocale, indentSize: PropTypes.number, customRow: PropTypes.func, customHeaderRow: PropTypes.func, - useFixedHeader: PropTypes.bool, - bordered: PropTypes.bool, - showHeader: PropTypes.bool, + useFixedHeader: PropTypes.looseBool, + bordered: PropTypes.looseBool, + showHeader: PropTypes.looseBool, footer: PropTypes.func, title: PropTypes.func, scroll: PropTypes.object, @@ -163,20 +163,20 @@ export const TableProps = { export const SelectionCheckboxAllProps = { store: Store, locale: PropTypes.any, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, getCheckboxPropsByItem: PropTypes.func, getRecordKey: PropTypes.func, data: PropTypes.array, prefixCls: PropTypes.string, - hideDefaultSelections: PropTypes.bool, - selections: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]), + hideDefaultSelections: PropTypes.looseBool, + selections: PropTypes.oneOfType([PropTypes.array, PropTypes.looseBool]), getPopupContainer: PropTypes.func, onSelect: PropTypes.func, }; // export interface SelectionCheckboxAllState { -// checked: PropTypes.bool, -// indeterminate: PropTypes.bool, +// checked: PropTypes.looseBool, +// indeterminate: PropTypes.looseBool, // } export const SelectionBoxProps = { @@ -185,13 +185,13 @@ export const SelectionBoxProps = { defaultSelection: PropTypes.arrayOf([PropTypes.string, PropTypes.number]), rowIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), name: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, id: PropTypes.string, // onChange: React.ChangeEventHandler; }; // export interface SelectionBoxState { -// checked?: PropTypes.bool, +// checked?: PropTypes.looseBool, // } export const FilterMenuProps = { @@ -208,5 +208,5 @@ export const FilterMenuProps = { // export interface FilterMenuState { // selectedKeys: string[]; // keyPathOfSelectedItem: { [key: string]: string }; -// visible?: PropTypes.bool, +// visible?: PropTypes.looseBool, // } diff --git a/components/tabs/TabBar.jsx b/components/tabs/TabBar.jsx index a981da1cf..579131a68 100644 --- a/components/tabs/TabBar.jsx +++ b/components/tabs/TabBar.jsx @@ -16,7 +16,7 @@ const TabBar = { tabPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']).def('top'), tabBarPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']), size: PropTypes.oneOf(['default', 'small', 'large']), - animated: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), + animated: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), renderTabBar: PropTypes.func, panels: PropTypes.array.def([]), activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), diff --git a/components/tabs/tabs.jsx b/components/tabs/tabs.jsx index aa6a1051c..dd61bbe80 100644 --- a/components/tabs/tabs.jsx +++ b/components/tabs/tabs.jsx @@ -26,14 +26,14 @@ export default { prefixCls: PropTypes.string, activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), defaultActiveKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - hideAdd: PropTypes.bool.def(false), + hideAdd: PropTypes.looseBool.def(false), tabBarStyle: PropTypes.object, tabBarExtraContent: PropTypes.any, - destroyInactiveTabPane: PropTypes.bool.def(false), + destroyInactiveTabPane: PropTypes.looseBool.def(false), type: PropTypes.oneOf(['line', 'card', 'editable-card']), tabPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']).def('top'), size: PropTypes.oneOf(['default', 'small', 'large']), - animated: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), + animated: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), tabBarGutter: PropTypes.number, renderTabBar: PropTypes.func, onChange: PropTypes.func, diff --git a/components/tag/CheckableTag.tsx b/components/tag/CheckableTag.tsx index d95aeb222..a4f197d54 100644 --- a/components/tag/CheckableTag.tsx +++ b/components/tag/CheckableTag.tsx @@ -7,7 +7,7 @@ const CheckableTag = defineComponent({ name: 'ACheckableTag', props: { prefixCls: PropTypes.string, - checked: PropTypes.bool, + checked: PropTypes.looseBool, onChange: { type: Function as PropType<(checked: boolean) => void>, }, diff --git a/components/tag/index.tsx b/components/tag/index.tsx index 3a3380c81..7c600e673 100644 --- a/components/tag/index.tsx +++ b/components/tag/index.tsx @@ -124,7 +124,7 @@ const Tag = defineComponent({ Tag.props = { prefixCls: PropTypes.string, color: PropTypes.string, - closable: PropTypes.bool.def(false), + closable: PropTypes.looseBool.def(false), closeIcon: PropTypes.any, visible: { type: Boolean, diff --git a/components/time-picker/index.jsx b/components/time-picker/index.jsx index 93d83d7c6..c95859707 100644 --- a/components/time-picker/index.jsx +++ b/components/time-picker/index.jsx @@ -37,24 +37,24 @@ export const TimePickerProps = () => ({ size: PropTypes.oneOf(['large', 'default', 'small']), value: TimeOrTimesType, defaultValue: TimeOrTimesType, - open: PropTypes.bool, + open: PropTypes.looseBool, format: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, placeholder: PropTypes.string, prefixCls: PropTypes.string, - hideDisabledOptions: PropTypes.bool, + hideDisabledOptions: PropTypes.looseBool, disabledHours: PropTypes.func, disabledMinutes: PropTypes.func, disabledSeconds: PropTypes.func, getPopupContainer: PropTypes.func, - use12Hours: PropTypes.bool, - focusOnOpen: PropTypes.bool, + use12Hours: PropTypes.looseBool, + focusOnOpen: PropTypes.looseBool, hourStep: PropTypes.number, minuteStep: PropTypes.number, secondStep: PropTypes.number, - allowEmpty: PropTypes.bool, - allowClear: PropTypes.bool, - inputReadOnly: PropTypes.bool, + allowEmpty: PropTypes.looseBool, + allowClear: PropTypes.looseBool, + inputReadOnly: PropTypes.looseBool, clearText: PropTypes.string, defaultOpenValue: PropTypes.object, popupClassName: PropTypes.string, @@ -63,7 +63,7 @@ export const TimePickerProps = () => ({ align: PropTypes.object, placement: PropTypes.any, transitionName: PropTypes.string, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, addon: PropTypes.any, clearIcon: PropTypes.any, locale: PropTypes.object, diff --git a/components/timeline/Timeline.jsx b/components/timeline/Timeline.jsx index 93b36c7a3..9cbe82ad4 100644 --- a/components/timeline/Timeline.jsx +++ b/components/timeline/Timeline.jsx @@ -17,7 +17,7 @@ export const TimelineProps = { /** 指定最后一个幽灵节点是否存在或内容 */ pending: PropTypes.any, pendingDot: PropTypes.string, - reverse: PropTypes.bool, + reverse: PropTypes.looseBool, mode: PropTypes.oneOf(['left', 'alternate', 'right', '']), }; diff --git a/components/timeline/TimelineItem.jsx b/components/timeline/TimelineItem.jsx index 84bea2a6d..cb2557140 100644 --- a/components/timeline/TimelineItem.jsx +++ b/components/timeline/TimelineItem.jsx @@ -8,7 +8,7 @@ export const TimeLineItemProps = { prefixCls: PropTypes.string, color: PropTypes.string, dot: PropTypes.any, - pending: PropTypes.bool, + pending: PropTypes.looseBool, position: PropTypes.oneOf(['left', 'right', '']).def(''), }; diff --git a/components/tooltip/abstractTooltipProps.js b/components/tooltip/abstractTooltipProps.js index 1205bd34e..a4b9b53ea 100644 --- a/components/tooltip/abstractTooltipProps.js +++ b/components/tooltip/abstractTooltipProps.js @@ -2,8 +2,8 @@ import PropTypes from '../_util/vue-types'; const triggerType = PropTypes.oneOf(['hover', 'focus', 'click', 'contextmenu']); export default () => ({ trigger: PropTypes.oneOfType([triggerType, PropTypes.arrayOf(triggerType)]).def('hover'), - visible: PropTypes.bool, - defaultVisible: PropTypes.bool, + visible: PropTypes.looseBool, + defaultVisible: PropTypes.looseBool, placement: PropTypes.oneOf([ 'top', 'left', @@ -26,9 +26,9 @@ export default () => ({ mouseEnterDelay: PropTypes.number.def(0.1), mouseLeaveDelay: PropTypes.number.def(0.1), getPopupContainer: PropTypes.func, - arrowPointAtCenter: PropTypes.bool.def(false), - autoAdjustOverflow: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]).def(true), - destroyTooltipOnHide: PropTypes.bool.def(false), + arrowPointAtCenter: PropTypes.looseBool.def(false), + autoAdjustOverflow: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]).def(true), + destroyTooltipOnHide: PropTypes.looseBool.def(false), align: PropTypes.object.def(() => ({})), builtinPlacements: PropTypes.object, children: PropTypes.any, diff --git a/components/transfer/ListItem.jsx b/components/transfer/ListItem.jsx index ec7da984b..0d80c0609 100644 --- a/components/transfer/ListItem.jsx +++ b/components/transfer/ListItem.jsx @@ -12,10 +12,10 @@ export default { renderedText: PropTypes.any, renderedEl: PropTypes.any, item: PropTypes.any, - lazy: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), - checked: PropTypes.bool, + lazy: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), + checked: PropTypes.looseBool, prefixCls: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, onClick: PropTypes.func, }, render() { diff --git a/components/transfer/index.jsx b/components/transfer/index.jsx index e8d276859..09681f115 100644 --- a/components/transfer/index.jsx +++ b/components/transfer/index.jsx @@ -15,13 +15,13 @@ export const TransferItem = { key: PropTypes.string.isRequired, title: PropTypes.string.isRequired, description: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, }; export const TransferProps = { prefixCls: PropTypes.string, dataSource: PropTypes.arrayOf(PropTypes.shape(TransferItem).loose), - disabled: PropTypes.boolean, + disabled: PropTypes.looseBoolean, targetKeys: PropTypes.arrayOf(PropTypes.string), selectedKeys: PropTypes.arrayOf(PropTypes.string), render: PropTypes.func, @@ -29,14 +29,14 @@ export const TransferProps = { operationStyle: PropTypes.object, titles: PropTypes.arrayOf(PropTypes.string), operations: PropTypes.arrayOf(PropTypes.string), - showSearch: PropTypes.bool, + showSearch: PropTypes.looseBool, filterOption: PropTypes.func, searchPlaceholder: PropTypes.string, notFoundContent: PropTypes.any, locale: PropTypes.object, rowKey: PropTypes.func, - lazy: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), - showSelectAll: PropTypes.bool, + lazy: PropTypes.oneOfType([PropTypes.object, PropTypes.looseBool]), + showSelectAll: PropTypes.looseBool, children: PropTypes.any, onChange: PropTypes.func, onSelectChange: PropTypes.func, diff --git a/components/transfer/list.jsx b/components/transfer/list.jsx index e8a41131a..74ae2640a 100644 --- a/components/transfer/list.jsx +++ b/components/transfer/list.jsx @@ -19,7 +19,7 @@ const TransferItem = { key: PropTypes.string.isRequired, title: PropTypes.string.isRequired, description: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, }; function isRenderResultPlainObject(result) { @@ -42,7 +42,7 @@ export const TransferListProps = { handleSelectAll: PropTypes.func, handleClear: PropTypes.func, renderItem: PropTypes.func, - showSearch: PropTypes.bool, + showSearch: PropTypes.looseBool, searchPlaceholder: PropTypes.string, notFoundContent: PropTypes.any, itemUnit: PropTypes.string, @@ -50,10 +50,10 @@ export const TransferListProps = { body: PropTypes.any, renderList: PropTypes.any, footer: PropTypes.any, - lazy: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), - disabled: PropTypes.bool, + lazy: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), + disabled: PropTypes.looseBool, direction: PropTypes.string, - showSelectAll: PropTypes.bool, + showSelectAll: PropTypes.looseBool, onItemSelect: PropTypes.func, onItemSelectAll: PropTypes.func, onScroll: PropTypes.func, diff --git a/components/transfer/renderListBody.jsx b/components/transfer/renderListBody.jsx index 1ef261bc0..2886a568d 100644 --- a/components/transfer/renderListBody.jsx +++ b/components/transfer/renderListBody.jsx @@ -11,9 +11,9 @@ const ListBody = { props: { prefixCls: PropTypes.string, filteredRenderItems: PropTypes.array.def([]), - lazy: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), + lazy: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), selectedKeys: PropTypes.array, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, onItemSelect: PropTypes.func, onItemSelectAll: PropTypes.func, onScroll: PropTypes.func, diff --git a/components/transfer/search.jsx b/components/transfer/search.jsx index a82aaa502..bee4e582a 100644 --- a/components/transfer/search.jsx +++ b/components/transfer/search.jsx @@ -9,7 +9,7 @@ export const TransferSearchProps = { placeholder: PropTypes.string, value: PropTypes.any, handleClear: PropTypes.func, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, onChange: PropTypes.func, }; diff --git a/components/tree-select/interface.jsx b/components/tree-select/interface.jsx index 54dc6ef30..0e04cc9a2 100644 --- a/components/tree-select/interface.jsx +++ b/components/tree-select/interface.jsx @@ -11,11 +11,11 @@ export const TreeData = PropTypes.shape({ export const TreeSelectProps = () => ({ ...AbstractSelectProps(), - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, dropdownStyle: PropTypes.object, filterTreeNode: PropTypes.oneOfType([Function, Boolean]), getPopupContainer: PropTypes.func, - labelInValue: PropTypes.bool, + labelInValue: PropTypes.looseBool, loadData: PropTypes.func, maxTagCount: PropTypes.number, maxTagPlaceholder: PropTypes.any, @@ -31,22 +31,22 @@ export const TreeSelectProps = () => ({ PropTypes.array, PropTypes.number, ]), - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, notFoundContent: PropTypes.any, searchPlaceholder: PropTypes.string, searchValue: PropTypes.string, showCheckedStrategy: PropTypes.oneOf(['SHOW_ALL', 'SHOW_PARENT', 'SHOW_CHILD']), suffixIcon: PropTypes.any, - treeCheckable: PropTypes.oneOfType([PropTypes.any, PropTypes.bool]), - treeCheckStrictly: PropTypes.bool, + treeCheckable: PropTypes.oneOfType([PropTypes.any, PropTypes.looseBool]), + treeCheckStrictly: PropTypes.looseBool, treeData: PropTypes.arrayOf(Object), treeDataSimpleMode: PropTypes.oneOfType([Boolean, Object]), dropdownClassName: PropTypes.string, - dropdownMatchSelectWidth: PropTypes.bool, - treeDefaultExpandAll: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, + treeDefaultExpandAll: PropTypes.looseBool, treeExpandedKeys: PropTypes.array, - treeIcon: PropTypes.bool, + treeIcon: PropTypes.looseBool, treeDefaultExpandedKeys: PropTypes.array, treeNodeFilterProp: PropTypes.string, treeNodeLabelProp: PropTypes.string, diff --git a/components/tree/Tree.jsx b/components/tree/Tree.jsx index 1fbb949ab..3c957c5b6 100644 --- a/components/tree/Tree.jsx +++ b/components/tree/Tree.jsx @@ -15,21 +15,21 @@ import { defaultConfigProvider } from '../config-provider'; const TreeNode = VcTree.TreeNode; function TreeProps() { return { - showLine: PropTypes.bool, + showLine: PropTypes.looseBool, /** 是否支持多选 */ - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, /** 是否自动展开父节点 */ - autoExpandParent: PropTypes.bool, + autoExpandParent: PropTypes.looseBool, /** checkable状态下节点选择完全受控(父子节点选中状态不再关联)*/ - checkStrictly: PropTypes.bool, + checkStrictly: PropTypes.looseBool, /** 是否支持选中 */ - checkable: PropTypes.bool, + checkable: PropTypes.looseBool, /** 是否禁用树 */ - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, /** 默认展开所有树节点 */ - defaultExpandAll: PropTypes.bool, + defaultExpandAll: PropTypes.looseBool, /** 默认展开对应树节点 */ - defaultExpandParent: PropTypes.bool, + defaultExpandParent: PropTypes.looseBool, /** 默认展开指定的树节点 */ defaultExpandedKeys: PropTypes.array, /** (受控)展开指定的树节点 */ @@ -48,7 +48,7 @@ function TreeProps() { selectedKeys: PropTypes.array, /** 默认选中的树节点 */ defaultSelectedKeys: PropTypes.array, - selectable: PropTypes.bool, + selectable: PropTypes.looseBool, /** filter some AntTreeNodes as you need. it should return true */ filterAntTreeNode: PropTypes.func, @@ -59,7 +59,7 @@ function TreeProps() { /** 响应右键点击 */ // onRightClick: (options: AntTreeNodeMouseEvent) => void, /** 设置节点可拖拽(IE>8)*/ - draggable: PropTypes.bool, + draggable: PropTypes.looseBool, // /** 开始拖拽时调用 */ // onDragStart: (options: AntTreeNodeMouseEvent) => void, // /** dragenter 触发时调用 */ @@ -70,7 +70,7 @@ function TreeProps() { // onDragLeave: (options: AntTreeNodeMouseEvent) => void, // /** drop 触发时调用 */ // onDrop: (options: AntTreeNodeMouseEvent) => void, - showIcon: PropTypes.bool, + showIcon: PropTypes.looseBool, icon: PropTypes.func, switcherIcon: PropTypes.any, prefixCls: PropTypes.string, @@ -82,7 +82,7 @@ function TreeProps() { * 替换treeNode中 title,key,children字段为treeData中对应的字段 */ replaceFields: PropTypes.object, - blockNode: PropTypes.bool, + blockNode: PropTypes.looseBool, /** 展开/收起节点时触发 */ onExpand: PropTypes.func, /** 点击复选框触发 */ diff --git a/components/vc-align/Align.jsx b/components/vc-align/Align.jsx index f2dabd69f..50bb5f97d 100644 --- a/components/vc-align/Align.jsx +++ b/components/vc-align/Align.jsx @@ -24,8 +24,8 @@ export default { align: PropTypes.object.isRequired, target: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).def(() => window), monitorBufferTime: PropTypes.number.def(50), - monitorWindowResize: PropTypes.bool.def(false), - disabled: PropTypes.bool.def(false), + monitorWindowResize: PropTypes.looseBool.def(false), + disabled: PropTypes.looseBool.def(false), }, data() { this.aligned = false; diff --git a/components/vc-calendar/src/Calendar.jsx b/components/vc-calendar/src/Calendar.jsx index f4ee34289..e0e929790 100644 --- a/components/vc-calendar/src/Calendar.jsx +++ b/components/vc-calendar/src/Calendar.jsx @@ -31,7 +31,7 @@ const Calendar = { PropTypes.arrayOf(PropTypes.string), PropTypes.func, ]), - visible: PropTypes.bool.def(true), + visible: PropTypes.looseBool.def(true), prefixCls: PropTypes.string.def('rc-calendar'), // prefixCls: PropTypes.string, defaultValue: PropTypes.object, @@ -40,10 +40,10 @@ const Calendar = { defaultSelectedValue: PropTypes.object, mode: PropTypes.oneOf(['time', 'date', 'month', 'year', 'decade']), // locale: PropTypes.object, - showDateInput: PropTypes.bool.def(true), - showWeekNumber: PropTypes.bool, - showToday: PropTypes.bool.def(true), - showOk: PropTypes.bool, + showDateInput: PropTypes.looseBool.def(true), + showWeekNumber: PropTypes.looseBool, + showToday: PropTypes.looseBool.def(true), + showOk: PropTypes.looseBool, // onSelect: PropTypes.func, // onOk: PropTypes.func, // onKeyDown: PropTypes.func, @@ -58,9 +58,9 @@ const Calendar = { renderFooter: PropTypes.func.def(() => null), renderSidebar: PropTypes.func.def(() => null), clearIcon: PropTypes.any, - focusablePanel: PropTypes.bool.def(true), + focusablePanel: PropTypes.looseBool.def(true), inputMode: PropTypes.string, - inputReadOnly: PropTypes.bool, + inputReadOnly: PropTypes.looseBool, monthCellRender: PropTypes.func, monthCellContentRender: PropTypes.func, }, diff --git a/components/vc-calendar/src/FullCalendar.jsx b/components/vc-calendar/src/FullCalendar.jsx index f8410607b..ce86b09aa 100644 --- a/components/vc-calendar/src/FullCalendar.jsx +++ b/components/vc-calendar/src/FullCalendar.jsx @@ -14,19 +14,19 @@ const FullCalendar = { props: { locale: PropTypes.object.def(enUs), format: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.func]), - visible: PropTypes.bool.def(true), + visible: PropTypes.looseBool.def(true), prefixCls: PropTypes.string.def('rc-calendar'), defaultType: PropTypes.string.def('date'), type: PropTypes.string, - fullscreen: PropTypes.bool.def(false), + fullscreen: PropTypes.looseBool.def(false), monthCellRender: PropTypes.func, dateCellRender: PropTypes.func, - showTypeSwitch: PropTypes.bool.def(true), + showTypeSwitch: PropTypes.looseBool.def(true), Select: PropTypes.object.isRequired, headerComponents: PropTypes.array, headerComponent: PropTypes.object, // The whole header component headerRender: PropTypes.func, - showHeader: PropTypes.bool.def(true), + showHeader: PropTypes.looseBool.def(true), disabledDate: PropTypes.func, value: PropTypes.object, defaultValue: PropTypes.object, diff --git a/components/vc-calendar/src/MonthCalendar.jsx b/components/vc-calendar/src/MonthCalendar.jsx index d36b929c2..ae19bae81 100644 --- a/components/vc-calendar/src/MonthCalendar.jsx +++ b/components/vc-calendar/src/MonthCalendar.jsx @@ -13,7 +13,7 @@ const MonthCalendar = { props: { locale: PropTypes.object.def(enUs), format: PropTypes.string, - visible: PropTypes.bool.def(true), + visible: PropTypes.looseBool.def(true), prefixCls: PropTypes.string.def('rc-calendar'), monthCellRender: PropTypes.func, value: PropTypes.object, diff --git a/components/vc-calendar/src/Picker.jsx b/components/vc-calendar/src/Picker.jsx index fd55b26f2..d38a2274e 100644 --- a/components/vc-calendar/src/Picker.jsx +++ b/components/vc-calendar/src/Picker.jsx @@ -29,15 +29,15 @@ const Picker = { inheritAttrs: false, props: { animation: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, transitionName: PropTypes.string, format: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.func]), // onChange: PropTypes.func, // onOpenChange: PropTypes.func, getCalendarContainer: PropTypes.func, calendar: PropTypes.any, - open: PropTypes.bool, - defaultOpen: PropTypes.bool.def(false), + open: PropTypes.looseBool, + defaultOpen: PropTypes.looseBool.def(false), prefixCls: PropTypes.string.def('rc-calendar-picker'), placement: PropTypes.any.def('bottomLeft'), value: TimeType, diff --git a/components/vc-calendar/src/RangeCalendar.jsx b/components/vc-calendar/src/RangeCalendar.jsx index 41baa648c..5ef133bec 100644 --- a/components/vc-calendar/src/RangeCalendar.jsx +++ b/components/vc-calendar/src/RangeCalendar.jsx @@ -84,7 +84,7 @@ const RangeCalendar = { inheritAttrs: false, props: { locale: PropTypes.object.def(enUs), - visible: PropTypes.bool.def(true), + visible: PropTypes.looseBool.def(true), prefixCls: PropTypes.string.def('rc-calendar'), dateInputPlaceholder: PropTypes.any, seperator: PropTypes.string.def('~'), @@ -92,14 +92,14 @@ const RangeCalendar = { value: PropTypes.any, hoverValue: PropTypes.any, mode: PropTypes.arrayOf(PropTypes.oneOf(['time', 'date', 'month', 'year', 'decade'])), - showDateInput: PropTypes.bool.def(true), + showDateInput: PropTypes.looseBool.def(true), timePicker: PropTypes.any, - showOk: PropTypes.bool, - showToday: PropTypes.bool.def(true), + showOk: PropTypes.looseBool, + showToday: PropTypes.looseBool.def(true), defaultSelectedValue: PropTypes.array.def([]), selectedValue: PropTypes.array, - showClear: PropTypes.bool, - showWeekNumber: PropTypes.bool, + showClear: PropTypes.looseBool, + showWeekNumber: PropTypes.looseBool, // locale: PropTypes.object, // onChange: PropTypes.func, // onSelect: PropTypes.func, @@ -119,7 +119,7 @@ const RangeCalendar = { renderSidebar: PropTypes.func.def(() => null), dateRender: PropTypes.func, clearIcon: PropTypes.any, - inputReadOnly: PropTypes.bool, + inputReadOnly: PropTypes.looseBool, }, mixins: [BaseMixin, CommonMixin], diff --git a/components/vc-calendar/src/calendar/CalendarFooter.jsx b/components/vc-calendar/src/calendar/CalendarFooter.jsx index 05dc2bd82..ff365a4a0 100644 --- a/components/vc-calendar/src/calendar/CalendarFooter.jsx +++ b/components/vc-calendar/src/calendar/CalendarFooter.jsx @@ -11,20 +11,20 @@ const CalendarFooter = { mixins: [BaseMixin], props: { prefixCls: PropTypes.string, - showDateInput: PropTypes.bool, + showDateInput: PropTypes.looseBool, disabledTime: PropTypes.any, timePicker: PropTypes.any, selectedValue: PropTypes.any, - showOk: PropTypes.bool, + showOk: PropTypes.looseBool, // onSelect: PropTypes.func, value: PropTypes.object, renderFooter: PropTypes.func, defaultValue: PropTypes.object, locale: PropTypes.object, - showToday: PropTypes.bool, + showToday: PropTypes.looseBool, disabledDate: PropTypes.func, - showTimePicker: PropTypes.bool, - okDisabled: PropTypes.bool, + showTimePicker: PropTypes.looseBool, + okDisabled: PropTypes.looseBool, mode: PropTypes.string, }, methods: { diff --git a/components/vc-calendar/src/calendar/CalendarHeader.jsx b/components/vc-calendar/src/calendar/CalendarHeader.jsx index 4c0652f49..ffa238b3f 100644 --- a/components/vc-calendar/src/calendar/CalendarHeader.jsx +++ b/components/vc-calendar/src/calendar/CalendarHeader.jsx @@ -29,7 +29,7 @@ const CalendarHeader = { prefixCls: PropTypes.string, value: PropTypes.object, // onValueChange: PropTypes.func, - showTimePicker: PropTypes.bool, + showTimePicker: PropTypes.looseBool, // onPanelChange: PropTypes.func, locale: PropTypes.object, enablePrev: PropTypes.any.def(1), diff --git a/components/vc-calendar/src/date/DateInput.jsx b/components/vc-calendar/src/date/DateInput.jsx index dd1ba167a..1524694b1 100644 --- a/components/vc-calendar/src/date/DateInput.jsx +++ b/components/vc-calendar/src/date/DateInput.jsx @@ -34,9 +34,9 @@ const DateInput = { selectedValue: PropTypes.object, clearIcon: PropTypes.any, inputMode: PropTypes.string, - inputReadOnly: PropTypes.bool, - disabled: PropTypes.bool, - showClear: PropTypes.bool, + inputReadOnly: PropTypes.looseBool, + disabled: PropTypes.looseBool, + showClear: PropTypes.looseBool, }, data() { diff --git a/components/vc-calendar/src/date/DateTBody.jsx b/components/vc-calendar/src/date/DateTBody.jsx index 3b6646724..7aca5ea92 100644 --- a/components/vc-calendar/src/date/DateTBody.jsx +++ b/components/vc-calendar/src/date/DateTBody.jsx @@ -37,7 +37,7 @@ const DateTBody = { selectedValue: PropTypes.oneOfType([PropTypes.any, PropTypes.arrayOf(PropTypes.any)]), value: PropTypes.object, hoverValue: PropTypes.any.def([]), - showWeekNumber: PropTypes.bool, + showWeekNumber: PropTypes.looseBool, }, render() { diff --git a/components/vc-calendar/src/full-calendar/CalendarHeader.jsx b/components/vc-calendar/src/full-calendar/CalendarHeader.jsx index 809dd86da..3800fcfa4 100644 --- a/components/vc-calendar/src/full-calendar/CalendarHeader.jsx +++ b/components/vc-calendar/src/full-calendar/CalendarHeader.jsx @@ -16,7 +16,7 @@ const CalendarHeader = { Select: PropTypes.object, prefixCls: PropTypes.string, type: PropTypes.string, - showTypeSwitch: PropTypes.bool, + showTypeSwitch: PropTypes.looseBool, headerComponents: PropTypes.array, }, methods: { diff --git a/components/vc-calendar/src/range-calendar/CalendarPart.jsx b/components/vc-calendar/src/range-calendar/CalendarPart.jsx index 6f45122bb..5f6724817 100644 --- a/components/vc-calendar/src/range-calendar/CalendarPart.jsx +++ b/components/vc-calendar/src/range-calendar/CalendarPart.jsx @@ -18,9 +18,9 @@ const CalendarPart = { selectedValue: PropTypes.any, direction: PropTypes.any, locale: PropTypes.any, - showDateInput: PropTypes.bool, - showTimePicker: PropTypes.bool, - showWeekNumber: PropTypes.bool, + showDateInput: PropTypes.looseBool, + showTimePicker: PropTypes.looseBool, + showWeekNumber: PropTypes.looseBool, format: PropTypes.any, placeholder: PropTypes.any, disabledDate: PropTypes.any, @@ -35,7 +35,7 @@ const CalendarPart = { clearIcon: PropTypes.any, dateRender: PropTypes.func, inputMode: PropTypes.string, - inputReadOnly: PropTypes.bool, + inputReadOnly: PropTypes.looseBool, }, render() { const { $props: props } = this; diff --git a/components/vc-cascader/Cascader.jsx b/components/vc-cascader/Cascader.jsx index 6146ecd33..5d81dd2b0 100644 --- a/components/vc-cascader/Cascader.jsx +++ b/components/vc-cascader/Cascader.jsx @@ -58,8 +58,8 @@ export default { options: PropTypes.array, // onChange: PropTypes.func, // onPopupVisibleChange: PropTypes.func, - popupVisible: PropTypes.bool, - disabled: PropTypes.bool.def(false), + popupVisible: PropTypes.looseBool, + disabled: PropTypes.looseBool.def(false), transitionName: PropTypes.string.def(''), popupClassName: PropTypes.string.def(''), popupStyle: PropTypes.object.def(() => ({})), @@ -68,7 +68,7 @@ export default { dropdownMenuColumnStyle: PropTypes.object, builtinPlacements: PropTypes.object.def(BUILT_IN_PLACEMENTS), loadData: PropTypes.func, - changeOnSelect: PropTypes.bool, + changeOnSelect: PropTypes.looseBool, // onKeyDown: PropTypes.func, expandTrigger: PropTypes.string.def('click'), fieldNames: PropTypes.object.def(() => ({ diff --git a/components/vc-cascader/Menus.jsx b/components/vc-cascader/Menus.jsx index ba40abbca..ba26f5b6e 100644 --- a/components/vc-cascader/Menus.jsx +++ b/components/vc-cascader/Menus.jsx @@ -14,7 +14,7 @@ export default { prefixCls: PropTypes.string.def('rc-cascader-menus'), expandTrigger: PropTypes.string.def('click'), // onSelect: PropTypes.func, - visible: PropTypes.bool.def(false), + visible: PropTypes.looseBool.def(false), dropdownMenuColumnStyle: PropTypes.object, defaultFieldNames: PropTypes.object, fieldNames: PropTypes.object, diff --git a/components/vc-checkbox/src/Checkbox.jsx b/components/vc-checkbox/src/Checkbox.jsx index 2828dcd25..79de0f741 100644 --- a/components/vc-checkbox/src/Checkbox.jsx +++ b/components/vc-checkbox/src/Checkbox.jsx @@ -14,16 +14,16 @@ export default { name: PropTypes.string, id: PropTypes.string, type: PropTypes.string, - defaultChecked: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]), - checked: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]), - disabled: PropTypes.bool, + defaultChecked: PropTypes.oneOfType([PropTypes.number, PropTypes.looseBool]), + checked: PropTypes.oneOfType([PropTypes.number, PropTypes.looseBool]), + disabled: PropTypes.looseBool, // onFocus: PropTypes.func, // onBlur: PropTypes.func, // onChange: PropTypes.func, // onClick: PropTypes.func, tabindex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - readonly: PropTypes.bool, - autofocus: PropTypes.bool, + readonly: PropTypes.looseBool, + autofocus: PropTypes.looseBool, value: PropTypes.any, }, { diff --git a/components/vc-collapse/src/PanelContent.jsx b/components/vc-collapse/src/PanelContent.jsx index 5949cd075..a01cb4893 100644 --- a/components/vc-collapse/src/PanelContent.jsx +++ b/components/vc-collapse/src/PanelContent.jsx @@ -5,9 +5,9 @@ export default { name: 'PanelContent', props: { prefixCls: PropTypes.string, - isActive: PropTypes.bool, - destroyInactivePanel: PropTypes.bool, - forceRender: PropTypes.bool, + isActive: PropTypes.looseBool, + destroyInactivePanel: PropTypes.looseBool, + forceRender: PropTypes.looseBool, role: PropTypes.any, }, data() { diff --git a/components/vc-collapse/src/commonProps.js b/components/vc-collapse/src/commonProps.js index 73f8b16d3..ed77a3654 100644 --- a/components/vc-collapse/src/commonProps.js +++ b/components/vc-collapse/src/commonProps.js @@ -12,9 +12,9 @@ const collapseProps = () => ({ PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), ]), - accordion: PropTypes.bool, - destroyInactivePanel: PropTypes.bool, - bordered: PropTypes.bool, + accordion: PropTypes.looseBool, + destroyInactivePanel: PropTypes.looseBool, + bordered: PropTypes.looseBool, expandIcon: PropTypes.func, openAnimation: PropTypes.object, expandIconPosition: PropTypes.oneOf(['left', 'right']), @@ -27,12 +27,12 @@ const panelProps = () => ({ prefixCls: PropTypes.string, header: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.node]), headerClass: PropTypes.string, - showArrow: PropTypes.bool, - isActive: PropTypes.bool, - destroyInactivePanel: PropTypes.bool, - disabled: PropTypes.bool, - accordion: PropTypes.bool, - forceRender: PropTypes.bool, + showArrow: PropTypes.looseBool, + isActive: PropTypes.looseBool, + destroyInactivePanel: PropTypes.looseBool, + disabled: PropTypes.looseBool, + accordion: PropTypes.looseBool, + forceRender: PropTypes.looseBool, expandIcon: PropTypes.func, extra: PropTypes.any, panelKey: PropTypes.any, diff --git a/components/vc-dialog/IDialogPropTypes.js b/components/vc-dialog/IDialogPropTypes.js index 329c15b35..1d3849bb6 100644 --- a/components/vc-dialog/IDialogPropTypes.js +++ b/components/vc-dialog/IDialogPropTypes.js @@ -2,14 +2,14 @@ import PropTypes from '../_util/vue-types'; function IDialogPropTypes() { return { - keyboard: PropTypes.bool, - mask: PropTypes.bool, + keyboard: PropTypes.looseBool, + mask: PropTypes.looseBool, afterClose: PropTypes.func, // onClose: PropTypes. (e: SyntheticEvent) =>any, - closable: PropTypes.bool, - maskClosable: PropTypes.bool, - visible: PropTypes.bool, - destroyOnClose: PropTypes.bool, + closable: PropTypes.looseBool, + maskClosable: PropTypes.looseBool, + visible: PropTypes.looseBool, + destroyOnClose: PropTypes.looseBool, mousePosition: PropTypes.shape({ x: PropTypes.number, y: PropTypes.number, @@ -35,11 +35,11 @@ function IDialogPropTypes() { dialogStyle: PropTypes.object.def(() => ({})), dialogClass: PropTypes.string.def(''), closeIcon: PropTypes.any, - forceRender: PropTypes.bool, + forceRender: PropTypes.looseBool, getOpenCount: PropTypes.func, // https://github.com/ant-design/ant-design/issues/19771 // https://github.com/react-component/dialog/issues/95 - focusTriggerAfterClose: PropTypes.bool, + focusTriggerAfterClose: PropTypes.looseBool, onClose: PropTypes.func, }; } diff --git a/components/vc-dialog/LazyRenderBox.jsx b/components/vc-dialog/LazyRenderBox.jsx index 12058a273..01ca6a466 100644 --- a/components/vc-dialog/LazyRenderBox.jsx +++ b/components/vc-dialog/LazyRenderBox.jsx @@ -2,9 +2,9 @@ import PropTypes from '../_util/vue-types'; import { getSlot } from '../_util/props-util'; const ILazyRenderBoxPropTypes = { - visible: PropTypes.bool, + visible: PropTypes.looseBool, hiddenClassName: PropTypes.string, - forceRender: PropTypes.bool, + forceRender: PropTypes.looseBool, }; export default { diff --git a/components/vc-drawer/src/IDrawerPropTypes.js b/components/vc-drawer/src/IDrawerPropTypes.js index 6e0cc4bb1..44867cb16 100644 --- a/components/vc-drawer/src/IDrawerPropTypes.js +++ b/components/vc-drawer/src/IDrawerPropTypes.js @@ -3,9 +3,9 @@ import PropTypes from '../../_util/vue-types'; const IProps = { width: PropTypes.any, height: PropTypes.any, - defaultOpen: PropTypes.bool, - firstEnter: PropTypes.bool, - open: PropTypes.bool, + defaultOpen: PropTypes.looseBool, + firstEnter: PropTypes.looseBool, + open: PropTypes.looseBool, prefixCls: PropTypes.string, placement: PropTypes.string, level: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), @@ -13,24 +13,24 @@ const IProps = { ease: PropTypes.string, duration: PropTypes.string, handler: PropTypes.any, - showMask: PropTypes.bool, + showMask: PropTypes.looseBool, maskStyle: PropTypes.object, className: PropTypes.string, wrapStyle: PropTypes.object, - maskClosable: PropTypes.bool, + maskClosable: PropTypes.looseBool, afterVisibleChange: PropTypes.func, - keyboard: PropTypes.bool, + keyboard: PropTypes.looseBool, }; const IDrawerProps = { ...IProps, wrapperClassName: PropTypes.string, - forceRender: PropTypes.bool, + forceRender: PropTypes.looseBool, getContainer: PropTypes.oneOfType([ PropTypes.string, PropTypes.func, PropTypes.object, - PropTypes.bool, + PropTypes.looseBool, ]), }; diff --git a/components/vc-dropdown/src/Dropdown.jsx b/components/vc-dropdown/src/Dropdown.jsx index 1453b639c..d0c2ecb17 100644 --- a/components/vc-dropdown/src/Dropdown.jsx +++ b/components/vc-dropdown/src/Dropdown.jsx @@ -15,7 +15,7 @@ import { cloneElement } from '../../_util/vnode'; export default { mixins: [BaseMixin], props: { - minOverlayWidthMatchTrigger: PropTypes.bool, + minOverlayWidthMatchTrigger: PropTypes.looseBool, prefixCls: PropTypes.string.def('rc-dropdown'), transitionName: PropTypes.string, overlayClassName: PropTypes.string.def(''), @@ -26,12 +26,12 @@ export default { placement: PropTypes.string.def('bottomLeft'), overlay: PropTypes.any, trigger: PropTypes.array.def(['hover']), - alignPoint: PropTypes.bool, + alignPoint: PropTypes.looseBool, showAction: PropTypes.array.def([]), hideAction: PropTypes.array.def([]), getPopupContainer: PropTypes.func, - visible: PropTypes.bool, - defaultVisible: PropTypes.bool.def(false), + visible: PropTypes.looseBool, + defaultVisible: PropTypes.looseBool.def(false), mouseEnterDelay: PropTypes.number.def(0.15), mouseLeaveDelay: PropTypes.number.def(0.1), }, diff --git a/components/vc-input-number/src/InputHandler.js b/components/vc-input-number/src/InputHandler.js index 42b929f5c..287521391 100755 --- a/components/vc-input-number/src/InputHandler.js +++ b/components/vc-input-number/src/InputHandler.js @@ -7,7 +7,7 @@ const InputHandler = { inheritAttrs: false, props: { prefixCls: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, }, render() { const { prefixCls, disabled } = this.$props; diff --git a/components/vc-input-number/src/index.js b/components/vc-input-number/src/index.js index 6f9a72971..3fc7f454e 100755 --- a/components/vc-input-number/src/index.js +++ b/components/vc-input-number/src/index.js @@ -42,24 +42,24 @@ const isEqual = (oldValue, newValue) => const inputNumberProps = { value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - focusOnUpDown: PropTypes.bool, - autofocus: PropTypes.bool, + focusOnUpDown: PropTypes.looseBool, + autofocus: PropTypes.looseBool, // onChange: PropTypes.func, // onKeyDown: PropTypes.func, // onKeyUp: PropTypes.func, prefixCls: PropTypes.string, tabindex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), placeholder: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, // onFocus: PropTypes.func, // onBlur: PropTypes.func, - readonly: PropTypes.bool, + readonly: PropTypes.looseBool, max: PropTypes.number, min: PropTypes.number, step: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), upHandler: PropTypes.any, downHandler: PropTypes.any, - useTouch: PropTypes.bool, + useTouch: PropTypes.looseBool, formatter: PropTypes.func, parser: PropTypes.func, // onMouseEnter: PropTypes.func, @@ -67,7 +67,7 @@ const inputNumberProps = { // onMouseOver: PropTypes.func, // onMouseOut: PropTypes.func, precision: PropTypes.number, - required: PropTypes.bool, + required: PropTypes.looseBool, pattern: PropTypes.string, decimalSeparator: PropTypes.string, autocomplete: PropTypes.string, diff --git a/components/vc-lazy-load/src/LazyLoad.jsx b/components/vc-lazy-load/src/LazyLoad.jsx index aec38dc6c..f4ec677b5 100644 --- a/components/vc-lazy-load/src/LazyLoad.jsx +++ b/components/vc-lazy-load/src/LazyLoad.jsx @@ -10,7 +10,7 @@ import inViewport from './utils/inViewport'; import { watchEffect } from 'vue'; const lazyLoadProps = { - debounce: PropTypes.bool, + debounce: PropTypes.looseBool, elementType: PropTypes.string, height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), offset: PropTypes.number, diff --git a/components/vc-m-feedback/src/PropTypes.jsx b/components/vc-m-feedback/src/PropTypes.jsx index 332859fc5..9ff09ce49 100755 --- a/components/vc-m-feedback/src/PropTypes.jsx +++ b/components/vc-m-feedback/src/PropTypes.jsx @@ -1,7 +1,7 @@ import PropTypes from '../../_util/vue-types'; export const ITouchProps = { - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, activeClassName: PropTypes.string, activeStyle: PropTypes.any, // onTouchStart: PropTypes.func, diff --git a/components/vc-mentions/src/KeywordTrigger.jsx b/components/vc-mentions/src/KeywordTrigger.jsx index 86bb6add4..2e5f01d29 100644 --- a/components/vc-mentions/src/KeywordTrigger.jsx +++ b/components/vc-mentions/src/KeywordTrigger.jsx @@ -26,11 +26,11 @@ const BUILT_IN_PLACEMENTS = { export default { name: 'KeywordTrigger', props: { - loading: PropTypes.bool, + loading: PropTypes.looseBool, options: PropTypes.arrayOf(OptionProps), prefixCls: PropTypes.string, placement: PropTypes.oneOf(PlaceMent), - visible: PropTypes.bool, + visible: PropTypes.looseBool, transitionName: PropTypes.string, getPopupContainer: PropTypes.func, }, diff --git a/components/vc-mentions/src/Option.jsx b/components/vc-mentions/src/Option.jsx index 41ef0a0a8..b309a2dfb 100644 --- a/components/vc-mentions/src/Option.jsx +++ b/components/vc-mentions/src/Option.jsx @@ -2,7 +2,7 @@ import PropTypes from '../../_util/vue-types'; export const OptionProps = { value: PropTypes.string, - disabled: PropTypes.boolean, + disabled: PropTypes.looseBoolean, children: PropTypes.any, }; diff --git a/components/vc-mentions/src/mentionsProps.js b/components/vc-mentions/src/mentionsProps.js index 3d40339c9..8da68ca74 100644 --- a/components/vc-mentions/src/mentionsProps.js +++ b/components/vc-mentions/src/mentionsProps.js @@ -7,12 +7,12 @@ import { import { PlaceMent } from './placement'; export const mentionsProps = { - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, prefix: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), prefixCls: PropTypes.string, value: PropTypes.string, defaultValue: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, notFoundContent: PropTypes.any, split: PropTypes.string, transitionName: PropTypes.string, diff --git a/components/vc-menu/DOMWrap.jsx b/components/vc-menu/DOMWrap.jsx index 2802e0e05..1aedcac3e 100644 --- a/components/vc-menu/DOMWrap.jsx +++ b/components/vc-menu/DOMWrap.jsx @@ -287,7 +287,7 @@ DOMWrap.props = { level: PropTypes.number, theme: PropTypes.string, overflowedIndicator: PropTypes.node, - visible: PropTypes.bool, + visible: PropTypes.looseBool, hiddenClassName: PropTypes.string, tag: PropTypes.string.def('div'), }; diff --git a/components/vc-menu/Menu.jsx b/components/vc-menu/Menu.jsx index 5ed103ea8..004e814d8 100644 --- a/components/vc-menu/Menu.jsx +++ b/components/vc-menu/Menu.jsx @@ -11,7 +11,7 @@ const Menu = { inheritAttrs: false, props: { ...commonPropsType, - selectable: PropTypes.bool.def(true), + selectable: PropTypes.looseBool.def(true), }, mixins: [BaseMixin], data() { diff --git a/components/vc-menu/MenuItem.jsx b/components/vc-menu/MenuItem.jsx index 65c120a31..c521b872a 100644 --- a/components/vc-menu/MenuItem.jsx +++ b/components/vc-menu/MenuItem.jsx @@ -11,17 +11,17 @@ const props = { attribute: PropTypes.object, rootPrefixCls: PropTypes.string, eventKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - active: PropTypes.bool, + active: PropTypes.looseBool, selectedKeys: PropTypes.array, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, title: PropTypes.any, index: PropTypes.number, inlineIndent: PropTypes.number.def(24), level: PropTypes.number.def(1), mode: PropTypes.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, value: PropTypes.any, - isSelected: PropTypes.bool, + isSelected: PropTypes.looseBool, manualRef: PropTypes.func.def(noop), role: PropTypes.any, subMenuKey: PropTypes.string, diff --git a/components/vc-menu/MenuItemGroup.jsx b/components/vc-menu/MenuItemGroup.jsx index 1776cf7b7..d52f5138c 100644 --- a/components/vc-menu/MenuItemGroup.jsx +++ b/components/vc-menu/MenuItemGroup.jsx @@ -11,7 +11,7 @@ const MenuItemGroup = { className: PropTypes.string, subMenuKey: PropTypes.string, rootPrefixCls: PropTypes.string, - disabled: PropTypes.bool.def(true), + disabled: PropTypes.looseBool.def(true), title: PropTypes.any, }, isMenuItemGroup: true, diff --git a/components/vc-menu/SubMenu.jsx b/components/vc-menu/SubMenu.jsx index 725962d51..69c2efcc2 100644 --- a/components/vc-menu/SubMenu.jsx +++ b/components/vc-menu/SubMenu.jsx @@ -42,23 +42,23 @@ const SubMenu = { openChange: PropTypes.func.def(noop), rootPrefixCls: PropTypes.string, eventKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - multiple: PropTypes.bool, - active: PropTypes.bool, // TODO: remove - isRootMenu: PropTypes.bool.def(false), + multiple: PropTypes.looseBool, + active: PropTypes.looseBool, // TODO: remove + isRootMenu: PropTypes.looseBool.def(false), index: PropTypes.number, triggerSubMenuAction: PropTypes.string, popupClassName: PropTypes.string, getPopupContainer: PropTypes.func, - forceSubMenuRender: PropTypes.bool, + forceSubMenuRender: PropTypes.looseBool, openAnimation: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, subMenuOpenDelay: PropTypes.number.def(0.1), subMenuCloseDelay: PropTypes.number.def(0.1), level: PropTypes.number.def(1), inlineIndent: PropTypes.number.def(24), openTransitionName: PropTypes.string, popupOffset: PropTypes.array, - isOpen: PropTypes.bool, + isOpen: PropTypes.looseBool, store: PropTypes.object, mode: PropTypes.oneOf([ 'horizontal', diff --git a/components/vc-menu/SubPopupMenu.jsx b/components/vc-menu/SubPopupMenu.jsx index 72b4bca7d..264ab276f 100644 --- a/components/vc-menu/SubPopupMenu.jsx +++ b/components/vc-menu/SubPopupMenu.jsx @@ -88,14 +88,14 @@ const SubPopupMenu = { openTransitionName: PropTypes.string, openAnimation: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), openKeys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), - visible: PropTypes.bool, + visible: PropTypes.looseBool, eventKey: PropTypes.string, store: PropTypes.object, // adding in refactor - focusable: PropTypes.bool, - multiple: PropTypes.bool, - defaultActiveFirst: PropTypes.bool, + focusable: PropTypes.looseBool, + multiple: PropTypes.looseBool, + defaultActiveFirst: PropTypes.looseBool, activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), selectedKeys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), defaultSelectedKeys: PropTypes.arrayOf( diff --git a/components/vc-menu/commonPropsType.js b/components/vc-menu/commonPropsType.js index f7bab2c2b..309996393 100644 --- a/components/vc-menu/commonPropsType.js +++ b/components/vc-menu/commonPropsType.js @@ -1,10 +1,10 @@ import PropTypes from '../_util/vue-types'; export default { prefixCls: PropTypes.string.def('rc-menu'), - focusable: PropTypes.bool.def(true), - multiple: PropTypes.bool, - defaultActiveFirst: PropTypes.bool, - visible: PropTypes.bool.def(true), + focusable: PropTypes.looseBool.def(true), + multiple: PropTypes.looseBool, + defaultActiveFirst: PropTypes.looseBool, + visible: PropTypes.looseBool.def(true), activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), selectedKeys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), defaultSelectedKeys: PropTypes.arrayOf( @@ -30,9 +30,9 @@ export default { theme: PropTypes.oneOf(['light', 'dark']).def('light'), getPopupContainer: PropTypes.func, openTransitionName: PropTypes.string, - forceSubMenuRender: PropTypes.bool, - selectable: PropTypes.bool, - isRootMenu: PropTypes.bool.def(true), + forceSubMenuRender: PropTypes.looseBool, + selectable: PropTypes.looseBool, + isRootMenu: PropTypes.looseBool.def(true), builtinPlacements: PropTypes.object.def(() => ({})), itemIcon: PropTypes.any, expandIcon: PropTypes.any, diff --git a/components/vc-notification/Notice.jsx b/components/vc-notification/Notice.jsx index 01717c303..0a6f2346c 100644 --- a/components/vc-notification/Notice.jsx +++ b/components/vc-notification/Notice.jsx @@ -6,9 +6,9 @@ export default { mixins: [BaseMixin], props: { duration: PropTypes.number.def(1.5), - closable: PropTypes.bool, + closable: PropTypes.looseBool, prefixCls: PropTypes.string, - update: PropTypes.bool, + update: PropTypes.looseBool, closeIcon: PropTypes.any, onClose: PropTypes.func, }, diff --git a/components/vc-pagination/Options.jsx b/components/vc-pagination/Options.jsx index 05877a00f..df1207f81 100644 --- a/components/vc-pagination/Options.jsx +++ b/components/vc-pagination/Options.jsx @@ -7,7 +7,7 @@ import antInput from '../_util/antInputDirective'; export default { mixins: [BaseMixin], props: { - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, changeSize: PropTypes.func, quickGo: PropTypes.func, selectComponentClass: PropTypes.any, diff --git a/components/vc-pagination/Pager.jsx b/components/vc-pagination/Pager.jsx index 4023aca32..65214804a 100644 --- a/components/vc-pagination/Pager.jsx +++ b/components/vc-pagination/Pager.jsx @@ -9,10 +9,10 @@ export default { props: { rootPrefixCls: PropTypes.string, page: PropTypes.number, - active: PropTypes.bool, - last: PropTypes.bool, + active: PropTypes.looseBool, + last: PropTypes.looseBool, locale: PropTypes.object, - showTitle: PropTypes.bool, + showTitle: PropTypes.looseBool, itemRender: { type: Function, default: () => {}, diff --git a/components/vc-pagination/Pagination.jsx b/components/vc-pagination/Pagination.jsx index 94290bfa5..46393599f 100644 --- a/components/vc-pagination/Pagination.jsx +++ b/components/vc-pagination/Pagination.jsx @@ -33,7 +33,7 @@ export default { mixins: [BaseMixin], inheritAttrs: false, props: { - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, prefixCls: PropTypes.string.def('rc-pagination'), selectPrefixCls: PropTypes.string.def('rc-select'), current: PropTypes.number, @@ -41,18 +41,18 @@ export default { total: PropTypes.number.def(0), pageSize: PropTypes.number, defaultPageSize: PropTypes.number.def(10), - hideOnSinglePage: PropTypes.bool.def(false), - showSizeChanger: PropTypes.bool.def(false), - showLessItems: PropTypes.bool.def(false), + hideOnSinglePage: PropTypes.looseBool.def(false), + showSizeChanger: PropTypes.looseBool.def(false), + showLessItems: PropTypes.looseBool.def(false), // showSizeChange: PropTypes.func.def(noop), selectComponentClass: PropTypes.any, - showPrevNextJumpers: PropTypes.bool.def(true), - showQuickJumper: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]).def(false), - showTitle: PropTypes.bool.def(true), + showPrevNextJumpers: PropTypes.looseBool.def(true), + showQuickJumper: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]).def(false), + showTitle: PropTypes.looseBool.def(true), pageSizeOptions: PropTypes.arrayOf(PropTypes.string), buildOptionText: PropTypes.func, showTotal: PropTypes.func, - simple: PropTypes.bool, + simple: PropTypes.looseBool, locale: PropTypes.object.def(LOCALE), itemRender: PropTypes.func, prevIcon: PropTypes.any, diff --git a/components/vc-progress/src/Circle.js b/components/vc-progress/src/Circle.js index dc129367f..9f72f1c30 100644 --- a/components/vc-progress/src/Circle.js +++ b/components/vc-progress/src/Circle.js @@ -6,7 +6,7 @@ import { propTypes, defaultProps } from './types'; const circlePropTypes = { ...propTypes, gapPosition: PropTypes.oneOf(['top', 'bottom', 'left', 'right']), - gapDegree: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.bool]), + gapDegree: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.looseBool]), }; const circleDefaultProps = { diff --git a/components/vc-rate/src/Rate.jsx b/components/vc-rate/src/Rate.jsx index 34d323888..bcac6af31 100644 --- a/components/vc-rate/src/Rate.jsx +++ b/components/vc-rate/src/Rate.jsx @@ -13,17 +13,17 @@ import { getOffsetLeft } from './util'; import Star from './Star'; const rateProps = { - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, value: PropTypes.number, defaultValue: PropTypes.number, count: PropTypes.number, - allowHalf: PropTypes.bool, - allowClear: PropTypes.bool, + allowHalf: PropTypes.looseBool, + allowClear: PropTypes.looseBool, prefixCls: PropTypes.string, character: PropTypes.any, characterRender: PropTypes.func, tabindex: PropTypes.number, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, }; function noop() {} diff --git a/components/vc-rate/src/Star.jsx b/components/vc-rate/src/Star.jsx index 9a83c4b34..8d9726674 100644 --- a/components/vc-rate/src/Star.jsx +++ b/components/vc-rate/src/Star.jsx @@ -11,11 +11,11 @@ export default { value: PropTypes.number, index: PropTypes.number, prefixCls: PropTypes.string, - allowHalf: PropTypes.bool, - disabled: PropTypes.bool, + allowHalf: PropTypes.looseBool, + disabled: PropTypes.looseBool, character: PropTypes.any, characterRender: PropTypes.func, - focused: PropTypes.bool, + focused: PropTypes.looseBool, count: PropTypes.number, }, methods: { diff --git a/components/vc-select/DropdownMenu.jsx b/components/vc-select/DropdownMenu.jsx index 0e0469c64..a1ed0d020 100644 --- a/components/vc-select/DropdownMenu.jsx +++ b/components/vc-select/DropdownMenu.jsx @@ -13,10 +13,10 @@ export default { inheritAttrs: false, props: { ariaId: PropTypes.string, - defaultActiveFirstOption: PropTypes.bool, + defaultActiveFirstOption: PropTypes.looseBool, value: PropTypes.any, dropdownMenuStyle: PropTypes.object, - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, // onPopupFocus: PropTypes.func, // onPopupScroll: PropTypes.func, // onMenuDeSelect: PropTypes.func, @@ -24,7 +24,7 @@ export default { prefixCls: PropTypes.string, menuItems: PropTypes.any, inputValue: PropTypes.string, - visible: PropTypes.bool, + visible: PropTypes.looseBool, backfillValue: PropTypes.any, firstActiveValue: PropTypes.string, menuItemSelectedIcon: PropTypes.any, diff --git a/components/vc-select/Option.jsx b/components/vc-select/Option.jsx index 6704e4c42..6225e64a7 100644 --- a/components/vc-select/Option.jsx +++ b/components/vc-select/Option.jsx @@ -4,7 +4,7 @@ export default { props: { value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }, isSelectOption: true, diff --git a/components/vc-select/PropTypes.js b/components/vc-select/PropTypes.js index 271c9355e..d1fb61b7c 100644 --- a/components/vc-select/PropTypes.js +++ b/components/vc-select/PropTypes.js @@ -1,15 +1,15 @@ import PropTypes from '../_util/vue-types'; export const SelectPropTypes = { - defaultActiveFirstOption: PropTypes.bool, - multiple: PropTypes.bool, + defaultActiveFirstOption: PropTypes.looseBool, + multiple: PropTypes.looseBool, filterOption: PropTypes.any, // children: PropTypes.any, - showSearch: PropTypes.bool, - disabled: PropTypes.bool, - allowClear: PropTypes.bool, - showArrow: PropTypes.bool, - tags: PropTypes.bool, + showSearch: PropTypes.looseBool, + disabled: PropTypes.looseBool, + allowClear: PropTypes.looseBool, + showArrow: PropTypes.looseBool, + tags: PropTypes.looseBool, prefixCls: PropTypes.string, // className: PropTypes.string, transitionName: PropTypes.string, @@ -17,8 +17,8 @@ export const SelectPropTypes = { optionFilterProp: PropTypes.string, animation: PropTypes.string, choiceTransitionName: PropTypes.string, - open: PropTypes.bool, - defaultOpen: PropTypes.bool, + open: PropTypes.looseBool, + defaultOpen: PropTypes.looseBool, // onChange: PropTypes.func, // onBlur: PropTypes.func, // onFocus: PropTypes.func, @@ -30,8 +30,8 @@ export const SelectPropTypes = { // onInputKeyDown: PropTypes.func, placeholder: PropTypes.any, // onDeselect: PropTypes.func, - labelInValue: PropTypes.bool, - loading: PropTypes.bool, + labelInValue: PropTypes.looseBool, + loading: PropTypes.looseBool, value: PropTypes.any, defaultValue: PropTypes.any, dropdownStyle: PropTypes.object, @@ -42,7 +42,7 @@ export const SelectPropTypes = { tokenSeparators: PropTypes.arrayOf(PropTypes.string), getInputElement: PropTypes.func, showAction: PropTypes.arrayOf(PropTypes.string), - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, getPopupContainer: PropTypes.func, clearIcon: PropTypes.any, inputIcon: PropTypes.any, @@ -50,9 +50,9 @@ export const SelectPropTypes = { menuItemSelectedIcon: PropTypes.any, dropdownRender: PropTypes.func, mode: PropTypes.oneOf(['multiple', 'tags']), - backfill: PropTypes.bool, + backfill: PropTypes.looseBool, dropdownAlign: PropTypes.any, - dropdownMatchSelectWidth: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, dropdownMenuStyle: PropTypes.object, notFoundContent: PropTypes.oneOfType([String, Number]), tabindex: PropTypes.oneOfType([String, Number]), diff --git a/components/vc-select/Select.jsx b/components/vc-select/Select.jsx index 3a4a74012..267f2c29e 100644 --- a/components/vc-select/Select.jsx +++ b/components/vc-select/Select.jsx @@ -81,24 +81,24 @@ const Select = { props: { ...SelectPropTypes, prefixCls: SelectPropTypes.prefixCls.def('rc-select'), - defaultOpen: PropTypes.bool.def(false), + defaultOpen: PropTypes.looseBool.def(false), labelInValue: SelectPropTypes.labelInValue.def(false), defaultActiveFirstOption: SelectPropTypes.defaultActiveFirstOption.def(true), showSearch: SelectPropTypes.showSearch.def(true), allowClear: SelectPropTypes.allowClear.def(false), placeholder: SelectPropTypes.placeholder.def(''), // showArrow: SelectPropTypes.showArrow.def(true), - dropdownMatchSelectWidth: PropTypes.bool.def(true), + dropdownMatchSelectWidth: PropTypes.looseBool.def(true), dropdownStyle: SelectPropTypes.dropdownStyle.def(() => ({})), dropdownMenuStyle: PropTypes.object.def(() => ({})), optionFilterProp: SelectPropTypes.optionFilterProp.def('value'), optionLabelProp: SelectPropTypes.optionLabelProp.def('value'), notFoundContent: PropTypes.any.def('Not Found'), - backfill: PropTypes.bool.def(false), + backfill: PropTypes.looseBool.def(false), showAction: SelectPropTypes.showAction.def(['click']), - combobox: PropTypes.bool.def(false), + combobox: PropTypes.looseBool.def(false), tokenSeparators: PropTypes.arrayOf(PropTypes.string).def([]), - autoClearSearchValue: PropTypes.bool.def(true), + autoClearSearchValue: PropTypes.looseBool.def(true), tabindex: PropTypes.any.def(0), dropdownRender: PropTypes.func.def(({ menuNode }) => menuNode), // onChange: noop, diff --git a/components/vc-select/SelectTrigger.jsx b/components/vc-select/SelectTrigger.jsx index 31e735482..222ecd46b 100644 --- a/components/vc-select/SelectTrigger.jsx +++ b/components/vc-select/SelectTrigger.jsx @@ -33,26 +33,26 @@ export default { props: { // onPopupFocus: PropTypes.func, // onPopupScroll: PropTypes.func, - dropdownMatchSelectWidth: PropTypes.bool, - defaultActiveFirstOption: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, + defaultActiveFirstOption: PropTypes.looseBool, dropdownAlign: PropTypes.object, - visible: PropTypes.bool, - disabled: PropTypes.bool, - showSearch: PropTypes.bool, + visible: PropTypes.looseBool, + disabled: PropTypes.looseBool, + showSearch: PropTypes.looseBool, dropdownClassName: PropTypes.string, dropdownStyle: PropTypes.object, dropdownMenuStyle: PropTypes.object, - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, inputValue: PropTypes.string, filterOption: PropTypes.any, - empty: PropTypes.bool, + empty: PropTypes.looseBool, options: PropTypes.any, prefixCls: PropTypes.string, popupClassName: PropTypes.string, value: PropTypes.array, // children: PropTypes.any, showAction: PropTypes.arrayOf(PropTypes.string), - combobox: PropTypes.bool, + combobox: PropTypes.looseBool, animation: PropTypes.string, transitionName: PropTypes.string, getPopupContainer: PropTypes.func, diff --git a/components/vc-slick/src/default-props.js b/components/vc-slick/src/default-props.js index 573de9436..ac901f6b0 100644 --- a/components/vc-slick/src/default-props.js +++ b/components/vc-slick/src/default-props.js @@ -1,54 +1,54 @@ import PropTypes from '../../_util/vue-types'; const defaultProps = { - accessibility: PropTypes.bool.def(true), + accessibility: PropTypes.looseBool.def(true), // 自定义高度 - adaptiveHeight: PropTypes.bool.def(false), + adaptiveHeight: PropTypes.looseBool.def(false), afterChange: PropTypes.any.def(null), - arrows: PropTypes.bool.def(true), - autoplay: PropTypes.bool.def(false), + arrows: PropTypes.looseBool.def(true), + autoplay: PropTypes.looseBool.def(false), autoplaySpeed: PropTypes.number.def(3000), beforeChange: PropTypes.any.def(null), - centerMode: PropTypes.bool.def(false), + centerMode: PropTypes.looseBool.def(false), centerPadding: PropTypes.string.def('50px'), cssEase: PropTypes.string.def('ease'), - dots: PropTypes.bool.def(false), + dots: PropTypes.looseBool.def(false), dotsClass: PropTypes.string.def('slick-dots'), - draggable: PropTypes.bool.def(true), - unslick: PropTypes.bool.def(false), + draggable: PropTypes.looseBool.def(true), + unslick: PropTypes.looseBool.def(false), easing: PropTypes.string.def('linear'), edgeFriction: PropTypes.number.def(0.35), - fade: PropTypes.bool.def(false), - focusOnSelect: PropTypes.bool.def(false), - infinite: PropTypes.bool.def(true), + fade: PropTypes.looseBool.def(false), + focusOnSelect: PropTypes.looseBool.def(false), + infinite: PropTypes.looseBool.def(true), initialSlide: PropTypes.number.def(0), lazyLoad: PropTypes.any.def(null), - verticalSwiping: PropTypes.bool.def(false), + verticalSwiping: PropTypes.looseBool.def(false), asNavFor: PropTypes.any.def(null), // 圆点hover是否暂停 - pauseOnDotsHover: PropTypes.bool.def(false), + pauseOnDotsHover: PropTypes.looseBool.def(false), // focus是否暂停 - pauseOnFocus: PropTypes.bool.def(false), + pauseOnFocus: PropTypes.looseBool.def(false), // hover是否暂停 - pauseOnHover: PropTypes.bool.def(true), + pauseOnHover: PropTypes.looseBool.def(true), responsive: PropTypes.array, rows: PropTypes.number.def(1), - rtl: PropTypes.bool.def(false), + rtl: PropTypes.looseBool.def(false), slide: PropTypes.string.def('div'), slidesPerRow: PropTypes.number.def(1), slidesToScroll: PropTypes.number.def(1), slidesToShow: PropTypes.number.def(1), speed: PropTypes.number.def(500), - swipe: PropTypes.bool.def(true), + swipe: PropTypes.looseBool.def(true), swipeEvent: PropTypes.any.def(null), - swipeToSlide: PropTypes.bool.def(false), - touchMove: PropTypes.bool.def(true), + swipeToSlide: PropTypes.looseBool.def(false), + touchMove: PropTypes.looseBool.def(true), touchThreshold: PropTypes.number.def(5), - useCSS: PropTypes.bool.def(true), - useTransform: PropTypes.bool.def(true), - variableWidth: PropTypes.bool.def(false), - vertical: PropTypes.bool.def(false), - waitForAnimate: PropTypes.bool.def(true), + useCSS: PropTypes.looseBool.def(true), + useTransform: PropTypes.looseBool.def(true), + variableWidth: PropTypes.looseBool.def(false), + vertical: PropTypes.looseBool.def(false), + waitForAnimate: PropTypes.looseBool.def(true), children: PropTypes.array, __propsSymbol__: PropTypes.any, }; diff --git a/components/vc-slider/src/Handle.jsx b/components/vc-slider/src/Handle.jsx index 4359e85be..ef73a907e 100644 --- a/components/vc-slider/src/Handle.jsx +++ b/components/vc-slider/src/Handle.jsx @@ -10,14 +10,14 @@ export default { inheritAttrs: false, props: { prefixCls: PropTypes.string, - vertical: PropTypes.bool, + vertical: PropTypes.looseBool, offset: PropTypes.number, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, min: PropTypes.number, max: PropTypes.number, value: PropTypes.number, tabindex: PropTypes.number, - reverse: PropTypes.bool, + reverse: PropTypes.looseBool, // handleFocus: PropTypes.func.def(noop), // handleBlur: PropTypes.func.def(noop), }, diff --git a/components/vc-slider/src/Range.jsx b/components/vc-slider/src/Range.jsx index f05e085cc..6b9954d6e 100644 --- a/components/vc-slider/src/Range.jsx +++ b/components/vc-slider/src/Range.jsx @@ -26,15 +26,15 @@ const rangeProps = { defaultValue: PropTypes.arrayOf(PropTypes.number), value: PropTypes.arrayOf(PropTypes.number), count: PropTypes.number, - pushable: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]), - allowCross: PropTypes.bool, - disabled: PropTypes.bool, - reverse: PropTypes.bool, + pushable: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.number]), + allowCross: PropTypes.looseBool, + disabled: PropTypes.looseBool, + reverse: PropTypes.looseBool, tabindex: PropTypes.arrayOf(PropTypes.number), prefixCls: PropTypes.string, min: PropTypes.number, max: PropTypes.number, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, }; const Range = { name: 'Range', diff --git a/components/vc-slider/src/Slider.jsx b/components/vc-slider/src/Slider.jsx index 623498d7a..83c075922 100644 --- a/components/vc-slider/src/Slider.jsx +++ b/components/vc-slider/src/Slider.jsx @@ -12,10 +12,10 @@ const Slider = { props: { defaultValue: PropTypes.number, value: PropTypes.number, - disabled: PropTypes.bool, - autofocus: PropTypes.bool, + disabled: PropTypes.looseBool, + autofocus: PropTypes.looseBool, tabindex: PropTypes.number, - reverse: PropTypes.bool, + reverse: PropTypes.looseBool, min: PropTypes.number, max: PropTypes.number, }, diff --git a/components/vc-slider/src/common/createSlider.jsx b/components/vc-slider/src/common/createSlider.jsx index 18cfc127b..ebab206aa 100644 --- a/components/vc-slider/src/common/createSlider.jsx +++ b/components/vc-slider/src/common/createSlider.jsx @@ -18,13 +18,13 @@ export default function createSlider(Component) { max: PropTypes.number, step: PropTypes.number, marks: PropTypes.object, - included: PropTypes.bool, + included: PropTypes.looseBool, prefixCls: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, handle: PropTypes.func, - dots: PropTypes.bool, - vertical: PropTypes.bool, - reverse: PropTypes.bool, + dots: PropTypes.looseBool, + vertical: PropTypes.looseBool, + reverse: PropTypes.looseBool, minimumTrackStyle: PropTypes.object, // just for compatibility, will be deperecate maximumTrackStyle: PropTypes.object, // just for compatibility, will be deperecate handleStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.arrayOf(PropTypes.object)]), @@ -32,7 +32,7 @@ export default function createSlider(Component) { railStyle: PropTypes.object, dotStyle: PropTypes.object, activeDotStyle: PropTypes.object, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, }; return { name: 'createSlider', diff --git a/components/vc-steps/Step.jsx b/components/vc-steps/Step.jsx index f277b7585..cc59e8859 100644 --- a/components/vc-steps/Step.jsx +++ b/components/vc-steps/Step.jsx @@ -13,8 +13,8 @@ export default { prefixCls: PropTypes.string, wrapperStyle: PropTypes.object, itemWidth: PropTypes.string, - active: PropTypes.bool, - disabled: PropTypes.bool, + active: PropTypes.looseBool, + disabled: PropTypes.looseBool, status: PropTypes.string, iconPrefix: PropTypes.string, icon: PropTypes.any, @@ -24,7 +24,7 @@ export default { description: PropTypes.any, title: PropTypes.any, subTitle: PropTypes.any, - progressDot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), + progressDot: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]), tailContent: PropTypes.any, icons: PropTypes.shape({ finish: PropTypes.any, diff --git a/components/vc-steps/Steps.jsx b/components/vc-steps/Steps.jsx index c01ce0787..943db10d0 100644 --- a/components/vc-steps/Steps.jsx +++ b/components/vc-steps/Steps.jsx @@ -16,14 +16,14 @@ export default { labelPlacement: PropTypes.string.def('horizontal'), status: PropTypes.string.def('process'), size: PropTypes.string.def(''), - progressDot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), + progressDot: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]), initial: PropTypes.number.def(0), current: PropTypes.number.def(0), icons: PropTypes.shape({ finish: PropTypes.any, error: PropTypes.any, }).loose, - canClick: PropTypes.bool, + canClick: PropTypes.looseBool, }, data() { this.calcStepOffsetWidth = debounce(this.calcStepOffsetWidth, 150); diff --git a/components/vc-switch/PropTypes.js b/components/vc-switch/PropTypes.js index 0ce63feb1..17bc7ddf9 100644 --- a/components/vc-switch/PropTypes.js +++ b/components/vc-switch/PropTypes.js @@ -2,15 +2,15 @@ import PropTypes from '../_util/vue-types'; export const switchPropTypes = { prefixCls: PropTypes.string, - disabled: PropTypes.bool.def(false), + disabled: PropTypes.looseBool.def(false), checkedChildren: PropTypes.any, unCheckedChildren: PropTypes.any, // onChange: PropTypes.func, // onMouseUp: PropTypes.func, // onClick: PropTypes.func, tabindex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - checked: PropTypes.bool, - defaultChecked: PropTypes.bool.def(false), - autofocus: PropTypes.bool.def(false), + checked: PropTypes.looseBool, + defaultChecked: PropTypes.looseBool.def(false), + autofocus: PropTypes.looseBool.def(false), loadingIcon: PropTypes.any, }; diff --git a/components/vc-table/src/BaseTable.jsx b/components/vc-table/src/BaseTable.jsx index 446222ed8..035ec7231 100644 --- a/components/vc-table/src/BaseTable.jsx +++ b/components/vc-table/src/BaseTable.jsx @@ -11,15 +11,15 @@ const BaseTable = { name: 'BaseTable', inheritAttrs: false, props: { - fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), + fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.looseBool]), columns: PropTypes.array.isRequired, tableClassName: PropTypes.string.isRequired, - hasHead: PropTypes.bool.isRequired, - hasBody: PropTypes.bool.isRequired, + hasHead: PropTypes.looseBool.isRequired, + hasBody: PropTypes.looseBool.isRequired, store: PropTypes.object.isRequired, expander: PropTypes.object.isRequired, getRowKey: PropTypes.func, - isAnyColumnsFixed: PropTypes.bool, + isAnyColumnsFixed: PropTypes.looseBool, }, setup() { return { diff --git a/components/vc-table/src/BodyTable.jsx b/components/vc-table/src/BodyTable.jsx index 47f7a00ba..0c6b0e690 100644 --- a/components/vc-table/src/BodyTable.jsx +++ b/components/vc-table/src/BodyTable.jsx @@ -7,14 +7,14 @@ export default { name: 'BodyTable', inheritAttrs: false, props: { - fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), + fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.looseBool]), columns: PropTypes.array.isRequired, tableClassName: PropTypes.string.isRequired, handleBodyScroll: PropTypes.func.isRequired, handleWheel: PropTypes.func.isRequired, getRowKey: PropTypes.func.isRequired, expander: PropTypes.object.isRequired, - isAnyColumnsFixed: PropTypes.bool, + isAnyColumnsFixed: PropTypes.looseBool, }, setup() { return { diff --git a/components/vc-table/src/Column.jsx b/components/vc-table/src/Column.jsx index 2e10b602c..ea2176fdf 100644 --- a/components/vc-table/src/Column.jsx +++ b/components/vc-table/src/Column.jsx @@ -8,7 +8,7 @@ // title: PropTypes.any, // dataIndex: PropTypes.string, // width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), -// ellipsis: PropTypes.bool, +// ellipsis: PropTypes.looseBool, // fixed: PropTypes.oneOf([true, 'left', 'right']), // align: PropTypes.oneOf(['left', 'center', 'right']), // customRender: PropTypes.func, diff --git a/components/vc-table/src/ExpandIcon.jsx b/components/vc-table/src/ExpandIcon.jsx index 151ea685b..bda530d8a 100644 --- a/components/vc-table/src/ExpandIcon.jsx +++ b/components/vc-table/src/ExpandIcon.jsx @@ -8,8 +8,8 @@ export default { record: PropTypes.object, prefixCls: PropTypes.string, expandable: PropTypes.any, - expanded: PropTypes.bool, - needIndentSpaced: PropTypes.bool, + expanded: PropTypes.looseBool, + needIndentSpaced: PropTypes.looseBool, }, methods: { onExpand(e) { diff --git a/components/vc-table/src/ExpandableRow.jsx b/components/vc-table/src/ExpandableRow.jsx index fa943934f..b1cdc8af4 100644 --- a/components/vc-table/src/ExpandableRow.jsx +++ b/components/vc-table/src/ExpandableRow.jsx @@ -11,13 +11,13 @@ const ExpandableRow = { props: { prefixCls: PropTypes.string.isRequired, rowKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, - fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), + fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.looseBool]), record: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired, indentSize: PropTypes.number, - needIndentSpaced: PropTypes.bool.isRequired, - expandRowByClick: PropTypes.bool, - expanded: PropTypes.bool.isRequired, - expandIconAsCell: PropTypes.bool, + needIndentSpaced: PropTypes.looseBool.isRequired, + expandRowByClick: PropTypes.looseBool, + expanded: PropTypes.looseBool.isRequired, + expandIconAsCell: PropTypes.looseBool, expandIconColumnIndex: PropTypes.number, childrenColumnName: PropTypes.string, expandedRowRender: PropTypes.func, diff --git a/components/vc-table/src/ExpandableTable.jsx b/components/vc-table/src/ExpandableTable.jsx index 877e88f43..76e9a380f 100644 --- a/components/vc-table/src/ExpandableTable.jsx +++ b/components/vc-table/src/ExpandableTable.jsx @@ -7,11 +7,11 @@ import { remove } from './utils'; import { initDefaultProps, getOptionProps, getSlot } from '../../_util/props-util'; export const ExpandableTableProps = () => ({ - expandIconAsCell: PropTypes.bool, - expandRowByClick: PropTypes.bool, + expandIconAsCell: PropTypes.looseBool, + expandRowByClick: PropTypes.looseBool, expandedRowKeys: PropTypes.array, expandedRowClassName: PropTypes.func, - defaultExpandAllRows: PropTypes.bool, + defaultExpandAllRows: PropTypes.looseBool, defaultExpandedRowKeys: PropTypes.array, expandIconColumnIndex: PropTypes.number, expandedRowRender: PropTypes.func, diff --git a/components/vc-table/src/HeadTable.jsx b/components/vc-table/src/HeadTable.jsx index 4706ffcda..8357b3eb2 100644 --- a/components/vc-table/src/HeadTable.jsx +++ b/components/vc-table/src/HeadTable.jsx @@ -8,7 +8,7 @@ export default { name: 'HeadTable', inheritAttrs: false, props: { - fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), + fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.looseBool]), columns: PropTypes.array.isRequired, tableClassName: PropTypes.string.isRequired, handleBodyScrollLeft: PropTypes.func.isRequired, diff --git a/components/vc-table/src/Table.jsx b/components/vc-table/src/Table.jsx index b86594bef..b132d6bc0 100644 --- a/components/vc-table/src/Table.jsx +++ b/components/vc-table/src/Table.jsx @@ -23,7 +23,7 @@ export default { props: initDefaultProps( { data: PropTypes.array, - useFixedHeader: PropTypes.bool, + useFixedHeader: PropTypes.looseBool, columns: PropTypes.array, prefixCls: PropTypes.string, bodyStyle: PropTypes.object, @@ -36,7 +36,7 @@ export default { // onRowContextMenu: PropTypes.func, // onRowMouseEnter: PropTypes.func, // onRowMouseLeave: PropTypes.func, - showHeader: PropTypes.bool, + showHeader: PropTypes.looseBool, title: PropTypes.func, id: PropTypes.string, footer: PropTypes.func, @@ -57,16 +57,16 @@ export default { cell: PropTypes.any, }), }), - expandIconAsCell: PropTypes.bool, + expandIconAsCell: PropTypes.looseBool, expandedRowKeys: PropTypes.array, expandedRowClassName: PropTypes.func, - defaultExpandAllRows: PropTypes.bool, + defaultExpandAllRows: PropTypes.looseBool, defaultExpandedRowKeys: PropTypes.array, expandIconColumnIndex: PropTypes.number, expandedRowRender: PropTypes.func, childrenColumnName: PropTypes.string, indentSize: PropTypes.number, - expandRowByClick: PropTypes.bool, + expandRowByClick: PropTypes.looseBool, expandIcon: PropTypes.func, tableLayout: PropTypes.string, transformCellText: PropTypes.func, diff --git a/components/vc-table/src/TableRow.jsx b/components/vc-table/src/TableRow.jsx index 4e4bd52da..f966e4787 100644 --- a/components/vc-table/src/TableRow.jsx +++ b/components/vc-table/src/TableRow.jsx @@ -29,20 +29,20 @@ const TableRow = { indent: PropTypes.number, indentSize: PropTypes.number, hasExpandIcon: PropTypes.func, - hovered: PropTypes.bool.isRequired, - visible: PropTypes.bool.isRequired, + hovered: PropTypes.looseBool.isRequired, + visible: PropTypes.looseBool.isRequired, store: PropTypes.object.isRequired, - fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), + fixed: PropTypes.oneOfType([PropTypes.string, PropTypes.looseBool]), renderExpandIcon: PropTypes.func, renderExpandIconCell: PropTypes.func, components: PropTypes.any, - expandedRow: PropTypes.bool, - isAnyColumnsFixed: PropTypes.bool, + expandedRow: PropTypes.looseBool, + isAnyColumnsFixed: PropTypes.looseBool, ancestorKeys: PropTypes.array.isRequired, expandIconColumnIndex: PropTypes.number, - expandRowByClick: PropTypes.bool, - // visible: PropTypes.bool, - // hovered: PropTypes.bool, + expandRowByClick: PropTypes.looseBool, + // visible: PropTypes.looseBool, + // hovered: PropTypes.looseBool, // height: PropTypes.any, }, { diff --git a/components/vc-tabs/src/ScrollableTabBarNode.jsx b/components/vc-tabs/src/ScrollableTabBarNode.jsx index 6eef57c91..2e1650e47 100644 --- a/components/vc-tabs/src/ScrollableTabBarNode.jsx +++ b/components/vc-tabs/src/ScrollableTabBarNode.jsx @@ -15,7 +15,7 @@ export default { saveRef: PropTypes.func.def(() => {}), tabBarPosition: PropTypes.oneOf(['left', 'right', 'top', 'bottom']).def('left'), prefixCls: PropTypes.string.def(''), - scrollAnimated: PropTypes.bool.def(true), + scrollAnimated: PropTypes.looseBool.def(true), navWrapper: PropTypes.func.def(arg => arg), prevIcon: PropTypes.any, nextIcon: PropTypes.any, diff --git a/components/vc-tabs/src/TabContent.jsx b/components/vc-tabs/src/TabContent.jsx index fb27bf599..1047621dd 100644 --- a/components/vc-tabs/src/TabContent.jsx +++ b/components/vc-tabs/src/TabContent.jsx @@ -10,13 +10,13 @@ export default { name: 'TabContent', inheritAttrs: false, props: { - animated: PropTypes.bool.def(true), - animatedWithMargin: PropTypes.bool.def(true), + animated: PropTypes.looseBool.def(true), + animatedWithMargin: PropTypes.looseBool.def(true), prefixCls: PropTypes.string.def('ant-tabs'), activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), tabBarPosition: PropTypes.string, direction: PropTypes.string, - destroyInactiveTabPane: PropTypes.bool, + destroyInactiveTabPane: PropTypes.looseBool, children: PropTypes.any, }, computed: { diff --git a/components/vc-tabs/src/TabPane.jsx b/components/vc-tabs/src/TabPane.jsx index 640c8067c..07ba53b49 100644 --- a/components/vc-tabs/src/TabPane.jsx +++ b/components/vc-tabs/src/TabPane.jsx @@ -6,14 +6,14 @@ import Sentinel from './Sentinel'; export default { name: 'TabPane', props: { - active: PropTypes.bool, - destroyInactiveTabPane: PropTypes.bool, - forceRender: PropTypes.bool, + active: PropTypes.looseBool, + destroyInactiveTabPane: PropTypes.looseBool, + forceRender: PropTypes.looseBool, placeholder: PropTypes.any, rootPrefixCls: PropTypes.string, tab: PropTypes.any, - closable: PropTypes.bool, - disabled: PropTypes.bool, + closable: PropTypes.looseBool, + disabled: PropTypes.looseBool, }, setup() { return { diff --git a/components/vc-tabs/src/Tabs.jsx b/components/vc-tabs/src/Tabs.jsx index 31b5d12dd..f466cbdf8 100644 --- a/components/vc-tabs/src/Tabs.jsx +++ b/components/vc-tabs/src/Tabs.jsx @@ -30,7 +30,7 @@ export default { mixins: [BaseMixin], inheritAttrs: false, props: { - destroyInactiveTabPane: PropTypes.bool, + destroyInactiveTabPane: PropTypes.looseBool, renderTabBar: PropTypes.func.isRequired, renderTabContent: PropTypes.func.isRequired, navWrapper: PropTypes.func.def(arg => arg), diff --git a/components/vc-time-picker/Combobox.jsx b/components/vc-time-picker/Combobox.jsx index f3797b6a5..e6b567457 100644 --- a/components/vc-time-picker/Combobox.jsx +++ b/components/vc-time-picker/Combobox.jsx @@ -30,9 +30,9 @@ const Combobox = { value: PropTypes.object, // onChange: PropTypes.func, // onAmPmChange: PropTypes.func, - showHour: PropTypes.bool, - showMinute: PropTypes.bool, - showSecond: PropTypes.bool, + showHour: PropTypes.looseBool, + showMinute: PropTypes.looseBool, + showSecond: PropTypes.looseBool, hourOptions: PropTypes.array, minuteOptions: PropTypes.array, secondOptions: PropTypes.array, @@ -40,8 +40,8 @@ const Combobox = { disabledMinutes: PropTypes.func, disabledSeconds: PropTypes.func, // onCurrentSelectPanelChange: PropTypes.func, - use12Hours: PropTypes.bool, - isAM: PropTypes.bool, + use12Hours: PropTypes.looseBool, + isAM: PropTypes.looseBool, }, methods: { onItemChange(type, itemValue) { diff --git a/components/vc-time-picker/Header.jsx b/components/vc-time-picker/Header.jsx index 041b38723..4501bcc06 100644 --- a/components/vc-time-picker/Header.jsx +++ b/components/vc-time-picker/Header.jsx @@ -15,7 +15,7 @@ const Header = { placeholder: PropTypes.string, clearText: PropTypes.string, value: PropTypes.object, - inputReadOnly: PropTypes.bool.def(false), + inputReadOnly: PropTypes.looseBool.def(false), hourOptions: PropTypes.array, minuteOptions: PropTypes.array, secondOptions: PropTypes.array, @@ -25,10 +25,10 @@ const Header = { // onChange: PropTypes.func, // onClear: PropTypes.func, // onEsc: PropTypes.func, - allowEmpty: PropTypes.bool, + allowEmpty: PropTypes.looseBool, defaultOpenValue: PropTypes.object, currentSelectPanel: PropTypes.string, - focusOnOpen: PropTypes.bool, + focusOnOpen: PropTypes.looseBool, // onKeyDown: PropTypes.func, clearIcon: PropTypes.any, }, diff --git a/components/vc-time-picker/Panel.jsx b/components/vc-time-picker/Panel.jsx index 29993ec34..1bd1e502e 100644 --- a/components/vc-time-picker/Panel.jsx +++ b/components/vc-time-picker/Panel.jsx @@ -48,24 +48,24 @@ const Panel = { defaultValue: PropTypes.any, placeholder: PropTypes.string, format: PropTypes.string, - inputReadOnly: PropTypes.bool.def(false), + inputReadOnly: PropTypes.looseBool.def(false), disabledHours: PropTypes.func.def(noop), disabledMinutes: PropTypes.func.def(noop), disabledSeconds: PropTypes.func.def(noop), - hideDisabledOptions: PropTypes.bool, + hideDisabledOptions: PropTypes.looseBool, // onChange: PropTypes.func, // onEsc: PropTypes.func, - allowEmpty: PropTypes.bool, - showHour: PropTypes.bool, - showMinute: PropTypes.bool, - showSecond: PropTypes.bool, + allowEmpty: PropTypes.looseBool, + showHour: PropTypes.looseBool, + showMinute: PropTypes.looseBool, + showSecond: PropTypes.looseBool, // onClear: PropTypes.func, - use12Hours: PropTypes.bool.def(false), + use12Hours: PropTypes.looseBool.def(false), hourStep: PropTypes.number, minuteStep: PropTypes.number, secondStep: PropTypes.number, addon: PropTypes.func.def(noop), - focusOnOpen: PropTypes.bool, + focusOnOpen: PropTypes.looseBool, // onKeydown: PropTypes.func, clearIcon: PropTypes.any, }, diff --git a/components/vc-time-picker/TimePicker.jsx b/components/vc-time-picker/TimePicker.jsx index 614f7c956..5ce42dd75 100644 --- a/components/vc-time-picker/TimePicker.jsx +++ b/components/vc-time-picker/TimePicker.jsx @@ -34,27 +34,27 @@ export default { return moment(); }, }, - inputReadOnly: PropTypes.bool, - disabled: PropTypes.bool, - allowEmpty: PropTypes.bool, + inputReadOnly: PropTypes.looseBool, + disabled: PropTypes.looseBool, + allowEmpty: PropTypes.looseBool, defaultValue: PropTypes.any, - open: PropTypes.bool, - defaultOpen: PropTypes.bool, + open: PropTypes.looseBool, + defaultOpen: PropTypes.looseBool, align: PropTypes.object, placement: PropTypes.any, transitionName: PropTypes.string, getPopupContainer: PropTypes.func, placeholder: PropTypes.string, format: PropTypes.string, - showHour: PropTypes.bool, - showMinute: PropTypes.bool, - showSecond: PropTypes.bool, + showHour: PropTypes.looseBool, + showMinute: PropTypes.looseBool, + showSecond: PropTypes.looseBool, popupClassName: PropTypes.string, popupStyle: PropTypes.object, disabledHours: PropTypes.func, disabledMinutes: PropTypes.func, disabledSeconds: PropTypes.func, - hideDisabledOptions: PropTypes.bool, + hideDisabledOptions: PropTypes.looseBool, // onChange: PropTypes.func, // onAmPmChange: PropTypes.func, // onOpen: PropTypes.func, @@ -63,13 +63,13 @@ export default { // onBlur: PropTypes.func, name: PropTypes.string, autocomplete: PropTypes.string, - use12Hours: PropTypes.bool, + use12Hours: PropTypes.looseBool, hourStep: PropTypes.number, minuteStep: PropTypes.number, secondStep: PropTypes.number, - focusOnOpen: PropTypes.bool, + focusOnOpen: PropTypes.looseBool, // onKeyDown: PropTypes.func, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, id: PropTypes.string, inputIcon: PropTypes.any, clearIcon: PropTypes.any, diff --git a/components/vc-tooltip/Tooltip.jsx b/components/vc-tooltip/Tooltip.jsx index 3cafb023a..db4889bbb 100644 --- a/components/vc-tooltip/Tooltip.jsx +++ b/components/vc-tooltip/Tooltip.jsx @@ -9,8 +9,8 @@ export default { inheritAttrs: false, props: { trigger: PropTypes.any.def(['hover']), - defaultVisible: PropTypes.bool, - visible: PropTypes.bool, + defaultVisible: PropTypes.looseBool, + visible: PropTypes.looseBool, placement: PropTypes.string.def('right'), transitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), animation: PropTypes.any, @@ -22,7 +22,7 @@ export default { mouseEnterDelay: PropTypes.number.def(0), mouseLeaveDelay: PropTypes.number.def(0.1), getTooltipContainer: PropTypes.func, - destroyTooltipOnHide: PropTypes.bool.def(false), + destroyTooltipOnHide: PropTypes.looseBool.def(false), align: PropTypes.object.def(() => ({})), arrowContent: PropTypes.any.def(null), tipId: PropTypes.string, diff --git a/components/vc-tree-select/src/Base/BasePopup.jsx b/components/vc-tree-select/src/Base/BasePopup.jsx index 412cb0e50..64721be35 100644 --- a/components/vc-tree-select/src/Base/BasePopup.jsx +++ b/components/vc-tree-select/src/Base/BasePopup.jsx @@ -79,16 +79,16 @@ const BasePopup = { searchHalfCheckedKeys: PropTypes.array, valueEntities: PropTypes.object, keyEntities: Map, - treeIcon: PropTypes.bool, - treeLine: PropTypes.bool, + treeIcon: PropTypes.looseBool, + treeLine: PropTypes.looseBool, treeNodeFilterProp: PropTypes.string, treeCheckable: PropTypes.any, - treeCheckStrictly: PropTypes.bool, - treeDefaultExpandAll: PropTypes.bool, + treeCheckStrictly: PropTypes.looseBool, + treeDefaultExpandAll: PropTypes.looseBool, treeDefaultExpandedKeys: PropTypes.array, treeExpandedKeys: PropTypes.array, loadData: PropTypes.func, - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, // onTreeExpand: PropTypes.func, searchValue: PropTypes.string, treeNodes: PropTypes.any, diff --git a/components/vc-tree-select/src/Base/BaseSelector.jsx b/components/vc-tree-select/src/Base/BaseSelector.jsx index 992c1ff54..1300f13cf 100644 --- a/components/vc-tree-select/src/Base/BaseSelector.jsx +++ b/components/vc-tree-select/src/Base/BaseSelector.jsx @@ -13,10 +13,10 @@ import { initDefaultProps, getComponent } from '../../../_util/props-util'; import BaseMixin from '../../../_util/BaseMixin'; export const selectorPropTypes = () => ({ prefixCls: PropTypes.string, - open: PropTypes.bool, + open: PropTypes.looseBool, selectorValueList: PropTypes.array, - allowClear: PropTypes.bool, - showArrow: PropTypes.bool, + allowClear: PropTypes.looseBool, + showArrow: PropTypes.looseBool, // onClick: PropTypes.func, // onBlur: PropTypes.func, // onFocus: PropTypes.func, @@ -28,8 +28,8 @@ export const selectorPropTypes = () => ({ clearIcon: PropTypes.any, removeIcon: PropTypes.any, placeholder: PropTypes.any, - disabled: PropTypes.bool, - focused: PropTypes.bool, + disabled: PropTypes.looseBool, + focused: PropTypes.looseBool, }); function noop() {} diff --git a/components/vc-tree-select/src/Popup/SinglePopup.jsx b/components/vc-tree-select/src/Popup/SinglePopup.jsx index 438ae2b29..3a06e156e 100644 --- a/components/vc-tree-select/src/Popup/SinglePopup.jsx +++ b/components/vc-tree-select/src/Popup/SinglePopup.jsx @@ -10,9 +10,9 @@ const SinglePopup = { ...BasePopup.props, ...SearchInput.props, searchValue: PropTypes.string, - showSearch: PropTypes.bool, + showSearch: PropTypes.looseBool, dropdownPrefixCls: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, searchPlaceholder: PropTypes.string, }, created() { diff --git a/components/vc-tree-select/src/SearchInput.jsx b/components/vc-tree-select/src/SearchInput.jsx index 185541318..99ef80d96 100644 --- a/components/vc-tree-select/src/SearchInput.jsx +++ b/components/vc-tree-select/src/SearchInput.jsx @@ -13,12 +13,12 @@ const SearchInput = { name: 'SearchInput', inheritAttrs: false, props: { - open: PropTypes.bool, + open: PropTypes.looseBool, searchValue: PropTypes.string, prefixCls: PropTypes.string, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, renderPlaceholder: PropTypes.func, - needAlign: PropTypes.bool, + needAlign: PropTypes.looseBool, ariaId: PropTypes.string, }, setup() { diff --git a/components/vc-tree-select/src/Select.jsx b/components/vc-tree-select/src/Select.jsx index faa6cf23f..8a88b8997 100644 --- a/components/vc-tree-select/src/Select.jsx +++ b/components/vc-tree-select/src/Select.jsx @@ -75,25 +75,25 @@ const Select = { { prefixCls: PropTypes.string, prefixAria: PropTypes.string, - multiple: PropTypes.bool, - showArrow: PropTypes.bool, - open: PropTypes.bool, + multiple: PropTypes.looseBool, + showArrow: PropTypes.looseBool, + open: PropTypes.looseBool, value: PropTypes.any, - autofocus: PropTypes.bool, + autofocus: PropTypes.looseBool, - defaultOpen: PropTypes.bool, + defaultOpen: PropTypes.looseBool, defaultValue: PropTypes.any, - showSearch: PropTypes.bool, + showSearch: PropTypes.looseBool, placeholder: PropTypes.any, inputValue: PropTypes.string, // [Legacy] Deprecated. Use `searchValue` instead. searchValue: PropTypes.string, - autoClearSearchValue: PropTypes.bool, + autoClearSearchValue: PropTypes.looseBool, searchPlaceholder: PropTypes.any, // [Legacy] Confuse with placeholder - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, children: PropTypes.any, - labelInValue: PropTypes.bool, + labelInValue: PropTypes.looseBool, maxTagCount: PropTypes.number, maxTagPlaceholder: PropTypes.oneOfType([PropTypes.any, PropTypes.func]), maxTagTextLength: PropTypes.number, @@ -101,21 +101,21 @@ const Select = { dropdownClassName: PropTypes.string, dropdownStyle: PropTypes.object, dropdownVisibleChange: PropTypes.func, - dropdownMatchSelectWidth: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, treeData: PropTypes.array, - treeDataSimpleMode: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), + treeDataSimpleMode: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object]), treeNodeFilterProp: PropTypes.string, treeNodeLabelProp: PropTypes.string, - treeCheckable: PropTypes.oneOfType([PropTypes.any, PropTypes.object, PropTypes.bool]), + treeCheckable: PropTypes.oneOfType([PropTypes.any, PropTypes.object, PropTypes.looseBool]), // treeCheckable: PropTypes.any, - treeCheckStrictly: PropTypes.bool, - treeIcon: PropTypes.bool, - treeLine: PropTypes.bool, - treeDefaultExpandAll: PropTypes.bool, + treeCheckStrictly: PropTypes.looseBool, + treeIcon: PropTypes.looseBool, + treeLine: PropTypes.looseBool, + treeDefaultExpandAll: PropTypes.looseBool, treeDefaultExpandedKeys: PropTypes.array, treeExpandedKeys: PropTypes.array, loadData: PropTypes.func, - filterTreeNode: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]), + filterTreeNode: PropTypes.oneOfType([PropTypes.func, PropTypes.looseBool]), notFoundContent: PropTypes.any, getPopupContainer: PropTypes.func, @@ -127,7 +127,7 @@ const Select = { // onDropdownVisibleChange: PropTypes.func, // onTreeExpand: PropTypes.func, - allowClear: PropTypes.bool, + allowClear: PropTypes.looseBool, transitionName: PropTypes.string, animation: PropTypes.string, choiceTransitionName: PropTypes.string, diff --git a/components/vc-tree-select/src/SelectTrigger.jsx b/components/vc-tree-select/src/SelectTrigger.jsx index c9e916d87..837fb6824 100644 --- a/components/vc-tree-select/src/SelectTrigger.jsx +++ b/components/vc-tree-select/src/SelectTrigger.jsx @@ -30,8 +30,8 @@ const SelectTrigger = { inheritAttrs: false, props: { // Pass by outside user props - disabled: PropTypes.bool, - showSearch: PropTypes.bool, + disabled: PropTypes.looseBool, + showSearch: PropTypes.looseBool, prefixCls: PropTypes.string, dropdownPopupAlign: PropTypes.object, dropdownClassName: PropTypes.string, @@ -40,14 +40,14 @@ const SelectTrigger = { animation: PropTypes.string, getPopupContainer: PropTypes.func, - dropdownMatchSelectWidth: PropTypes.bool, + dropdownMatchSelectWidth: PropTypes.looseBool, // Pass by Select - isMultiple: PropTypes.bool, + isMultiple: PropTypes.looseBool, dropdownPrefixCls: PropTypes.string, dropdownVisibleChange: PropTypes.func, popupElement: PropTypes.node, - open: PropTypes.bool, + open: PropTypes.looseBool, }, created() { this.triggerRef = createRef(); diff --git a/components/vc-tree-select/src/Selector/MultipleSelector/index.jsx b/components/vc-tree-select/src/Selector/MultipleSelector/index.jsx index 71dea3936..bdcf931c5 100644 --- a/components/vc-tree-select/src/Selector/MultipleSelector/index.jsx +++ b/components/vc-tree-select/src/Selector/MultipleSelector/index.jsx @@ -23,9 +23,9 @@ const MultipleSelector = { ...selectorPropTypes(), ...SearchInput.props, selectorValueList: PropTypes.array, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, searchValue: PropTypes.string, - labelInValue: PropTypes.bool, + labelInValue: PropTypes.looseBool, maxTagCount: PropTypes.number, maxTagPlaceholder: PropTypes.any, diff --git a/components/vc-tree/src/Tree.jsx b/components/vc-tree/src/Tree.jsx index 7941d9682..ea9fe7dd0 100644 --- a/components/vc-tree/src/Tree.jsx +++ b/components/vc-tree/src/Tree.jsx @@ -50,19 +50,19 @@ const Tree = { tabindex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), children: PropTypes.any, treeData: PropTypes.array, // Generate treeNode by children - showLine: PropTypes.bool, - showIcon: PropTypes.bool, + showLine: PropTypes.looseBool, + showIcon: PropTypes.looseBool, icon: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), - focusable: PropTypes.bool, - selectable: PropTypes.bool, - disabled: PropTypes.bool, - multiple: PropTypes.bool, - checkable: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), - checkStrictly: PropTypes.bool, - draggable: PropTypes.bool, - defaultExpandParent: PropTypes.bool, - autoExpandParent: PropTypes.bool, - defaultExpandAll: PropTypes.bool, + focusable: PropTypes.looseBool, + selectable: PropTypes.looseBool, + disabled: PropTypes.looseBool, + multiple: PropTypes.looseBool, + checkable: PropTypes.oneOfType([PropTypes.object, PropTypes.looseBool]), + checkStrictly: PropTypes.looseBool, + draggable: PropTypes.looseBool, + defaultExpandParent: PropTypes.looseBool, + autoExpandParent: PropTypes.looseBool, + defaultExpandAll: PropTypes.looseBool, defaultExpandedKeys: PropTypes.array, expandedKeys: PropTypes.array, defaultCheckedKeys: PropTypes.array, diff --git a/components/vc-tree/src/TreeNode.jsx b/components/vc-tree/src/TreeNode.jsx index 5ece80c5a..2bb3de0b4 100644 --- a/components/vc-tree/src/TreeNode.jsx +++ b/components/vc-tree/src/TreeNode.jsx @@ -26,24 +26,24 @@ const TreeNode = { // onSelect: PropTypes.func, // By parent - expanded: PropTypes.bool, - selected: PropTypes.bool, - checked: PropTypes.bool, - loaded: PropTypes.bool, - loading: PropTypes.bool, - halfChecked: PropTypes.bool, + expanded: PropTypes.looseBool, + selected: PropTypes.looseBool, + checked: PropTypes.looseBool, + loaded: PropTypes.looseBool, + loading: PropTypes.looseBool, + halfChecked: PropTypes.looseBool, title: PropTypes.any, pos: PropTypes.string, - dragOver: PropTypes.bool, - dragOverGapTop: PropTypes.bool, - dragOverGapBottom: PropTypes.bool, + dragOver: PropTypes.looseBool, + dragOverGapTop: PropTypes.looseBool, + dragOverGapBottom: PropTypes.looseBool, // By user - isLeaf: PropTypes.bool, - checkable: PropTypes.bool, - selectable: PropTypes.bool, - disabled: PropTypes.bool, - disableCheckbox: PropTypes.bool, + isLeaf: PropTypes.looseBool, + checkable: PropTypes.looseBool, + selectable: PropTypes.looseBool, + disabled: PropTypes.looseBool, + disableCheckbox: PropTypes.looseBool, icon: PropTypes.any, dataRef: PropTypes.object, switcherIcon: PropTypes.any, diff --git a/components/vc-trigger/LazyRenderBox.jsx b/components/vc-trigger/LazyRenderBox.jsx index 83f3b7c3d..5cefd4447 100644 --- a/components/vc-trigger/LazyRenderBox.jsx +++ b/components/vc-trigger/LazyRenderBox.jsx @@ -5,7 +5,7 @@ import { getSlot } from '../_util/props-util'; export default { name: 'LazyRenderBox', props: { - visible: PropTypes.bool, + visible: PropTypes.looseBool, hiddenClassName: PropTypes.string, }, render() { diff --git a/components/vc-trigger/Popup.jsx b/components/vc-trigger/Popup.jsx index e0af76cb8..5bc1dd246 100644 --- a/components/vc-trigger/Popup.jsx +++ b/components/vc-trigger/Popup.jsx @@ -13,18 +13,18 @@ export default { mixins: [BaseMixin], inheritAttrs: false, props: { - visible: PropTypes.bool, + visible: PropTypes.looseBool, getClassNameFromAlign: PropTypes.func, getRootDomNode: PropTypes.func, align: PropTypes.any, - destroyPopupOnHide: PropTypes.bool, + destroyPopupOnHide: PropTypes.looseBool, prefixCls: PropTypes.string, getContainer: PropTypes.func, transitionName: PropTypes.string, animation: PropTypes.any, maskAnimation: PropTypes.string, maskTransitionName: PropTypes.string, - mask: PropTypes.bool, + mask: PropTypes.looseBool, zIndex: PropTypes.number, popupClassName: PropTypes.any, popupStyle: PropTypes.object.def(() => ({})), diff --git a/components/vc-trigger/PopupInner.jsx b/components/vc-trigger/PopupInner.jsx index bdde1176e..6b6d7249d 100644 --- a/components/vc-trigger/PopupInner.jsx +++ b/components/vc-trigger/PopupInner.jsx @@ -5,7 +5,7 @@ export default { props: { hiddenClassName: PropTypes.string.def(''), prefixCls: PropTypes.string, - visible: PropTypes.bool, + visible: PropTypes.looseBool, }, render() { const { prefixCls, visible, hiddenClassName } = this.$props; diff --git a/components/vc-trigger/Trigger.jsx b/components/vc-trigger/Trigger.jsx index dde7d228b..21e5163a4 100644 --- a/components/vc-trigger/Trigger.jsx +++ b/components/vc-trigger/Trigger.jsx @@ -63,18 +63,18 @@ export default defineComponent({ blurDelay: PropTypes.number.def(0.15), getPopupContainer: PropTypes.func, getDocument: PropTypes.func.def(returnDocument), - forceRender: PropTypes.bool, - destroyPopupOnHide: PropTypes.bool.def(false), - mask: PropTypes.bool.def(false), - maskClosable: PropTypes.bool.def(true), + forceRender: PropTypes.looseBool, + destroyPopupOnHide: PropTypes.looseBool.def(false), + mask: PropTypes.looseBool.def(false), + maskClosable: PropTypes.looseBool.def(true), // onPopupAlign: PropTypes.func.def(noop), popupAlign: PropTypes.object.def(() => ({})), - popupVisible: PropTypes.bool, - defaultPopupVisible: PropTypes.bool.def(false), + popupVisible: PropTypes.looseBool, + defaultPopupVisible: PropTypes.looseBool.def(false), maskTransitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), maskAnimation: PropTypes.string, stretch: PropTypes.string, - alignPoint: PropTypes.bool, // Maybe we can support user pass position in the future + alignPoint: PropTypes.looseBool, // Maybe we can support user pass position in the future }, data() { const props = this.$props; diff --git a/components/vc-upload/src/AjaxUploader.jsx b/components/vc-upload/src/AjaxUploader.jsx index daaf2c24d..c024191cd 100644 --- a/components/vc-upload/src/AjaxUploader.jsx +++ b/components/vc-upload/src/AjaxUploader.jsx @@ -14,9 +14,9 @@ const upLoadPropTypes = { prefixCls: PropTypes.string, name: PropTypes.string, // className: PropTypes.string, - multiple: PropTypes.bool, - directory: PropTypes.bool, - disabled: PropTypes.bool, + multiple: PropTypes.looseBool, + directory: PropTypes.looseBool, + disabled: PropTypes.looseBool, accept: PropTypes.string, // children: PropTypes.any, // onStart: PropTypes.func, @@ -26,8 +26,8 @@ const upLoadPropTypes = { beforeUpload: PropTypes.func, customRequest: PropTypes.func, // onProgress: PropTypes.func, - withCredentials: PropTypes.bool, - openFileDialogOnClick: PropTypes.bool, + withCredentials: PropTypes.looseBool, + openFileDialogOnClick: PropTypes.looseBool, transformFile: PropTypes.func, method: PropTypes.string, }; diff --git a/components/vc-upload/src/IframeUploader.jsx b/components/vc-upload/src/IframeUploader.jsx index e9a15a2d6..d0c721877 100644 --- a/components/vc-upload/src/IframeUploader.jsx +++ b/components/vc-upload/src/IframeUploader.jsx @@ -21,12 +21,12 @@ const IframeUploader = { props: { componentTag: PropTypes.string, // style: PropTypes.object, - disabled: PropTypes.bool, + disabled: PropTypes.looseBool, prefixCls: PropTypes.string, // className: PropTypes.string, accept: PropTypes.string, // onStart: PropTypes.func, - multiple: PropTypes.bool, + multiple: PropTypes.looseBool, // children: PropTypes.any, data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), action: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), diff --git a/components/vc-upload/src/Upload.jsx b/components/vc-upload/src/Upload.jsx index bee4bb278..ecbe93e17 100644 --- a/components/vc-upload/src/Upload.jsx +++ b/components/vc-upload/src/Upload.jsx @@ -12,8 +12,8 @@ const uploadProps = { prefixCls: PropTypes.string, action: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), name: PropTypes.string, - multipart: PropTypes.bool, - directory: PropTypes.bool, + multipart: PropTypes.looseBool, + directory: PropTypes.looseBool, onError: PropTypes.func, onSuccess: PropTypes.func, onProgress: PropTypes.func, @@ -21,14 +21,14 @@ const uploadProps = { data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), headers: PropTypes.object, accept: PropTypes.string, - multiple: PropTypes.bool, - disabled: PropTypes.bool, + multiple: PropTypes.looseBool, + disabled: PropTypes.looseBool, beforeUpload: PropTypes.func, customRequest: PropTypes.func, onReady: PropTypes.func, - withCredentials: PropTypes.bool, - supportServerRender: PropTypes.bool, - openFileDialogOnClick: PropTypes.bool, + withCredentials: PropTypes.looseBool, + supportServerRender: PropTypes.looseBool, + openFileDialogOnClick: PropTypes.looseBool, }; export default { name: 'Upload', diff --git a/components/vc-virtual-list/List.tsx b/components/vc-virtual-list/List.tsx index f27628856..673e2e11e 100644 --- a/components/vc-virtual-list/List.tsx +++ b/components/vc-virtual-list/List.tsx @@ -67,7 +67,7 @@ const List = defineComponent({ height: PropTypes.number, itemHeight: PropTypes.number, /** If not match virtual scroll condition, Set List still use height of container. */ - fullHeight: PropTypes.bool, + fullHeight: PropTypes.looseBool, itemKey: { type: [String, Number, Function] as PropType Key)>, required: true, @@ -76,7 +76,7 @@ const List = defineComponent({ type: [String, Object] as PropType, }, /** Set `false` will always use real scroll instead of virtual one */ - virtual: PropTypes.bool, + virtual: PropTypes.looseBool, children: PropTypes.func, onScroll: PropTypes.func, onMousedown: PropTypes.func,