Skip to content

Commit 27fa55b

Browse files
committed
[build] 5.0.2
1 parent 176c310 commit 27fa55b

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

dist/vue-class-component.common.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-class-component v5.0.1
2+
* vue-class-component v5.0.2
33
* (c) 2015-2017 Evan You
44
* @license MIT
55
*/
@@ -12,11 +12,15 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
1212
var Vue = _interopDefault(require('vue'));
1313

1414
function createDecorator(factory) {
15-
return function (_, key, index) {
15+
return function (target, key, index) {
16+
var Ctor = target.constructor;
17+
if (!Ctor.__decorators__) {
18+
Ctor.__decorators__ = [];
19+
}
1620
if (typeof index !== 'number') {
1721
index = undefined;
1822
}
19-
$decoratorQueue.push(function (options) { return factory(options, key, index); });
23+
Ctor.__decorators__.push(function (options) { return factory(options, key, index); });
2024
};
2125
}
2226
function warn(message) {
@@ -75,7 +79,6 @@ var $internalHooks = [
7579
'deactivated',
7680
'render'
7781
];
78-
var $decoratorQueue = [];
7982
function componentFactory(Component, options) {
8083
if (options === void 0) { options = {}; }
8184
options.name = options.name || Component._componentTag || Component.name;
@@ -104,8 +107,10 @@ function componentFactory(Component, options) {
104107
return collectDataFromConstructor(this, Component);
105108
}
106109
});
107-
$decoratorQueue.forEach(function (fn) { return fn(options); });
108-
$decoratorQueue = [];
110+
var decorators = Component.__decorators__;
111+
if (decorators) {
112+
decorators.forEach(function (fn) { return fn(options); });
113+
}
109114
var superProto = Object.getPrototypeOf(Component.prototype);
110115
var Super = superProto instanceof Vue
111116
? superProto.constructor

dist/vue-class-component.js

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-class-component v5.0.1
2+
* vue-class-component v5.0.2
33
* (c) 2015-2017 Evan You
44
* @license MIT
55
*/
@@ -9,14 +9,18 @@
99
(factory((global.VueClassComponent = global.VueClassComponent || {}),global.Vue));
1010
}(this, (function (exports,Vue) { 'use strict';
1111

12-
Vue = 'default' in Vue ? Vue['default'] : Vue;
12+
Vue = Vue && 'default' in Vue ? Vue['default'] : Vue;
1313

1414
function createDecorator(factory) {
15-
return function (_, key, index) {
15+
return function (target, key, index) {
16+
var Ctor = target.constructor;
17+
if (!Ctor.__decorators__) {
18+
Ctor.__decorators__ = [];
19+
}
1620
if (typeof index !== 'number') {
1721
index = undefined;
1822
}
19-
$decoratorQueue.push(function (options) { return factory(options, key, index); });
23+
Ctor.__decorators__.push(function (options) { return factory(options, key, index); });
2024
};
2125
}
2226
function warn(message) {
@@ -75,7 +79,6 @@ var $internalHooks = [
7579
'deactivated',
7680
'render'
7781
];
78-
var $decoratorQueue = [];
7982
function componentFactory(Component, options) {
8083
if (options === void 0) { options = {}; }
8184
options.name = options.name || Component._componentTag || Component.name;
@@ -104,8 +107,10 @@ function componentFactory(Component, options) {
104107
return collectDataFromConstructor(this, Component);
105108
}
106109
});
107-
$decoratorQueue.forEach(function (fn) { return fn(options); });
108-
$decoratorQueue = [];
110+
var decorators = Component.__decorators__;
111+
if (decorators) {
112+
decorators.forEach(function (fn) { return fn(options); });
113+
}
109114
var superProto = Object.getPrototypeOf(Component.prototype);
110115
var Super = superProto instanceof Vue
111116
? superProto.constructor

dist/vue-class-component.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)