Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(resetsetter): 重置属性setter #77

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ChiZng
Copy link
Contributor

@ChiZng ChiZng commented Dec 30, 2023

重置当前属性的setter
image

alibaba/lowcode-engine#2795

render() {
const tipContext = intlNode('Reset Attribute');

// return <a onClick={ this.resetIconClickHandler }> {tipContext} </a>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的注释去掉。

@@ -0,0 +1 @@
/* write style here */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件是不是可以删掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以删除的,我把他和variable-setter的一块删除了吧


let setterContent: any;
let actions: any;
if (n < 3) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块的逻辑,可以在PR里面补充一些截图吗?我想看看交互/逻辑上要不要优化。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResetSetter不会单独存在,两个setter的时候resetset在最后面。大于两个了前面是切换setter后面是resetsetter
image
一开始想把resetsetter合到切换setter中,但是重置的时候使用不方便,但是放两个图标有的不开启resetsetter又不太好看

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

都超过2个了这种ui看着还凑合
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

这种场景下展示的效果呢?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外,这里没有重置按钮吗?

image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我么有开启全局resetsetter,这个属性也没有配置resetsetter

可以开启全局,我看一下这里的效果。

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前那个截图就是开启了全局的
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

开启全局会影响这个地方吗?

image

image

我觉得不影响比较好。重置的时候,清空变量绑定,并将值还原。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,那就按你说的这个逻辑我改一下。在有三个setter并且有variable和reset setter时,最后一个位置放resetsetter,倒数第二个放variableSetter。如果没有variableSetter第二个位置就是switchAction。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果没有variableSetter,就直接放 reset setter 就好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants