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

Attributes gets converted to camelCase without explicit props declaration #583

Closed
sqal opened this issue Jan 5, 2020 · 1 comment
Closed
Labels
🐞 bug Something isn't working

Comments

@sqal
Copy link
Contributor

sqal commented Jan 5, 2020

Version

3.0.0-alpha.1

Reproduction link

https://codesandbox.io/s/zen-field-ewni3

vue 2 for comparison - https://jsfiddle.net/jfrhgbma/

Steps to reproduce

import { h, createApp } from "vue";

function Button(props, { attrs }) {
  console.log({
    props,
    attrs
  });
}

const App = {
  setup() {
    return () => [
      h(Button, {
        "data-id": 1,
        "aria-label": "Close",
      })
    ];
  }
};

createApp().mount(App, "#root");

What is expected?

Button's props should be in camelCase and attrs in kebab-case

What is actually happening?

Without explicit props declaration Button attrs keys are converted to camelCase.

@KaelWD
Copy link
Contributor

KaelWD commented Jan 6, 2020

I think this would be fine if they were converted back to kebab-case in the DOM, but they get lowercased instead.

@yyx990803 yyx990803 added the 🐞 bug Something isn't working label Jan 6, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants