require与import 的区别

1.import 是预编译加载,意思是在被编译的时候这个文件就会加载出来,就会被写入到内存当中,而require不会

2.require 在从上到下执行的时候,才去加载

猜你喜欢

转载自blog.csdn.net/weixin_43906597/article/details/112561468
今日推荐