official docs:
Global functions set and delete, and the instance methods $set and $delete. They are no longer required with proxy-based change detection.
Ok, how should I set or delete a data() value now?
CodePudding user response:
You can set them directly by assigning a value. And you can "delete" them by setting null or undefined. Or if you really want to delete something, doesn't make sense for data() values in my opinion, only for properties of an object, you can use the delete
operator: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete