ES6 中import 的时候{}的用法

xiaoxiao2021-02-28  28

module中的任何变量或函数都可以被export

1. 不带{}, 引入的是module中export default的函数或变量;

2. 带{},引入的是module中export的函数或变量;

转载请注明原文地址: https://www.6miu.com/read-2622025.html

最新回复(0)