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

refactor: update attribute value parsing logic #149

Merged
merged 15 commits into from
May 16, 2024
Merged

refactor: update attribute value parsing logic #149

merged 15 commits into from
May 16, 2024

Conversation

wwsun
Copy link
Contributor

@wwsun wwsun commented May 11, 2024

Core

  1. 优化属性值的解析逻辑,统一使用 {{code}} 表示用户提供的插值代码。所有用户侧的代码均需要调整到新的格式。

Helpers

  1. 移除掉 code2object,使用 core 包的 code2value 代替
  2. 移除掉 isValidObjectString -- 无效实现

SettingForm

  1. FormObject 支持切换到 codeSetter
  2. expressionSetter 统一命名为 codeSetter
  3. setter 注册支持,设置 type="code|value", code类型setter表示返回值需要处理为 code string
  4. code类setter无需手动返回包裹代码{code},直接返回原始的 code 即可
  5. 所有的基础 js 类型 setter 都合并到 SettingForm 中,包括 numberSetter, textSetter, boolSetter 等

@wwsun wwsun merged commit ffaa276 into main May 16, 2024
1 check passed
@wwsun wwsun deleted the fix/setCode0511 branch May 16, 2024 05:03
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.

None yet

1 participant