vue-class-component icon indicating copy to clipboard operation
vue-class-component copied to clipboard

name of component in Vue-devtool display is Anonymous Component

Open ffeeng opened this issue 4 years ago • 1 comments

name of compnent is Anonymous Component image

I can fix this bug like this。

function Options(options) {
  return function (Component) {
    // add  such line
    options.name = options.name || Component.name;
    Component.__o = options;
    return Component;
  };
}

this is the result image

ffeeng avatar Jul 08 '21 07:07 ffeeng

Same issue with 8.0.0-rc.1 You can force a name with @Options({ name: "Foo" }); but by default, it should take the Class's name.

zeroinformatique avatar Jul 30 '21 15:07 zeroinformatique