[bugfix] functional component should not inherit scropedSlots (#2752)

This commit is contained in:
neverland
2019-02-15 19:07:27 +08:00
committed by GitHub
parent 137fe83fc1
commit 170dcbf0d2
10 changed files with 50 additions and 29 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { use } from '../utils';
import { inherit } from '../utils/functional';
const [sfc, bem] = use('loading');
const DEFAULT_COLOR = '#c9c9c9';
@@ -28,7 +29,7 @@ function Loading(h, props, slots, ctx) {
);
return (
<div class={bem([type, colorType])} style={style} {...ctx.data}>
<div class={bem([type, colorType])} style={style} {...inherit(ctx, true)}>
<span class={bem('spinner', type)}>
{Spin}
{Circular}