Home > front end >  @property in vue components
@property in vue components

Time:01-29

enter image description here

I am on the project with Vue.js, and it's the first time I see that type of thing @property etc. Can anyone explain to me what this thing is?

P.S. with global search I cannot find references in my project folder, so don't know where it's derived from

I just tried to search the property name with Ctrl Shift F inside the project folder. That's about it. Just want to know something about this pattern.

CodePudding user response:

It's just documenting the component arguments/properties.

From the docunentation:

 If your event returns arguments/properties use the @property tag to describe them

/**
 * Triggers when the number changes
 *
 * @property {number} newValue new value set
 * @property {number} oldValue value that was set before the change
 */

this.$emit('change', newValue, oldValue)
  • Related