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

pull/340/MERGE
墨苒孤 2026-04-02 18:18:56 +08:00 committed by GitHub
parent c775d7ed80
commit 128a131797
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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>