fix(List): scoped style not applied to first child (#7128)

This commit is contained in:
neverland 2020-09-07 20:57:42 +08:00 committed by GitHub
parent bc59e6ea5d
commit 432c32a3c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,7 @@ export default createComponent({
genLoading() {
if (this.innerLoading && !this.finished) {
return (
<div class={bem('loading')} key="loading">
<div class={bem('loading')}>
{this.slots('loading') || (
<Loading size="16">{this.loadingText || t('loading')}</Loading>
)}
@ -156,7 +156,9 @@ export default createComponent({
},
render() {
const Placeholder = <div ref="placeholder" class={bem('placeholder')} />;
const Placeholder = (
<div ref="placeholder" key="placeholder" class={bem('placeholder')} />
);
return (
<div class={bem()} role="feed" aria-busy={this.innerLoading}>