vuedraggable Cannot read properties of undefined (reading 'header')
时间: 2023-11-01 14:51:12 浏览: 95
The error message "Cannot read properties of undefined (reading 'header')" typically occurs when you are trying to access a property of an undefined object. In the context of VueDraggable, it usually means that the data object you are trying to access does not exist or is not properly defined.
To resolve this issue, make sure you have properly defined the data object that contains the 'header' property. Check if you have initialized the data object in your Vue component and if the 'header' property is correctly assigned within it.
Here's an example of how you can define a data object with a 'header' property in a Vue component:
```javascript
export default {
data() {
return {
myData: {
header: 'My Header',
// other properties...
}
};
}
}
```
Ensure that the object containing the 'header' property is properly defined and accessible within your template or methods.
If you still encounter issues, please provide more information or code snippets related to your problem so that I can assist you further.