mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Skeleton): fix non-props attributes warning (#10384)
This commit is contained in:
parent
09694feaad
commit
3bb729214e
@ -38,9 +38,11 @@ export type SkeletonProps = ExtractPropTypes<typeof skeletonProps>;
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name,
|
name,
|
||||||
|
|
||||||
|
inheritAttrs: false,
|
||||||
|
|
||||||
props: skeletonProps,
|
props: skeletonProps,
|
||||||
|
|
||||||
setup(props, { slots }) {
|
setup(props, { slots, attrs }) {
|
||||||
const renderAvatar = () => {
|
const renderAvatar = () => {
|
||||||
if (props.avatar) {
|
if (props.avatar) {
|
||||||
return (
|
return (
|
||||||
@ -90,7 +92,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={bem({ animate: props.animate, round: props.round })}>
|
<div
|
||||||
|
class={bem({ animate: props.animate, round: props.round })}
|
||||||
|
{...attrs}
|
||||||
|
>
|
||||||
{renderAvatar()}
|
{renderAvatar()}
|
||||||
<div class={bem('content')}>
|
<div class={bem('content')}>
|
||||||
{renderTitle()}
|
{renderTitle()}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user