当然按照步骤的引入的策略几乎和对应的react的逻辑是一样的;这一次需要加入一些新的东西;比如对应webpack5是否已经足够稳定去做一些事情了 ;typeScript是不是添加了代码量级;新的VUE的机制都需要哪些的新的耦合逻辑;

    1. <template>
    2. <div class="demo"></div>
    3. </template>
    4. <script lang="ts">
    5. import ThreeJs from "./index";
    6. import { defineComponent, onMounted } from "vue";
    7. export default defineComponent({
    8. name: "Demo01",
    9. props: {},
    10. setup() {
    11. onMounted(() => {
    12. new ThreeJs();
    13. });
    14. },
    15. });
    16. </script>
    17. <style scoped lang="scss"></style>