diff --git a/packages/design/src/spin/__tests__/__snapshots__/index.test.tsx.snap b/packages/design/src/spin/__tests__/__snapshots__/index.test.tsx.snap index a22f3b7c5..128aaf161 100644 --- a/packages/design/src/spin/__tests__/__snapshots__/index.test.tsx.snap +++ b/packages/design/src/spin/__tests__/__snapshots__/index.test.tsx.snap @@ -16,18 +16,18 @@ exports[`Spin default indicator should render correctly 1`] = `
@@ -36,131 +36,131 @@ exports[`Spin default indicator should render correctly 1`] = ` id="__lottie_element_2" > @@ -178,370 +178,370 @@ exports[`Spin default indicator should render correctly 1`] = ` style="display: none;" > diff --git a/packages/design/src/spin/demo/gray.tsx b/packages/design/src/spin/demo/colored.tsx similarity index 61% rename from packages/design/src/spin/demo/gray.tsx rename to packages/design/src/spin/demo/colored.tsx index cc0d263a1..75d2ea105 100644 --- a/packages/design/src/spin/demo/gray.tsx +++ b/packages/design/src/spin/demo/colored.tsx @@ -3,9 +3,9 @@ import { Space, Spin } from '@oceanbase/design'; const App: React.FC = () => ( - - - + + + ); diff --git a/packages/design/src/spin/index.md b/packages/design/src/spin/index.md index 4ec69a6f6..07bade6cb 100644 --- a/packages/design/src/spin/index.md +++ b/packages/design/src/spin/index.md @@ -16,7 +16,7 @@ demo: - + @@ -24,8 +24,8 @@ demo: ## API -| 参数 | 说明 | 类型 | 默认值 | 版本 | -| :--- | :------------------------------------------- | :------ | :----- | :--- | -| gray | 是否为灰色的加载指示符,仅针对默认指示符生效 | boolean | false | - | +| 参数 | 说明 | 类型 | 默认值 | 版本 | +| :-- | :-- | :-- | :-- | :-- | +| gray | 是否为灰色的加载指示符,仅针对默认指示符生效,关闭后为彩色的加载指示符 | boolean | true | - | - 更多 API 详见 antd Spin 文档: https://ant.design/components/spin-cn diff --git a/packages/design/src/spin/index.tsx b/packages/design/src/spin/index.tsx index 84cd10121..f3ae779eb 100644 --- a/packages/design/src/spin/index.tsx +++ b/packages/design/src/spin/index.tsx @@ -19,7 +19,7 @@ const Spin = ({ prefixCls: customizePrefixCls, className, indicator: customizeIndicator, - gray, + gray = true, ...restProps }: SpinProps) => { const { getPrefixCls, spin } = useContext(ConfigProvider.ConfigContext);