📃
Vucript Documentation
  • Vucript
  • Setup
  • Usage
  • Language Reference
    • Reactive Values & Functions
    • Computed
    • Lifecycle Methods
    • Import Components
    • Prop
    • Using Ohter Libraries
Powered by GitBook
On this page

Was this helpful?

  1. Language Reference

Import Components

Import components in vucript is very simple.

importComponent(filepath: string, name);

Example

importComponent('@/components/HelloWorld.vue','HelloWorld');

This code is compiled to

import { defineComponent } from "vue";
import HelloWorld from "@/components/HelloWorld.vue";
export default defineComponent({
  components: { HelloWorld },
  setup() {
    return {};
  },
});
PreviousLifecycle MethodsNextProp

Last updated 4 years ago

Was this helpful?