修改下拉类demo&移动数字输入demo到输入类

This commit is contained in:
xujiahao01 2022-02-22 19:17:49 +08:00
parent cda6511b81
commit d0e9c3af70
3 changed files with 114 additions and 33 deletions

View File

@ -181,6 +181,80 @@ export default {
{
type: 'divider'
},
{
type: 'tpl',
tpl: 'InputNumber数字输入框',
inline: false,
wrapperComponent: 'h2'
},
{
type: 'form',
debug: true,
body: [
{
type: 'group',
body: [
{
name: 'trigger1',
id: 'trigger1',
type: 'action',
label: 'clear触发器',
level: 'primary',
onEvent: {
click: {
actions: [
{
actionType: 'clear',
componentId: 'clear-input-number-receiver',
description: '点击清空指定输入框的内容'
},
]
}
}
},
{
name: 'clear-input-number-receiver',
id: 'clear-input-number-receiver',
type: 'input-number',
label: 'clear动作测试',
value: 1,
onEvent: {
blur: {
actions: [
{
actionType: 'toast',
msgType: 'info',
msg: '派发blur事件'
}
]
},
focus: {
actions: [
{
actionType: 'toast',
msgType: 'info',
msg: '派发focus事件'
}
]
},
change: {
actions: [
{
actionType: 'toast',
msgType: 'info',
msg: '派发change事件'
}
]
}
}
}
]
}
]
},
{
type: 'divider'
},
{
type: 'tpl',
tpl: 'Editor 编辑器',

View File

@ -1,22 +1,9 @@
const change = {
actions: [
{
actionType: 'dialog',
args: {
val: '${event.data.value}'
},
dialog: {
title: '派发change事件',
data: {
val: '${val}'
},
body: [
{
type: 'tpl',
tpl: '值更新:${val}'
}
]
}
actionType: 'toast',
msgType: 'info',
msg: '派发change事件'
}
]
};
@ -343,7 +330,7 @@ export default {
},
{
type: 'tpl',
tpl: 'checkbox单选框',
tpl: '选框/复选框',
inline: false,
wrapperComponent: 'h2'
},
@ -384,6 +371,41 @@ export default {
},
},
]
},
{
type: 'group',
body: [
{
name: 'trigger9',
id: 'trigger9',
type: 'action',
mode: 'row',
label: 'clear触发器',
level: 'primary',
onEvent: {
click: {
actions: [
{
actionType: 'clear',
componentId: 'clear-checkboxes',
description: '点击清空指定浮选框选中值'
}
]
}
}
},
{
name: 'clear-checkboxes',
id: 'clear-checkboxes',
type: 'checkboxes',
mode: 'row',
label: 'clear动作测试',
options,
onEvent: {
change
}
},
]
}
]
},
@ -418,15 +440,6 @@ export default {
}
}
},
{
name: 'clear-options',
id: 'clear-options',
type: 'checkboxes',
options,
onEvent: {
change
}
},
{
name: 'clear-options',
id: 'clear-options',

View File

@ -74,7 +74,6 @@ import LogicEventActionSchema from './EventAction/Logic';
import StopEventActionSchema from './EventAction/Stop';
import DataFlowEventActionSchema from './EventAction/DataFlow';
import InputEventSchema from './EventAction/InputEvent';
import InputNumberEventSchema from './EventAction/InputNumberEvent';
import DateEventSchema from './EventAction/DateEvent';
import SwitchEventSchema from './EventAction/SwitchEvent';
import TabsEventSchema from './EventAction/TabsEvent';
@ -545,11 +544,6 @@ export const examples = [
path: '/examples/event/input',
component: makeSchemaRenderer(InputEventSchema)
},
{
label: '数字输入组件',
path: '/examples/event/input-number',
component: makeSchemaRenderer(InputNumberEventSchema)
},
{
label: '上传类组件',
path: '/examples/event/upload',
@ -571,7 +565,7 @@ export const examples = [
component: makeSchemaRenderer(SwitchEventSchema)
},
{
label: '标签页组件',
label: '选项卡组件',
path: 'examples/event/tabs',
component: makeSchemaRenderer(TabsEventSchema)
}