# FieldTemplateSelect 模板字段选择

- 来源：[E10 UI 组件库](https://www.e-cology.com.cn/ui/field-template-select/freepass)
- 平台：PC
- 维护者：赵俊飞

## 代码演示

### 基础使用

```jsx
import React, { Component } from 'react';
import {FieldTemplateSelect,FieldTemplateSelectData} from "@weapp/ui";

const allOptions:FieldTemplateSelectData[] = [
  {
    id: "$HRM_Loginid",
    name: "登录名"
  },
  {
    clickable: false,
    multClickable: true,
    id: "$HRM_Name",
    name: "名称"
  },
  {
    clickable: true,
    id: "$HRM_Title",
    name: "称呼"
  },
  {
    clickable: true,
    multClickable: true,
    id: "$HRM_Mobile",
    name: "移动电话"
  },
  {
    clickable: true,
    id: "$HRM_Telephone",
    name: "办公电话"
  },
  {
    clickable: true,
    id: "$HRM_Email",
    name: "电邮"
  },
  {
    clickable: true,
    id: "$HRM_Startdate",
    name: "工作日期"
  },
  {
    clickable: true,
    id: "$HRM_Enddate",
    name: "系统结束日期"
  },
  {
    clickable: true,
    id: "$HRM_Contractdate",
    name: "合同结束日期"
  },
  {
    clickable: false,
    id: "$HRM_Jobtitle",
    name: "职务"
  },
  {
    clickable: false,
    id: "$HRM_Jobgroup",
    name: "工作类别"
  },
];

export default class Basic extends Component {

  onClick=(data:any,index:number|undefined)=>{
   console.log(data,index)
  }

  render() {
    return (
      <div style={{height:'300px'}}><FieldTemplateSelect onClick={this.onClick} data={allOptions}/></div>
    )
  }
}
```

## API

### 参数说明如下：

| 参数 | 说明 | 类型 | 是否必填 | 默认值 |
| --- | --- | --- | --- | --- |
| data | 列表数据 | FieldTemplateSelectData[] | 否 |  |
| inputProps | input属性 | InputProps | 否 |  |
| onClick | 点击事件 | ()=>void | 否 |  |
