From b530fe98e373e08ef631331deb21caa8c430621d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Sat, 11 Jan 2025 03:24:45 +0800 Subject: [PATCH 1/6] refactor: rc-component/table --- docs/examples/animation.tsx | 2 +- package.json | 6 ++--- src/Cell/index.tsx | 2 +- src/Cell/useCellRender.ts | 8 +++--- src/FixedHolder/index.tsx | 2 +- src/Table.tsx | 16 ++++++------ src/VirtualTable/index.tsx | 4 +-- src/hooks/useColumns/index.tsx | 4 +-- src/hooks/useExpand.ts | 2 +- src/hooks/useFixedInfo.ts | 4 +-- src/hooks/useRowInfo.tsx | 2 +- src/hooks/useSticky.ts | 2 +- src/stickyScrollBar.tsx | 47 +++++++++++++++++----------------- src/utils/legacyUtil.ts | 2 +- src/utils/offsetUtil.ts | 4 +-- tests/Deprecated.spec.jsx | 2 +- tests/ExpandRow.spec.jsx | 4 +-- tests/FixedColumn-IE.spec.jsx | 4 +-- tests/FixedColumn.spec.tsx | 2 +- tests/FixedHeader.spec.jsx | 2 +- tests/Hover.spec.tsx | 4 +-- tests/Scroll.spec.jsx | 2 +- tests/Sticky.spec.jsx | 2 +- tests/Table.spec.jsx | 2 +- tests/Virtual.spec.tsx | 4 +-- tests/refs.spec.tsx | 2 +- tests/setup.ts | 2 +- 27 files changed, 70 insertions(+), 69 deletions(-) diff --git a/docs/examples/animation.tsx b/docs/examples/animation.tsx index 6a71da379..fc773559e 100644 --- a/docs/examples/animation.tsx +++ b/docs/examples/animation.tsx @@ -1,7 +1,7 @@ import React from 'react'; import CSSMotionList from 'rc-animate/lib/CSSMotionList'; import classNames from 'classnames'; -import toArray from 'rc-util/lib/Children/toArray'; +import toArray from '@rc-component/util/lib/Children/toArray'; import type { TableProps } from 'rc-table'; import Table from 'rc-table'; import '../../assets/index.less'; diff --git a/package.json b/package.json index 9a9226f4e..00f264600 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rc-table", - "version": "7.50.2", + "name": "@rc-component/table", + "version": "1.0.0", "description": "table ui component for react", "engines": { "node": ">=8.x" @@ -55,9 +55,9 @@ "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/context": "^1.4.0", + "@rc-component/util": "^1.1.0", "classnames": "^2.2.5", "rc-resize-observer": "^1.1.0", - "rc-util": "^5.44.3", "rc-virtual-list": "^3.14.2" }, "devDependencies": { diff --git a/src/Cell/index.tsx b/src/Cell/index.tsx index 8b0d22162..8dd562016 100644 --- a/src/Cell/index.tsx +++ b/src/Cell/index.tsx @@ -14,7 +14,7 @@ import type { } from '../interface'; import useCellRender from './useCellRender'; import useHoverState from './useHoverState'; -import { useEvent } from 'rc-util'; +import { useEvent } from '@rc-component/util'; export interface CellProps { prefixCls?: string; diff --git a/src/Cell/useCellRender.ts b/src/Cell/useCellRender.ts index 6cbfda3a2..f71ae190c 100644 --- a/src/Cell/useCellRender.ts +++ b/src/Cell/useCellRender.ts @@ -1,7 +1,7 @@ -import useMemo from 'rc-util/lib/hooks/useMemo'; -import isEqual from 'rc-util/lib/isEqual'; -import getValue from 'rc-util/lib/utils/get'; -import warning from 'rc-util/lib/warning'; +import useMemo from '@rc-component/util/lib/hooks/useMemo'; +import isEqual from '@rc-component/util/lib/isEqual'; +import getValue from '@rc-component/util/lib/utils/get'; +import warning from '@rc-component/util/lib/warning'; import * as React from 'react'; import PerfContext from '../context/PerfContext'; import type { CellType, ColumnType, DataIndex, RenderedCell } from '../interface'; diff --git a/src/FixedHolder/index.tsx b/src/FixedHolder/index.tsx index d4a243974..fb450cefe 100644 --- a/src/FixedHolder/index.tsx +++ b/src/FixedHolder/index.tsx @@ -1,6 +1,6 @@ import { useContext } from '@rc-component/context'; import classNames from 'classnames'; -import { fillRef } from 'rc-util/lib/ref'; +import { fillRef } from '@rc-component/util/lib/ref'; import * as React from 'react'; import { useMemo } from 'react'; import ColGroup from '../ColGroup'; diff --git a/src/Table.tsx b/src/Table.tsx index 5b9ec0898..2923df584 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -27,13 +27,13 @@ import type { CompareProps } from '@rc-component/context/lib/Immutable'; import classNames from 'classnames'; import ResizeObserver from 'rc-resize-observer'; -import isVisible from 'rc-util/lib/Dom/isVisible'; -import { isStyleSupport } from 'rc-util/lib/Dom/styleChecker'; -import { getTargetScrollBarSize } from 'rc-util/lib/getScrollBarSize'; -import useEvent from 'rc-util/lib/hooks/useEvent'; -import pickAttrs from 'rc-util/lib/pickAttrs'; -import getValue from 'rc-util/lib/utils/get'; -import warning from 'rc-util/lib/warning'; +import isVisible from '@rc-component/util/lib/Dom/isVisible'; +import { isStyleSupport } from '@rc-component/util/lib/Dom/styleChecker'; +import { getTargetScrollBarSize } from '@rc-component/util/lib/getScrollBarSize'; +import useEvent from '@rc-component/util/lib/hooks/useEvent'; +import pickAttrs from '@rc-component/util/lib/pickAttrs'; +import getValue from '@rc-component/util/lib/utils/get'; +import warning from '@rc-component/util/lib/warning'; import * as React from 'react'; import Body from './Body'; import ColGroup from './ColGroup'; @@ -75,7 +75,7 @@ import StickyScrollBar from './stickyScrollBar'; import Column from './sugar/Column'; import ColumnGroup from './sugar/ColumnGroup'; import { getColumnsKey, validateValue, validNumberValue } from './utils/valueUtil'; -import { getDOM } from 'rc-util/lib/Dom/findDOMNode'; +import { getDOM } from '@rc-component/util/lib/Dom/findDOMNode'; export const DEFAULT_PREFIX = 'rc-table'; diff --git a/src/VirtualTable/index.tsx b/src/VirtualTable/index.tsx index 61c9dc49f..a51695abb 100644 --- a/src/VirtualTable/index.tsx +++ b/src/VirtualTable/index.tsx @@ -1,6 +1,6 @@ import type { CompareProps } from '@rc-component/context/lib/Immutable'; import classNames from 'classnames'; -import { useEvent, warning } from 'rc-util'; +import { useEvent, warning } from '@rc-component/util'; import * as React from 'react'; import { INTERNAL_HOOKS } from '../constant'; import { makeImmutable } from '../context/TableContext'; @@ -8,7 +8,7 @@ import type { CustomizeScrollBody, GetComponent, Reference } from '../interface' import Table, { DEFAULT_PREFIX, type TableProps } from '../Table'; import Grid from './BodyGrid'; import { StaticContext } from './context'; -import getValue from 'rc-util/lib/utils/get'; +import getValue from '@rc-component/util/lib/utils/get'; const renderBody: CustomizeScrollBody = (rawData, props) => { const { ref, onScroll } = props; diff --git a/src/hooks/useColumns/index.tsx b/src/hooks/useColumns/index.tsx index 573a44af3..c387157c4 100644 --- a/src/hooks/useColumns/index.tsx +++ b/src/hooks/useColumns/index.tsx @@ -1,5 +1,5 @@ -import toArray from 'rc-util/lib/Children/toArray'; -import warning from 'rc-util/lib/warning'; +import toArray from '@rc-component/util/lib/Children/toArray'; +import warning from '@rc-component/util/lib/warning'; import * as React from 'react'; import { EXPAND_COLUMN } from '../../constant'; import type { diff --git a/src/hooks/useExpand.ts b/src/hooks/useExpand.ts index dcb8637f4..89c6a9563 100644 --- a/src/hooks/useExpand.ts +++ b/src/hooks/useExpand.ts @@ -1,4 +1,4 @@ -import warning from 'rc-util/lib/warning'; +import warning from '@rc-component/util/lib/warning'; import * as React from 'react'; import { INTERNAL_HOOKS } from '../constant'; import type { diff --git a/src/hooks/useFixedInfo.ts b/src/hooks/useFixedInfo.ts index d2ea2e687..799fc27fb 100644 --- a/src/hooks/useFixedInfo.ts +++ b/src/hooks/useFixedInfo.ts @@ -1,5 +1,5 @@ -import useMemo from 'rc-util/lib/hooks/useMemo'; -import isEqual from 'rc-util/lib/isEqual'; +import useMemo from '@rc-component/util/lib/hooks/useMemo'; +import isEqual from '@rc-component/util/lib/isEqual'; import type { ColumnType, Direction, StickyOffsets } from '../interface'; import { getCellFixedInfo } from '../utils/fixUtil'; diff --git a/src/hooks/useRowInfo.tsx b/src/hooks/useRowInfo.tsx index bba123a89..4e3e11fa8 100644 --- a/src/hooks/useRowInfo.tsx +++ b/src/hooks/useRowInfo.tsx @@ -2,7 +2,7 @@ import { useContext } from '@rc-component/context'; import type { TableContextProps } from '../context/TableContext'; import TableContext from '../context/TableContext'; import { getColumnsKey } from '../utils/valueUtil'; -import { useEvent } from 'rc-util'; +import { useEvent } from '@rc-component/util'; import classNames from 'classnames'; export default function useRowInfo( diff --git a/src/hooks/useSticky.ts b/src/hooks/useSticky.ts index f85929302..d34e61448 100644 --- a/src/hooks/useSticky.ts +++ b/src/hooks/useSticky.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import canUseDom from 'rc-util/lib/Dom/canUseDom'; +import canUseDom from '@rc-component/util/lib/Dom/canUseDom'; import type { TableSticky } from '../interface'; // fix ssr render diff --git a/src/stickyScrollBar.tsx b/src/stickyScrollBar.tsx index 071e68494..1da632dd2 100644 --- a/src/stickyScrollBar.tsx +++ b/src/stickyScrollBar.tsx @@ -1,13 +1,17 @@ import { useContext } from '@rc-component/context'; import classNames from 'classnames'; -import addEventListener from 'rc-util/lib/Dom/addEventListener'; -import getScrollBarSize from 'rc-util/lib/getScrollBarSize'; +import getScrollBarSize from '@rc-component/util/lib/getScrollBarSize'; import * as React from 'react'; import TableContext from './context/TableContext'; import { useLayoutState } from './hooks/useFrame'; -import raf from 'rc-util/lib/raf'; +import raf from '@rc-component/util/lib/raf'; import { getOffset } from './utils/offsetUtil'; +const MOUSEUP_EVENT: keyof WindowEventMap = 'mouseup'; +const MOUSEMOVE_EVENT: keyof WindowEventMap = 'mousemove'; +const SCROLL_EVENT: keyof WindowEventMap = 'scroll'; +const RESIZE_EVENT: keyof WindowEventMap = 'resize'; + interface StickyScrollBarProps { scrollBodyRef: React.RefObject; onScroll: (params: { scrollLeft?: number }) => void; @@ -50,11 +54,11 @@ const StickyScrollBar: React.ForwardRefRenderFunction = () => { + const onMouseUp = () => { setActive(false); }; - const onMouseDown: React.MouseEventHandler = event => { + const onMouseDown = (event: React.MouseEvent) => { event.persist(); refState.current.delta = event.pageX - scrollState.scrollLeft; refState.current.x = 0; @@ -62,7 +66,7 @@ const StickyScrollBar: React.ForwardRefRenderFunction = event => { + const onMouseMove = (event: any) => { // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons const { buttons } = event || (window?.event as any); if (!isActive || buttons === 0) { @@ -72,8 +76,7 @@ const StickyScrollBar: React.ForwardRefRenderFunction { - const onMouseUpListener = addEventListener(document.body, 'mouseup', onMouseUp, false); - const onMouseMoveListener = addEventListener(document.body, 'mousemove', onMouseMove, false); + document.body.addEventListener(MOUSEUP_EVENT, onMouseUp, false); + document.body.addEventListener(MOUSEMOVE_EVENT, onMouseMove, false); checkScrollBarVisible(); return () => { - onMouseUpListener.remove(); - onMouseMoveListener.remove(); + document.body.removeEventListener(MOUSEUP_EVENT, onMouseUp, false); + document.body.removeEventListener(MOUSEMOVE_EVENT, onMouseMove, false); }; - }, [scrollBarWidth, isActive]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [scrollBarWidth, isActive, checkScrollBarVisible]); React.useEffect(() => { - const onScrollListener = addEventListener(container, 'scroll', checkScrollBarVisible, false); - const onResizeListener = addEventListener(window, 'resize', checkScrollBarVisible, false); - + container.addEventListener(SCROLL_EVENT, checkScrollBarVisible, false); + window.addEventListener(RESIZE_EVENT, checkScrollBarVisible, false); return () => { - onScrollListener.remove(); - onResizeListener.remove(); + container.removeEventListener(SCROLL_EVENT, checkScrollBarVisible, false); + window.removeEventListener(RESIZE_EVENT, checkScrollBarVisible, false); }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [container]); React.useEffect(() => { @@ -167,6 +171,7 @@ const StickyScrollBar: React.ForwardRefRenderFunction
{ +vi.mock('@rc-component/util/lib/Dom/styleChecker', () => { return { isStyleSupport: (name, val) => val !== 'sticky', }; diff --git a/tests/FixedColumn.spec.tsx b/tests/FixedColumn.spec.tsx index 50a21baf9..bde68c79a 100644 --- a/tests/FixedColumn.spec.tsx +++ b/tests/FixedColumn.spec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { mount } from 'enzyme'; import { render } from '@testing-library/react'; import RcResizeObserver, { _rs } from 'rc-resize-observer'; -import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; +import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook'; import { act } from 'react-dom/test-utils'; import Table, { type ColumnsType } from '../src'; import { safeAct } from './utils'; diff --git a/tests/FixedHeader.spec.jsx b/tests/FixedHeader.spec.jsx index c3d3dd8f4..fb564e964 100644 --- a/tests/FixedHeader.spec.jsx +++ b/tests/FixedHeader.spec.jsx @@ -1,6 +1,6 @@ import { mount } from 'enzyme'; import RcResizeObserver from 'rc-resize-observer'; -import { spyElementPrototype } from 'rc-util/lib/test/domHook'; +import { spyElementPrototype } from '@rc-component/util/lib/test/domHook'; import React from 'react'; import { act } from 'react-dom/test-utils'; import Table, { INTERNAL_COL_DEFINE } from '../src'; diff --git a/tests/Hover.spec.tsx b/tests/Hover.spec.tsx index 623a11750..9c9a3ebdc 100644 --- a/tests/Hover.spec.tsx +++ b/tests/Hover.spec.tsx @@ -1,6 +1,6 @@ import { mount } from 'enzyme'; -import toArray from 'rc-util/lib/Children/toArray'; -import { resetWarned } from 'rc-util/lib/warning'; +import toArray from '@rc-component/util/lib/Children/toArray'; +import { resetWarned } from '@rc-component/util/lib/warning'; import React from 'react'; import Table from '../src'; import type { TableProps } from '../src/Table'; diff --git a/tests/Scroll.spec.jsx b/tests/Scroll.spec.jsx index 387e6cd5f..e8cd475a3 100644 --- a/tests/Scroll.spec.jsx +++ b/tests/Scroll.spec.jsx @@ -1,5 +1,5 @@ import { mount } from 'enzyme'; -import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; +import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook'; import React from 'react'; import { act } from 'react-dom/test-utils'; import Table from '../src'; diff --git a/tests/Sticky.spec.jsx b/tests/Sticky.spec.jsx index 772356278..fed2d9f62 100644 --- a/tests/Sticky.spec.jsx +++ b/tests/Sticky.spec.jsx @@ -1,5 +1,5 @@ import { mount } from 'enzyme'; -import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; +import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook'; import React from 'react'; import { act } from 'react-dom/test-utils'; import Table from '../src'; diff --git a/tests/Table.spec.jsx b/tests/Table.spec.jsx index 872cd89c2..41e6a4e8c 100644 --- a/tests/Table.spec.jsx +++ b/tests/Table.spec.jsx @@ -1,5 +1,5 @@ import { mount } from 'enzyme'; -import { resetWarned } from 'rc-util/lib/warning'; +import { resetWarned } from '@rc-component/util/lib/warning'; import React from 'react'; import { VariableSizeGrid as Grid } from 'react-window'; import Table, { INTERNAL_COL_DEFINE } from '../src'; diff --git a/tests/Virtual.spec.tsx b/tests/Virtual.spec.tsx index f9170c7d5..921453e77 100644 --- a/tests/Virtual.spec.tsx +++ b/tests/Virtual.spec.tsx @@ -1,8 +1,8 @@ import { act, fireEvent, render } from '@testing-library/react'; import { _rs as onEsResize } from 'rc-resize-observer/es/utils/observerUtil'; import { _rs as onLibResize } from 'rc-resize-observer/lib/utils/observerUtil'; -import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; -import { resetWarned } from 'rc-util/lib/warning'; +import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook'; +import { resetWarned } from '@rc-component/util/lib/warning'; import React from 'react'; import { VirtualTable, type Reference, type VirtualTableProps } from '../src'; diff --git a/tests/refs.spec.tsx b/tests/refs.spec.tsx index f291741e5..51ea05af5 100644 --- a/tests/refs.spec.tsx +++ b/tests/refs.spec.tsx @@ -1,5 +1,5 @@ import { render } from '@testing-library/react'; -import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; +import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook'; import React from 'react'; import Table, { type Reference } from '../src'; diff --git a/tests/setup.ts b/tests/setup.ts index 648329c8d..00aa9c818 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -7,7 +7,7 @@ window.getComputedStyle = elt => getComputedStyle(elt); global.requestAnimationFrame = cb => setTimeout(cb, 0); require('regenerator-runtime'); -vi.mock('rc-util/lib/getScrollBarSize'); +vi.mock('@rc-component/util/lib/getScrollBarSize'); const Enzyme = require('enzyme'); const Adapter = require('enzyme-adapter-react-16'); From 321c68cdfd9c7b0e88d1ed55a3292eec1f8261ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Sat, 11 Jan 2025 03:42:42 +0800 Subject: [PATCH 2/6] fix: fix --- src/stickyScrollBar.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/stickyScrollBar.tsx b/src/stickyScrollBar.tsx index 1da632dd2..b4c42316c 100644 --- a/src/stickyScrollBar.tsx +++ b/src/stickyScrollBar.tsx @@ -142,20 +142,18 @@ const StickyScrollBar: React.ForwardRefRenderFunction { - document.body.removeEventListener(MOUSEUP_EVENT, onMouseUp, false); - document.body.removeEventListener(MOUSEMOVE_EVENT, onMouseMove, false); + document.body.removeEventListener(MOUSEUP_EVENT, onMouseUp); + document.body.removeEventListener(MOUSEMOVE_EVENT, onMouseMove); }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [scrollBarWidth, isActive, checkScrollBarVisible]); + }, [scrollBarWidth, isActive]); React.useEffect(() => { container.addEventListener(SCROLL_EVENT, checkScrollBarVisible, false); window.addEventListener(RESIZE_EVENT, checkScrollBarVisible, false); return () => { - container.removeEventListener(SCROLL_EVENT, checkScrollBarVisible, false); - window.removeEventListener(RESIZE_EVENT, checkScrollBarVisible, false); + container.removeEventListener(SCROLL_EVENT, checkScrollBarVisible); + window.removeEventListener(RESIZE_EVENT, checkScrollBarVisible); }; - // eslint-disable-next-line react-hooks/exhaustive-deps }, [container]); React.useEffect(() => { From 61ed10f094f26dd43694bdf4af13e5f13a6d30d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Sat, 11 Jan 2025 03:46:57 +0800 Subject: [PATCH 3/6] fix: fix --- src/Table.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Table.tsx b/src/Table.tsx index 2923df584..90f523b4e 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -527,9 +527,9 @@ function Table( React.useEffect(() => { if (!tailor || !useInternalHooks) { if (scrollBodyRef.current instanceof Element) { - setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current).width); + setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current)?.width); } else { - setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current).width); + setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current)?.width); } } setSupportSticky(isStyleSupport('position', 'sticky')); From a0804b5f7b3a41025bd464ea8f43ef94a754202a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Sat, 11 Jan 2025 03:56:33 +0800 Subject: [PATCH 4/6] fix: fix --- src/Table.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Table.tsx b/src/Table.tsx index 90f523b4e..2923df584 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -527,9 +527,9 @@ function Table( React.useEffect(() => { if (!tailor || !useInternalHooks) { if (scrollBodyRef.current instanceof Element) { - setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current)?.width); + setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current).width); } else { - setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current)?.width); + setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current).width); } } setSupportSticky(isStyleSupport('position', 'sticky')); From 2bd1de9b610761e989851f99e44291b24b10c9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Mon, 13 Jan 2025 19:57:27 +0800 Subject: [PATCH 5/6] test: fix test case --- .gitignore | 1 + .../{rc-util => @rc-component/util}/lib/getScrollBarSize.ts | 0 2 files changed, 1 insertion(+) rename __mocks__/{rc-util => @rc-component/util}/lib/getScrollBarSize.ts (100%) diff --git a/.gitignore b/.gitignore index d1a606c3f..94be18dab 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ es/ .storybook .doc !__mocks__/rc-util/lib +!__mocks__/@rc-component/util/lib examples/debug.tsx .history ~* diff --git a/__mocks__/rc-util/lib/getScrollBarSize.ts b/__mocks__/@rc-component/util/lib/getScrollBarSize.ts similarity index 100% rename from __mocks__/rc-util/lib/getScrollBarSize.ts rename to __mocks__/@rc-component/util/lib/getScrollBarSize.ts From 70c366104806667733eed3b0deaeeb2f92de3040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Tue, 14 Jan 2025 16:26:11 +0800 Subject: [PATCH 6/6] fix: fix --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8c3b8ce7..afb1d137c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rc-component/table", - "version": "1.0.0", + "version": "1.0.0-0", "description": "table ui component for react", "engines": { "node": ">=8.x"