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解决,开心一下


相关文章
|
9月前
|
XML C# 数据格式
C#报错 The ‘xmins‘ attribute is not supported in this context
System.Xml.Schema.XmlSchemaException:“The ‘xmins’ attribute is not supported in this context.”异常的解决百度翻译:System.Xml.Schema.XmlSchemaException:“此上下文中不支持”xmins“属性。”这是在使用System.Data.DataSet的ReadXml读取x...
55 0
C#报错 The ‘xmins‘ attribute is not supported in this context
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
Error: Element type is invalid: expected a string (for built-in components) or a class/function
2429 0
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
86 0
|
9月前
|
人工智能 自然语言处理 语音技术
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“问题解决
69 0
|
JavaScript 算法 前端开发
Property xxx was accessed during render but is not defined on instance
目前el-form的model主要用表单验证的,也就是配合el-form的rules和el-form-item的prop来使用的。不信的话,你可以增加一个rules和prop(为了调用验证方法,也el-form也加一个ref属性,相当于id或者class选择器的意思),但是不写model,然后验证的话,会提示缺少model,导致无法验证成功。
Property xxx was accessed during render but is not defined on instance
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
95 0