From 7fab35b535b29ce751c492b1081c9a06519a37cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <645381995@qq.com> Date: Fri, 9 Aug 2024 09:30:56 +0800 Subject: [PATCH] feat: init --- .dumi/theme/layouts/GlobalLayout.tsx | 2 +- components/table/demo/header-table.md | 7 ++++ components/table/demo/header-table.tsx | 53 ++++++++++++++++++++++++++ components/table/index.en-US.md | 1 + components/table/index.zh-CN.md | 1 + 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 components/table/demo/header-table.md create mode 100644 components/table/demo/header-table.tsx diff --git a/.dumi/theme/layouts/GlobalLayout.tsx b/.dumi/theme/layouts/GlobalLayout.tsx index 3b7da72e52..e85ba69e45 100644 --- a/.dumi/theme/layouts/GlobalLayout.tsx +++ b/.dumi/theme/layouts/GlobalLayout.tsx @@ -150,7 +150,7 @@ const GlobalLayout: React.FC = () => { () => ({ algorithm: getAlgorithm(theme), token: { motion: !theme.includes('motion-off') }, - cssVar: true, + cssVar: false, hashed: false, }), [theme], diff --git a/components/table/demo/header-table.md b/components/table/demo/header-table.md new file mode 100644 index 0000000000..19b791b5b7 --- /dev/null +++ b/components/table/demo/header-table.md @@ -0,0 +1,7 @@ +## zh-CN + +调试使用。 + +## en-US + +debug use. diff --git a/components/table/demo/header-table.tsx b/components/table/demo/header-table.tsx new file mode 100644 index 0000000000..4e36a4645d --- /dev/null +++ b/components/table/demo/header-table.tsx @@ -0,0 +1,53 @@ +import React from 'react'; +import type { TableProps } from 'antd'; +import { Table } from 'antd'; + +const HeaderTable = (props: { style?: React.CSSProperties; children?: React.ReactNode }) => ( + <> +
+
+
哈哈哈
+
哈哈哈
+
+
+ + +); +const _tableProps: TableProps = { + columns: [ + { title: 'Name1', width: 1600, dataIndex: 'name' }, + { title: 'Name2', dataIndex: 'name' }, + { title: 'Name3', dataIndex: 'name' }, + { title: 'Name4', dataIndex: 'name' }, + { title: 'Name5', dataIndex: 'name' }, + ], + dataSource: [ + { key: '1', name: 'John Brown' }, + { key: '2', name: 'Jim Green' }, + { key: '3', name: 'Joe Black' }, + ], + scroll: { x: 'max-content' }, + sticky: true, + components: { header: { table: HeaderTable } }, +}; + +const App = () => ( +
+
+
+ +); + +export default App; diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index 5b7cfe7b36..eaee35e661 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -109,6 +109,7 @@ const columns = [ Dynamic Settingsselections with iconComponent Token +header table ## API diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index a2647bbf6c..49a617db1c 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -110,6 +110,7 @@ const columns = [ 动态控制表格属性带下拉箭头的表头组件 Token +头部表格 ## API