weex导入css文件:
1.webpack.config.js中
loaders:[
...
,  {
    test: /\.css$/,
    loader: 'babel',
    exclude: /node_modules/
  }
]

2.foo.vue中
<button class='test' style='font-size:6em'>aaaaaaaaaaa</button>

<style>
  @import "../assets/css1.css";
</style>

http://www.jianshu.com/p/5ba253651c3b
npm install style-loader --save-dev
npm install css-loader --save-dev
npm install file-loader --save-dev
在 webpack.config.js 中的 loaders 数组加入以下配置
,
{
  test: /\.css$/,
  loader: "style!css"
},
{
  test: /\.(eot|woff|woff2|ttf)([\?]?.*)$/,
  loader: "file"
}

app.js中

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'

import foo from './src/foo.vue'
foo.el = '#root'
let vue = new Vue(foo);
vue.use(ElementUI)
//export default new Vue(foo);
export default vue;

 

相关文章:

  • 2021-04-03
  • 2021-07-26
  • 2022-01-27
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-01-13
相关资源
相似解决方案