更新骨架屏自定义模板时的key值 (#2944)

* 更新骨架屏自定义模板时的key值

之前骨架屏自定义模板时key都是0,因为没有传入模板作用域。现在把count循环的i传入作用域,解决该问题

* fix warning

fix the linter issue before this merged
This commit is contained in:
CallMeSoul 2021-08-19 09:50:02 +08:00 committed by GitHub
parent f55c320354
commit 8287f90521
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
<template v-if="uiLoading">
<div :class="['el-skeleton', animated ? 'is-animated' : '', ]" v-bind="$attrs">
<template v-for="i in count" :key="i">
<slot v-if="loading" name="template">
<slot v-if="loading" :key="i" name="template">
<el-skeleton-item class="is-first" variant="p" />
<el-skeleton-item
v-for="item in rows"