@@ -34,7 +34,7 @@ import {
3434onRenderTriggered ,
3535onServerPrefetch ,
3636} from 'vue' ;
37- import type { Node , Prop } from '@alilc/lowcode-designer' ;
37+ import type { Node } from '@alilc/lowcode-designer' ;
3838import type {
3939IPublicTypeNodeData as NodeData ,
4040IPublicTypeSlotSchema as SlotSchema ,
@@ -435,8 +435,10 @@ export function useLeaf(
435435schema :unknown ,
436436scope :RuntimeScope ,
437437blockScope ?:BlockScope | null ,
438- prop ?:Prop | null
438+ path ?:string | null ,
439+ node ?:Node | null
439440) :any => {
441+ const prop = path ?node ?. getProp ( path , false ) :null ;
440442if ( isJSExpression ( schema ) || isJSFunction ( schema ) ) {
441443// 处理表达式和函数
442444return parser . parseExpression ( schema , scope ) ;
@@ -469,16 +471,15 @@ export function useLeaf(
469471} else if ( isArray ( schema ) ) {
470472// 属性值为 array,递归处理属性的每一项
471473return schema . map ( ( item , idx ) =>
472- buildNormalProp ( item , scope , blockScope , prop ?. get ( idx ) )
474+ buildNormalProp ( item , scope , blockScope , ` ${ path } [ ${ idx } ]` , node )
473475) ;
474476} else if ( schema && isObject ( schema ) ) {
475477// 属性值为 object,递归处理属性的每一项
476478const res :Record < string , unknown > = { } ;
477479Object . keys ( schema ) . forEach ( ( key ) => {
478480if ( key . startsWith ( '__' ) ) return ;
479481const val = schema [ key ] ;
480- const childProp = prop ?. get ( key ) ;
481- res [ key ] = buildNormalProp ( val , scope , blockScope , childProp ) ;
482+ res [ key ] = buildNormalProp ( val , scope , blockScope , `${ path } .${ key } ` , node ) ;
482483} ) ;
483484return res ;
484485}
@@ -497,7 +498,8 @@ export function useLeaf(
497498schema :unknown ,
498499scope :RuntimeScope ,
499500blockScope ?:BlockScope | null ,
500- prop ?:Prop | null
501+ path ?:string | null ,
502+ node ?:Node | null
501503) :any => {
502504if ( isString ( schema ) ) {
503505const field = schema ;
@@ -537,9 +539,9 @@ export function useLeaf(
537539lastInst = inst ;
538540} ;
539541} else {
540- const propValue = buildNormalProp ( schema , scope , blockScope , prop ) ;
542+ const propValue = buildNormalProp ( schema , scope , blockScope , path , node ) ;
541543return isString ( propValue )
542- ?buildRefProp ( propValue , scope , blockScope , prop )
544+ ?buildRefProp ( propValue , scope , blockScope , path , node )
543545 :propValue ;
544546}
545547} ;
@@ -570,13 +572,8 @@ export function useLeaf(
570572const schema = processed [ propName ] ;
571573parsedProps [ propName ] =
572574propName === 'ref'
573- ?buildRefProp ( schema , mergedScope , blockScope , node ?. getProp ( propName ) as Prop )
574- :buildNormalProp (
575- schema ,
576- mergedScope ,
577- blockScope ,
578- node ?. getProp ( propName ) as Prop
579- ) ;
575+ ?buildRefProp ( schema , mergedScope , blockScope , propName , node )
576+ :buildNormalProp ( schema , mergedScope , blockScope , propName , node ) ;
580577} ) ;
581578
582579// 应用运行时附加的属性值