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

kabab-case component doesn't work when I typed same name but camelcase ref. #12685

Closed
Shimada666 opened this issue Jul 20, 2022 · 1 comment · Fixed by #12687
Closed

kabab-case component doesn't work when I typed same name but camelcase ref. #12685

Shimada666 opened this issue Jul 20, 2022 · 1 comment · Fixed by #12687

Comments

@Shimada666
Copy link

Version

2.7.7

Reproduction link

github.com

image

image

Steps to reproduce

  1. Clone the repo
  2. Run pnpm i
  3. Run pnpm dev

What is expected?

Kebab-case component can be rendered.

What is actually happening?

Kebab-case component can't be rendered. But when I delete ref sentence, it works.


Is it a bug?
It can work in vue3.
It also can work in vue2.6 + vue-composition-api.

@Shimada666
Copy link
Author

<template>
  <div>
    <p>I'm parent.</p>

    <p>This can work: {{right}} -> (<ChildPage/>)</p>
    <p>This can't work: {{wrong}} -> (<child-page/>)</p>

    <p>Because I coded 'const childPage = ref(null)'. If I delete it, they both can show.</p>
  </div>
</template>
<script setup>
import ChildPage from './ChildPage.vue'
import { ref } from 'vue'

const right = ref(`<ChildPage/>`)
const wrong = ref(`<child-page/>`)

const childPage = ref(null) // If I delete it, they both can show.
</script>
<style></style>

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

Successfully merging a pull request may close this issue.

2 participants