From b24552b029b98ec71c4a277e367e39495450c42c Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Sat, 24 Oct 2020 21:40:39 +0800 Subject: [PATCH 1/6] refactor: list to ts --- components/list/{Item.jsx => Item.tsx} | 22 +++++---- .../__snapshots__/empty.test.js.snap | 8 ++-- components/list/{index.jsx => index.tsx} | 48 +++++++++++-------- components/list/style/{index.js => index.ts} | 0 4 files changed, 45 insertions(+), 33 deletions(-) rename components/list/{Item.jsx => Item.tsx} (90%) rename components/list/{index.jsx => index.tsx} (90%) rename components/list/style/{index.js => index.ts} (100%) diff --git a/components/list/Item.jsx b/components/list/Item.tsx similarity index 90% rename from components/list/Item.jsx rename to components/list/Item.tsx index 3f7aed1a4..a446a32c5 100644 --- a/components/list/Item.jsx +++ b/components/list/Item.tsx @@ -3,15 +3,14 @@ import classNames from '../_util/classNames'; import { getComponent, isStringElement, isEmptyElement, getSlot } from '../_util/props-util'; import { Col } from '../grid'; import { defaultConfigProvider } from '../config-provider'; -import { ListGridType } from './index'; import { cloneElement } from '../_util/vnode'; -import { inject } from 'vue'; +import { defineComponent, ExtractPropTypes, FunctionalComponent, inject } from 'vue'; export const ListItemProps = { prefixCls: PropTypes.string, extra: PropTypes.any, actions: PropTypes.array, - grid: ListGridType, + grid: PropTypes.any, }; export const ListItemMetaProps = { @@ -21,9 +20,11 @@ export const ListItemMetaProps = { title: PropTypes.any, }; -export const ListItemMeta = (props, { slots }) => { +export const ListItemMeta: FunctionalComponent +>> = (props, { slots }) => { const configProvider = inject('configProvider', defaultConfigProvider); - const getPrefixCls = configProvider.getPrefixCls; + const { getPrefixCls } = configProvider; const { prefixCls: customizePrefixCls } = props; const prefixCls = getPrefixCls('list', customizePrefixCls); const avatar = props.avatar || slots.avatar?.(); @@ -53,13 +54,18 @@ function getGrid(grid, t) { return grid[t] && Math.floor(24 / grid[t]); } -export default { +export interface ListContext { + grid?: any; + itemLayout?: string; +} + +export default defineComponent({ name: 'AListItem', inheritAttrs: false, Meta: ListItemMeta, props: ListItemProps, setup() { - const listContext = inject('listContext', {}); + const listContext = inject('listContext', {}); const configProvider = inject('configProvider', defaultConfigProvider); return { listContext, @@ -147,4 +153,4 @@ export default { return mainContent; }, -}; +}); diff --git a/components/list/__tests__/__snapshots__/empty.test.js.snap b/components/list/__tests__/__snapshots__/empty.test.js.snap index 65a462d2b..8c546d877 100644 --- a/components/list/__tests__/__snapshots__/empty.test.js.snap +++ b/components/list/__tests__/__snapshots__/empty.test.js.snap @@ -9,12 +9,12 @@ exports[`List renders empty list 1`] = `
-
+
- - + + - +
diff --git a/components/list/index.jsx b/components/list/index.tsx similarity index 90% rename from components/list/index.jsx rename to components/list/index.tsx index c0ca8122c..350d69067 100644 --- a/components/list/index.jsx +++ b/components/list/index.tsx @@ -8,9 +8,11 @@ import Pagination, { PaginationConfig } from '../pagination'; import { Row } from '../grid'; import Item from './Item'; -import { initDefaultProps, getComponent, getSlot } from '../_util/props-util'; +import { getComponent, getSlot } from '../_util/props-util'; +import initDefaultProps from '../_util/props-util/initDefaultProps'; import { cloneElement } from '../_util/vnode'; -import { provide, inject } from 'vue'; +import { provide, inject, defineComponent, App } from 'vue'; +import { tuple } from '../_util/type'; export { ListItemProps, ListItemMetaProps } from './Item'; @@ -29,7 +31,7 @@ export const ListGridType = { xxl: PropTypes.oneOf(ColumnCount), }; -export const ListSize = ['small', 'default', 'large']; +export const ListSize = tuple('small', 'default', 'large'); export const ListProps = () => ({ bordered: PropTypes.looseBool, @@ -52,7 +54,7 @@ export const ListProps = () => ({ locale: PropTypes.object, }); -const List = { +const List = defineComponent({ inheritAttrs: false, Item, name: 'AList', @@ -65,31 +67,35 @@ const List = { }), created() { provide('listContext', this); - }, - setup() { - return { - configProvider: inject('configProvider', defaultConfigProvider), - }; - }, - - data() { - this.keys = []; this.defaultPaginationProps = { current: 1, pageSize: 10, - onChange: (page, pageSize) => { + onChange: (page: number, pageSize: number) => { const { pagination } = this; this.paginationCurrent = page; - if (pagination && pagination.onChange) { - pagination.onChange(page, pageSize); + if (pagination && (pagination as any).onChange) { + (pagination as any).onChange(page, pageSize); } }, total: 0, }; this.onPaginationChange = this.triggerPaginationEvent('onChange'); this.onPaginationShowSizeChange = this.triggerPaginationEvent('onShowSizeChange'); + }, + setup() { + return { + keys: [], + defaultPaginationProps: {}, + onPaginationChange: null, + onPaginationShowSizeChange: null, + configProvider: inject('configProvider', defaultConfigProvider), + }; + }, + + data() { const { pagination } = this.$props; - const paginationObj = pagination && typeof pagination === 'object' ? pagination : {}; + const paginationObj: Partial = + pagination && typeof pagination === 'object' ? pagination : {}; return { paginationCurrent: paginationObj.defaultCurrent || 1, paginationSize: paginationObj.defaultPageSize || 10, @@ -163,7 +169,7 @@ const List = { paginationSize, $attrs, } = this; - const getPrefixCls = this.configProvider.getPrefixCls; + const { getPrefixCls } = this.configProvider; const prefixCls = getPrefixCls('list', customizePrefixCls); const { class: className, ...restAttrs } = $attrs; const loadMore = getComponent(this, 'loadMore'); @@ -209,7 +215,7 @@ const List = { total: dataSource.length, current: paginationCurrent, pageSize: paginationSize, - ...(pagination || {}), + ...((pagination as any) || {}), }; classString; const largestPage = Math.ceil(paginationProps.total / paginationProps.pageSize); @@ -276,10 +282,10 @@ const List = {
); }, -}; +}); /* istanbul ignore next */ -List.install = function(app) { +List.install = function(app: App) { app.component(List.name, List); app.component(List.Item.name, List.Item); app.component(List.Item.Meta.displayName, List.Item.Meta); diff --git a/components/list/style/index.js b/components/list/style/index.ts similarity index 100% rename from components/list/style/index.js rename to components/list/style/index.ts From 873ecf03129ce2c686713d21f840705bb19e1c0d Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Sat, 24 Oct 2020 22:09:54 +0800 Subject: [PATCH 2/6] fix: mentions --- components/mentions/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/mentions/index.tsx b/components/mentions/index.tsx index fc9313742..e6425c4d0 100644 --- a/components/mentions/index.tsx +++ b/components/mentions/index.tsx @@ -204,4 +204,6 @@ Mentions.install = function(app: App) { return app; }; -export default Mentions; +export default Mentions as typeof Mentions & { + readonly Option: typeof Option; +}; From 3b14396a0841bc3cd91e6856fd92892d2021898a Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Sat, 24 Oct 2020 22:38:25 +0800 Subject: [PATCH 3/6] refactor: menu to ts --- components/layout/Sider.tsx | 7 ++-- .../menu/{MenuItem.jsx => MenuItem.tsx} | 17 ++++---- components/menu/{SubMenu.jsx => SubMenu.tsx} | 17 +++++--- components/menu/{index.jsx => index.tsx} | 39 ++++++++++++------- components/menu/style/{index.js => index.ts} | 0 components/tooltip/Tooltip.tsx | 19 +++++---- components/tooltip/index.ts | 2 + components/vc-mentions/src/mentionsProps.ts | 10 ++--- components/vc-menu/Menu.jsx | 12 +++--- 9 files changed, 72 insertions(+), 51 deletions(-) rename components/menu/{MenuItem.jsx => MenuItem.tsx} (77%) rename components/menu/{SubMenu.jsx => SubMenu.tsx} (70%) rename components/menu/{index.jsx => index.tsx} (92%) rename components/menu/style/{index.js => index.ts} (100%) diff --git a/components/layout/Sider.tsx b/components/layout/Sider.tsx index b130fe359..ca7651c36 100644 --- a/components/layout/Sider.tsx +++ b/components/layout/Sider.tsx @@ -46,9 +46,10 @@ export const SiderProps = { // belowShow?: boolean; // } -// export interface SiderContext { -// siderCollapsed: boolean; -// } +export interface SiderContextProps { + sCollapsed?: boolean; + collapsedWidth?: string | number; +} const generateId = (() => { let i = 0; diff --git a/components/menu/MenuItem.jsx b/components/menu/MenuItem.tsx similarity index 77% rename from components/menu/MenuItem.jsx rename to components/menu/MenuItem.tsx index 96ddaad5d..7f952dcc8 100644 --- a/components/menu/MenuItem.jsx +++ b/components/menu/MenuItem.tsx @@ -1,8 +1,9 @@ import { defineComponent, inject } from 'vue'; import { Item, itemProps } from '../vc-menu'; import { getOptionProps, getSlot } from '../_util/props-util'; -import Tooltip from '../tooltip'; -function noop() {} +import Tooltip, { TooltipProps } from '../tooltip'; +import { SiderContextProps } from '../layout/Sider'; + export default defineComponent({ name: 'MenuItem', inheritAttrs: false, @@ -10,13 +11,13 @@ export default defineComponent({ isMenuItem: true, setup() { return { - getInlineCollapsed: inject('getInlineCollapsed', noop), - layoutSiderContext: inject('layoutSiderContext', {}), + getInlineCollapsed: inject<() => boolean>('getInlineCollapsed', () => false), + layoutSiderContext: inject('layoutSiderContext', {}), }; }, methods: { - onKeyDown(e) { - this.$refs.menuItem.onKeyDown(e); + onKeyDown(e: HTMLElement) { + (this.$refs.menuItem as any).onKeyDown(e); }, }, render() { @@ -31,7 +32,7 @@ export default defineComponent({ } else if (title === false) { tooltipTitle = ''; } - const tooltipProps = { + const tooltipProps: TooltipProps = { title: tooltipTitle, }; const siderCollapsed = this.layoutSiderContext.sCollapsed; @@ -48,7 +49,7 @@ export default defineComponent({ ...attrs, ref: 'menuItem', }; - const toolTipProps = { + const toolTipProps: TooltipProps = { ...tooltipProps, placement: 'right', overlayClassName: `${rootPrefixCls}-inline-collapsed-tooltip`, diff --git a/components/menu/SubMenu.jsx b/components/menu/SubMenu.tsx similarity index 70% rename from components/menu/SubMenu.jsx rename to components/menu/SubMenu.tsx index 989866306..8da036938 100644 --- a/components/menu/SubMenu.jsx +++ b/components/menu/SubMenu.tsx @@ -1,22 +1,29 @@ -import { inject } from 'vue'; +import { defineComponent, inject } from 'vue'; import { SubMenu as VcSubMenu } from '../vc-menu'; import classNames from '../_util/classNames'; import Omit from 'omit.js'; import { getSlot } from '../_util/props-util'; -export default { +export type MenuTheme = 'light' | 'dark'; + +export interface MenuContextProps { + inlineCollapsed?: boolean; + theme?: MenuTheme; +} + +export default defineComponent({ name: 'ASubMenu', isSubMenu: true, inheritAttrs: false, props: { ...VcSubMenu.props }, setup() { return { - menuPropsContext: inject('menuPropsContext', {}), + menuPropsContext: inject('menuPropsContext', {}), }; }, methods: { onKeyDown(e) { - this.$refs.subMenu.onKeyDown(e); + (this.$refs.subMenu as any).onKeyDown(e); }, }, @@ -33,4 +40,4 @@ export default { }; return {getSlot(this)}; }, -}; +}); diff --git a/components/menu/index.jsx b/components/menu/index.tsx similarity index 92% rename from components/menu/index.jsx rename to components/menu/index.tsx index 16050fc27..e7e613ff0 100644 --- a/components/menu/index.jsx +++ b/components/menu/index.tsx @@ -1,4 +1,4 @@ -import { defineComponent, inject, provide, toRef } from 'vue'; +import { defineComponent, inject, provide, toRef, App, ExtractPropTypes } from 'vue'; import omit from 'omit.js'; import VcMenu, { Divider, ItemGroup } from '../vc-menu'; import SubMenu from './SubMenu'; @@ -10,6 +10,8 @@ import { hasProp, getOptionProps, getSlot } from '../_util/props-util'; import BaseMixin from '../_util/BaseMixin'; import commonPropsType from '../vc-menu/commonPropsType'; import { defaultConfigProvider } from '../config-provider'; +import { SiderContextProps } from '../layout/Sider'; +import { tuple } from '../_util/type'; // import raf from '../_util/raf'; export const MenuMode = PropTypes.oneOf([ @@ -22,7 +24,7 @@ export const MenuMode = PropTypes.oneOf([ export const menuProps = { ...commonPropsType, - theme: PropTypes.oneOf(['light', 'dark']).def('light'), + theme: PropTypes.oneOf(tuple('light', 'dark')).def('light'), mode: MenuMode.def('vertical'), selectable: PropTypes.looseBool, selectedKeys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), @@ -43,10 +45,10 @@ export const menuProps = { onClick: PropTypes.func, onMouseenter: PropTypes.func, onSelectChange: PropTypes.func, - 'onUpdate:selectedKeys': PropTypes.func, - 'onUpdate:openKeys': PropTypes.func, }; +export type MenuProps = Partial>; + const Menu = defineComponent({ name: 'AMenu', inheritAttrs: false, @@ -56,23 +58,33 @@ const Menu = defineComponent({ SubMenu: { ...SubMenu, name: 'ASubMenu' }, ItemGroup: { ...ItemGroup, name: 'AMenuItemGroup' }, mixins: [BaseMixin], + emits: [ + 'update:selectedKeys', + 'update:openKeys', + 'mouseenter', + 'openChange', + 'click', + 'selectChange', + 'select', + 'deselect', + ], created() { provide('getInlineCollapsed', this.getInlineCollapsed); provide('menuPropsContext', this.$props); }, setup() { - const layoutSiderContext = inject('layoutSiderContext', {}); + const layoutSiderContext = inject('layoutSiderContext', {}); const layoutSiderCollapsed = toRef(layoutSiderContext, 'sCollapsed'); return { configProvider: inject('configProvider', defaultConfigProvider), layoutSiderContext, layoutSiderCollapsed, + propsUpdating: false, + switchingModeFromInline: false, + leaveAnimationExecutedWhenInlineCollapsed: false, + inlineOpenKeys: [], }; }, - // model: { - // prop: 'selectedKeys', - // event: 'selectChange', - // }, updated() { this.propsUpdating = false; }, @@ -96,15 +108,12 @@ const Menu = defineComponent({ }, }, data() { - const props = getOptionProps(this); + const props: MenuProps = getOptionProps(this); warning( !('inlineCollapsed' in props && props.mode !== 'inline'), 'Menu', "`inlineCollapsed` should only be used when Menu's `mode` is inline.", ); - this.switchingModeFromInline = false; - this.leaveAnimationExecutedWhenInlineCollapsed = false; - this.inlineOpenKeys = []; let sOpenKeys; if ('openKeys' in props) { @@ -244,7 +253,7 @@ const Menu = defineComponent({ const menuOpenAnimation = this.getMenuOpenAnimation(menuMode); const { class: className, ...otherAttrs } = this.$attrs; const menuClassName = { - [className]: className, + [className as string]: className, [`${prefixCls}-${theme}`]: true, [`${prefixCls}-inline-collapsed`]: this.getInlineCollapsed(), }; @@ -297,7 +306,7 @@ const Menu = defineComponent({ }); /* istanbul ignore next */ -Menu.install = function(app) { +Menu.install = function(app: App) { app.component(Menu.name, Menu); app.component(Menu.Item.name, Menu.Item); app.component(Menu.SubMenu.name, Menu.SubMenu); diff --git a/components/menu/style/index.js b/components/menu/style/index.ts similarity index 100% rename from components/menu/style/index.js rename to components/menu/style/index.ts diff --git a/components/tooltip/Tooltip.tsx b/components/tooltip/Tooltip.tsx index 9e05524fa..a466b060a 100644 --- a/components/tooltip/Tooltip.tsx +++ b/components/tooltip/Tooltip.tsx @@ -1,4 +1,4 @@ -import { defineComponent, inject } from 'vue'; +import { defineComponent, ExtractPropTypes, inject } from 'vue'; import VcTooltip from '../vc-tooltip'; import classNames from '../_util/classNames'; import getPlacements from './placements'; @@ -27,13 +27,18 @@ const splitObject = (obj: any, keys: string[]) => { return { picked, omitted }; }; const props = abstractTooltipProps(); + +const tooltipProps = { + ...props, + title: PropTypes.VNodeChild, +}; + +export type TooltipProps = Partial>; + export default defineComponent({ name: 'ATooltip', inheritAttrs: false, - props: { - ...props, - title: PropTypes.VNodeChild, - }, + props: tooltipProps, emits: ['update:visible', 'visibleChange'], setup() { return { @@ -192,7 +197,7 @@ export default defineComponent({ [openClassName || `${prefixCls}-open`]: sVisible, [child.props && child.props.class]: child.props && child.props.class, }); - const tooltipProps = { + const vcTooltipProps = { ...$attrs, ...$props, prefixCls, @@ -205,7 +210,7 @@ export default defineComponent({ onPopupAlign: this.onPopupAlign, }; return ( - + {sVisible ? cloneElement(child, { class: childCls }) : child} ); diff --git a/components/tooltip/index.ts b/components/tooltip/index.ts index a3b35afd7..1e41360cf 100644 --- a/components/tooltip/index.ts +++ b/components/tooltip/index.ts @@ -1,6 +1,8 @@ import { App } from 'vue'; import ToolTip from './Tooltip'; +export { TooltipProps } from './Tooltip'; + /* istanbul ignore next */ ToolTip.install = function(app: App) { app.component(ToolTip.name, ToolTip); diff --git a/components/vc-mentions/src/mentionsProps.ts b/components/vc-mentions/src/mentionsProps.ts index d2aacc16b..a3b391af6 100644 --- a/components/vc-mentions/src/mentionsProps.ts +++ b/components/vc-mentions/src/mentionsProps.ts @@ -1,6 +1,6 @@ import { PropType } from 'vue'; import PropTypes from '../../_util/vue-types'; -import initDefaultProps from '../../_util/props-util/initDefaultProps'; +import { initDefaultProps } from '../../_util/props-util'; import { filterOption as defaultFilterOption, validateSearch as defaultValidateSearch, @@ -20,12 +20,8 @@ export const mentionsProps = { placement: PropTypes.oneOf(PlaceMent), character: PropTypes.any, characterRender: PropTypes.func, - filterOption: { - type: [Boolean, Function] as PropType, - }, - validateSearch: { - type: Function as PropType, - }, + filterOption: PropTypes.func, + validateSearch: PropTypes.func, getPopupContainer: { type: Function as PropType<() => HTMLElement>, }, diff --git a/components/vc-menu/Menu.jsx b/components/vc-menu/Menu.jsx index 66e1968e9..cc88bd8cd 100644 --- a/components/vc-menu/Menu.jsx +++ b/components/vc-menu/Menu.jsx @@ -47,7 +47,7 @@ const Menu = { this.updateMiniStore(); }, methods: { - onSelect(selectInfo) { + handleSelect(selectInfo) { const props = this.$props; if (props.selectable) { // root menu @@ -70,7 +70,7 @@ const Menu = { } }, - onClick(e) { + handleClick(e) { this.__emit('click', e); }, // onKeyDown needs to be exposed as a instance method @@ -112,7 +112,7 @@ const Menu = { } }, - onDeselect(selectInfo) { + handleDeselect(selectInfo) { const props = this.$props; if (props.selectable) { const selectedKeys = this.store.getState().selectedKeys.concat(); @@ -172,10 +172,10 @@ const Menu = { overflowedIndicator: getComponent(this, 'overflowedIndicator', props) || ···, openTransitionName: this.getOpenTransitionName(), children: filterEmpty(props.children), - onClick: this.onClick, + onClick: this.handleClick, onOpenChange: this.onOpenChange, - onDeselect: this.onDeselect, - onSelect: this.onSelect, + onDeselect: this.handleDeselect, + onSelect: this.handleSelect, ref: this.saveInnerMenu, }; From 689486fadc6e11aea4eb32b8ea5c281f602d597d Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Sat, 24 Oct 2020 22:53:55 +0800 Subject: [PATCH 4/6] chore: table snap --- components/table/Table.tsx | 5 ++-- .../Table.rowSelection.test.js.snap | 7 ------ .../__snapshots__/Table.test.js.snap | 7 ------ .../__snapshots__/empty.test.js.snap | 24 +++++++++---------- components/table/filterDropdown.tsx | 2 +- 5 files changed, 15 insertions(+), 30 deletions(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 47ccd50b4..efb5bbb4e 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -147,14 +147,13 @@ export default defineComponent({ }; }, - data() { + data(this) { const props = getOptionProps(this); warning( !props.expandedRowRender || !('scroll' in props), '`expandedRowRender` and `scroll` are not compatible. Please use one of them at one time.', ); - const self = this; - const { getDefaultSortOrder, getDefaultFilters, getDefaultPagination } = self as typeof self & { + const { getDefaultSortOrder, getDefaultFilters, getDefaultPagination } = this as typeof this & { getDefaultSortOrder: Function; getDefaultFilters: Function; getDefaultPagination: Function; diff --git a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap index aa975e79e..c0ff215b5 100644 --- a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap @@ -138,13 +138,6 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
-
    - -
  • -
  • 1
  • -
  • - -
diff --git a/components/table/__tests__/__snapshots__/Table.test.js.snap b/components/table/__tests__/__snapshots__/Table.test.js.snap index 2faf59955..5869d38d3 100644 --- a/components/table/__tests__/__snapshots__/Table.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.test.js.snap @@ -59,13 +59,6 @@ exports[`Table align column should not override cell style 1`] = ` -
    - -
  • -
  • 1
  • -
  • - -
diff --git a/components/table/__tests__/__snapshots__/empty.test.js.snap b/components/table/__tests__/__snapshots__/empty.test.js.snap index 35ea067ec..d9751d971 100644 --- a/components/table/__tests__/__snapshots__/empty.test.js.snap +++ b/components/table/__tests__/__snapshots__/empty.test.js.snap @@ -60,12 +60,12 @@ exports[`Table renders empty table 1`] = `
-
+
- - + + - +
@@ -226,12 +226,12 @@ exports[`Table renders empty table with fixed columns 1`] = `
-
+
- - + + - +
@@ -359,12 +359,12 @@ exports[`Table renders empty table without emptyText when loading 1`] = `
-
+
- - + + - +
diff --git a/components/table/filterDropdown.tsx b/components/table/filterDropdown.tsx index d8c30f92d..24edd860a 100755 --- a/components/table/filterDropdown.tsx +++ b/components/table/filterDropdown.tsx @@ -156,7 +156,7 @@ export default defineComponent({ column, filterDropdown ? selectedKeys - : selectedKeys.map(key => valueKeys[key]).filter(key => key !== undefined), + : selectedKeys.map((key: any) => valueKeys[key]).filter(key => key !== undefined), ); } }, From a5879124df940eaa7eaecc98fa0174015633e5ea Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Sat, 24 Oct 2020 22:56:17 +0800 Subject: [PATCH 5/6] chore: transfer snap --- .../transfer/__tests__/__snapshots__/search.test.js.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/transfer/__tests__/__snapshots__/search.test.js.snap b/components/transfer/__tests__/__snapshots__/search.test.js.snap index 21d617303..fbc273eb6 100644 --- a/components/transfer/__tests__/__snapshots__/search.test.js.snap +++ b/components/transfer/__tests__/__snapshots__/search.test.js.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Search should show cross icon when input value exists 1`] = `
`; +exports[`Search should show cross icon when input value exists 1`] = ``; -exports[`Search should show cross icon when input value exists 2`] = `
`; +exports[`Search should show cross icon when input value exists 2`] = ``; From b233d1e68ab3722bd27005f866dc43bb4679d7c7 Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Sat, 24 Oct 2020 23:11:41 +0800 Subject: [PATCH 6/6] chore: update snap --- .../__snapshots__/index.test.js.snap | 5439 +++++++---------- .../__snapshots__/index.test.js.snap | 4 +- 2 files changed, 2339 insertions(+), 3104 deletions(-) diff --git a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap index f3c3cbf6d..b8bbb204e 100644 --- a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap +++ b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap @@ -588,36 +588,29 @@ exports[`Locale Provider should display the text as ar 1`] = `
  • 5
  • - -
    - +
    + + +
    10 / الصفحة + +
    +
  • - -
    - +
    - ~ + ~ Click to confirm @@ -627,17 +620,15 @@ exports[`Locale Provider should display the text as ar 1`] = ` 0 عنصر