hooks icon indicating copy to clipboard operation
hooks copied to clipboard

refactor/useEventEmitter 支持指定名称订阅,支持订阅方法结果返回,支持同步调用异步订阅方法,支持订阅方法添加使用依赖项

Open xbw19975 opened this issue 7 months ago • 0 comments

[中文版模板 / Chinese template]

🤔 This is a ...

  • [ ] New feature
  • [ ] Bug fix
  • [ ] Site / documentation update
  • [ ] Demo update
  • [ ] TypeScript definition update
  • [ ] Bundle size optimization
  • [ ] Performance optimization
  • [ ] Enhancement feature
  • [ ] Internationalization
  • [x] Refactoring
  • [ ] Code style optimization
  • [ ] Test Case
  • [ ] Branch merge
  • [ ] Other (about what?)

🔗 Related issue link

💡 Background and solution

背景: 原有hook无法满足订阅指定名称方法.不支持同步调用异步订阅方法。不支持传递依赖项,不支持调用订阅方法后返回结果.

解决方案: 重构内部代码.兼容原来的版本.添加新的支持.

📝 Changelog

Language Changelog
🇺🇸 English Support a specified name subscription call, synchronous invocation of asynchronous subscription methods, real-time access to the return result of subscription methods, subscription methods support passing dependencies
🇨🇳 Chinese 支持指定名称订阅调用,同步调用异步订阅方法,实时获取订阅方法的返回结果,订阅方法支持传递依赖项

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • [x] Doc is updated/provided or not needed
  • [x] Demo is updated/provided or not needed
  • [x] TypeScript definition is updated/provided or not needed
  • [x] Changelog is provided or not needed

xbw19975 avatar Jul 01 '24 11:07 xbw19975