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="基础示例">
<template #extra>
<Switch
v-model="needMerge"
v-model:checked="needMerge"
checked-children="开启字段合并"
class="mr-4"
un-checked-children="关闭字段合并"

View File

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