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

Single file component can contain only one <script> element #71

Closed
swliu920322 opened this issue Mar 10, 2021 · 1 comment
Closed

Single file component can contain only one <script> element #71

swliu920322 opened this issue Mar 10, 2021 · 1 comment

Comments

@swliu920322
Copy link

swliu920322 commented Mar 10, 2021

when i make a README.md, i add

_当前计数为: {{ count }}_
<button @click="count++">点我!</button>

// next code origin from components
<basic-table />

<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
  setup() {
    const msg = 'Markdown 中的 Vue';
    const count = ref(0);
    return {
      msg,
      count,
    }
  }
})
</script>```

when i add a sfc file from components catalog, i get a error like title,
i think my custom sfc file also has script tag,
 i get two script tags from .temp/pages/README.vue;
how can i add my custom component to the md file;
@swliu920322
Copy link
Author

sorry, my self error,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant