首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
export
export
mac
2024-03-18
26
export default :
可以用任意变量接收一个模块(js页面)只能有一个成员。 export default {name: ‘zs’}
export
需要解构接收指定变量 指定变量{xx} (按需导出)一个模块(js页面)可以有多个成员。export var age= 18
export 和export default 是es6语法,用import xx from ‘xx’
modult.export {}
是node.js语法,用const xx = require(‘xx’)
转载请注明原文地址: https://mac.8miu.com/read-486558.html
最新回复
(
0
)