From bd726f77bce2426d640964aa8db0beb8e4d0adcf Mon Sep 17 00:00:00 2001 From: rdmclin2 Date: Mon, 12 Feb 2024 17:25:15 +0800 Subject: [PATCH] :memo: docs: cn demos --- docs/guide/demos/ColumnList/index.tsx | 12 ++-- src/ColumnList/demos/actions.tsx | 14 ++-- src/ColumnList/demos/column.tsx | 16 ++--- src/ColumnList/demos/controlled.tsx | 18 ++--- src/ColumnList/demos/creatorButtonProps.tsx | 12 ++-- .../demos/creatorButtonPropsFalse.tsx | 12 ++-- src/ColumnList/demos/customCreate.tsx | 18 ++--- src/ColumnList/demos/empty.tsx | 6 +- src/ColumnList/demos/mock_data/options.ts | 66 +++++++++---------- src/ColumnList/demos/normal.tsx | 10 +-- src/SortableList/demos/data.ts | 6 +- 11 files changed, 95 insertions(+), 95 deletions(-) diff --git a/docs/guide/demos/ColumnList/index.tsx b/docs/guide/demos/ColumnList/index.tsx index 5ebcb427..eb80da2f 100644 --- a/docs/guide/demos/ColumnList/index.tsx +++ b/docs/guide/demos/ColumnList/index.tsx @@ -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 = [ { - title: '列标题', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '值类型', + title: 'ValueType', dataIndex: 'valueType', type: 'select', options: tableColumnValueOptions, }, { - title: '字段', + title: 'DataIndex', dataIndex: 'dataIndex', type: 'select', }, diff --git a/src/ColumnList/demos/actions.tsx b/src/ColumnList/demos/actions.tsx index 693bc7d6..5b911002 100644 --- a/src/ColumnList/demos/actions.tsx +++ b/src/ColumnList/demos/actions.tsx @@ -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 = [ { - title: '列标题', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '值类型', + title: 'ValueType', dataIndex: 'valueType', type: 'select', options: tableColumnValueOptions, }, { - title: '字段', + title: 'DataIndex', dataIndex: 'dataIndex', type: 'select', }, @@ -64,7 +64,7 @@ export default () => ( creatorButtonProps={{ record: () => ({ valueType: 'text', - title: '示例标题', + title: 'Example Title', }), }} onChange={(values) => { diff --git a/src/ColumnList/demos/column.tsx b/src/ColumnList/demos/column.tsx index 2070924d..bd2d17d4 100644 --- a/src/ColumnList/demos/column.tsx +++ b/src/ColumnList/demos/column.tsx @@ -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 = [ { - 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 }) => { diff --git a/src/ColumnList/demos/controlled.tsx b/src/ColumnList/demos/controlled.tsx index e13d9a70..7ad8c577 100644 --- a/src/ColumnList/demos/controlled.tsx +++ b/src/ColumnList/demos/controlled.tsx @@ -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 = [ { - title: '列标题', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '值类型', + title: 'ValueType', dataIndex: 'valueType', type: 'select', options: tableColumnValueOptions, }, { - title: '字段', + title: 'DataIndex', dataIndex: 'dataIndex', type: 'select', }, @@ -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 columns={columns} diff --git a/src/ColumnList/demos/creatorButtonProps.tsx b/src/ColumnList/demos/creatorButtonProps.tsx index b594781c..29ef36a1 100644 --- a/src/ColumnList/demos/creatorButtonProps.tsx +++ b/src/ColumnList/demos/creatorButtonProps.tsx @@ -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', }, ]; @@ -39,18 +39,18 @@ export const randomIndex = () => Math.random() * 10000; const columns: ColumnItemList = [ { - title: '列标题', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '值类型', + title: 'ValueType', dataIndex: 'valueType', type: 'select', options: tableColumnValueOptions, }, { - title: '字段', + title: 'DataIndex', dataIndex: 'dataIndex', type: 'select', }, diff --git a/src/ColumnList/demos/creatorButtonPropsFalse.tsx b/src/ColumnList/demos/creatorButtonPropsFalse.tsx index 29876060..92cc1cf7 100644 --- a/src/ColumnList/demos/creatorButtonPropsFalse.tsx +++ b/src/ColumnList/demos/creatorButtonPropsFalse.tsx @@ -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', }, ]; @@ -39,18 +39,18 @@ export const randomIndex = () => Math.random() * 10000; const columns: ColumnItemList = [ { - title: '列标题', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '值类型', + title: 'ValueType', dataIndex: 'valueType', type: 'select', options: tableColumnValueOptions, }, { - title: '字段', + title: 'DataIndex', dataIndex: 'dataIndex', type: 'select', }, diff --git a/src/ColumnList/demos/customCreate.tsx b/src/ColumnList/demos/customCreate.tsx index 36ff46dd..f8657651 100644 --- a/src/ColumnList/demos/customCreate.tsx +++ b/src/ColumnList/demos/customCreate.tsx @@ -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', }, ]; @@ -38,18 +38,18 @@ export const randomIndex = () => Math.random() * 10000; const columns: ColumnItemList = [ { - title: '列标题', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '值类型', + title: 'ValueType', dataIndex: 'valueType', type: 'select', options: tableColumnValueOptions, }, { - title: '字段', + title: 'DataIndex', dataIndex: 'dataIndex', type: 'select', }, @@ -76,7 +76,7 @@ export default () => { distribution={'space-between'} style={{ marginBottom: 16 }} > -
列配置项
+
Custom Title
} key={'edit'} @@ -88,9 +88,9 @@ export default () => { ref={ref} columns={columns} renderEmpty={() => ( - + )} diff --git a/src/ColumnList/demos/empty.tsx b/src/ColumnList/demos/empty.tsx index 56ec1051..da0d2e87 100644 --- a/src/ColumnList/demos/empty.tsx +++ b/src/ColumnList/demos/empty.tsx @@ -17,18 +17,18 @@ type SchemaItem = { const columns: ColumnItemList = [ { - title: '列标题', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '值类型', + title: 'ValueType', dataIndex: 'valueType', type: 'select', options: tableColumnValueOptions, }, { - title: '字段', + title: 'DataIndex', dataIndex: 'dataIndex', type: 'select', }, diff --git a/src/ColumnList/demos/mock_data/options.ts b/src/ColumnList/demos/mock_data/options.ts index f0521a38..92c71d03 100644 --- a/src/ColumnList/demos/mock_data/options.ts +++ b/src/ColumnList/demos/mock_data/options.ts @@ -2,37 +2,37 @@ * Column 所有类型 * */ export const tableColumnValueOptions = [ - { label: '序号', value: 'index' }, - { label: '圆形序号', value: 'indexBorder' }, - { label: '数字', value: 'digit' }, - { label: '密码', value: 'password' }, - { label: '金额', value: 'money' }, - { label: '文本', value: 'text' }, - { label: '文本域', value: 'textarea' }, - { label: '日期', value: 'date' }, - { label: '操作', value: 'option' }, - { label: '日期时间', value: 'dateTime' }, - { label: '周', value: 'dateWeek' }, - { label: '月', value: 'dateMonth' }, - { label: '季度', value: 'dateQuarter' }, - { label: '年份', value: 'dateYear' }, - { label: '日期区间', value: 'dateRange' }, - { label: '日期时间区间', value: 'dateTimeRange' }, - { label: '时间', value: 'time' }, - { label: '时间区间', value: 'timeRange' }, - { label: '下拉框', value: 'select' }, - { label: '多选框', value: 'checkbox' }, - { label: '星级组件', value: 'rate' }, - { label: '单选框', value: 'radio' }, - { label: '按钮单选框', value: 'radioButton' }, - { label: '进度条', value: 'progress' }, - { label: '百分比', value: 'percent' }, - { label: '秒格式化', value: 'second' }, - { label: '头像', value: 'avatar' }, - { label: '代码框', value: 'code' }, - { label: '开关', value: 'switch' }, - { label: '显示当前时间', value: 'fromNow' }, - { label: '图片', value: 'image' }, - { label: 'json 格式化', value: 'jsonCode' }, - { label: '颜色选择器', value: 'color' }, + { label: 'index', value: 'index' }, + { label: 'indexBorder', value: 'indexBorder' }, + { label: 'digit', value: 'digit' }, + { label: 'password', value: 'password' }, + { label: 'money', value: 'money' }, + { label: 'text', value: 'text' }, + { label: 'textarea', value: 'textarea' }, + { label: 'date', value: 'date' }, + { label: 'option', value: 'option' }, + { label: 'dateTime', value: 'dateTime' }, + { label: 'dateWeek', value: 'dateWeek' }, + { label: 'dateMonth', value: 'dateMonth' }, + { label: 'dateQuarter', value: 'dateQuarter' }, + { label: 'dateYear', value: 'dateYear' }, + { label: 'dateRange', value: 'dateRange' }, + { label: 'dateTimeRange', value: 'dateTimeRange' }, + { label: 'time', value: 'time' }, + { label: 'timeRange', value: 'timeRange' }, + { label: 'select', value: 'select' }, + { label: 'checkbox', value: 'checkbox' }, + { label: 'rate', value: 'rate' }, + { label: 'radio', value: 'radio' }, + { label: 'radioButton', value: 'radioButton' }, + { label: 'progress', value: 'progress' }, + { label: 'percent', value: 'percent' }, + { label: 'second', value: 'second' }, + { label: 'avatar', value: 'avatar' }, + { label: 'code', value: 'code' }, + { label: 'switch', value: 'switch' }, + { label: 'fromNow', value: 'fromNow' }, + { label: 'image', value: 'image' }, + { label: 'jsonCode', value: 'jsonCode' }, + { label: 'color', value: 'color' }, ]; diff --git a/src/ColumnList/demos/normal.tsx b/src/ColumnList/demos/normal.tsx index 4e557cb6..843906a9 100644 --- a/src/ColumnList/demos/normal.tsx +++ b/src/ColumnList/demos/normal.tsx @@ -11,22 +11,22 @@ type SchemaItem = { }; const initialValues = [ - { title: '序号', dataIndex: 'index' }, + { title: 'Index', dataIndex: 'index' }, { - title: '授权企业名称', + title: 'Enterprise', dataIndex: 'name', }, - { title: '被授权企业', dataIndex: 'authCompany' }, + { title: 'Company', dataIndex: 'authCompany' }, ]; const columns: ColumnItemList = [ { - title: '配置项一', + title: 'Title', dataIndex: 'title', type: 'input', }, { - title: '配置项二', + title: 'Index', dataIndex: 'dataIndex', type: 'input', }, diff --git a/src/SortableList/demos/data.ts b/src/SortableList/demos/data.ts index 0e5b5748..6bb40d57 100644 --- a/src/SortableList/demos/data.ts +++ b/src/SortableList/demos/data.ts @@ -19,13 +19,13 @@ export const fieldStyle: React.CSSProperties = { }; export const INIT_VALUES = [ - { id: 'index', title: '序号', dataIndex: 'indexBorder' }, + { id: 'index', title: 'Index', dataIndex: 'indexBorder' }, { id: 'authName', - title: '授权企业名称', + title: 'Enterprise', dataIndex: 'text', }, - { id: 'authedName', title: '被授权企业', dataIndex: 'select' }, + { id: 'authedName', title: 'Company', dataIndex: 'select' }, ]; /*