New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在组件上使用decorator装饰器报错 #9301

NextBoy opened this Issue Jan 10, 2019 · 1 comment


None yet
2 participants
Copy link

NextBoy commented Jan 10, 2019



Reproduction link

Steps to reproduce

the code

export const withLogin = function (Component): any {
  return class ComponentWithLogin extends Component {
  <div>123{{ login }}</div>
  import Vue from 'vue'
  import { withLogin } from '../decorator'
  class Hello extends Vue {
    login = false

What is expected?

no error

What is actually happening?

But it went wrong

vue-router.esm.js?8c4f:1897 TypeError: Cannot set property 'render' of undefined
    at normalizeComponent (componentNormalizer.js?2877:24)
    at eval (hello.vue?0739:8)
    at Module../src/views/hello.vue (1.js:59)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)

This comment has been minimized.

Copy link

posva commented Jan 10, 2019

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server, gitter or StackOverflow.

Not sure what you are trying to do by extending Vue class but you should check

@posva posva closed this Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment