alibaba / alibaba/lowcode-engine

请教一个FunctionSetter的问题,点击删除图标的时候, 没有执行 setValue

Open
#2,300 0 comments 0 reactions 1 assignee Claimed by @hzd822 View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

点击删除图标的时候, 没有执行 setValue 。我需要怎么做,才可以知道执行删除动作?

![image](https://github.com/alibaba/lowcode-engine/assets/31153559/b1e74f3b-8092-4bc7-abd8-afb56e4e5b92)
```TypeScript
{
name: "_format_options_formatfn_1",
title: '绑定格式化函数',
condition: (target) => {
const formatType = target.parent.getPropValue('formatType');
return formatType && ['customFormat'].includes(formatType);
},
setter: "FunctionSetter",
extraProps:{
// getValue: (target) => {
// const formatOptions = target.parent.getPropValue('formatOptions') || [];
// return formatOptions[0];
// },
setValue: (target, value) => {
const formatOptions = target.parent.getPropValue('formatOptions') || [];
formatOptions[0] = value;
target.parent.setPropValue('formatOptions', formatOptions);
target.parent.setPropValue('_format_options_formatfn_1', value);
},
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.