0👍
You’re trying to assign an object to the position
CSS property. This won’t work; position
must be a string with a value like relative
, absolute
, fixed
, etc just like in regular CSS.
Try this instead:
data() {
return {
style: {
position: 'absolute',
left: '238px',
top: '116px',
}
}
}
<div :style="style"></div>
When the element is dragged, just update this.style.left
and this.style.top
accordingly.
- [Vuejs]-"export 'default' " <imported as '__vue_script__'> was not found in '!!babel-loader
- [Vuejs]-Can I use mdb vue (Material Design Vue) along side with Bootstrap Vue ? What are the risks?
Source:stackexchange.com