fix(form): 修复表单示例中 switch 组件无法切换的问题 (#7636) (#7763)

This commit is contained in:
墨苒孤
2026-04-02 18:18:56 +08:00
committed by allen
parent 89349f8d91
commit c7b1bb3492
2 changed files with 5 additions and 2 deletions

View File

@@ -94,7 +94,7 @@ async function handleMergeSubmit() {
<Card title="基础示例"> <Card title="基础示例">
<template #extra> <template #extra>
<Switch <Switch
v-model="needMerge" v-model:checked="needMerge"
checked-children="开启字段合并" checked-children="开启字段合并"
class="mr-4" class="mr-4"
un-checked-children="关闭字段合并" un-checked-children="关闭字段合并"

View File

@@ -132,7 +132,10 @@ async function fillPartialData() {
<Card title="功能测试"> <Card title="功能测试">
<template #extra> <template #extra>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<Switch v-model="scrollEnabled" @change="toggleScrollToError" /> <Switch
v-model:checked="scrollEnabled"
@change="toggleScrollToError"
/>
<span>启用滚动到错误字段</span> <span>启用滚动到错误字段</span>
</div> </div>
</template> </template>