Vue + Element 配置报错
2022-10-08 17:22:18
101
{{single.collect_count}}

1.安装:

cnpm i element-ui -S


2.main .js 引入:

import ElementUI from 'element-ui';import 'element-ui/lib/theme-chalk/index.css';Vue.use(ElementUI);



3.运行报错:

ERROR in ./node_modules/_element-ui@2.4.2@element-ui/lib/theme-chalk/fonts/element-icons.ttfModule parse failed: Unexpected character ' ' (1:0)You may need an appropriate loader to handle this file type.(Source code omitted for this binary file) @ ./node_modules/_css-loader@0.28.11@css-loader!./node_modules/_element-ui@2.4.2@element-ui/lib/theme-chalk/index.css 7:411-447 @ ./node_modules/_element-ui@2.4.2@element-ui/lib/theme-chalk/index.css @ ./src/main.js @ multi ./node_modules/_webpack-dev-server@2.11.2@webpack-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js


4.解决:在webpack.config.js里配置

{test: /\.(eot|svg|ttf|woff|woff2)$/,loader: 'file-loader'}

原文:https://blog.csdn.net/weixin_41587194/article/details/80275281


回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}