-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
created hook doesn't take effect when mixing composition api and options api and composition api occurs first #11674
Comments
@yangxiuxiu1115 ❤️ |
Cool, could i know what's the expected way after fixing? The final result should use the data from by the way, if one field exist in both |
|
fyi @yangxiuxiu1115 , edison said the order is decided by the order, the latter will override the former one. You may need to revise the PR title.
|
@xieyuschen |
Either way though, it doesn't really make sense to have |
Vue version
fbc0c42(default version of playground on 21Aug24)
Link to minimal reproduction
https://play.vuejs.org/#eNp9k02P0zAQhv/KyJe20ioVglNJK8GyBzgAAo6+BGeSeNexI390g6r8d8ZO3FSwWilKYs877zwzcS7swzAU54DswEqP/aAqjyeuAcruzelygd61ME1Q7mnJdbm/0dDSCSsHT++yH4z1cAGLDUzQWNPDhmw376MOxxStsamCIlX0d+jDsN3NCwBhtPOp2jF6bDnrUCnzbKyqOdslm6jb7+G+Uup3JZ5AmVYK8F3lwQbtgJ6+Q9gIi0RYb8D5qsVbf5FTj0Clj6dcfY4bhQV5Uu1rCRxRBPKaEWYpQRbnSgUkF85Sq03QwkujUwGQ2skac4ecLZnTbROfpEXh1Z85I2JntoV3WW1zXUtuVq/ARLHa0v0u3uvKV+tMX0g5ZOJFmcE5+99sGeN2lw18J10xf6Jsc9X84zRxTVe5Xw4Iu2Pe0Ygb2RaPzmg6bcmUM2H6QSq034aY7Dg7ZF7OaATm+Uva8zZggko5HYqnF/Yf3Rj3OPtu0aE9I2fXmK9si34OP/z8iiO9X4O9qYMi9SvBH0jHI8wNRtnHoGvCvtEl2s/pP5C6/eUeRo90EJamIug6Ws7o37h/pfUV923xLg+UTX8Bs0Uwjg==
Steps to reproduce
Can see the right side of the page.
What is expected?
I expected to see
from created() function
, as the lifecycle diagram shows the created will be executed aftersetup
andOptions API
:What is actually happening?
I saw
from data() function
, seems the created hook is ignored.System Info
No response
Any additional comments?
if i change the place of
setup
anddata
, the issue disappears. the following data works as expected.The text was updated successfully, but these errors were encountered: