mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-05-09 01:58:48 +00:00
补全方法的参数类型、返回值类型与详情说明,规范字段编辑器/字段配置/运行时 API 等文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
821 B
Markdown
36 lines
821 B
Markdown
# Display 只读文本
|
||
|
||
用于显示,不可编辑
|
||
|
||
## TS 定义
|
||
|
||
```typescript
|
||
interface Display extends FormItem {
|
||
type: "display";
|
||
}
|
||
```
|
||
|
||
点击查看[FormItem](https://github.com/Tencent/tmagic-editor/blob/cce8b63fc3618b5b811aa33c703de21c22be8a6a/packages/form-schema/src/base.ts#L90)的定义
|
||
|
||
## 基础用法
|
||
|
||
<demo-block type="form" :config="[{
|
||
type: 'display',
|
||
name: 'display',
|
||
text: '只读文本',
|
||
defaultValue: 'display'
|
||
}]">
|
||
<template #source>
|
||
<p>
|
||
在开启多选模式后,默认情况下会展示所有已选中的选项的Tag
|
||
</p>
|
||
</template>
|
||
</demo-block>
|
||
|
||
## Input Attributes
|
||
|
||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||
| ---- | -------- | ------ | ------ | ------ |
|
||
| name | 绑定值 | string | — | — |
|
||
| text | 表单标签 | string | — | — |
|