Skip to content
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

<script setup> How should the name be set #4078

Closed
hairyf opened this issue Jul 8, 2021 · 2 comments
Closed

<script setup> How should the name be set #4078

hairyf opened this issue Jul 8, 2021 · 2 comments

Comments

@hairyf
Copy link

hairyf commented Jul 8, 2021

Version

3.1.4

Reproduction link

[https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICA8aDE e3sgbXNnIH19PC9oMT5cbjwvdGVtcGxhdGU XG5cbjxzY3JpcHQgc2V0dXA XG5jb25zdCBtc2cgPSAnSGVsbG8gV29ybGQhJ1xuLy8gIG5hbWUgPz9cbjwvc2NyaXB0PiJ9](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICA8aDE e3sgbXNnIH19PC9oMT5cbjwvdGVtcGxhdGU XG5cbjxzY3JpcHQgc2V0dXA XG5jb25zdCBtc2cgPSAnSGVsbG8gV29ybGQhJ1xuLy8gIG5hbWUgPz9cbjwvc2NyaXB0PiJ9)

Steps to reproduce

<script lang="ts" setup>
// name??
</script>

What is expected?

can set name

What is actually happening?

Cannot set name


import { useName } from 'vue'

@replygirl
Copy link

you can use a second <script> block to define options

<script lang=“ts”>
import { defineComponent } from ‘vue’

export default defineComponent({ name: ‘MyComponent’ })
</script>

<script setup lang=“ts”>
//
</script>

@posva
Copy link
Member

posva commented Jul 8, 2021

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.

@posva posva closed this as completed Jul 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants