提交 c72adfad 编写于 作者: Cano1997's avatar Cano1997

update: 表格注入属性脚本添加控制器参数

上级 e3362559
......@@ -287,7 +287,7 @@ export const GridControl = defineComponent({
)
}
scopedSlots={columnSlots}
{...renderAttrs(this.c.model, {
{...renderAttrs(this.c.model, this.c, {
context: this.context,
params: this.params,
data: this.c.getData() || [],
......
......@@ -258,6 +258,7 @@ export function useAppGridPagination(c: GridController) {
export function renderAttrs(
model: GridColumnModel | GridModel,
controller: GridController,
params: IParams,
): IParams {
const attrs: IParams = {};
......@@ -267,6 +268,7 @@ export function renderAttrs(
if (item.attrName && item.attrValue) {
const args = {
...params,
controller,
};
const code = `return (function() { ${item.attrValue}} )();`;
// eslint-disable-next-line no-new-func
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册