File tree Expand file tree Collapse file tree 5 files changed +36
-1
lines changed
Expand file tree Collapse file tree 5 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ export class Designer {
550550
551551 return reducers . reduce ( ( xprops , reducer ) => {
552552 try {
553- return reducer ( xprops , node , { stage } ) ;
553+ return reducer ( xprops , node . internalToShellNode ( ) as any , { stage } ) ;
554554 } catch ( e ) {
555555 // todo: add log
556556 console . warn ( e ) ;
Original file line number Diff line number Diff line change @@ -61,6 +61,13 @@ export default class DocumentModel {
6161 return new DocumentModel ( document ) ;
6262 }
6363
64+ /**
65+ * id
66+ */
67+ get id ( ) {
68+ return this [ documentSymbol ] . id ;
69+ }
70+
6471 /**
6572 * 获取当前文档所属的 project
6673 * @returns
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Props from './props';
99import DocumentModel from './document-model' ;
1010import NodeChildren from './node-children' ;
1111import ComponentMeta from './component-meta' ;
12+ import SettingTopEntry from './setting-top-entry' ;
1213import { documentSymbol , nodeSymbol } from './symbols' ;
1314
1415const shellNodeSymbol = Symbol ( 'shellNodeSymbol' ) ;
@@ -237,6 +238,10 @@ export default class Node {
237238 return this [ nodeSymbol ] . schema ;
238239 }
239240
241+ get settingEntry ( ) : any {
242+ return SettingTopEntry . create ( this [ nodeSymbol ] . settingEntry as any ) ;
243+ }
244+
240245 /**
241246 * @deprecated use .children instead
242247 */
Original file line number Diff line number Diff line change @@ -94,4 +94,23 @@ export default class Props {
9494 setExtraPropValue ( path : string , value : CompositeValue ) {
9595 return this . getExtraProp ( path ) ?. setValue ( value ) ;
9696 }
97+
98+ /**
99+ * test if the specified key is existing or not.
100+ * @param key
101+ * @returns
102+ */
103+ has ( key : string ) {
104+ return this [ propsSymbol ] . has ( key ) ;
105+ }
106+
107+ /**
108+ * add a key with given value
109+ * @param value
110+ * @param key
111+ * @returns
112+ */
113+ add ( value : CompositeValue , key ?: string | number | undefined ) {
114+ return this [ propsSymbol ] . add ( value , key ) ;
115+ }
97116}
Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ export default class SettingPropEntry {
6464 return this [ settingPropEntrySymbol ] . extraProps ;
6565 }
6666
67+ get props ( ) {
68+ return SettingTopEntry . create ( this [ settingPropEntrySymbol ] . props ) ;
69+ }
70+
6771 /**
6872 * 获取设置属性对应的节点实例
6973 */
You can’t perform that action at this time.
0 commit comments