2022年7月6日

摘要: 1.实例化router , export default router 2.App.vue 中将router实例挂载进来 3.在App.vue中用路径名router-link>链接 再用router-view占位 4.在路由配置文件中配置routes:{path:"",component:},先导入 阅读全文
posted @ 2022-07-06 00:30 废青小1 阅读(1302) 评论(0) 推荐(0) 编辑

2022年7月5日

摘要: npm init -y npm i jquery -s npm install webpack@5.42.1 webpack-cli@4.7.2 -D index.js下 //1.使用 ES6导入jQuery import $ from 'jquery' $(function () { //3.实现 阅读全文
posted @ 2022-07-05 10:49 废青小1 阅读(32) 评论(0) 推荐(0) 编辑

2022年6月24日

摘要: var num=10; //作用域链:内部函数访问外部函数的变量,采取的是链式查找的方式来决定取哪个值。 function fn(){ //外部函数 var num=20; function fun(){//内部函数 console.log(num) } fun(); } fn(); 2022-06 阅读全文
posted @ 2022-06-24 21:48 废青小1 阅读(12) 评论(0) 推荐(0) 编辑
 
摘要: 正确写法: function fn(){ console.log(11) } fn(); 阅读全文
posted @ 2022-06-24 21:46 废青小1 阅读(38) 评论(0) 推荐(0) 编辑