reason:
V-bind or ‘:’ is followed by the written JS code, which is written in the form of key value pairs. The key is the CSS style attribute name of the tag, and the key is the attribute value. The key value must be a string or a variable (provided that the variable must be declared in the data first): style = “{transform: rotate()}” this writing browser calls rotate as a function rotate(), so an error will be reported
Solution:
//String mode
:style="{transform: 'rotate(60deg)'}
//Variable form
:style="{transform: `rotate(${Variable}deg)`}
Read More:
- The solution to the problem that the custom styles of UI components such as element-ui in the vue project do not take effect
- How to Solve VUE Error: Avoid mutating a prop directly since the value will be overwritten …
- How to Fix “HTTP 405 method not allowed” Error
- [Solved] TYPEERROR: CANNOT READ PROPERTY ‘REDUCE‘ OF UNDEFINED
- Solve Google browser font reduction to 12px
- [Vue warn]: Error in mounted hook: “Error: please transfer a valid prop path to form item“
- [Solved] Error in mounted hook: “Error: please transfer a valid prop
- If the request parameter is formdata, use the Ajax operation
- [Solved] react-router-dom Error: <NavLink>activeClassName
- Node Error: Error: Multipart: Boundary not found [How to Solve]
- Use of error attribute in element UI (solution of triggering only once)
- [Solved] node.js Upload Files Error: Multipart: boundary not found multer
- How to Use DOM to operate CSS
- Application of call, apply and bind methods
- How to React page to achieve entry and exit animation
- [Solved] Binding onclick event in JS: for loop: error uncaught typeerror: cannot set properties of undefined (setting ‘classname’)
- [Solved] Error in v-on handler: “Error: please transfer a valid prop path to form item
- Please transfer a valid prop path to form item
- [Solved] Vue element UI form verification error: cannot read property ‘validate’ of undefined
- Vue form validate error: Error in v-on handler “TypeError Cannot read properties of undefined (reading ‘indexOf‘)