GithubHelp home page GithubHelp logo

Comments (5)

NathanFreeman avatar NathanFreeman commented on May 18, 2024 1

The Number, ReadonlyArray etc... type is not necessary for production mode. It will be ignored since the type check is skipped in production mode. Only boolean, function (if default value exists), and string (if boolean type exists) are necessary for production mode and will affect runtime behavior.

from core.

edison1105 avatar edison1105 commented on May 18, 2024

As @NathanFreeman said, this is the expected behavior in production mode

from core.

xvaara avatar xvaara commented on May 18, 2024

It's not nice that console.log is full of warnings when developers are using our published library. If that is what is expected I think we need to revert away from defineModel.

[Vue warn]: Invalid prop: type check failed for prop "modelValue". Expected Boolean | String, got Object

from core.

xvaara avatar xvaara commented on May 18, 2024

I'm using the same type here is the code but it generates different types in defineModel and defineProps:

  otherValue: { type: [Boolean, String, Array, Object, Number, null] }
  "modelValue": { type: [Boolean, String] }

from core.

yyx990803 avatar yyx990803 commented on May 18, 2024

Looks like a behavior discrepancy between defineProps and defineModel is the actual bug here.

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.