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