mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-17 00:36:17 +10:00
remove default chinese text in Transfer (#3768)
This commit is contained in:
@@ -27,7 +27,6 @@ export default {
|
||||
cancelText: 'Cancel',
|
||||
},
|
||||
Transfer: {
|
||||
titles: ['Source', 'Target'],
|
||||
notFoundContent: 'Not Found',
|
||||
searchPlaceholder: 'Search here',
|
||||
itemUnit: 'item',
|
||||
|
||||
@@ -55,6 +55,7 @@ const App = React.createClass({
|
||||
return (
|
||||
<Transfer
|
||||
dataSource={mockData}
|
||||
titles={['Source', 'Target']}
|
||||
targetKeys={state.targetKeys}
|
||||
selectedKeys={state.selectedKeys}
|
||||
onChange={this.handleChange}
|
||||
|
||||
@@ -24,8 +24,8 @@ To transfer the elements between two columns in an intuitive and efficient way.
|
||||
| onChange | A callback function that is executed when the transfer between columns is complete. | (targetKeys, direction, moveKeys): void | |
|
||||
| onSelectChange | A callback function which is executed when selected items are changed. | (sourceSelectedKeys, targetSelectedKeys): void | |
|
||||
| listStyle | A custom CSS style used for rendering the transfer columns. | Object | |
|
||||
| className | A custom CSS class. | String | |
|
||||
| titles | A set of titles that are sorted from left to right. | Array | ['Source, 'Target] |
|
||||
| className | A custom CSS class. | String | ['', ''] |
|
||||
| titles | A set of titles that are sorted from left to right. | Array | - |
|
||||
| operations | A set of operations that are sorted from top to bottom. | Array | [] |
|
||||
| showSearch | If included, a search box is shown on each column. | Boolean | false |
|
||||
| filterOption | A function to determine whether an item should show in search result list | (inputValue, option): boolean | |
|
||||
|
||||
@@ -45,7 +45,7 @@ export interface TransferContext {
|
||||
};
|
||||
}
|
||||
|
||||
const defaultTitles = ['源列表', '目的列表'];
|
||||
const defaultTitles = ['', ''];
|
||||
export default class Transfer extends React.Component<TransferProps, any> {
|
||||
// For high-level customized Transfer @dqaria
|
||||
static List = List;
|
||||
|
||||
@@ -26,7 +26,7 @@ title: Transfer
|
||||
| onSelectChange | 选中项发生改变时的回调函数 | (sourceSelectedKeys, targetSelectedKeys): void | |
|
||||
| listStyle | 两个穿梭框的自定义样式 | Object | |
|
||||
| className | 自定义类 | String | |
|
||||
| titles | 标题集合,顺序从左至右 | Array | ['源列表', '目的列表'] |
|
||||
| titles | 标题集合,顺序从左至右 | Array | ['', ''] |
|
||||
| operations | 操作文案集合,顺序从上至下 | Array | [] |
|
||||
| showSearch | 是否显示搜索框 | Boolean | false |
|
||||
| filterOption | 接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false`。| (inputValue, option): boolean | |
|
||||
|
||||
@@ -159,7 +159,7 @@ export default class TransferList extends React.Component<TransferListProps, any
|
||||
);
|
||||
});
|
||||
|
||||
let unit = '条';
|
||||
let unit = '';
|
||||
const antLocale = this.context.antLocale;
|
||||
if (antLocale && antLocale.Transfer) {
|
||||
const transferLocale = antLocale.Transfer;
|
||||
@@ -197,7 +197,7 @@ export default class TransferList extends React.Component<TransferListProps, any
|
||||
<Search prefixCls={`${prefixCls}-search`}
|
||||
onChange={this.handleFilter}
|
||||
handleClear={this.handleClear}
|
||||
placeholder={searchPlaceholder || '请输入搜索内容'}
|
||||
placeholder={searchPlaceholder || 'Search'}
|
||||
value={filter}
|
||||
/>
|
||||
</div> : null}
|
||||
@@ -209,7 +209,7 @@ export default class TransferList extends React.Component<TransferListProps, any
|
||||
>
|
||||
{showItems.length > 0
|
||||
? showItems
|
||||
: <div key="not-found" className={`${prefixCls}-body-not-found`}>{notFoundContent || '列表为空'}</div>}
|
||||
: <div key="not-found" className={`${prefixCls}-body-not-found`}>{notFoundContent || 'Not Found'}</div>}
|
||||
</Animate>
|
||||
</div>}
|
||||
{footerDom ? <div className={`${prefixCls}-footer`}>
|
||||
|
||||
Reference in New Issue
Block a user