Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/docsPublic

fix: Script Setup Does Not Populate Name Property#2703

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
incutonez wants to merge1 commit intovuejs:main
base:main
Choose a base branch
Loading
fromincutonez:10348

Conversation

@incutonez
Copy link

@incutonezincutonez commentedFeb 19, 2024
edited
Loading

#10348:

  • Adding clarification on how to accessname property in script setup

Description of Problem

Inscript setup, thename property does not get created, perhere.

Proposed Solution

In order to help clarify what can be used, it makes sense to add a reference to__name to help devs that need access to the component's name inscript setup.

Additional Information

Original PR that introduced__name

- Adding clarification on how to access `name` property in script setup
@netlify
Copy link

netlifybot commentedFeb 19, 2024
edited
Loading

Deploy Preview forvuejs ready!

NameLink
🔨 Latest commit01094c3
🔍 Latest deploy loghttps://app.netlify.com/sites/vuejs/deploys/65d3916ae370800008ef896a
😎 Deploy Previewhttps://deploy-preview-2703--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site configuration.

@yyx990803
Copy link
Member

I don't think this should be added because the inference is an internal mechanism. Can you clarify your use case here?

@incutonez
Copy link
Author

incutonez commentedMar 13, 2024
edited
Loading

I don't think this should be added because the inference is an internal mechanism. Can you clarify your use case here?

Absolutely! I use script setup, and I need to be able to reference the name of the component programmatically... according to the docs, I should be able to usename, but I can't because script setup sets__name, and it wasn't clear which property to use. I would rather not have to go through each component and usedefineOptions({ name: "ComponentName" }); if the name is inferred from the file (which is what I want).

@flogehring
Copy link
Contributor

I use script setup, and I need to be able to reference the name of the component programmatically...

What are you doing with the name?

@incutonez
Copy link
Author

What are you doing with the name?

For display purposes, retrieving it for aninclude/exclude list inKeepAlive, and other use cases that apply for the Options API.

@bencodezenbencodezen added the state: awaiting-feedbackNeeds more input before further actions can be taken labelAug 30, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@yyx990803yyx990803Awaiting requested review from yyx990803

Assignees

No one assigned

Labels

state: awaiting-feedbackNeeds more input before further actions can be taken

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@incutonez@yyx990803@flogehring@bencodezen

[8]ページ先頭

©2009-2025 Movatter.jp