vue-class-component
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -50,11 +50,7 @@ "use strict"; | ||
var superProto = Object.getPrototypeOf(Component.prototype); | ||
if (!(superProto instanceof Vue)) { | ||
Component.prototype = Object.create(Vue.prototype); | ||
Component.prototype.constructor = Component; | ||
Object.keys(Vue).forEach(function (key) { | ||
Component[key] = Vue[key]; | ||
}); | ||
} | ||
return Component.extend(options); | ||
var Super = superProto instanceof Vue | ||
? superProto.constructor | ||
: Vue; | ||
return Super.extend(options); | ||
} | ||
exports.componentFactory = componentFactory; |
"use strict"; | ||
var util_1 = require('./util'); | ||
function collectDataFromConstructor(vm, Component) { | ||
var data = Object.create(vm, { | ||
_init: { | ||
get: function () { return util_1.noop; } | ||
} | ||
}); | ||
Component.call(data); | ||
Component.prototype._init = function () { | ||
var _this = this; | ||
Object.getOwnPropertyNames(vm).forEach(function (key) { | ||
Object.defineProperty(_this, key, { | ||
get: function () { return vm[key]; }, | ||
set: function (value) { return vm[key] = value; } | ||
}); | ||
}); | ||
}; | ||
var data = new Component(); | ||
var plainData = {}; | ||
Object.keys(data).forEach(function (key) { | ||
plainData[key] = data[key]; | ||
if (data[key] !== undefined) { | ||
plainData[key] = data[key]; | ||
} | ||
}); | ||
@@ -14,0 +19,0 @@ return plainData; |
{ | ||
"name": "vue-class-component", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "ES201X/TypeScript class decorator for Vue components", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
10700
147
0