import 引入方法时报错:TypeError: Object(...) is not a function的解决方法
报错:
报错时的引用写法为:
import getValue from './getValue';
不报错的写法为:
import {getValue } from './getValue';
getValue.js文件中的内容为:
export const getValue = (name,url) =>{
return ***;
}
报错:
报错时的引用写法为:
import getValue from './getValue';
不报错的写法为:
import {getValue } from './getValue';
getValue.js文件中的内容为:
export const getValue = (name,url) =>{
return ***;
}