配置项说明
字段名 |
含义 |
类型 |
是否必选 |
备注 |
name |
显示名 |
string |
是 |
无。 |
type |
类型 |
string |
是 |
无。 |
default |
默认显示值 |
string |
否 |
没填时为options[0] 。 |
options |
选项列表 |
array |
否 |
每一项都包含label 和value 。label 表示显示文本,value 表示文本的值。 |
filterable |
是否⽀持过滤 |
boolean |
否 |
默认:true。 |
allowCustom |
是否⽀持⾃定义输⼊内容 |
boolean |
否 |
filterable 为true时生效。默认:true。 |
useFont |
是否渲染字体 |
boolean |
否 |
无。 |
值说明
条件 |
数据类型 |
示例 |
默认值 |
无 |
string |
"left" |
"" |
配置示例
"font": {
"name": "字体",
"type": "select",
"useFont": true,
"default": "SimSun",
"options": [
{
"value": "Microsoft Yahei",
"label": "微软雅黑"
},
{
"value": "SimSun",
"label": "宋体"
},
{
"value": "SimHei",
"label": "黑体"
}
]
}