mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
feat: tabsTransfer tab title 支持模版 (#6614)
This commit is contained in:
parent
1bd375cc2f
commit
1bdb4645b5
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import {autobind} from 'amis-core';
|
||||
import {autobind, createObject, filter} from 'amis-core';
|
||||
import Tabs, {Tab} from './Tabs';
|
||||
import InputBox from './InputBox';
|
||||
import TableCheckboxes from './TableSelection';
|
||||
@ -256,7 +256,8 @@ export class TabsTransfer extends React.Component<
|
||||
placeholder,
|
||||
activeKey,
|
||||
classnames: cx,
|
||||
translate: __
|
||||
translate: __,
|
||||
data
|
||||
} = this.props;
|
||||
const showOptions = options.filter(item => item.visible !== false);
|
||||
|
||||
@ -279,7 +280,10 @@ export class TabsTransfer extends React.Component<
|
||||
<Tab
|
||||
eventKey={index}
|
||||
key={index}
|
||||
title={option.label || option.title}
|
||||
title={filter(
|
||||
option.label || option.title,
|
||||
createObject(data, option)
|
||||
)}
|
||||
className="TabsTransfer-tab"
|
||||
>
|
||||
{option.searchable ? (
|
||||
|
@ -1247,7 +1247,7 @@ export class TreeSelector extends React.Component<
|
||||
|
||||
return (
|
||||
<li
|
||||
key={item[valueField]}
|
||||
key={`${item[valueField || 'value']}-${index}`}
|
||||
className={cx(`Tree-item ${itemClassName || ''}`, {
|
||||
'Tree-item--isLeaf': isLeaf,
|
||||
'is-child': this.relations.get(item)
|
||||
|
Loading…
Reference in New Issue
Block a user