当前位置:网站首页>export使用
export使用
2022-08-05 05:29:00 【weixin_43923808】
建一个test.js
function f1 (){
console.log("module - 1 : functino 1")
}
let b = {
name:"test_obj"
}
let str = "hell绿绿绿"
export {
f1,b,str
}使用
import * as m1 from "./test.js"
console.log(m1)结果:

如果要调用f1方法,
m1.f1()边栏推荐
猜你喜欢
随机推荐
The method of using ROS1 bag under ROS2
The future of cloud gaming
The hook of the operation of the selenium module
Next-Generation Parsing Technology - Cloud Parsing
System basics - study notes (some command records)
Matplotlib plotting notes
document.querySelector()方法
link 和@improt的区别
reduce()方法的学习和整理
【考研结束第一天,过于空虚,想对自己进行总结一下】
Matplotlib绘图笔记
vs2017关于函数命名方面的注意事项
H5开发调试-Fiddler手机抓包
前置++和后置++的区别
Vim tutorial: vimtutor
Drools规则引擎快速入门(一)
VS Code私有服务器部署(私有化)
D41_buffer pool
LeetCode practice and self-comprehension record (1)
H5 的浏览器存储









