|
|
@@ -18,7 +18,6 @@ import {
|
|
|
del,
|
|
|
nextTick,
|
|
|
mergeOptions,
|
|
|
- classify,
|
|
|
toArray,
|
|
|
commonTagRE,
|
|
|
reservedTagRE,
|
|
|
@@ -104,7 +103,9 @@ export default function (Vue) {
|
|
|
name = null
|
|
|
}
|
|
|
}
|
|
|
- var Sub = createClass(name || 'VueComponent')
|
|
|
+ var Sub = function VueComponent (options) {
|
|
|
+ Vue.call(this, options)
|
|
|
+ }
|
|
|
Sub.prototype = Object.create(Super.prototype)
|
|
|
Sub.prototype.constructor = Sub
|
|
|
Sub.cid = cid++
|
|
|
@@ -131,24 +132,6 @@ export default function (Vue) {
|
|
|
return Sub
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * A function that returns a sub-class constructor with the
|
|
|
- * given name. This gives us much nicer output when
|
|
|
- * logging instances in the console.
|
|
|
- *
|
|
|
- * @param {String} name
|
|
|
- * @return {Function}
|
|
|
- */
|
|
|
-
|
|
|
- function createClass (name) {
|
|
|
- /* eslint-disable no-new-func */
|
|
|
- return new Function(
|
|
|
- 'return function ' + classify(name) +
|
|
|
- ' (options) { this._init(options) }'
|
|
|
- )()
|
|
|
- /* eslint-enable no-new-func */
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Plugin system
|
|
|
*
|