mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
54 lines
1.1 KiB
TypeScript
54 lines
1.1 KiB
TypeScript
/**
|
|
* title: Tabs
|
|
*/
|
|
import { ISchema } from '@formily/react';
|
|
import { SchemaComponent, SchemaComponentProvider, Tabs } from '@nocobase/client';
|
|
import React from 'react';
|
|
|
|
const schema: ISchema = {
|
|
type: 'object',
|
|
properties: {
|
|
tabs1: {
|
|
type: 'void',
|
|
'x-component': 'Tabs',
|
|
'x-component-props': {},
|
|
properties: {
|
|
tab1: {
|
|
type: 'void',
|
|
title: 'Tab1',
|
|
'x-component': 'Tabs.TabPane',
|
|
'x-component-props': {
|
|
tab: 'Tab1',
|
|
},
|
|
properties: {
|
|
aaa: {
|
|
'x-content': 'Hello1',
|
|
},
|
|
},
|
|
},
|
|
tab2: {
|
|
type: 'void',
|
|
title: 'Tab2',
|
|
'x-component': 'Tabs.TabPane',
|
|
'x-component-props': {
|
|
tab: 'Tab2',
|
|
},
|
|
properties: {
|
|
aaa: {
|
|
'x-content': 'Hello2',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default () => {
|
|
return (
|
|
<SchemaComponentProvider components={{ Tabs }}>
|
|
<SchemaComponent schema={schema} />
|
|
</SchemaComponentProvider>
|
|
);
|
|
};
|