当前位置:网站首页>ES: export 的用法
ES: export 的用法
2022-08-02 16:59:00 【amadeus_liu2】
- 在lib目录下定义一个js(math.js)
export function sum(x, y) {
return x + y;
}
export var pi = 3.141593;
export default function(x) {
return Math.exp(x);
}
- 在另一个vue文件里使用
首先导入:
import myExp ,{pi} from "./lib/math";
然后使用:
console.log(myExp(pi));
边栏推荐
- 持续集成(五)Jenkins配置父子job
- nacos简单使用
- [300+ selected big factory interview questions continue to share] Big data operation and maintenance sharp knife interview questions column (10)
- navicat creates a connection 2002-can't connect to server on localhost (10061) and the mysql service has started the problem
- 数字孪生园区场景中的坐标知识
- executeScript异步执行的时候没有返回值的原因
- 阿里云关系型数据库RDS是干嘛额?
- 工信部电子五所张志强:中国数据库行业发展趋势分析
- 「全球数字经济大会」登陆 N 世界,融云提供通信云服务支持
- 创新云集技术咖,工赋汇聚实战派:2022工赋开发者峰会
猜你喜欢
随机推荐
动力电池扩产潮,宁德时代遭围剿
Informatica旗下PowerCenter的元数据库解析
工信部电子五所张志强:中国数据库行业发展趋势分析
golang源码分析(13)gorpc源码分析
golang 计算器实现
持续交付(一)JenkinsAPI接口调用
蔚来杯2022牛客暑期多校训练营5 ABCDFGHK
关于我用iVX沉浸式体验了一把0代码项目创建
C语言中的一系列操作符
oracle 和mysql 语句结果不一致问题
golang源码分析(9)调度
Gartner发布,年度Challenger!
sql2008数据库置疑的解决方法_sqlserver2008数据库可疑
【电子器件笔记7】MOS管参数和选型
用函数递归的方法解决汉诺塔问题
Continuous integration (4) Jenkins configuration alarm mechanism
navicat创建连接 2002-can‘t connect to server on localhost(10061)且mysql服务已启动问题
[300+ selected big factory interview questions continue to share] Big data operation and maintenance sharp knife interview questions column (10)
[C Language Brush Questions] Three Questions for Getting Started with Pointers | String Length, String Copy, Two Number Swap
Real-time data warehouse architecture evolution and selection