es6模块定义与引入
定义
export default {
uname: "li",
hello: function () {
console.log("hello");
}
}
引入
<body>
<script type="module">
import * as m from "./app.js"
import m from "./app.js"
console.log(m);
</script>
<div> hello world</div>
</body>

浙公网安备 33010602011771号