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