-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
feat: add prefer-use-template-ref rule #2554
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! 🙂
I have a few comments.
<div ref="root" /> | ||
</template> | ||
|
||
<script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is a <script setup>
test, the setup
attribute is required.
<script> | |
<script setup> |
Co-authored-by: Flo Edelmann <[email protected]>
Co-authored-by: Flo Edelmann <[email protected]>
Co-authored-by: Flo Edelmann <[email protected]>
Co-authored-by: Flo Edelmann <[email protected]>
This comment was marked as spam.
This comment was marked as spam.
@maxfrees I will split it to 2 PRs as @ota-meshi suggested. Sorry for the delay, I was not able to get to it recently, will try to finish at least the first part this weekend, most of it is already done. |
@FloEdelmann @ota-meshi Implemented all of your feedback. 🙂 |
data() { | ||
return { | ||
label: ref(), | ||
label: ref(this.defaultLabel), | ||
labelElem: ref(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are ref
s actually supported by Vue in Option API's data
like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't break but Vue acts like the ref
isn't there at all, it will simply unwrap the value. I wanted to prove that it works even in such a case, should I remove the test?
resolves #2549