feat: 暂存, 添加ui2
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { Container } from '@abearxiong/container';
|
||||
import { Container, ContainerEdit } from '@abearxiong/container';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useParams } from 'react-router';
|
||||
import { query } from '@/modules';
|
||||
import { message } from 'antd';
|
||||
import '@abearxiong/container/dist/container.css';
|
||||
|
||||
export const Deck = () => {
|
||||
const params = useParams<{ id: string }>();
|
||||
@@ -78,10 +79,11 @@ export const Deck = () => {
|
||||
};
|
||||
const init = async (data: any[]) => {
|
||||
// console.log('data', data, ref.current);
|
||||
const container = new Container({
|
||||
const container = new ContainerEdit({
|
||||
root: ref.current!,
|
||||
data: data as any,
|
||||
showChild: true,
|
||||
// edit: false,
|
||||
});
|
||||
container.render(id!);
|
||||
containerRef.current = container;
|
||||
|
||||
@@ -124,9 +124,15 @@ export const List = () => {
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
navicate('/container/preview/' + record.id);
|
||||
navicate('/panel/flow/' + record.id);
|
||||
}}>
|
||||
Preview
|
||||
Flow
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
navicate('/panel/deck/' + record.id);
|
||||
}}>
|
||||
Deck
|
||||
</Button>
|
||||
<Button
|
||||
danger
|
||||
|
||||
@@ -2,12 +2,12 @@ import { useParams } from 'react-router';
|
||||
import Flow from './Flow';
|
||||
import { usePanelStore } from '../store';
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { DialogModal } from '@kevisual/ui';
|
||||
import '@kevisual/ui';
|
||||
export const App = () => {
|
||||
const param = useParams();
|
||||
const id = param.id;
|
||||
|
||||
const panel = usePanelStore(
|
||||
useShallow((state) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user