vue+ elementui 怎样复制一个元素插入到页面上
1个回答
展开全部
1.安装以下模块,让webpack可以解析css文件
cnpm install style-loader --save-devcnpm install css-loader --save-devcnpm install file-loader --save-dev
2.安装elementUi模块
cnpm install element-ui@next -S
3.在webpack.base.conf.js中添加配置
{
test: /\\\\\\\\.css$/,
loader: "style!css" }, {
test: /\\\\\\\\.(eot|woff|woff2|ttf)([\\\\\\\\?]?.*)$/,
loader: "file" }
4.然后在 main.js 引入并注册
import Element from 'element-ui'import 'element-ui/lib/theme-default/index.css'Vue.use(Element)
cnpm install style-loader --save-devcnpm install css-loader --save-devcnpm install file-loader --save-dev
2.安装elementUi模块
cnpm install element-ui@next -S
3.在webpack.base.conf.js中添加配置
{
test: /\\\\\\\\.css$/,
loader: "style!css" }, {
test: /\\\\\\\\.(eot|woff|woff2|ttf)([\\\\\\\\?]?.*)$/,
loader: "file" }
4.然后在 main.js 引入并注册
import Element from 'element-ui'import 'element-ui/lib/theme-default/index.css'Vue.use(Element)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询