[Vuejs]-Vue js how to get notified when any property's value is being read?

0👍

This could be a possibile solution: create an “hidden” field and expose it through computed properties, with your custom logic.

<script>
export default {
   data () {
      return {
         _mini: false
      }
   },
   methods: {
       // Your methods here...
   },
   computed: {
      mini {
         get: function () {
            // TODO: notify your listeners, functions, etc.

            return this._mini;
         },
         set: function (value) {
            this._mini = mini;
         }
      }
   }
}
</script>

Leave a comment