fix(components): [el-table] development environment warning issues (#4167)

fix #4166
This commit is contained in:
msidolphin 2021-11-05 18:34:47 +08:00 committed by GitHub
parent 65276c3e4a
commit e5e9d654a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 3 deletions

View File

@ -37,7 +37,7 @@
> >
<template #default="scope"> <template #default="scope">
<el-tag <el-tag
:type="scope.row.tag === 'Home' ? 'primary' : 'success'" :type="scope.row.tag === 'Home' ? '' : 'success'"
disable-transitions disable-transitions
>{{ scope.row.tag }}</el-tag >{{ scope.row.tag }}</el-tag
> >

View File

@ -119,7 +119,17 @@ export const cellForced = {
class: classes, class: classes,
onClick: callback, onClick: callback,
}, },
[h(ElIcon, null, [h(ArrowRight)])] {
default: () => {
return [
h(ElIcon, null, {
default: () => {
return [h(ArrowRight)]
},
}),
]
},
}
) )
}, },
sortable: false, sortable: false,
@ -185,7 +195,19 @@ export function treeCellPrefix<T>({
class: expandClasses, class: expandClasses,
onClick: callback, onClick: callback,
}, },
[h(ElIcon, { class: { 'is-loading': treeNode.loading } }, [h(icon)])] {
default: () => {
return [
h(
ElIcon,
{ class: { 'is-loading': treeNode.loading } },
{
default: () => [h(icon)],
}
),
]
},
}
) )
) )
} else { } else {