generated from template/vite-react-template
feat: update new feature temp for panel
This commit is contained in:
39
template/index.ts
Normal file
39
template/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { app, page, load } from './app';
|
||||
import './ai-app/main';
|
||||
import './tailwind.css';
|
||||
import './workspace/entry';
|
||||
|
||||
page.addPage('/', 'workspace');
|
||||
|
||||
const runLoad = () => {
|
||||
load.load(
|
||||
() => {
|
||||
// @TODO 这里需要优化,不能每次都去调用
|
||||
page.subscribe(
|
||||
'workspace',
|
||||
async () => {
|
||||
await app.call({
|
||||
path: 'workspace',
|
||||
key: 'enter',
|
||||
});
|
||||
setTimeout(() => {
|
||||
app.call({
|
||||
path: 'ai',
|
||||
key: 'render',
|
||||
});
|
||||
}, 1000);
|
||||
},
|
||||
{ runImmediately: true },
|
||||
);
|
||||
},
|
||||
{
|
||||
key: 'workspaceRoute',
|
||||
isReRun: true,
|
||||
checkSuccess: () => {
|
||||
return page.pageModule.has('workspace');
|
||||
},
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
// runLoad()
|
||||
Reference in New Issue
Block a user