随笔分类 - vue
摘要:vue2中使用的是object.defineProperty()通过劫持对象的属性数据的变化进行监听绑定的, 但对数组的变化监听不到,所以vue2对数组的原型对象进行了重写: // src/core/observer/array.js // 获取数组的原型Array.prototype,上面有我们常
阅读全文
摘要:https://zhuanlan.zhihu.com/p/461720764
阅读全文
摘要:1.页面跳转 impor { useRouter } from 'vue-router' const router = useRouter() router.push() // 相当于 vue中this.$router.push 2.router.js中 const routes = [ { pat
阅读全文
摘要:1.vite.config.js同目录下建立三个文件夹,如下 //生产.env.productionVITE_MODE_NAME=productionVITE_APP_ID=123456VITE_AGENT_ID=123456VITE_LOGIN_TEST=falseVITE_RES_URL=./V
阅读全文
摘要:对 IE11 的支持:Vue 3 已经官方放弃对 IE11 的支持。如果仍然需要支持 IE11 或更低版本,那你仍需继续使用 Vue 2。 vite 浏览器支持:开发环境:浏览器需支持import语法。生产环境:支持<script type=“module”>标签,不支持的话可以加上官方插件@vit
阅读全文
摘要:环境:vite + vue3 + element-plus 问题:打包时出现warning: "@charset" must be the first rule in the file这样的警告,发现是完整引入element-plus import 'element-plus/dist/index.
阅读全文