-
-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/less-4.1.3
- Loading branch information
Showing
76 changed files
with
8,855 additions
and
5,607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import { defineConfig } from 'father'; | ||
|
||
export default defineConfig({ | ||
platform: 'browser', | ||
cjs: { output: 'lib' }, | ||
esm: { | ||
output: 'es', | ||
alias: { 'rc-util/lib': 'rc-util/es' }, | ||
}, | ||
}); | ||
plugins: ['@rc-component/father-plugin'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This configuration file was automatically generated by Gitpod. | ||
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) | ||
# and commit this file to your remote git repository to share the goodness with others. | ||
|
||
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart | ||
|
||
tasks: | ||
- init: npm install && npm run compile | ||
command: npm run start | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@import (reference) 'index.less'; | ||
|
||
.@{tablePrefixCls}-tbody-virtual { | ||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
@border: 1px solid @border-color; | ||
border-left: @border; | ||
|
||
.@{tablePrefixCls}-row { | ||
display: flex; | ||
box-sizing: border-box; | ||
width: 100%; | ||
} | ||
|
||
.@{tablePrefixCls}-row-extra { | ||
.@{tablePrefixCls}-cell { | ||
background: rgba(200, 200, 255) !important; | ||
} | ||
} | ||
|
||
.@{tablePrefixCls}-cell { | ||
flex: 0 0 var(--virtual-width); | ||
width: var(--virtual-width); | ||
padding: 8px 16px; | ||
border-right: @border; | ||
border-bottom: @border; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: click-summary-row | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/click-summary-row.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Virtual Columns | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/virtual-columns.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Virtual | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/virtual.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* eslint-disable no-console,func-names,react/no-multi-comp, no-nested-ternary */ | ||
import type { ColumnType } from '@/interface'; | ||
import Table from 'rc-table'; | ||
import React from 'react'; | ||
import '../../assets/index.less'; | ||
|
||
interface RecordType { | ||
a: string; | ||
b?: string; | ||
c?: string; | ||
d: number; | ||
key: string; | ||
} | ||
|
||
const columns: ColumnType<RecordType>[] = [ | ||
{ title: 'title1', dataIndex: 'a', key: 'a' }, | ||
{ title: 'title2', dataIndex: 'b', key: 'b' }, | ||
{ title: 'title3', dataIndex: 'c', key: 'c' }, | ||
{ title: 'title4', dataIndex: 'd', key: 'd' }, | ||
]; | ||
|
||
const data: RecordType[] = [ | ||
{ a: 'cdd', b: 'edd12221', d: 3, key: '2' }, | ||
{ a: '133', c: 'edd12221', d: 2, key: '3' }, | ||
{ a: '133', c: 'edd12221', d: 2, key: '4' }, | ||
]; | ||
|
||
const Demo = () => { | ||
return ( | ||
<div style={{ width: 800 }}> | ||
<Table | ||
columns={columns} | ||
data={data} | ||
summary={() => ( | ||
<Table.Summary> | ||
<Table.Summary.Row | ||
onClick={e => { | ||
e.stopPropagation(); | ||
alert('click summary row will trigger the click event'); | ||
}} | ||
> | ||
<Table.Summary.Cell index={0} /> | ||
<Table.Summary.Cell index={1}>Summary</Table.Summary.Cell> | ||
<Table.Summary.Cell index={3}>Content</Table.Summary.Cell> | ||
<Table.Summary.Cell index={11}>Right</Table.Summary.Cell> | ||
</Table.Summary.Row> | ||
</Table.Summary> | ||
)} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Demo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.