Vue中 export 和import用法
一,import
import HelloWorld from './components/HelloWorld.vue'
import TheWelcome from './components/TheWelcome.vue'
import * as ss from './assets/export'
import {bb} from './assets/export'
二,export
export const bb='11'; 导出一个变量
导出一个函数
export const cc=function(){
return 8;
}
另外一种写法
const bb='11';
const cc=function(){
return ‘www.96net.com.cn’;
}
export {bb,cc}