Skip to content

Commit

Permalink
feat: Add form demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong502431556 committed Jan 27, 2022
1 parent 543156f commit e6f9580
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.ts
Expand Up @@ -200,7 +200,7 @@ export default {
formDes:
'The secondary encapsulation of form components based on ElementPlus realizes data-driven and supports all Form parameters',
example: 'example',
operate: 'Operate',
operate: 'operate',
change: 'Change',
restore: 'Restore',
disabled: 'Disabled',
Expand Down
4 changes: 2 additions & 2 deletions src/views/Components/Form/RefForm.vue
Expand Up @@ -214,7 +214,7 @@ const verifyReset = () => {
</script>

<template>
<ContentWrap :title="`refForm${t('formDemo.operate')}`">
<ContentWrap :title="`RefForm ${t('formDemo.operate')}`">
<ElButton @click="changeLabelWidth(150)">{{ t('formDemo.change') }} labelWidth</ElButton>
<ElButton @click="changeLabelWidth('auto')">{{ t('formDemo.restore') }} labelWidth</ElButton>

Expand Down Expand Up @@ -243,7 +243,7 @@ const verifyReset = () => {
<ElButton @click="formValidation"> {{ t('formDemo.formValidation') }} </ElButton>
<ElButton @click="verifyReset"> {{ t('formDemo.verifyReset') }} </ElButton>
</ContentWrap>
<ContentWrap :title="`refForm${t('formDemo.example')}`">
<ContentWrap :title="`RefForm ${t('formDemo.example')}`">
<Form :schema="schema" ref="formRef" />
</ContentWrap>
</template>
4 changes: 2 additions & 2 deletions src/views/Components/Form/UseFormDemo.vue
Expand Up @@ -221,7 +221,7 @@ const verifyReset = () => {
</script>

<template>
<ContentWrap :title="`useForm${t('formDemo.operate')}`">
<ContentWrap :title="`UseForm ${t('formDemo.operate')}`">
<ElButton @click="changeLabelWidth(150)">{{ t('formDemo.change') }} labelWidth</ElButton>
<ElButton @click="changeLabelWidth('auto')">{{ t('formDemo.restore') }} labelWidth</ElButton>

Expand Down Expand Up @@ -250,7 +250,7 @@ const verifyReset = () => {
<ElButton @click="formValidation"> {{ t('formDemo.formValidation') }} </ElButton>
<ElButton @click="verifyReset"> {{ t('formDemo.verifyReset') }} </ElButton>
</ContentWrap>
<ContentWrap :title="`useForm${t('formDemo.example')}`">
<ContentWrap :title="`UseForm ${t('formDemo.example')}`">
<Form :schema="schema" @register="register" />
</ContentWrap>
</template>

0 comments on commit e6f9580

Please sign in to comment.