- 博客(31)
- 问答 (1)
- 收藏
- 关注
原创 js模块化:修改导入模块的内容,会有影响吗?
以webpack处理commonjs模块化为例,webpack将已加载过的模块对象存放在__webpack_module_cache__中。键名可以理解为模块名,键值就是对应的模块对象。未加载的模块存放在__webpack_modules__中。每个模块代码其实是在一个函数里,webpack向该函数作用域内注入了module、module.exports、require这些对象,以供模块导入导出。导出的内容会挂载到对应的module.exports里。导入就是导入的module.exports对象。
2024-05-02 17:11:11
1104
1
原创 vitepress:编写vite插件实现vitepress自动sidebar
vitepress:编写vite插件实现vitepress自动sidebar
2023-09-04 21:32:30
1660
4
转载 js:Number.prototype.toString() 方法的注意点
1.toString() 为什么会报错?(1).toString() 为什么可以正常输出?1..toString() 输出什么?
2022-12-11 15:22:46
165
原创 vue2:关于props和emit
在子组件通过$emit传给父组件的数变量,事实上也是指向同一内存地址。在父组件中直接修改子组件传递过来的变量,子组件中对应的变量值也会发生改变。
2022-12-06 17:55:06
832
原创 nuxt:如何在nuxt项目的js文件里获取当前应用的store或者router?
如何在nuxt项目的js文件里获取当前应用的store或者router?
2022-10-16 17:47:11
2135
转载 vue: this.$router.currentRoute 和this.$route有区别吗?
this.$router.currentRoute === this.$route
2022-09-28 09:11:04
790
转载 npm i 报错 The operation was rejected by your operating system
npm ERR! If you believe this might be a permissions issue, please double-check thenpm ERR! permissions of the file and its containing directories, or try runningnpm ERR! the command again as root/Administrator (though this is not recommended).
2022-09-24 10:13:22
4246
转载 Object.prototype.toString()如何判断数据类型及注意点
Object.prototype.toString()如何判断数据类型及注意点
2022-08-07 16:58:26
279
原创 git:git push时error: src refspec main does not match any error报错解决
git push时error: src refspec main does not match any error报错解决
2022-07-26 16:04:39
3804
转载 uni-app:关于其他vue的web组件库、小程序组件库是否能在uni-app中使用的问题,uni-app的ui库、ui框架、ui组件
关于uni-app的ui库、ui框架、ui组件
2022-07-26 10:44:53
320
空空如也
vue响应式原理和双向绑定原理是不是一个东西?
2022-08-02
TA创建的收藏夹 TA关注的收藏夹
TA关注的人