lowcode-engine
lowcode-engine copied to clipboard
tsx文件无法生成defaultValue
现象:使用脚手架 @alilc/element 生成的组件库项目,执行 npm run lowcode:build 后,lowcode文件夹中的代码没有defaultValue内容
步骤:
- 使用脚手架生成组件库项目 2.在src中增加组件test.tsx,内容如下:
import * as React from 'react';
import { createElement } from 'react';
export interface TableProps {
id?: number;
}
const Test: React.FC<TableProps> = function Test({
id = 1,
}) {
return <div>{id}</div>;
};
export default Test;
- 在src/index.tsx中暴露组件和type
export type { TestProps } from './components/test'
export { default as Test } from './components/test'
4.执行 npm run lowcode:build,lowcode文件夹中没有Test的defaultValue值
-
debug @alilc/lowcode-material-parser,发现第474行,info中 id的defaultValue是null
-
包的版本信息 "@alib/build-scripts": "^0.1.32", "@alifd/build-plugin-lowcode": "^0.3.0", "name": "@alilc/lowcode-material-parser" 的版本是 "1.0.3"
@akirakai defaultValue / initialValue 的问题看看能不能支持?🙏🏻
This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 2 days.
This issue was closed because it has been stalled for 10 days with no activity.
有任何进展吗,这个issue