vue-class-component
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -47,6 +47,7 @@ var Vue = require('vue') | ||
// find super | ||
var Super = proto.__proto__.constructor | ||
if (!(Super instanceof Vue)) { | ||
Super = Vue | ||
} | ||
var Super | ||
var superProto = Object.getPrototypeOf(Component.prototype) | ||
var Super = superProto instanceof Vue | ||
? superProto.constructor | ||
: Vue | ||
return Super.extend(options) | ||
@@ -53,0 +54,0 @@ } |
{ | ||
"name": "vue-class-component", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "ES201X/TypeScript class decorator for Vue components", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -84,2 +84,22 @@ import Component from '../index' | ||
}) | ||
it('extending', function () { | ||
@Component | ||
class Base { | ||
data () { | ||
return { a: 1 } | ||
} | ||
} | ||
@Component | ||
class A extends Base { | ||
data () { | ||
return { b: 2 } | ||
} | ||
} | ||
const a = new A() | ||
expect(a.a).to.equal(1) | ||
expect(a.b).to.equal(2) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6958
9
221