Skip to content

Commit

Permalink
chore(playground): 修复 dev 脚本命令
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxinssfd committed Feb 29, 2024
1 parent 6745f8b commit da2be1e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 176 deletions.
1 change: 0 additions & 1 deletion internal/playground/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { RouterProvider } from 'react-router-dom';
import ReactDOM from 'react-dom/client';
import '@pkg/components/index.scss';
import { router } from './router';
import React from 'react';
import './index.css';
Expand Down
5 changes: 5 additions & 0 deletions internal/playground/src/layouts/App.layout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ $h: 60px;
line-height: $h;
background-color: var(--aside-bg-color);
}
.body {
flex: 1;
display: flex;
}
.aside {
$w: 230px;

Expand Down Expand Up @@ -47,5 +51,6 @@ $h: 60px;
overflow-y: auto;
padding: 20px;
height: 100%;
flex: 1;
box-sizing: border-box;
}
3 changes: 1 addition & 2 deletions internal/playground/src/layouts/App.layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export function AppLayout(): JSX.Element {
<option value="dark">dark</option>
</select>
</header>

<section>
<section className={styles['body']}>
<aside className={styles['aside']}>
<ul>
{baseRouter.map((item, index) => (
Expand Down
177 changes: 4 additions & 173 deletions internal/playground/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,179 +7,10 @@ import App from './app/App';

export const baseRouter = [
{
element: getDemos(import.meta.glob('~/transition/demo/*.tsx')),
name: 'transition 动画',
path: '/transition',
},
{
element: getDemos(import.meta.glob('~/transition-group/demo/*.tsx')),
name: 'transition-group 动画组',
path: '/transition-group',
},
{
element: getDemos(import.meta.glob('~/loading/demo/*.tsx')),
name: 'loading 加载中',
path: '/loading',
},
{
element: getDemos(import.meta.glob('~/button/demo/*.tsx')),
name: 'button 按钮',
path: '/button',
},
{
element: getDemos(import.meta.glob('~/layouts/demo/*.tsx')),
name: 'layout 布局',
path: '/layout',
},
{
element: getDemos(import.meta.glob('~/divider/demo/*.tsx')),
name: 'divider 分割线',
path: '/divider',
},
{
element: getDemos(import.meta.glob('~/dialog/demo/*.tsx')),
name: 'dialog 弹窗',
path: '/dialog',
},
{
element: getDemos(import.meta.glob('~/icon/demo/*.tsx')),
name: 'icon 图标',
path: '/icon',
},
{
element: getDemos(import.meta.glob('~/space/demo/*.tsx')),
name: 'space 间距',
path: '/space',
},
{
element: getDemos(import.meta.glob('~/resizer/demo/*.tsx')),
name: 'resizer 修改宽高',
path: '/resizer',
},
{
element: getDemos(import.meta.glob('~/drawer/demo/*.tsx')),
name: 'drawer 抽屉',
path: '/drawer',
},
{
element: getDemos(import.meta.glob('~/message/demo/*.tsx')),
name: 'message 信息',
path: '/message',
},
{
element: getDemos(import.meta.glob('~/word-balloon/demo/*.tsx')),
name: 'word-balloon 文字气泡',
path: '/word-balloon',
},
{
element: getDemos(import.meta.glob('~/popover/demo/*.tsx')),
name: 'popover 弹出层',
path: '/popover',
},
{
element: getDemos(import.meta.glob('~/tooltip/demo/*.tsx')),
name: 'tooltip 文字提示',
path: '/tooltip',
},
{
element: getDemos(import.meta.glob('~/pop-confirm/demo/*.tsx')),
name: 'pop-confirm 弹出确认框',
path: '/pop-confirm',
},
{
element: getDemos(import.meta.glob('~/collapse-transition/demo/*.tsx')),
name: 'collapse-transition 折叠动画',
path: '/collapse-transition',
},
{
element: getDemos(import.meta.glob('~/collapse/demo/*.tsx')),
name: 'collapse 折叠面板',
path: '/collapse',
},
{
element: getDemos(import.meta.glob('~/option/demo/*.tsx')),
name: 'option 选项',
path: '/option',
},
{
element: getDemos(import.meta.glob('~/dropdown/demo/*.tsx')),
name: 'dropdown 下拉菜单',
path: '/dropdown',
},
{
element: getDemos(import.meta.glob('~/number-transition/demo/*.tsx')),
name: 'number-transition 数值动画',
path: '/number-transition',
},
{
element: getDemos(import.meta.glob('~/alert/demo/*.tsx')),
name: 'alert 提示',
path: '/alert',
},
{
element: getDemos(import.meta.glob('~/switch/demo/*.tsx')),
name: 'switch 开关',
path: '/switch',
},
{
element: getDemos(import.meta.glob('~/tag/demo/*.tsx')),
name: 'tag 标签',
path: '/tag',
},
{
element: getDemos(import.meta.glob('~/select/demo/*.tsx')),
name: 'select 选择器',
path: '/select',
},
{
element: getDemos(import.meta.glob('~/input/demo/*.tsx')),
name: 'input 输入框',
path: '/input',
},
{
element: getDemos(import.meta.glob('~/image/demo/*.tsx')),
name: 'image 图像',
path: '/image',
},
{
element: getDemos(import.meta.glob('~/slider/demo/*.tsx')),
name: 'slider 滑块',
path: '/slider',
},
{
element: getDemos(import.meta.glob('~/empty/demo/*.tsx')),
name: 'empty 空状态',
path: '/empty',
},
{
element: getDemos(import.meta.glob('~/timeline/demo/*.tsx')),
name: 'timeline 时间线',
path: '/timeline',
},
{
element: getDemos(import.meta.glob('~/calendar/demo/*.tsx')),
name: 'calendar 日历',
path: '/calendar',
},
{
element: getDemos(import.meta.glob('~/input-popover/demo/*.tsx')),
name: 'input-popover 输入弹窗',
path: '/input-popover',
},
{
element: getDemos(import.meta.glob('~/picker/demo/*.tsx')),
name: 'picker 拾取器',
path: '/picker',
},
{
element: getDemos(import.meta.glob('~/date-picker/demo/*.tsx')),
name: 'date-picker 日期选择器',
path: '/date-picker',
},
{
element: getDemos(import.meta.glob('~/virtual-list/demo/*.tsx')),
name: 'virtual-list 虚拟列表',
path: '/virtual-list',
// element: getDemos(import.meta.glob('~/virtual-list/demo/*.tsx')),
element: getDemos({}),
name: 'test 测试路由',
path: '/test',
},
/* {import insert target} */
];
Expand Down

0 comments on commit da2be1e

Please sign in to comment.