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

fix: add prop value template #201

Merged
merged 5 commits into from
Aug 30, 2024
Merged

fix: add prop value template #201

merged 5 commits into from
Aug 30, 2024

Conversation

wwsun
Copy link
Contributor

@wwsun wwsun commented Aug 30, 2024

prop value template

在组件的 prototype.js 中定义属性说明信息

  {
        name: 'onClick',
        title: '点击事件',
        setter: 'eventSetter',
+       template: '(e) => {\n  {{content}}\n}',
+       tip: '回调参数说明:e 为事件对象',
  },

在 CodeSetter 中会读取这个信息,并用来拼装回调函数,用来透出回调函数的签名信息。目前仅对函数类型的变量生效

prop-valute-template

@wwsun wwsun merged commit c4e1ed6 into main Aug 30, 2024
1 check passed
@wwsun wwsun deleted the hotfix0821 branch August 30, 2024 10:09
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