File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,17 @@ export function componentFactory (
57
57
const decorators = ( Component as DecoratedClass ) . __decorators__
58
58
if ( decorators ) {
59
59
decorators . forEach ( fn => fn ( options ) )
60
- }
60
+ }
61
61
62
62
// find super
63
63
const superProto = Object . getPrototypeOf ( Component . prototype )
64
64
const Super = superProto instanceof Vue
65
65
? superProto . constructor as VueClass
66
66
: Vue
67
- return Super . extend ( options )
67
+ const rv = Super . extend ( options ) ;
68
+
69
+ for ( let sttc in Component )
70
+ if ( ! ( sttc in function ( ) { } ) && Component . hasOwnProperty ( sttc ) )
71
+ rv [ sttc ] = Component [ sttc ] ;
72
+ return rv ;
68
73
}
Original file line number Diff line number Diff line change @@ -256,4 +256,14 @@ describe('vue-class-component', () => {
256
256
expect ( parent . value ) . to . equal ( 'parent' )
257
257
expect ( child . value ) . to . equal ( 'child' )
258
258
} )
259
+
260
+ it ( 'forwardStatics' , function ( ) {
261
+ debugger ;
262
+ @Component
263
+ class MyComp extends Vue {
264
+ static myValue = 52
265
+ }
266
+
267
+ expect ( MyComp . myValue ) . to . equal ( 52 ) ;
268
+ } )
259
269
} )
You can’t perform that action at this time.
0 commit comments