Skip to content

挂载表单组件

如何导入 formCreate

全局挂载

js
app.use(formCreate)

局部挂载

js
//Vue 组件
{
    components: {
        formCreate: formCreate.$form()
    }
}

在 setup 中使用

vue
<template>
    <FormCreate :rule="rule"></FormCreate>
</template>
<script setup>
//导入 form-create
import formCreate from "@form-create/element-ui";
//获取 formCreate 组件
const FormCreate = formCreate.$form();
</script>