Skip to content

Commit

Permalink
📝 docs: cn demos
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmclin2 committed Feb 12, 2024
1 parent db78bce commit bd726f7
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 95 deletions.
12 changes: 6 additions & 6 deletions docs/guide/demos/ColumnList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ type SchemaItem = {
};

const INIT_VALUES = [
{ title: '序号', valueType: 'indexBorder', dataIndex: 'index' },
{ title: 'Index', valueType: 'indexBorder', dataIndex: 'index' },
{
title: '授权企业名称',
title: 'Enterprise',
valueType: 'text',
dataIndex: 'name',
},
{ title: '被授权企业', valueType: 'text', dataIndex: 'authCompany' },
{ title: 'Company', valueType: 'text', dataIndex: 'authCompany' },
];

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
Expand Down
14 changes: 7 additions & 7 deletions src/ColumnList/demos/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ type SchemaItem = {
};

const initialValues: SchemaItem[] = [
{ title: '序号', valueType: 'indexBorder', dataIndex: 'index' },
{ title: 'Index', valueType: 'indexBorder', dataIndex: 'index' },
{
title: '授权企业名称',
title: 'Enterprise',
valueType: 'text',
dataIndex: 'name',
},
{ title: '被授权企业', valueType: 'text', dataIndex: 'authCompany' },
{ title: 'Company', valueType: 'text', dataIndex: 'authCompany' },
];

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
Expand All @@ -64,7 +64,7 @@ export default () => (
creatorButtonProps={{
record: () => ({
valueType: 'text',
title: '示例标题',
title: 'Example Title',
}),
}}
onChange={(values) => {
Expand Down
16 changes: 8 additions & 8 deletions src/ColumnList/demos/column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,48 @@ const initialValues = [
{
dataIndex: 'orderCreated',
valueType: 'date',
title: '订单创建时间',
title: 'CreateTime',
color: undefined,
},
{
dataIndex: 'detailPic',
valueType: 'text',
title: '产品详情图',
title: 'Detail Pic',
color: undefined,
},
{
dataIndex: 'closeReason',
valueType: 'text',
title: '订单关闭原因',
title: 'Close Reason',
color: undefined,
},
{
dataIndex: 'closeType',
valueType: 'text',
title: '订单关闭类型',
title: 'Close Type',
color: undefined,
},
];

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
{
title: '颜色',
title: 'Color',
dataIndex: 'color',
type: 'custom',
render: ({ value, onChange }) => {
Expand Down
18 changes: 9 additions & 9 deletions src/ColumnList/demos/controlled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ type SchemaItem = {
};

const INIT_VALUES: SchemaItem[] = [
{ title: '序号', valueType: 'indexBorder', dataIndex: 'index' },
{ title: 'Index', valueType: 'indexBorder', dataIndex: 'index' },
{
title: '授权企业名称',
title: 'Enterprise',
valueType: 'text',
dataIndex: 'name',
},
{ title: '被授权企业', valueType: 'text', dataIndex: 'authCompany' },
{ title: 'Company', valueType: 'text', dataIndex: 'authCompany' },
];

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
Expand All @@ -57,18 +57,18 @@ export default () => {
{
dataIndex: 'orderCreated',
valueType: 'date',
title: '订单创建时间',
title: 'CreateTime',
},
{
dataIndex: 'detailPic',
valueType: 'text',
title: '产品详情图',
title: 'Detail',
},
]);
}}
style={{ marginBottom: 12 }}
>
受控设置数据
Set Data
</Button>
<ColumnList<SchemaItem>
columns={columns}
Expand Down
12 changes: 6 additions & 6 deletions src/ColumnList/demos/creatorButtonProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ const INIT_VALUES = [
{
dataIndex: 'productName',
valueType: 'text',
title: '产品名称',
title: 'Product Name',
color: undefined,
},
{
dataIndex: 'productComment',
valueType: 'text',
title: '产品介绍',
title: 'Product Comment',
color: undefined,
},
{
dataIndex: 'orderStatus',
valueType: 'text',
title: '订单状态',
title: 'Order Status',
},
];

Expand All @@ -39,18 +39,18 @@ export const randomIndex = () => Math.random() * 10000;

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
Expand Down
12 changes: 6 additions & 6 deletions src/ColumnList/demos/creatorButtonPropsFalse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ const INIT_VALUES = [
{
dataIndex: 'productName',
valueType: 'text',
title: '产品名称',
title: 'Product Name',
color: undefined,
},
{
dataIndex: 'productComment',
valueType: 'text',
title: '产品介绍',
title: 'Product Comment',
color: undefined,
},
{
dataIndex: 'orderStatus',
valueType: 'text',
title: '订单状态',
title: 'Order Status',
},
];

Expand All @@ -39,18 +39,18 @@ export const randomIndex = () => Math.random() * 10000;

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
Expand Down
18 changes: 9 additions & 9 deletions src/ColumnList/demos/customCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ type SchemaItem = {
};

const INIT_VALUES = [
{ dataIndex: 'orderId', valueType: 'text', title: '订单id' },
{ dataIndex: 'orderId', valueType: 'text', title: 'Order ID' },
{
dataIndex: 'orderNumber',
valueType: 'text',
title: '订单号',
title: 'Order Number',
},
{
dataIndex: 'orderMoney',
valueType: 'text',
title: '订单金额',
title: 'Order Money',
},
];

Expand All @@ -38,18 +38,18 @@ export const randomIndex = () => Math.random() * 10000;

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
Expand All @@ -76,7 +76,7 @@ export default () => {
distribution={'space-between'}
style={{ marginBottom: 16 }}
>
<div>列配置项</div>
<div>Custom Title</div>
<ActionIcon
icon={<PlusCircleTwoTone />}
key={'edit'}
Expand All @@ -88,9 +88,9 @@ export default () => {
ref={ref}
columns={columns}
renderEmpty={() => (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无数据">
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="No Data">
<Button type="primary" onClick={handleCreate}>
创建自定义数据
Create Custom Data
</Button>
</Empty>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/ColumnList/demos/empty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ type SchemaItem = {

const columns: ColumnItemList<SchemaItem> = [
{
title: '列标题',
title: 'Title',
dataIndex: 'title',
type: 'input',
},
{
title: '值类型',
title: 'ValueType',
dataIndex: 'valueType',
type: 'select',
options: tableColumnValueOptions,
},
{
title: '字段',
title: 'DataIndex',
dataIndex: 'dataIndex',
type: 'select',
},
Expand Down
Loading

0 comments on commit bd726f7

Please sign in to comment.