fix(cascader): render error of radio label (#859)

empty fragment will treat as invalid slot content since vue@3.0.4 which cause radio label renders
unexpectedly, so use span instead of fragment.
This commit is contained in:
Simona 2020-12-06 22:52:13 +08:00 committed by GitHub
parent 9abdf513d8
commit e8a9074545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,8 +35,11 @@
@update:model-value="handleCheck"
@click.stop
>
<!-- add an empty element to avoid render label -->
<template #default></template>
<!--
Add an empty element to avoid render label,
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
-->
<span></span>
</el-radio>
<i v-else-if="isLeaf && node.checked" class="el-icon-check el-cascader-node__prefix"></i>