feat: change the schema component directory

This commit is contained in:
chenos 2022-01-13 14:53:13 +08:00
parent f8181cbf74
commit 58683a7657
56 changed files with 32 additions and 33 deletions

View File

@ -7,19 +7,12 @@ export * from './admin-layout';
export * from './antd-config-provider'; export * from './antd-config-provider';
export * from './api-client'; export * from './api-client';
export * from './auth-layout'; export * from './auth-layout';
export * from './checkbox';
export * from './collection-manager'; export * from './collection-manager';
export * from './current-user'; export * from './current-user';
export * from './document-title'; export * from './document-title';
export * from './route-switch'; export * from './route-switch';
export * from './schema-component'; export * from './schema-component';
export * from './system-settings'; export * from './system-settings';
export * from './action';
export * from './form';
export * from './form-item';
export * from './block-item';
export * from './dnd-context';
export * from './grid';
export * from './application'; export * from './application';
export * from './record-provider'; export * from './record-provider';
export * from './async-data-provider'; export * from './async-data-provider';

View File

@ -5,4 +5,4 @@ group:
path: /schema-components path: /schema-components
--- ---
# SubTable <Badge>待定</Badge> # ArrayTable <Badge>待定</Badge>

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { useDesignable } from '../schema-component'; import { useDesignable } from '../..';
export const BlockItem: React.FC<any> = (props) => { export const BlockItem: React.FC<any> = (props) => {
const { DesignableBar } = useDesignable(); const { DesignableBar } = useDesignable();

View File

@ -10,8 +10,7 @@ const schema = {
type: 'object', type: 'object',
properties: { properties: {
input: { input: {
interface: 'string', type: 'boolean',
type: 'string',
title: `编辑模式`, title: `编辑模式`,
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-component': 'Checkbox', 'x-component': 'Checkbox',
@ -25,8 +24,7 @@ const schema = {
}, },
}, },
read: { read: {
interface: 'string', type: 'boolean',
type: 'string',
title: `阅读模式`, title: `阅读模式`,
'x-read-pretty': true, 'x-read-pretty': true,
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',

View File

@ -23,7 +23,7 @@ const schema = {
type: 'object', type: 'object',
properties: { properties: {
input: { input: {
type: 'string', type: 'array',
title: `编辑模式`, title: `编辑模式`,
enum: options, enum: options,
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
@ -38,7 +38,7 @@ const schema = {
}, },
}, },
read: { read: {
type: 'string', type: 'array',
title: `阅读模式`, title: `阅读模式`,
enum: options, enum: options,
'x-read-pretty': true, 'x-read-pretty': true,

View File

@ -1,7 +1,7 @@
import { DndContext as DndKitContext, DragEndEvent } from '@dnd-kit/core'; import { DndContext as DndKitContext, DragEndEvent } from '@dnd-kit/core';
import { observer } from '@formily/react'; import { observer } from '@formily/react';
import React from 'react'; import React from 'react';
import { createDesignable, useDesignable } from '../schema-component'; import { createDesignable, useDesignable } from '../..';
const useDragEnd = () => { const useDragEnd = () => {
const { refresh } = useDesignable(); const { refresh } = useDesignable();

View File

@ -11,7 +11,7 @@ import {
useField, useField,
useFieldSchema, useFieldSchema,
} from '@formily/react'; } from '@formily/react';
import { SchemaComponent, useAttach } from '../schema-component'; import { SchemaComponent, useAttach } from '../..';
type ComposedForm = React.FC<any> & { type ComposedForm = React.FC<any> & {
__NOCOBASE_FORM?: boolean; __NOCOBASE_FORM?: boolean;

View File

@ -0,0 +1,7 @@
export * from './checkbox';
export * from './action';
export * from './form';
export * from './form-item';
export * from './block-item';
export * from './dnd-context';
export * from './grid';

View File

@ -0,0 +1,16 @@
---
nav:
path: /client
group:
path: /schema-components
---
# VoidTable <Badge>待定</Badge>
- VoidTable
- VoidTable.Column
- VoidTable.SortHandle
- TaVoidTableble.Index
- VoidTable.Pagination
- VoidTable.ActionBar
- VoidTable.Filter

View File

@ -2,3 +2,4 @@ export * from './components';
export * from './context'; export * from './context';
export * from './hooks'; export * from './hooks';
export * from './types'; export * from './types';
export * from './antd';

View File

@ -1,16 +0,0 @@
---
nav:
path: /client
group:
path: /schema-components
---
# Table <Badge>待定</Badge>
- Table
- Table.Column
- Table.SortHandle
- Table.Index
- Table.Pagination
- Table.ActionBar
- Table.Filter