search

Home  >  Q&A  >  body text

javascript - Can vue registered components (not .vue single files) write css styles?

Can this form of registration form define css? I searched the documents and APIs several times but couldn't find it.

Vue.component('my-component', {
  template: '<p>A custom component!</p>'
})
阿神阿神2771 days ago655

reply all(2)I'll reply

  • 我想大声告诉你

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

    You can’t write it because no one can compile it for you

    You can write a separate .vue file because the loader helps you compile it

    reply
    0
  • PHPz

    PHPz2017-05-18 11:04:37

    Shouldn’t be able to write!

    reply
    0
  • Cancelreply