可以同时用,但导出两遍真的没必要,引入可以像楼上一样。
export default 和export const 同时导出算是规范的写法么
代码中export const 导出的内容export default 再导出一遍,这种写法规范么?
export const a=0;
export const b=0;
export default {
a,
b
};
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
代码中export const 导出的内容export default 再导出一遍,这种写法规范么?
export const a=0;
export const b=0;
export default {
a,
b
};