diff --git "a/\344\270\245\347\216\211\345\267\235/20230215-\346\250\241\345\235\227.md" "b/\344\270\245\347\216\211\345\267\235/20230215-\346\250\241\345\235\227.md" index e95570c8be961d0b0c1b8b5fbe2a73cadfdad976..da460ec14cdf025525aed21da69287c5c9cc4b37 100644 --- "a/\344\270\245\347\216\211\345\267\235/20230215-\346\250\241\345\235\227.md" +++ "b/\344\270\245\347\216\211\345\267\235/20230215-\346\250\241\345\235\227.md" @@ -24,7 +24,7 @@ 使用require()方法加载模块时,会执行模块中的代码 -![](../imgs/20220223113857.png) +![](./imgs/20220223113857.png) ``` hi.js中的代码是 @@ -39,20 +39,20 @@ console.log("你好,世界"); 例子: -![](../imgs/20220223114544.png) +![](./imgs/20220223114544.png) ### module.exports对象 **向外共享模块作用域中的成员** 使用module.exports对象,将模块内的成员共享出去。 -![](../imgs/20220223115149.png) +![](./imgs/20220223115149.png) 使用require()方法导入模块时,导入结果永远以**module.exports**指向的对象为准。 多对象共享 -![](../imgs/20220223115447.png) +![](./imgs/20220223115447.png) **module.exports与exports的区别** @@ -62,19 +62,19 @@ exports的作用与module.exports一样,但是require()方法永远以**module 当同时出现module.exports和exports时,exports不会被向外共享。 -![](../imgs/20220223131039.png) +![](./imgs/20220223131039.png) module.exports和exports指向同一个对象时两者的属性都可以向外共享 -![](../imgs/20220223132125.png) +![](./imgs/20220223132125.png) **指向对象** -![](../imgs/20220223133045.png) +![](./imgs/20220223133045.png) -![](../imgs/20220223132923.png) +![](./imgs/20220223132923.png) diff --git a/imgs/20220223113857.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223113857.png" similarity index 100% rename from imgs/20220223113857.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223113857.png" diff --git a/imgs/20220223114544.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223114544.png" similarity index 100% rename from imgs/20220223114544.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223114544.png" diff --git a/imgs/20220223115149.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223115149.png" similarity index 100% rename from imgs/20220223115149.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223115149.png" diff --git a/imgs/20220223115447.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223115447.png" similarity index 100% rename from imgs/20220223115447.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223115447.png" diff --git a/imgs/20220223131039.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223131039.png" similarity index 100% rename from imgs/20220223131039.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223131039.png" diff --git a/imgs/20220223132125.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223132125.png" similarity index 100% rename from imgs/20220223132125.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223132125.png" diff --git a/imgs/20220223132923.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223132923.png" similarity index 100% rename from imgs/20220223132923.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223132923.png" diff --git a/imgs/20220223133045.png "b/\344\270\245\347\216\211\345\267\235/imgs/20220223133045.png" similarity index 100% rename from imgs/20220223133045.png rename to "\344\270\245\347\216\211\345\267\235/imgs/20220223133045.png"