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

“Same-name Shorthand” bug? #10280

Closed
ghyaoutlook opened this issue Feb 6, 2024 · 0 comments
Closed

“Same-name Shorthand” bug? #10280

ghyaoutlook opened this issue Feb 6, 2024 · 0 comments

Comments

@ghyaoutlook
Copy link

Vue version

3.4.15

Link to minimal reproduction

?

Steps to reproduce

html code:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <div id="mydiv">
            <span :id></span>
            <br/>
            <span v-bind:id></span>
        </div>
        <script type="module" src="attribute_bindings_3.js"></script>
    </body>
</html>

js code:

import {createApp} from 'vue'

createApp({
    setup() {
        let id = 'myspan1';

        return {
            id
        }
    }
}).mount("#mydiv");

i will test url:
https://vuejs.org/guide/essentials/template-syntax.html#same-name-shorthand

but F12 show result:

attribute_bindings_3.js:11 [Vue warn]: Template compilation error: v-bind is missing expression.
1  |  
2  |              <span :id=""></span>
   |                    ^^^^^^
3  |              <br>
4  |              <span v-bind:id=""></span> 
  at <App>

What is expected?

What is actually happening?

System Info

No response

Any additional comments?

No response

sxzz added a commit to vuejs/vue-vapor that referenced this issue Feb 7, 2024
sxzz added a commit to vuejs/vue-vapor that referenced this issue Feb 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2024
lynxlangya pushed a commit to lynxlangya/core that referenced this issue May 30, 2024
…emplates

Also add error for invalid arguments for same-name shorthand.

close vuejs#10280
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

1 participant