diff --git a/packages/antd-lowcode-materials/lowcode/calendar/meta.ts b/packages/antd-lowcode-materials/lowcode/calendar/meta.ts index 3bfec4eb..aee8bfb6 100644 --- a/packages/antd-lowcode-materials/lowcode/calendar/meta.ts +++ b/packages/antd-lowcode-materials/lowcode/calendar/meta.ts @@ -103,16 +103,19 @@ export default { events: [ { name: 'onPanelChange', + description: '日期面板变化回调', template: "onPanelChange(date,mode,${extParams}){\n// 日期面板变化回调\nconsole.log('onPanelChange', date, mode);}", }, { name: 'onSelect', + description: '点击选择日期回调', template: - "onSelect(date,${extParams}){\n// 点击选择日期回调\nconsole.log('onSelect', date);}", + "onSelect(date,info,${extParams}){\n// 选择日期回调,包含来源信息\nconsole.log('onSelect', date,info);}", }, { name: 'onChange', + description: '日期变化回调', template: "onChange(date,${extParams}){\n// 日期变化回调\nconsole.log('onChange', date);}", }, diff --git a/packages/antd-lowcode-materials/lowcode/list/meta.ts b/packages/antd-lowcode-materials/lowcode/list/meta.ts index c816e052..41df1236 100644 --- a/packages/antd-lowcode-materials/lowcode/list/meta.ts +++ b/packages/antd-lowcode-materials/lowcode/list/meta.ts @@ -30,7 +30,7 @@ export default { { name: 'rowKey', title: { - label: '行Key', + label: '行 Key', tip: 'rowKey | 当 renderItem 自定义渲染列表项有效时,自定义每一行的 key 的获取方式', }, propType: { @@ -60,11 +60,24 @@ export default { { name: 'itemLayout', title: { - label: '尺寸', - tip: 'itemLayout | 设置 List.Item 布局, 设置成 vertical 则竖直样式显示, 默认横排', + label: '列表项布局', + tip: 'itemLayout | 设置 List.Item 布局,设置成 vertical 则竖直样式显示,默认横排', }, propType: { type: 'oneOf', value: ['horizontal', 'vertical'] }, defaultValue: 'horizontal', + extraProps: { + setValue(target, value) { + const { node } = target; + + if (value === 'vertical') { + node.setPropValue('grid', undefined); + node.setPropValue('gridEnable', true); + node.setPropValue('grid', undefined); + }else if (value === 'horizontal') { + node.setPropValue('grid', { column: 4, gutter: 0 }); + } + }, + }, setter: [ { componentName: 'RadioGroupSetter', @@ -132,6 +145,10 @@ export default { title: '栅格', display: 'block', type: 'group', + condition: { + type: 'JSFunction', + value: 'target => target.getProps().getPropValue("itemLayout") !== "vertical"', + }, items: [ { name: 'gridEnable', @@ -140,9 +157,11 @@ export default { setter: 'BoolSetter', extraProps: { setValue(target, value) { - if (value === false) { - const { node } = target; - node.setPropValue('grid', false); + const { node } = target; + if (value === true) { + node.setPropValue('grid', { column: 4, gutter: 0 }); + }else if(value === false){ + node.setPropValue('grid', undefined) } }, }, @@ -152,18 +171,16 @@ export default { title: { label: '列数', tip: 'grid.column | 栅格的列数' }, propType: 'number', setter: 'NumberSetter', - defaultValue: 4, condition: { type: 'JSFunction', value: 'target => !!target.getProps().getPropValue("gridEnable")', }, }, - { + { name: 'grid.gutter', title: { label: '间隔', tip: 'grid.gutter | 栅格的间隔' }, propType: 'number', setter: 'NumberSetter', - defaultValue: 0, condition: { type: 'JSFunction', value: 'target => !!target.getProps().getPropValue("gridEnable")', @@ -209,26 +226,6 @@ export default { value: 'target => !!target.getProps().getPropValue("pagination")', }, }, - // { - // name: 'pagination.defaultCurrent', - // title: { - // label: '默认当前页', - // tip: 'pagination.defaultCurrent | 默认的当前页数', - // }, - // setter: [ - // { - // componentName: 'NumberSetter', - // props: { - // initialValue: 1, - // }, - // }, - // 'VariableSetter', - // ], - // condition: { - // type: 'JSFunction', - // value: 'target => !!target.getProps().getPropValue("pagination")', - // }, - // }, { name: 'pagination.current', title: { label: '当前页数', tip: 'pagination.current | 当前页数' }, @@ -268,7 +265,6 @@ export default { }, propType: 'bool', setter: 'BoolSetter', - defaultValue: false, condition: { type: 'JSFunction', value: 'target => !!target.getProps().getPropValue("pagination")', @@ -282,7 +278,6 @@ export default { }, propType: 'bool', setter: 'BoolSetter', - defaultValue: false, condition: { type: 'JSFunction', value: 'target => !!target.getProps().getPropValue("pagination")', @@ -293,7 +288,6 @@ export default { title: { label: '简单分页', tip: 'pagination.simple | 简单分页' }, propType: 'bool', setter: 'BoolSetter', - defaultValue: false, condition: { type: 'JSFunction', value: 'target => !!target.getProps().getPropValue("pagination")', @@ -324,7 +318,6 @@ export default { }, 'VariableSetter', ], - defaultValue: 'default', condition: { type: 'JSFunction', value: 'target => !!target.getProps().getPropValue("pagination")', diff --git a/packages/antd-lowcode-materials/lowcode/modal/meta.ts b/packages/antd-lowcode-materials/lowcode/modal/meta.ts index f67b7a4b..f56b4378 100644 --- a/packages/antd-lowcode-materials/lowcode/modal/meta.ts +++ b/packages/antd-lowcode-materials/lowcode/modal/meta.ts @@ -51,7 +51,7 @@ export default { }, { name: 'confirmLoading', - title: { label: '确定按钮loading', tip: '确定按钮loading' }, + title: { label: '确定按钮 loading', tip: '确定按钮 loading' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', @@ -67,7 +67,7 @@ export default { }, { name: 'forceRender', - title: { label: '强制渲染Modal', tip: '强制渲染Modal' }, + title: { label: '强制渲染 Modal', tip: '强制渲染 Modal' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', @@ -75,7 +75,7 @@ export default { }, { name: 'keyboard', - title: { label: 'esc关闭', tip: '是否支持键盘 esc 关闭' }, + title: { label: 'esc 关闭', tip: '是否支持键盘 esc 关闭' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter', @@ -155,7 +155,7 @@ export default { }, { name: 'okButtonProps', - title: { label: '确认按钮props', tip: '确认按钮props' }, + title: { label: '确认按钮 props', tip: '确认按钮 props' }, propType: 'object', setter: { componentName: 'ObjectSetter', @@ -183,7 +183,7 @@ export default { }, { name: 'bodyStyle', - title: { label: 'body样式', tip: 'Modal body 样式' }, + title: { label: 'body 样式', tip: 'Modal body 样式' }, propType: 'object', }, { @@ -210,7 +210,7 @@ export default { name: 'getContainer', title: { label: '指定挂载节点', - tip: '指定 Modal 挂载的 HTML 节点, false 为挂载在当前 dom', + tip: '指定 Modal 挂载的 HTML 节点,false 为挂载在当前 dom', }, propType: { type: 'oneOfType', value: ['node', 'func'] }, }, diff --git a/packages/antd-lowcode-materials/lowcode/modal/snippets.ts b/packages/antd-lowcode-materials/lowcode/modal/snippets.ts index 1e219a0a..4667e071 100644 --- a/packages/antd-lowcode-materials/lowcode/modal/snippets.ts +++ b/packages/antd-lowcode-materials/lowcode/modal/snippets.ts @@ -20,11 +20,9 @@ export default [ schema: { componentName: 'Modal', props: { - title: 'Basic Modal', - okText: '确认', - cancelText: '取消', + title: 'Hide Footer Modal', open: true, - footer: null, + footer: ()=> null, destroyOnClose: true, }, children: [], diff --git a/packages/antd-lowcode-materials/lowcode/radio.group/meta.ts b/packages/antd-lowcode-materials/lowcode/radio.group/meta.ts index 6d5dce60..eff07fcc 100644 --- a/packages/antd-lowcode-materials/lowcode/radio.group/meta.ts +++ b/packages/antd-lowcode-materials/lowcode/radio.group/meta.ts @@ -31,7 +31,7 @@ export default { name: 'name', title: { label: 'name 属性', - tip: 'RadioGroup 下所有 input[type="radio"] 的 name 属性', + tip: 'RadioGroup 下所有 input[type="radio"] 的 name 属性。为组合内的 input 元素赋予相同的 name 属性,使浏览器把 Radio.Group 下的 Radio 真正看作是一组(例如可以通过方向键始终在同一组内更改选项)。', }, propType: 'string', setter: 'StringSetter', diff --git a/packages/fusion-lowcode-materials/lowcode/button/meta.ts b/packages/fusion-lowcode-materials/lowcode/button/meta.ts index ed7d1382..50cc36d4 100644 --- a/packages/fusion-lowcode-materials/lowcode/button/meta.ts +++ b/packages/fusion-lowcode-materials/lowcode/button/meta.ts @@ -73,7 +73,6 @@ export default { title: { label: { type: 'i18n', - zh_CN: '图标尺寸', en_US: 'Icon Size', }, tip: {