File tree 2 files changed +15
-0
lines changed
test/unit/features/global-api 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ export function resolveConstructorOptions (Ctor: Class<Component>) {
72
72
Ctor . superOptions = superOptions
73
73
extendOptions . render = options . render
74
74
extendOptions . staticRenderFns = options . staticRenderFns
75
+ extendOptions . _scopeId = options . _scopeId
75
76
options = Ctor . options = mergeOptions ( superOptions , extendOptions )
76
77
if ( options . name ) {
77
78
options . components [ options . name ] = Ctor
Original file line number Diff line number Diff line change @@ -70,4 +70,18 @@ describe('Global API: mixin', () => {
70
70
71
71
expect ( vm . $el . textContent ) . toBe ( 'hello' )
72
72
} )
73
+
74
+ // #4266
75
+ it ( 'should not drop scopedId' , ( ) => {
76
+ const Test = Vue . extend ( { } )
77
+ Test . options . _scopeId = 'foo'
78
+
79
+ Vue . mixin ( { } )
80
+
81
+ const vm = new Test ( {
82
+ template : '<div><p>hi<p></div>'
83
+ } ) . $mount ( )
84
+
85
+ expect ( vm . $el . children [ 0 ] . hasAttribute ( 'foo' ) ) . toBe ( true )
86
+ } )
73
87
} )
You can’t perform that action at this time.
0 commit comments