File tree Expand file tree Collapse file tree
renderer-core/src/renderer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -774,6 +774,11 @@ export default function baseRendererFactory(): IBaseRenderComponent {
774774 {
775775 ...schema ,
776776 loop : undefined ,
777+ props : {
778+ ...schema . props ,
779+ // 循环下 key 不能为常量,这样会造成 key 值重复,渲染异常
780+ key : isJSExpression ( schema . props ?. key ) ? schema . props ?. key : null ,
781+ } ,
777782 } ,
778783 loopSelf ,
779784 parentInfo ,
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ export interface IPluginPreferenceMananger {
1313export type PluginOptionsType = string | number | boolean | object ;
1414
1515export interface IPublicApiPlugins {
16+ /**
17+ * 可以通过 plugin api 获取其他插件 export 导出的内容
18+ */
19+ [ key : string ] : any ;
20+
1621 register (
1722 pluginModel : IPublicTypePlugin ,
1823 options ?: Record < string , PluginOptionsType > ,
@@ -21,6 +26,7 @@ export interface IPublicApiPlugins {
2126
2227 /**
2328 * 引擎初始化时可以提供全局配置给到各插件,通过这个方法可以获得本插件对应的配置
29+ *
2430 * use this to get preference config for this plugin when engine.init() called
2531 */
2632 getPluginPreference (
@@ -29,24 +35,28 @@ export interface IPublicApiPlugins {
2935
3036 /**
3137 * 获取指定插件
38+ *
3239 * get plugin instance by name
3340 */
3441 get ( pluginName : string ) : IPublicModelPluginInstance | null ;
3542
3643 /**
3744 * 获取所有的插件实例
45+ *
3846 * get all plugin instances
3947 */
4048 getAll ( ) : IPublicModelPluginInstance [ ] ;
4149
4250 /**
4351 * 判断是否有指定插件
52+ *
4453 * check if plugin with certain name exists
4554 */
4655 has ( pluginName : string ) : boolean ;
4756
4857 /**
4958 * 删除指定插件
59+ *
5060 * delete plugin instance by name
5161 */
5262 delete ( pluginName : string ) : void ;
Original file line number Diff line number Diff line change 1- import { IPublicTypeCompositeObject } from './' ;
1+ import { IPublicTypeCompositeObject , IPublicTypeNodeData } from './' ;
22
3- export type IPublicTypePropsMap = IPublicTypeCompositeObject ;
3+ export type IPublicTypePropsMap = IPublicTypeCompositeObject < IPublicTypeNodeData | IPublicTypeNodeData [ ] > ;
Original file line number Diff line number Diff line change @@ -131,6 +131,6 @@ export interface IPublicTypeJSONObject {
131131}
132132
133133export type IPublicTypeCompositeArray = IPublicTypeCompositeValue [ ] ;
134- export interface IPublicTypeCompositeObject {
135- [ key : string ] : IPublicTypeCompositeValue ;
134+ export interface IPublicTypeCompositeObject < T = IPublicTypeCompositeValue > {
135+ [ key : string ] : IPublicTypeCompositeValue | T ;
136136}
You can’t perform that action at this time.
0 commit comments