Error reported with decorator in vue: Parsing error: Decorators cannot be used to decorate object literal properties

Error message: error: parsing error: decorators cannot be used to decorate object literal properties

solution:
Add legacydecorators: true to the. Eslintrc.js file to support decorator writing

parserOptions: {
    parser: 'babel-eslint',
    ecmaFeatures:{
      legacyDecorators: true
    }
  },

If you still report an error after modifying the file, just run it under NPM install in the project directory

Read More: