fix: page

This commit is contained in:
2024-12-08 12:54:57 +08:00
parent a4f03c76eb
commit b5dde4e823
4 changed files with 114 additions and 9 deletions

View File

@@ -4,9 +4,15 @@ import { Page } from '@kevisual/store/page';
const page = new Page({
isListen: true,
});
page.addPage('/', 'home');
page.addPage('/:id', 'user');
page.subscribe(
'home',
(params, state) => {
console.log('home', params, 'state', state);
return;
},
);
page.subscribe('user', (params, state) => {
console.log('user', params, 'state', state);
return;