types(BfForm): Adding BfForm types

This commit is contained in:
kailong321200875
2021-12-12 09:34:02 +08:00
parent 8e036f54b5
commit 58cb24d9f8
6 changed files with 176 additions and 25 deletions

View File

@@ -4,12 +4,10 @@ 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<InstanceType<typeof BfFrom> & BfFormExpose>()
const formRef = ref<ComponentRef<typeof BfFrom> & BfFormExpose>()
onMounted(() => {
const form = unref(formRef.value)
console.log(form?.count)
form?.sayHello()
console.log(form?.$el)
const schema: BfFormSchema = [