---
group:
  title: 表单控件
  order: 4
title: VarTemplate
toc: content
---

# VarTemplate 变量模板

## 代码演示

<code title="基础用法" src="../../src/FormComp/VarTemplate/demos/basic.tsx" ></code>

## API
| 参数      | 说明                                      | 类型         | 默认值 | 参考值 |
|----------|------------------------------------------|-------------|-------|-------|
| size | 控件尺寸| 同antd的Textarea的size | middle |large/middle/small |
| tags | 变量列表 | Array | - | `[{ key: '', label: '', value: ''}]`]|
| tagsOptionName | 变量字段值 | Object | - | `{key: 'key', label: 'label', value: 'value'}`|
| showCountTip | 是否显示输入数字| Boolean |  | |
| style |扩展样式|Object|  | - |
| maxLength |限制框内文本字数|Number|  | - |
| style |扩展样式|Object|  | - |
| fieldStatus |控件状态，禁用或只读|String|  | `disabled`、`viewOnly` |
| disabled |禁用，同`fieldStatus='disabled'`|String|  | |
| readOnly |只读，同`fieldStatus='viewonly'`|Boolean|  | |

