Closed JaguarJack closed 8 months ago
<template> <div> <SchemaForm :schema="schema" footer @onFinish="onFinish" /> </div> </template> <script lang="ts" setup> const schema = { labelWidth: 150, labelAlign: 'right', size: 'default', items: [ { label: '分类', component: 'Radio', props: { mode: 'static', options: [ { name: '前端', id: 1 }, { name: '后端', id: 2 }, { name: '运维', id: 3 }, { name: '其他', id: 4 } ], labelKey: 'name', valueKey: 'name', optionType: 'button', space: 0 }, name: 'category', required: true, designKey: 'design-9djJ' }, { label: '文章', component: 'Radio', props: { mode: 'remote', placeholder: '请选择文章', labelKey: 'title', valueKey: 'id', api: { url: '/current/query/article', method: 'GET', params: { filters: { category: '{{$values.category}}' } }, dataPath: 'data' }, optionType: 'circle', autoSelectedFirst: true, direction: 'vertical', space: 0 }, name: 'article', required: true, hidden: '{{!$values.category}}', designKey: 'design-gr3L' } ] } const onFinish = (values: any) => { alert(JSON.stringify(values)) }
最新版本v3.0.10已经解决这个bug了,你看看你的是不是最新
最新的,才安装的