File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
test/unit/features/global-api Expand file tree Collapse file tree 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>) {
7272 Ctor . superOptions = superOptions
7373 extendOptions . render = options . render
7474 extendOptions . staticRenderFns = options . staticRenderFns
75+ extendOptions . _scopeId = options . _scopeId
7576 options = Ctor . options = mergeOptions ( superOptions , extendOptions )
7677 if ( options . name ) {
7778 options . components [ options . name ] = Ctor
Original file line number Diff line number Diff line change @@ -70,4 +70,18 @@ describe('Global API: mixin', () => {
7070
7171 expect ( vm . $el . textContent ) . toBe ( 'hello' )
7272 } )
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+ } )
7387} )
You can’t perform that action at this time.
0 commit comments