-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Version
3.0.0-alpha.4
Reproduction link
https://github.com/tooppoo/vue-next/tree/computed-option-with-arrow-function-not-work
Steps to reproduce
- clone forked repository in link to minimal reproduction
- run test.
yarn test ./packages/runtime-core/__tests__/apiOptions.spec.tsyarn test ./packages/runtime-core/__tests__/apiOptions.spec.ts
What is expected?
computed property with arrow function can access to vue instance in first argument.
What is actually happening?
arrow function can not access to vue instance in first argument. value of the argument is undefined.
Computed property with arrow function worked on vue2.6.
Please see
- https://codesandbox.io/s/computed-property-with-arrow-function-work-on-vue2x-e0wnu
- https://vuejs.org/v2/api/index.html#computed
Or is this deprecated?
If this problem should be fixed, apiOptions.ts l.305 and l.310 may need to be fixed.
I think they should pass context object to #bind
not only in the first argument but also in the second argument.
Metadata
Metadata
Assignees
Labels
No labels