@@ -46,14 +46,16 @@ export interface Assets {
4646 styles : string [ ]
4747}
4848
49+ export type Resource = Omit < Component , 'component' > & { type : string ; component ?: string ; item ?: string }
50+
4951export interface BlockResource {
5052 componentName : string
5153 fileName : string
5254 css ?: string
5355 props : Record < string , any >
5456 dataSource ?: Record < string , any >
55- schema : ContentSchema
56- children : BlockContentChildren [ ]
57+ schema : Schema
58+ children : Schema [ ]
5759 state ?: Record < string , any >
5860 methods : {
5961 [ key : string ] : TypeValuePair
@@ -70,69 +72,22 @@ export interface BlockResource {
7072 blockName ?: string
7173}
7274
73- export interface BlockContentChildren {
74- componentName : string
75- props ?: Record < string , any >
76- children ?: BlockContentChildren [ ]
77- id : string
78- condition ?: boolean
79- fileName ?: string
80- }
81-
8275export interface TypeValuePair {
8376 type : DataTypeEnum
8477 value : string
8578}
8679
8780export type DataTypeEnum = 'JSExpression' | 'JSFunction' | 'JSResource' | 'JSResouce'
8881
89- export interface ContentSchema {
90- properties ?: Property [ ]
91- events ?: Record < string , any >
92- slots ?: unknown
93- lifeCycles ?: Record < string , TypeValuePair >
94- }
95-
9682export interface Locale {
9783 zh_CN ?: string
9884}
9985
100- export interface Property {
101- label : Locale
102- description : Locale
103- collapse : Collapse
104- content ?: BlockProperty [ ]
105- defaultValue ?: any [ ]
106- }
107-
10886export interface Collapse {
10987 number : number
11088 text : Locale
11189}
11290
113- export interface BlockProperty {
114- property : string
115- type ?: string
116- defaultValue : unknown
117- label : {
118- text : Locale
119- }
120- description ?: Locale
121- widget ?: {
122- component : string
123- props ?: Record < string , any >
124- }
125- cols ?: number
126- rules ?: any [ ]
127- linked ?: Linked
128- handle ?: Record < string , any >
129- hidden ?: boolean
130- required ?: boolean
131- readOnly ?: boolean
132- disabled ?: boolean
133- labelPosition ?: string
134- }
135-
13691export interface Linked {
13792 componentName : string
13893 property : string
@@ -207,7 +162,7 @@ export interface Component {
207162 slots ?: unknown
208163 }
209164 library ?: number
210- schema : ComponentSchema
165+ schema : Schema
211166}
212167
213168export interface Configure {
@@ -236,13 +191,7 @@ export interface ContextMenu {
236191 disable : string [ ]
237192}
238193
239- export interface ComponentSchema {
240- properties ?: ComponentProperty [ ]
241- events ?: Record < string , any >
242- slots ?: unknown
243- }
244-
245- export interface ComponentProperty {
194+ export interface Property {
246195 label : Locale
247196 description ?: Locale
248197 collapse ?: Collapse
@@ -268,9 +217,12 @@ export interface ComponentProperty {
268217 device ?: any [ ]
269218 onChange ?: string
270219 properties ?: ContentProperty [ ]
220+ linked ?: Linked
221+ handle ?: Record < string , any >
271222 } [ ]
272223 name ?: string
273224 group ?: string
225+ defaultValue ?: unknown
274226}
275227
276228export interface ContentProperty {
@@ -313,7 +265,7 @@ export interface Snippet {
313265export interface SnippetChild {
314266 icon ?: string
315267 name ?: Locale
316- schema ?: SnippetSchema
268+ schema ?: Schema
317269 screenshot ?: string
318270 snippetName ?: string
319271 configure ?: Configure
@@ -349,14 +301,18 @@ export interface NestingRule {
349301 ancestorWhitelist ?: string [ ]
350302}
351303
352- export interface SnippetSchema {
304+ export interface Schema {
353305 props ?: Record < string , any >
354- children ?: SnippetSchema [ ]
306+ children ?: Schema [ ]
355307 componentName ?: string
356308 componentType ?: string
357- properties ?: unknown [ ]
358- events ?: unknown
309+ properties ?: Property [ ]
310+ events ?: Record < string , any >
359311 slots ?: unknown
312+ lifeCycles ?: Record < string , TypeValuePair >
313+ id ?: string
314+ condition ?: boolean
315+ fileName ?: string
360316}
361317
362318export interface MaterialState {
0 commit comments