gohttpdUi/src/App.vue

30 lines
723 B
Vue
Raw Normal View History

2021-12-08 10:47:33 +08:00
<script setup lang="ts">
2021-12-11 20:50:05 +08:00
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'
2021-12-13 16:55:58 +08:00
import { VFrom, VFormExpose } from '@/components/Form'
const formRef = ref<ComponentRef<typeof VFrom> & VFormExpose>()
2021-12-11 20:50:05 +08:00
onMounted(() => {
const form = unref(formRef.value)
console.log(form?.$el)
2021-12-13 16:55:58 +08:00
const schema: VFormSchema = [
2021-12-11 20:50:05 +08:00
{
field: '1',
colProps: {}
}
]
console.log(schema)
})
2021-12-08 10:47:33 +08:00
</script>
<template>
<ElConfigProvider :locale="zhCn">
2021-12-13 16:55:58 +08:00
<VFrom ref="formRef" />
<Component :is="VFrom" />
2021-12-11 20:50:05 +08:00
<!-- <RouterView class="app" /> -->
</ElConfigProvider>
</template>