Skip to content

Default casting of Boolean prop #3

Closed
@DonNicoJs

Description

@DonNicoJs

Using the version of vue-web-component-wrapper included with Vue cli version 3.0.0-beta.1

I have noticed a strange / not documented behaviour of the auto casting of Boolean Props:

a prop defined as:

props: {
  aBooleanProp: {
    type: Boolean,
    default: true
  }
}

will be set to false if the prop is omitted in the web component tag:

<my-web-component />

I understand that this may be the expected behaviour in the case of web-components but since it differ from what happens in normal Vue development I think it should be documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions