Comments (9)
Can you share the line of code that is throwing that error?
I'm not sure that's vue-the-mask related.
from vue-the-mask.
Here is the complete console warning that I received.
[Vue warn]: Error in callback for watcher "function () { return this._data.$$state }": "Error: [vuex] Do not mutate vuex store state outside mutation handlers."
(found in )
warn @ vue.esm.js?65d7:479
handleError @ vue.esm.js?65d7:562
run @ vue.esm.js?65d7:2974
update @ vue.esm.js?65d7:2946
notify @ vue.esm.js?65d7:778
mutator @ vue.esm.js?65d7:833
r @ vue-the-mask.js?3d13:1
t.a @ vue-the-mask.js?3d13:1
t.a @ vue-the-mask.js?3d13:1
callHook$1 @ vue.esm.js?65d7:5750
_update @ vue.esm.js?65d7:5682
updateDirectives @ vue.esm.js?65d7:5656
patchVnode @ vue.esm.js?65d7:5440
patch @ vue.esm.js?65d7:5575
Vue._update @ vue.esm.js?65d7:2424
updateComponent @ vue.esm.js?65d7:2538
get @ vue.esm.js?65d7:2881
run @ vue.esm.js?65d7:2958
flushSchedulerQueue @ vue.esm.js?65d7:2724
(anonymous) @ vue.esm.js?65d7:701
nextTickHandler @ vue.esm.js?65d7:648
vue.esm.js?65d7:566 Error: [vuex] Do not mutate vuex store state outside mutation handlers.
at assert (vuex.esm.js?edaa:96)
at Vue$3.store._vm.$watch.deep (vuex.esm.js?edaa:637)
at Watcher.run (vue.esm.js?65d7:2972)
at Watcher.update (vue.esm.js?65d7:2946)
at Dep.notify (vue.esm.js?65d7:778)
at Array.mutator (vue.esm.js?65d7:833)
at r (vue-the-mask.js?3d13:1)
at t.a (vue-the-mask.js?3d13:1)
at t.a (vue-the-mask.js?3d13:1)
at callHook$1 (vue.esm.js?65d7:5750)
from vue-the-mask.
Which line in your code that if you comment the error stops?
from vue-the-mask.
Aparently, the bug occour when the mask comes from a vuex state....
Ex:
`
< template>
< the-mask type="text" v-model="message" :mask="setup.mask" />
< /template>
< script>
import {TheMask} from 'vue-the-mask'
export default {
props: {
setup: Object
},
data: function () {
return {
message: null
}
},
components: {
TheMask
}
}
< /script>
`
My setup comes from vuex.
from vue-the-mask.
Are you using v-model with the-mask and a data from Vuex?
from vue-the-mask.
Yes. Sorry if that is not a good pratice. I'm starting with Vue this week rsrrsrsrs
from vue-the-mask.
Yes, that's a rule of thumb for Vuex.
Happy coding!
from vue-the-mask.
Sorry... I guess that I misunderstood your question... my v-model (message) isn't from vuex, just my prop (setup).
from vue-the-mask.
I think the warning just happen when the mask is from vuex and is an array.
from vue-the-mask.
Related Issues (20)
- Example of how to use vue-the-mask with antd HOT 1
- vue-the-mask and element ui input slot 2 value error
- Make the input picking smarter
- oninput="this.setCustomValidity('')" not working with vue-the-mask
- Read before posting, this project is abandoned
- Problem in implementing v-mask directive with templates HOT 1
- Please don't use it, you will regret it
- Does not works in VUE 3 + Server Sider Rendering HOT 5
- credit card holder name always uppercase mask
- Corrupted links in README.md
- please only work if there is a binding value HOT 1
- Pattern range HOT 1
- Mask phone number with 10 or 11 digits HOT 1
- Typescript 5 An argument for 'vnode' was not provided.
- Library Suggestion - Currency input
- Setup with vue + inertiajs HOT 1
- Bug - 2 regex for 2 different formats don't work
- nuxt3 import HOT 1
- cursor is jumping to back position when typing in Firefox
- Typescript support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-the-mask.