• 学习 vite + vue3 + pinia + ts(-)项目创建vs一些改变


    一、创建项目

    Vite 需要 Node.js 版本 >= 12.0.0

    npm init vite@latest 

    yarn create vite

    // 或者

    # npm 6.x

    npm init vite@latest 项目名称 --template vue

    # npm 7+, 需要额外的双横线:

    npm init vite@latest 项目名称 -- --template vue

    # yarn

    yarn create vite 项目名称 --template vue

    以上命令,根据自己需要取一行即可。我用的是yarn create vite,没有yarn的可以安装一下

    npm install -g yarn 

    二、 一些改变

    1. v-if与v-for优先级

    2.xx 版本 v-for > v-if

    3.xx 版本 v-if > v-for

    2.