error `slot` attributes are deprecated

简介: error `slot` attributes are deprecated

今天敲代码,遇到了一个 error  `slot` attributes are deprecated 的问题

这里该如何解决

哈哈^_^,参考了大佬秃头小辣鸡的资料,找到了bug

vue3学习笔记——error `slot` attributes are deprecated-CSDN博客

原来Vue3已经废除了slot,在<el-dropdown-menu>标签外加一层<template>

然后在<template>标签中加入#dropdown

<el-submenu>
                        <template #dropdown>
                            <i class="el-icon-menu"></i>
                            <span>信息管理</span>
                        </template>
                        <el-menu-item>用户信息</el-menu-item>
                    </el-submenu>

这样就可以了

页面也可以了

Bug解决,开心一下


相关文章
|
5月前
el-progress进度条提示Invalid prop: custom validator check failed for prop “status“
el-progress进度条提示Invalid prop: custom validator check failed for prop “status“
80 0
|
6月前
|
JavaScript
[Vue warn]_ Avoid using non-primitive value as key, use string_number value instea
[Vue warn]_ Avoid using non-primitive value as key, use string_number value instea
75 1
|
11月前
|
JavaScript
Uncaught runtime errors: × ERROR Avoided redundant navigation to current location: “/xxx“.
Uncaught runtime errors: × ERROR Avoided redundant navigation to current location: “/xxx“.
154 0
|
人工智能 自然语言处理 语音技术
Invalid prop: type check failed for prop “index“. Expected String with value “5“问题解决
Invalid prop: type check failed for prop “index“. Expected String with value “5“问题解决
116 0
|
Java Android开发
Bad method handle type 7异常解决
在利用androidx版本写demo时,在添加了一些依赖后,遇到了`java.lang.ClassNotFoundException`bug,这就很奇怪了,我就添加rxjava3的依赖,就给我报这个错误。
error: static assertion failed: Signal and slot arguments are not compatible.
error: static assertion failed: Signal and slot arguments are not compatible.
error: static assertion failed: Signal and slot arguments are not compatible.
解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
|
Java
The type XXX cannot be resolved. It is indirectly referenced from required .class files
The type XXX cannot be resolved. It is indirectly referenced from required .class files
128 0
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
320 0