GithubHelp home page GithubHelp logo

Comments (3)

krystalcampioni avatar krystalcampioni commented on June 12, 2024

Hi @YYQ8023. Could you please provide me your code so I could better understand what's going on? Unfortunately, I don't speak Chinese.

from vue-number-input-spinner.

llk2yq avatar llk2yq commented on June 12, 2024

@krystalcampioni my code maybe a little complex,here it is(a part of my code):

<parentComponent>
<Mynumber v-model="Num" :min="1" :max="5">
</Mynumber>
</parentComponent>
data(){
retutn{
Num:0
}
}

condition1:i have a watch property :

info:function(newVal,oldVal){
this.num = newVal.num
}
}

condition2:when i click a button ,trigger a function to change "Num",like

this.Num = 2

then console.log(Num),i cannot get 2.

from vue-number-input-spinner.

krystalcampioni avatar krystalcampioni commented on June 12, 2024

I'm not sure I understood your example, but it seems you are trying to force update the value from an external component. If so, that's not how the component is intended to be used. This external manipulation of the value would not go through all the checks of min value, max value, step, etc, as using the buttons or input for manipulating the value would. Feel free to fork the repo and change it to your needs though :)

from vue-number-input-spinner.

Related Issues (16)

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.