已更新至前端模块化ES6
This commit is contained in:
parent
bb364d24c1
commit
56ea87a4e1
|
@ -11,3 +11,8 @@ function tj(n1,n2){
|
|||
export{
|
||||
pd,doing,tj
|
||||
}
|
||||
|
||||
let names=function(){
|
||||
return "你的名字是linda";
|
||||
}
|
||||
export default names
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import { pd,doing,tj } from "./Select_one.js";
|
||||
console.log(doing('张三','44'));
|
||||
console.log(tj(20,10));
|
||||
import * as info from "./Select_one.js";
|
||||
console.log(info.doing('张三','44'));
|
||||
console.log(info.tj(20,10));
|
||||
import { content } from "./Use_one.js";
|
||||
console.log(content);
|
||||
import { fun } from "./Use_one.js";
|
||||
console.log(fun());
|
||||
import fun_name from "./Select_one.js";
|
||||
console.log(fun_name());
|
|
@ -1,4 +1,4 @@
|
|||
import { pd,doing } from "./Select_one.js";
|
||||
import * as dos from "./Select_one.js";
|
||||
function doings(pd){
|
||||
if (pd == true) {
|
||||
console.log(`${name}我在做作业`);
|
||||
|
@ -6,8 +6,8 @@ function doings(pd){
|
|||
console.log('你好呀');
|
||||
}
|
||||
}
|
||||
console.log(doing("小小", "22"));
|
||||
console.log(pd);
|
||||
console.log(dos.doing("小小", "22"));
|
||||
console.log(dos.pd);
|
||||
export let content="你好啊,webpack"
|
||||
export function fun() {
|
||||
let name="张三"
|
||||
|
|
Loading…
Reference in New Issue