1、Problem: (TypeScript)using a.b
or this.b
1
ERROR: property 'b' does not exist on value of type
Solution: change a
or this
to (a as any)
or (this as any)
2、Problem: using js or jquery to modify DOM’s css value doesn’t work
Solution: mount Js functions in mounted
instead of created
3、Problem: DOM does not change after changing data
Solution: using this.$set(Object, 'key', value)
instead of this.Object.key = value
4、Problem: (TypeScript)usingdocument.getElementsByClassName('CLASS_NAME')[key].style.ATTRIBUTE = VALUE
or document.querySelector('.CLASS').style.ATTRIBUTE = VALUE
1
ERROR: property 'style' does not exist on type 'Element'.Vetur(2339)
Solution: usign (document.querySelector('.CLASS') as HTMLElement).style.ATTRIBUTE = VALUE;
or jQuery

...
...
00:00
00:00
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !