搜索

首页  >  问答  >  正文

javascript - vue 注册 component (非 .vue单文件)能写css样式不?

这种形式的注册形式,能不能定义css的,文档和api找了几圈了没发现。

Vue.component('my-component', {
  template: '<p>A custom component!</p>'
})
阿神阿神2852 天前696

全部回复(2)我来回复

  • 我想大声告诉你

    我想大声告诉你2017-05-18 11:04:37

    不能写,因为这个没人会替你编译好

    单独.vue文件可以写是因为有loader帮你编译好

    回复
    0
  • PHPz

    PHPz2017-05-18 11:04:37

    应该不能写哦!

    回复
    0
  • 取消回复