types(VForm): Adding VForm types
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -3,14 +3,14 @@ import { ref, onMounted, unref } from 'vue'
|
||||
import { ElConfigProvider } from 'element-plus'
|
||||
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
|
||||
// import en from 'element-plus/lib/locale/lang/en'
|
||||
import { BfFrom, BfFormExpose } from '@/components/Form'
|
||||
const formRef = ref<ComponentRef<typeof BfFrom> & BfFormExpose>()
|
||||
import { VFrom, VFormExpose } from '@/components/Form'
|
||||
const formRef = ref<ComponentRef<typeof VFrom> & VFormExpose>()
|
||||
|
||||
onMounted(() => {
|
||||
const form = unref(formRef.value)
|
||||
console.log(form?.$el)
|
||||
|
||||
const schema: BfFormSchema = [
|
||||
const schema: VFormSchema = [
|
||||
{
|
||||
field: '1',
|
||||
colProps: {}
|
||||
@@ -22,8 +22,8 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="zhCn">
|
||||
<BfFrom ref="formRef" />
|
||||
<Component :is="BfFrom" />
|
||||
<VFrom ref="formRef" />
|
||||
<Component :is="VFrom" />
|
||||
<!-- <RouterView class="app" /> -->
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user