|
|
@@ -378,15 +378,22 @@ export function mergeOptions (
|
|
|
normalizeProps(child, vm)
|
|
|
normalizeInject(child, vm)
|
|
|
normalizeDirectives(child)
|
|
|
- const extendsFrom = child.extends
|
|
|
- if (extendsFrom) {
|
|
|
- parent = mergeOptions(parent, extendsFrom, vm)
|
|
|
- }
|
|
|
- if (child.mixins) {
|
|
|
- for (let i = 0, l = child.mixins.length; i < l; i++) {
|
|
|
- parent = mergeOptions(parent, child.mixins[i], vm)
|
|
|
+
|
|
|
+ // Apply extends and mixins on the child options,
|
|
|
+ // but only if it is a raw options object that isn't
|
|
|
+ // the result of another mergeOptions call.
|
|
|
+ // Only merged options has the _base property.
|
|
|
+ if (!child._base) {
|
|
|
+ if (child.extends) {
|
|
|
+ parent = mergeOptions(parent, child.extends, vm)
|
|
|
+ }
|
|
|
+ if (child.mixins) {
|
|
|
+ for (let i = 0, l = child.mixins.length; i < l; i++) {
|
|
|
+ parent = mergeOptions(parent, child.mixins[i], vm)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
const options = {}
|
|
|
let key
|
|
|
for (key in parent) {
|