icon无法显示的问题
html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | <!DOCTYPE html> <html lang= "en" > <head> <meta charset= "UTF-8" > <title>慕课网办公OA系统</title> <!--引入样式--> <link rel= "stylesheet" type= "text/css" href= "assets/element-plus/index.css" > <!--引入组件库--> <script src= "assets/vue/vue.global.js" ></script> <script src= "assets/element-plus/index.full.js" ></script> <script src= "assets/axios/axios.js" ></script> <style> .el-header { background-color: rgb( 238 , 241 , 246 ); color: # 333 ; line-height: 60px; } html, body, #app, .el-container { padding: 0 ; margin: 0 ; height: 100 %; max-height: 100 %; } </style> </head> <body> <div id= "app" > <el-container style= "height: 100%;border: 1px solid #eee" > <el-header> Header </el-header> <el-container> <el-aside width= "200px" style= "max-height: 100%;background-color: rgb(238, 241, 246)" > <!--默认展开第一个模块功能--> <el-menu : default -openeds= "['0']" > <template v- for = "(n,idx) in nodeList" > <el-sub-menu :index= "idx.toString()" > <template #title><i class = "el-icon-s-tools" ></i>{{n.node.nodeName}}</template> <template v- for = "func in n.children" > <el-menu-item :index= "func.nodeId.toString()" v-on:click= "showPage(func.url)" > {{func.nodeName}} </el-menu-item> </template> </el-sub-menu> </template> </el-menu> </el-aside> <el-main> <iframe id= "main" name= "main" src= "https://www.imooc.com" style= "width: 100%;height: 95%;border: 0" ></iframe> </el-main> </el-container> </el-container> </div> <script> const main = { data() { return { nodeList: [] } }, methods: { showPage(url) { document.getElementById( "main" ).src = url; } }, mounted() { const objApp = this ; axios.get( "/api/user_info?uid=" + sessionStorage.uid).then(function (response) { const json = response.data; json.data.nodeList.forEach(function (item) { objApp.nodeList.push(item); }) }) console.info(objApp.nodeList); } } const app = Vue.createApp(main); app.use(ElementPlus); app.mount( "#app" ); </script> </body> </html> |
资源文件使用课程提供的资源,还是不能成功显示icon
26
收起
正在回答
1回答
同学你好,ico文件无法显示时控制台是否出现如下提示信息呢?建议同学检查下项目中是否存在下述文件。
经过测试项目源码是可以显示ico文件的,建议同学清除IDEA缓存后重新运行试下。
祝学习愉快~
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧