1.开放源码注意事项 前端从2024年7月23日发布的5.0.57版本开始,将前端组件相关的源码放到了npm包供大家方便调试和理解,该版本需要在原有启动工程的src目录下新增翻译相关的全局vue插件 插件下载地址 2.搜索区域的数据字典字段支持标签栏写法优化 下图为数据字段标签栏功能示意图 5.x之前是在SearchWidget.ts内通过属性和方法实现,5.x开始剥离出了SearchTabWidget组件来实现 以下为原本在SearchWidget.ts内的方法,现已不再提供 export class SearchWidget extends BaseSearchWidget { @Widget.Reactive() protected get cateFields(): string[]; @Widget.Reactive() protected get topCateModelField(): RuntimeModelField | undefined; @Widget.Reactive() protected get showTopCateAll(); @Widget.Reactive() protected get topCateFieldOptions(); @Widget.Reactive() protected get secondCateModelField(): RuntimeModelField | undefined; @Widget.Reactive() protected get showSecondCateAll(); @Widget.Reactive() protected get secondCateFieldOptions(); } 迁移到了SearchTabWidget.ts @SPI.ClassFactory( BaseElementWidget.Token({ viewType: ViewType.Search, widget: 'SearchTab' }) ) export class SearchTabWidget extends BaseElementWidget { @Widget.Reactive() protected get cateFields(): string[]; @Widget.Reactive() protected get topCateModelField(): RuntimeModelField | undefined; @Widget.Reactive() protected get showTopCateAll(); @Widget.Reactive() protected get topCateFieldOptions(); @Widget.Reactive() protected get secondCateModelField(): RuntimeModelField | undefined; @Widget.Reactive() protected get showSecondCateAll(); @Widget.Reactive() protected get secondCateFieldOptions(); } 3.视图动作执行的executeViewAction方法的第一个入参需要提供path参数来控制权限 export class DemoTableStringWidget extends TableStringFieldWidget { // ❌ 错误的写法,完全手写,无法拿到该动作在当前页面的权限路径参数(path) private oldGotoAction() { executeViewAction( { viewType: ViewType.Table, moduleName: 'resource', model: 'resource.ResourceCity', name: 'resource#市', // 注释掉的下面这行的path属性可能是动态的,所以无法在此处写死 // path: 'xxxx' } as RuntimeViewAction ); } // ✅ 正确的写法,将动作配置到当前页面中(不想展示可以隐藏), // 这样才能在解析页面的时候拿到下面有哪些动作,才可以在权限处管理该页面下的所有动作, // 页面进入后会从后端拿到该页面的所有动作极其权限信息,前端的自定义代码就根据动作名称拿到带了权限信息的“动作Action”实例 private newGotoAction() { const viewAction = this.model.modelActions.find((a) => a.name === 'resource#市'); executeViewAction(viewAction); } }