mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-05-12 11:34:05 +00:00
补全方法的参数类型、返回值类型与详情说明,规范字段编辑器/字段配置/运行时 API 等文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
713 B
Markdown
38 lines
713 B
Markdown
# 联动
|
|
|
|
## 显隐
|
|
|
|
<demo-block type="form" :config="[{
|
|
name: 'switch',
|
|
text: '显示text',
|
|
type: 'switch'
|
|
}, {
|
|
name: 'text2',
|
|
text: '配置2',
|
|
display: (mForm, { model }) => model.switch
|
|
}]"></demo-block>
|
|
|
|
## 输入关联
|
|
|
|
<demo-block type="form" :config="[{
|
|
name: 'firstName',
|
|
text: '名',
|
|
onChange: (mForm, v, { model }) => {
|
|
model.fullName = `${model.lastName}${model.firstName}`
|
|
},
|
|
defaultValue: '三'
|
|
}, {
|
|
name: 'lastName',
|
|
text: '姓',
|
|
onChange: (mForm, v, { model }) => {
|
|
model.fullName = `${model.lastName}${model.firstName}`
|
|
},
|
|
defaultValue: '张'
|
|
}, {
|
|
name: 'fullName',
|
|
text: '姓名',
|
|
type: 'display',
|
|
defaultValue: '张三'
|
|
}]"></demo-block>
|
|
|