diff --git a/packages/client/src/schemas/tabs/index.tsx b/packages/client/src/schemas/tabs/index.tsx
index 3cdfc50ef..f9db03326 100644
--- a/packages/client/src/schemas/tabs/index.tsx
+++ b/packages/client/src/schemas/tabs/index.tsx
@@ -45,8 +45,15 @@ const useTabs = ({ singleton }) => {
export const Tabs: any = observer((props: any) => {
const { singleton, ...others } = props;
- const { schema, DesignableBar, appendChild, root, remove, insertAfter } =
- useDesignable();
+ const {
+ designable,
+ schema,
+ DesignableBar,
+ appendChild,
+ root,
+ remove,
+ insertAfter,
+ } = useDesignable();
const tabs = useTabs({ singleton });
const [dragOverlayContent, setDragOverlayContent] = useState('');
@@ -97,65 +104,67 @@ export const Tabs: any = observer((props: any) => {
{...others}
className={cls({ singleton })}
tabBarExtraContent={
- }
- onClick={async () => {
- const values = await FormDialog('新增标签页', () => {
- return (
-
- }
+ onClick={async () => {
+ const values = await FormDialog('新增标签页', () => {
+ return (
+
+
-
- );
- }).open({
- initialValues: {
- title: schema['title'],
- icon: schema['x-component-props']?.['icon'],
- },
- });
- const data = appendChild({
- type: 'void',
- name: uid(),
- title: values.title,
- 'x-component': 'Tabs.TabPane',
- 'x-designable-bar': 'Tabs.TabPane.DesignableBar',
- 'x-component-props': {
- icon: values.icon,
- },
- properties: {
- [uid()]: {
- type: 'void',
- 'x-component': 'Grid',
- 'x-component-props': {
- addNewComponent: 'AddNew.PaneItem',
+ }}
+ />
+
+ );
+ }).open({
+ initialValues: {
+ title: schema['title'],
+ icon: schema['x-component-props']?.['icon'],
+ },
+ });
+ const data = appendChild({
+ type: 'void',
+ name: uid(),
+ title: values.title,
+ 'x-component': 'Tabs.TabPane',
+ 'x-designable-bar': 'Tabs.TabPane.DesignableBar',
+ 'x-component-props': {
+ icon: values.icon,
+ },
+ properties: {
+ [uid()]: {
+ type: 'void',
+ 'x-component': 'Grid',
+ 'x-component-props': {
+ addNewComponent: 'AddNew.PaneItem',
+ },
},
},
- },
- });
- await createSchema(data);
- }}
- >
- 新增标签页
-
+ });
+ await createSchema(data);
+ }}
+ >
+ 新增标签页
+
+ )
}
>
{tabs.map(({ props, schema, name }, key) => (