search

Home  >  Q&A  >  body text

javascript - Everyone is using Vue for single-page projects, so can Vue be used for traditional multi-page projects?

There is no need to make the project into a single-page application for the time being, so can vue be simply used in traditional multi-page projects? Has anyone done this before? what should I be aware of?

I always thought that if I used vue as jquery, I would be called a fool. Now that I have an authoritative answer, I can use it without restraint. Thank you!

The answers below are all pretty good, but 南小鸟’s answer is like, you have a question about stocks, and Buffett comes to answer it for you. You have no resistance. It can be adopted. . .

仅有的幸福仅有的幸福2748 days ago916

reply all(9)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 13:22:31

    I think you should adopt it

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:22:31

    Of course. Before vue was so popular, vue was used as jquery in the Laravel circle 23333

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-16 13:22:31

    It works without any problems.

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:22:31

    It can be used, Vue also has server-side rendering, although it’s still a bit confusing now

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 13:22:31

    It’s ok

    module.exports = {
      entry: entries, // 这里配置多入口

    一个js文件,对应一个views(html)文件,对应一个pages(.vue),vue里可以引入多个vue组件。

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-16 13:22:31

    Yes, just import the <script> tag directly.
    Use it like jq

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 13:22:31

    Can be used as a progressive framework, you can completely use Vue as a replacement for jQuery. In the Vue officially integrated by Laravel, Vue is actually combined with the back-end template engine rather than completely separated from the front-end and back-end.

    At this time, what you actually need to provide are custom components, not complete pages, otherwise you will encounter an embarrassing problem: why do each of my pages render the same.

    reply
    0
  • PHPz

    PHPz2017-05-16 13:22:31

    I just mixed vue and ci to do two or three projects. I think, at least for now, it is not possible to replace jquery with vue. jquery's wheels are much richer than vue. I even mixed vue and jquery and there was still no problem. But I will use vue wherever vue can be used. After all, there is no need to manually update the dom

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:22:31

    The original problem has been solved, but I still have to say that if you use Vue for multi-page applications, you must use server-side rendering, otherwise there will be unresolved mustache expressions like {{..}} on the page first. , and then the result appears again.

    reply
    0
  • Cancelreply