init:低代码初始化

This commit is contained in:
lhj
2024-07-26 23:53:38 +08:00
commit 9306a02d1e
20 changed files with 5897 additions and 0 deletions

37
src/type/IMaterial.ts Normal file
View File

@ -0,0 +1,37 @@
interface IMaterial {
version: string;
componentName: string;
title: string;
icon?: string;
group?: string;
npm?: {
componentName?: string;
package: string;
version?: string;
};
props?: Array<{
name: string;
propType: string;
description: string;
defaultValue?: any;
}>;
style?: {
width?: string;
height?: string;
[key: string]: string | number | undefined; // 允许其他样式属性,可以是 string | number | undefined 类型
};
events?: Array<{
name: string;
description: string;
}>;
slots: {
default: string; // 默认插槽必须有值
[key: string]: string | undefined; // 其他插槽可以是 string | undefined 类型
};
loop?: {
propName: string;
description: string;
};
}