You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
747 B

3 months ago
  1. ## @vue/babel-helper-vue-jsx-merge-props
  2. A package used internally by vue jsx transformer to merge props spread. It is required to merge some prop trees like this:
  3. ```js
  4. import mergeProps from '@vue/babel-helper-vue-jsx-merge-props'
  5. const MyComponent = {
  6. render(h) {
  7. // original: <button onClick={$event => console.log($event)} {...{ on: { click: $event => doSomething($event) } }} />
  8. return h(
  9. 'button',
  10. mergeProps([
  11. {
  12. on: {
  13. click: $event => console.log($event),
  14. },
  15. },
  16. {
  17. on: {
  18. click: $event => doSomething($event),
  19. },
  20. },
  21. ]),
  22. )
  23. },
  24. }
  25. ```
  26. This tool is used internally and there is no reason for you to ever use it.