mirror of https://github.com/halo-dev/halo
perf: add name attribute for formkit form component
Signed-off-by: Ryan Wang <i@ryanc.cc>pull/3445/head
parent
5a4aaaf9aa
commit
0380b2d6e4
|
@ -124,8 +124,10 @@ watch(
|
|||
>
|
||||
<FormKit
|
||||
id="attachment-group-form"
|
||||
name="attachment-group-form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
type="form"
|
||||
:actions="false"
|
||||
@submit="handleSave"
|
||||
>
|
||||
<FormKit
|
||||
|
|
|
@ -202,6 +202,7 @@ const onVisibleChange = (visible: boolean) => {
|
|||
v-if="formSchema && configMapFormData"
|
||||
id="local-policy-form"
|
||||
v-model="configMapFormData['default']"
|
||||
name="local-policy-form"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
|
|
|
@ -150,6 +150,7 @@ watchEffect(() => {
|
|||
>
|
||||
<FormKit
|
||||
:id="formId"
|
||||
:name="formId"
|
||||
type="form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
@submit="handleCreateReply"
|
||||
|
|
|
@ -175,7 +175,13 @@ watchEffect(() => {
|
|||
|
||||
<VTabs v-model:active-id="activeTab" type="outline">
|
||||
<VTabItem id="general" label="常规">
|
||||
<FormKit id="basic" :actions="false" :preserve="true" type="form">
|
||||
<FormKit
|
||||
id="basic"
|
||||
name="basic"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
>
|
||||
<FormKit
|
||||
v-model="formState.page.spec.title"
|
||||
label="标题"
|
||||
|
@ -208,7 +214,13 @@ watchEffect(() => {
|
|||
</FormKit>
|
||||
</VTabItem>
|
||||
<VTabItem id="advanced" label="高级">
|
||||
<FormKit id="advanced" :actions="false" :preserve="true" type="form">
|
||||
<FormKit
|
||||
id="advanced"
|
||||
name="advanced"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
>
|
||||
<FormKit
|
||||
v-model="formState.page.spec.allowComment"
|
||||
:options="[
|
||||
|
|
|
@ -134,6 +134,7 @@ watch(
|
|||
>
|
||||
<FormKit
|
||||
id="category-form"
|
||||
name="category-form"
|
||||
type="form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
@submit="handleSaveCategory"
|
||||
|
|
|
@ -209,7 +209,13 @@ watchEffect(() => {
|
|||
|
||||
<VTabs v-model:active-id="activeTab" type="outline">
|
||||
<VTabItem id="general" label="常规">
|
||||
<FormKit id="basic" :actions="false" :preserve="true" type="form">
|
||||
<FormKit
|
||||
id="basic"
|
||||
name="basic"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
>
|
||||
<FormKit
|
||||
v-model="formState.post.spec.title"
|
||||
label="标题"
|
||||
|
@ -256,7 +262,13 @@ watchEffect(() => {
|
|||
</FormKit>
|
||||
</VTabItem>
|
||||
<VTabItem id="advanced" label="高级">
|
||||
<FormKit id="advanced" :actions="false" :preserve="true" type="form">
|
||||
<FormKit
|
||||
id="advanced"
|
||||
name="advanced"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
>
|
||||
<FormKit
|
||||
v-model="formState.post.spec.allowComment"
|
||||
:options="[
|
||||
|
|
|
@ -146,6 +146,7 @@ watch(
|
|||
</template>
|
||||
<FormKit
|
||||
id="tag-form"
|
||||
name="tag-form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
type="form"
|
||||
@submit="handleSaveTag"
|
||||
|
|
|
@ -119,6 +119,7 @@ watch(
|
|||
>
|
||||
<FormKit
|
||||
id="menu-form"
|
||||
name="menu-form"
|
||||
:classes="{ form: 'w-full' }"
|
||||
type="form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
|
|
|
@ -306,6 +306,7 @@ watch(
|
|||
>
|
||||
<FormKit
|
||||
id="menuitem-form"
|
||||
name="menuitem-form"
|
||||
type="form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
@submit="handleSaveMenuItem"
|
||||
|
|
|
@ -59,6 +59,7 @@ watch(
|
|||
v-if="group && formSchema && configMapFormData"
|
||||
:id="group"
|
||||
v-model="configMapFormData[group]"
|
||||
:name="group"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
|
|
|
@ -68,6 +68,7 @@ await handleFetchPlugin();
|
|||
v-if="group && formSchema && configMapFormData"
|
||||
:id="group"
|
||||
v-model="configMapFormData[group]"
|
||||
:name="group"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
|
|
|
@ -125,6 +125,7 @@ const handleResetForm = () => {
|
|||
<FormKit
|
||||
v-if="formState.metadata.annotations"
|
||||
id="role-form"
|
||||
name="role-form"
|
||||
:actions="false"
|
||||
type="form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
|
|
|
@ -39,6 +39,7 @@ await handleFetchConfigMap();
|
|||
v-if="group && formSchema && configMapFormData"
|
||||
:id="group"
|
||||
v-model="configMapFormData[group]"
|
||||
:name="group"
|
||||
:actions="false"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
|
|
|
@ -58,6 +58,7 @@ onMounted(() => {
|
|||
<FormKit
|
||||
id="login-form"
|
||||
v-model="loginForm"
|
||||
name="login-form"
|
||||
:actions="false"
|
||||
type="form"
|
||||
:config="{ animation: 'none' }"
|
||||
|
|
|
@ -36,7 +36,7 @@ onMounted(() => {
|
|||
<VModal v-model:visible="createVisible" :width="720" title="创建个人令牌">
|
||||
<VTabs v-model:active-id="createActiveId" type="outline">
|
||||
<VTabItem id="general" label="基础信息">
|
||||
<FormKit id="role-form" :actions="false" type="form">
|
||||
<FormKit id="role-form" name="role-form" :actions="false" type="form">
|
||||
<FormKit label="名称" type="text" validation="required"></FormKit>
|
||||
<FormKit label="失效日期" type="text" validation="required"></FormKit>
|
||||
</FormKit>
|
||||
|
|
|
@ -198,6 +198,7 @@ const handleRawModeChange = () => {
|
|||
<div v-show="!rawMode">
|
||||
<FormKit
|
||||
id="user-form"
|
||||
name="user-form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
type="form"
|
||||
@submit="handleCreateUser"
|
||||
|
|
|
@ -108,6 +108,7 @@ const handleChangePassword = async () => {
|
|||
<FormKit
|
||||
id="password-form"
|
||||
v-model="formState"
|
||||
name="password-form"
|
||||
:actions="false"
|
||||
type="form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
|
|
Loading…
Reference in New Issue