mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-14 21:12:53 +00:00
fix: 🐛 fix bug of unevaluated default values
This commit is contained in:
parent
ceb15f9717
commit
22b667c3fb
@ -27,7 +27,7 @@ export default {
|
||||
{
|
||||
name: 'prefix',
|
||||
propType: 'string',
|
||||
defaultValue: "'next-'"
|
||||
defaultValue: 'next-'
|
||||
},
|
||||
{
|
||||
name: 'rtl',
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
value: ['primary', 'secondary', 'normal']
|
||||
},
|
||||
description: '按钮的类型',
|
||||
defaultValue: "'normal'"
|
||||
defaultValue: 'normal'
|
||||
},
|
||||
{
|
||||
name: 'size',
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
value: ['small', 'medium', 'large']
|
||||
},
|
||||
description: '按钮的尺寸',
|
||||
defaultValue: "'medium'"
|
||||
defaultValue: 'medium'
|
||||
},
|
||||
{
|
||||
name: 'iconSize',
|
||||
@ -66,7 +66,7 @@ export default {
|
||||
value: ['submit', 'reset', 'button']
|
||||
},
|
||||
description: "当 component = 'button' 时,设置 button 标签的 type 值",
|
||||
defaultValue: "'button'"
|
||||
defaultValue: 'button'
|
||||
},
|
||||
{
|
||||
name: 'component',
|
||||
@ -75,13 +75,13 @@ export default {
|
||||
value: ['button', 'a', 'div', 'span']
|
||||
},
|
||||
description: '设置标签类型',
|
||||
defaultValue: "'button'"
|
||||
defaultValue: 'button'
|
||||
},
|
||||
{
|
||||
name: 'loading',
|
||||
propType: 'bool',
|
||||
description: '设置按钮的载入状态',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'ghost',
|
||||
@ -90,31 +90,30 @@ export default {
|
||||
value: [true, false, 'light', 'dark']
|
||||
},
|
||||
description: '是否为幽灵按钮',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'text',
|
||||
propType: 'bool',
|
||||
description: '是否为文本按钮',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'warning',
|
||||
propType: 'bool',
|
||||
description: '是否为警告按钮',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'disabled',
|
||||
propType: 'bool',
|
||||
description: '是否禁用',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'onClick',
|
||||
propType: 'func',
|
||||
description: '点击按钮的回调\n@param {Object} e Event Object',
|
||||
defaultValue: '() => {}'
|
||||
description: '点击按钮的回调\n@param {Object} e Event Object'
|
||||
},
|
||||
{
|
||||
name: 'className',
|
||||
@ -149,13 +148,13 @@ export default {
|
||||
{
|
||||
name: 'prefix',
|
||||
propType: 'string',
|
||||
defaultValue: "'next-'"
|
||||
defaultValue: 'next-'
|
||||
},
|
||||
{
|
||||
name: 'size',
|
||||
propType: 'string',
|
||||
description: '统一设置 Button 组件的按钮大小',
|
||||
defaultValue: "'medium'"
|
||||
defaultValue: 'medium'
|
||||
},
|
||||
{
|
||||
name: 'className',
|
||||
@ -321,7 +320,7 @@ export default {
|
||||
name: 'prefix',
|
||||
propType: 'string',
|
||||
description: '样式前缀',
|
||||
defaultValue: '"next-"'
|
||||
defaultValue: 'next-'
|
||||
},
|
||||
{
|
||||
name: 'inline',
|
||||
@ -336,7 +335,7 @@ export default {
|
||||
},
|
||||
description:
|
||||
'单个 Item 的 size 自定义,优先级高于 Form 的 size, 并且当组件与 Item 一起使用时,组件自身设置 size 属性无效。\n@enumdesc 大, 中, 小',
|
||||
defaultValue: '"medium"'
|
||||
defaultValue: 'medium'
|
||||
},
|
||||
{
|
||||
name: 'fullWidth',
|
||||
@ -350,7 +349,7 @@ export default {
|
||||
value: ['top', 'left', 'inset']
|
||||
},
|
||||
description: '标签的位置\n@enumdesc 上, 左, 内',
|
||||
defaultValue: '"left"'
|
||||
defaultValue: 'left'
|
||||
},
|
||||
{
|
||||
name: 'labelTextAlign',
|
||||
@ -368,8 +367,7 @@ export default {
|
||||
{
|
||||
name: 'saveField',
|
||||
propType: 'func',
|
||||
description: '保存 Form 自动生成的 field 对象',
|
||||
defaultValue: 'func.noop'
|
||||
description: '保存 Form 自动生成的 field 对象'
|
||||
},
|
||||
{
|
||||
name: 'labelCol',
|
||||
@ -384,8 +382,7 @@ export default {
|
||||
{
|
||||
name: 'onSubmit',
|
||||
propType: 'func',
|
||||
description: 'form内有 `htmlType="submit"` 的元素的时候会触发',
|
||||
defaultValue: 'function preventDefault(e) {\n e.preventDefault();\n}'
|
||||
description: 'form内有 `htmlType="submit"` 的元素的时候会触发'
|
||||
},
|
||||
{
|
||||
name: 'children',
|
||||
@ -411,8 +408,7 @@ export default {
|
||||
name: 'onChange',
|
||||
propType: 'func',
|
||||
description:
|
||||
'表单变化回调\n@param {Object} values 表单数据\n@param {Object} item 详细\n@param {String} item.name 变化的组件名\n@param {String} item.value 变化的数据\n@param {Object} item.field field 实例',
|
||||
defaultValue: 'func.noop'
|
||||
'表单变化回调\n@param {Object} values 表单数据\n@param {Object} item 详细\n@param {String} item.name 变化的组件名\n@param {String} item.value 变化的数据\n@param {Object} item.field field 实例'
|
||||
},
|
||||
{
|
||||
name: 'component',
|
||||
@ -421,7 +417,7 @@ export default {
|
||||
value: ['string', 'func']
|
||||
},
|
||||
description: '设置标签类型',
|
||||
defaultValue: '"form"'
|
||||
defaultValue: 'form'
|
||||
},
|
||||
{
|
||||
name: 'fieldOptions',
|
||||
@ -438,7 +434,7 @@ export default {
|
||||
value: ['phone', 'tablet', 'desktop']
|
||||
},
|
||||
description: '预设屏幕宽度',
|
||||
defaultValue: '"desktop"'
|
||||
defaultValue: 'desktop'
|
||||
},
|
||||
{
|
||||
name: 'responsive',
|
||||
@ -468,7 +464,7 @@ export default {
|
||||
name: 'prefix',
|
||||
propType: 'string',
|
||||
description: '样式前缀',
|
||||
defaultValue: "'next-'"
|
||||
defaultValue: 'next-'
|
||||
},
|
||||
{
|
||||
name: 'rtl',
|
||||
@ -513,7 +509,7 @@ export default {
|
||||
name: 'hasFeedback',
|
||||
propType: 'bool',
|
||||
description: '配合 validateState 属性使用,是否展示 success/loading 的校验状态图标, 目前只有Input支持',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'style',
|
||||
@ -735,7 +731,7 @@ export default {
|
||||
value: ['string', 'number']
|
||||
},
|
||||
description: '在响应式布局下,且label在左边时,label的宽度是多少',
|
||||
defaultValue: '100'
|
||||
defaultValue: 100
|
||||
},
|
||||
{
|
||||
name: 'isPreview',
|
||||
@ -764,7 +760,7 @@ export default {
|
||||
name: 'prefix',
|
||||
propType: 'string',
|
||||
description: '样式前缀',
|
||||
defaultValue: '"next-"'
|
||||
defaultValue: 'next-'
|
||||
},
|
||||
{
|
||||
name: 'type',
|
||||
@ -773,7 +769,7 @@ export default {
|
||||
value: ['normal', 'inline']
|
||||
},
|
||||
description: '设置类型\n@enumdesc 普通, 内联',
|
||||
defaultValue: '"normal"'
|
||||
defaultValue: 'normal'
|
||||
},
|
||||
{
|
||||
name: 'size',
|
||||
@ -782,7 +778,7 @@ export default {
|
||||
value: ['large', 'medium']
|
||||
},
|
||||
description: '大小',
|
||||
defaultValue: '"medium"'
|
||||
defaultValue: 'medium'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
@ -806,19 +802,19 @@ export default {
|
||||
value: ['number', 'string']
|
||||
},
|
||||
description: '步长',
|
||||
defaultValue: '1'
|
||||
defaultValue: 1
|
||||
},
|
||||
{
|
||||
name: 'precision',
|
||||
propType: 'number',
|
||||
description: '保留小数点后位数',
|
||||
defaultValue: '0'
|
||||
defaultValue: 0
|
||||
},
|
||||
{
|
||||
name: 'editable',
|
||||
propType: 'bool',
|
||||
description: '用户是否可以输入',
|
||||
defaultValue: 'true'
|
||||
defaultValue: true
|
||||
},
|
||||
{
|
||||
name: 'autoFocus',
|
||||
@ -828,14 +824,12 @@ export default {
|
||||
{
|
||||
name: 'onChange',
|
||||
propType: 'func',
|
||||
description: '数值被改变的事件\n@param {Number} value 数据\n@param {Event} e DOM事件对象',
|
||||
defaultValue: 'func.noop'
|
||||
description: '数值被改变的事件\n@param {Number} value 数据\n@param {Event} e DOM事件对象'
|
||||
},
|
||||
{
|
||||
name: 'onKeyDown',
|
||||
propType: 'func',
|
||||
description: '键盘按下',
|
||||
defaultValue: 'func.noop'
|
||||
description: '键盘按下'
|
||||
},
|
||||
{
|
||||
name: 'onFocus',
|
||||
@ -845,31 +839,28 @@ export default {
|
||||
{
|
||||
name: 'onBlur',
|
||||
propType: 'func',
|
||||
description: '焦点失去',
|
||||
defaultValue: 'func.noop'
|
||||
description: '焦点失去'
|
||||
},
|
||||
{
|
||||
name: 'onCorrect',
|
||||
propType: 'func',
|
||||
description: '数值订正后的回调\n@param {Object} obj {currentValue,oldValue:String}',
|
||||
defaultValue: 'func.noop'
|
||||
description: '数值订正后的回调\n@param {Object} obj {currentValue,oldValue:String}'
|
||||
},
|
||||
{
|
||||
name: 'onDisabled',
|
||||
propType: 'func',
|
||||
defaultValue: 'func.noop'
|
||||
propType: 'func'
|
||||
},
|
||||
{
|
||||
name: 'max',
|
||||
propType: 'number',
|
||||
description: '最大值',
|
||||
defaultValue: 'Infinity'
|
||||
defaultValue: null
|
||||
},
|
||||
{
|
||||
name: 'min',
|
||||
propType: 'number',
|
||||
description: '最小值',
|
||||
defaultValue: '-Infinity'
|
||||
defaultValue: null
|
||||
},
|
||||
{
|
||||
name: 'className',
|
||||
@ -879,8 +870,7 @@ export default {
|
||||
{
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
description: '自定义内联样式',
|
||||
defaultValue: '{}'
|
||||
description: '自定义内联样式'
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
@ -956,7 +946,7 @@ export default {
|
||||
value: ['single', 'multiple', 'tag']
|
||||
},
|
||||
description: '选择器模式',
|
||||
defaultValue: '"single"'
|
||||
defaultValue: 'single'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
@ -1019,13 +1009,13 @@ export default {
|
||||
name: 'hasArrow',
|
||||
propType: 'bool',
|
||||
description: '是否有下拉箭头',
|
||||
defaultValue: 'true'
|
||||
defaultValue: true
|
||||
},
|
||||
{
|
||||
name: 'showSearch',
|
||||
propType: 'bool',
|
||||
description: '展开后是否能搜索(tag 模式下固定为true)',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'onSearch',
|
||||
@ -1060,7 +1050,7 @@ export default {
|
||||
name: 'cacheValue',
|
||||
propType: 'bool',
|
||||
description: 'dataSource 变化的时是否保留已选的内容',
|
||||
defaultValue: 'true'
|
||||
defaultValue: true
|
||||
},
|
||||
{
|
||||
name: 'valueRender',
|
||||
@ -1092,7 +1082,7 @@ export default {
|
||||
name: 'tagInline',
|
||||
propType: 'bool',
|
||||
description: '是否一行显示,仅在 mode 为 multiple 的时候生效',
|
||||
defaultValue: 'false'
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'maxTagCount',
|
||||
@ -1139,8 +1129,7 @@ export default {
|
||||
},
|
||||
{
|
||||
name: 'locale',
|
||||
propType: 'object',
|
||||
defaultValue: 'zhCN.Select'
|
||||
propType: 'object'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user