@@ -567,17 +567,14 @@ export function applyOptions(
567
567
errorCaptured,
568
568
serverPrefetch,
569
569
// public API
570
- expose
570
+ expose,
571
+ inheritAttrs
571
572
} = options
572
573
573
574
const publicThis = instance . proxy !
574
575
const ctx = instance . ctx
575
576
const globalMixins = instance . appContext . mixins
576
577
577
- if ( asMixin && render && instance . render === NOOP ) {
578
- instance . render = render as InternalRenderFunction
579
- }
580
-
581
578
// applyOptions is called non-as-mixin once per instance
582
579
if ( ! asMixin ) {
583
580
shouldCacheAccess = false
@@ -755,17 +752,6 @@ export function applyOptions(
755
752
} )
756
753
}
757
754
758
- // asset options.
759
- // To reduce memory usage, only components with mixins or extends will have
760
- // resolved asset registry attached to instance.
761
- if ( asMixin ) {
762
- resolveInstanceAssets ( instance , options , COMPONENTS )
763
- resolveInstanceAssets ( instance , options , DIRECTIVES )
764
- if ( __COMPAT__ && isCompatEnabled ( DeprecationTypes . FILTERS , instance ) ) {
765
- resolveInstanceAssets ( instance , options , FILTERS )
766
- }
767
- }
768
-
769
755
// lifecycle options
770
756
if ( ! asMixin ) {
771
757
callSyncHook (
@@ -831,6 +817,27 @@ export function applyOptions(
831
817
warn ( `The \`expose\` option is ignored when used in mixins.` )
832
818
}
833
819
}
820
+
821
+ // options that are handled when creating the instance but also need to be
822
+ // applied from mixins
823
+ if ( asMixin ) {
824
+ if ( render && instance . render === NOOP ) {
825
+ instance . render = render as InternalRenderFunction
826
+ }
827
+
828
+ if ( inheritAttrs != null && instance . type . inheritAttrs == null ) {
829
+ instance . inheritAttrs = inheritAttrs
830
+ }
831
+
832
+ // asset options.
833
+ // To reduce memory usage, only components with mixins or extends will have
834
+ // resolved asset registry attached to instance.
835
+ resolveInstanceAssets ( instance , options , COMPONENTS )
836
+ resolveInstanceAssets ( instance , options , DIRECTIVES )
837
+ if ( __COMPAT__ && isCompatEnabled ( DeprecationTypes . FILTERS , instance ) ) {
838
+ resolveInstanceAssets ( instance , options , FILTERS )
839
+ }
840
+ }
834
841
}
835
842
836
843
function resolveInstanceAssets (
0 commit comments