omni-layout 0.0.4-beta.3 → 0.0.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/demo/src/App.d.ts +14 -0
- package/dist/demo/src/index.d.ts +1 -0
- package/dist/demo/src/layouts/BasicLayout.d.ts +16 -0
- package/dist/demo/src/pages/ArticlesPage.d.ts +10 -0
- package/dist/demo/src/pages/CategoryPage.d.ts +9 -0
- package/dist/demo/src/pages/Dashboard.d.ts +10 -0
- package/dist/demo/src/pages/DetailPage.d.ts +10 -0
- package/dist/demo/src/pages/ListPage.d.ts +10 -0
- package/dist/demo/src/pages/SettingPage.d.ts +13 -0
- package/dist/demo/vite.config.d.ts +2 -0
- package/dist/index.css +16 -5
- package/dist/index.esm.css +16 -5
- package/dist/index.esm.js +2 -2
- package/dist/index.js +1923 -285
- package/dist/{RouteContext.d.ts → src/RouteContext.d.ts} +1 -1
- package/dist/{compontent → src/compontent}/app/index.d.ts +1 -1
- package/dist/{compontent → src/compontent}/defaultSettings.d.ts +1 -1
- package/dist/{compontent → src/compontent}/footer/footer.d.ts +3 -3
- package/dist/{compontent → src/compontent}/header/all.d.ts +2 -2
- package/dist/src/compontent/header/favorate.d.ts +3 -0
- package/dist/{compontent → src/compontent}/header/help.d.ts +4 -4
- package/dist/{compontent → src/compontent}/header/index.d.ts +1 -1
- package/dist/{compontent → src/compontent}/search/index.d.ts +1 -1
- package/dist/{compontent → src/compontent}/sidemenu/BaseMenu.d.ts +1 -1
- package/dist/{compontent → src/compontent}/test/index.d.ts +2 -2
- package/dist/{compontent → src/compontent}/typings.d.ts +27 -6
- package/dist/src/mock/appInfos.d.ts +16 -0
- package/dist/src/mock/data.d.ts +5 -0
- package/dist/{model → src/model}/base.d.ts +8 -3
- package/dist/{model → src/model}/menu.d.ts +6 -1
- package/dist/{util → src/util}/getBreadcrumbProps.d.ts +1 -1
- package/dist/src/util/request.d.ts +11 -0
- package/package.json +6 -4
- package/dist/compontent/header/favorate.d.ts +0 -3
- package/dist/util/request.d.ts +0 -4
- /package/dist/{compontent → src/compontent}/GridContent/index.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/NoticeIcon/NoticeList.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/NoticeIcon/index.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/PageHeaderWrapper/index.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/PageHeaderWtihTagWrapper/index.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/footer/index.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/noticebox/index.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/sidemenu/SiderMenu.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/sidemenu/SiderMenuUtils.d.ts +0 -0
- /package/dist/{compontent → src/compontent}/sidemenu/index.d.ts +0 -0
- /package/dist/{const.d.ts → src/const.d.ts} +0 -0
- /package/dist/{data → src/data}/allmenu.d.ts +0 -0
- /package/dist/{data → src/data}/data.d.ts +0 -0
- /package/dist/{getPageTitle.d.ts → src/getPageTitle.d.ts} +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{store → src/store}/common.d.ts +0 -0
- /package/dist/{util → src/util}/check.d.ts +0 -0
- /package/dist/{util → src/util}/data.d.ts +0 -0
- /package/dist/{util → src/util}/getMenuData.d.ts +0 -0
- /package/dist/{util → src/util}/pathTools.d.ts +0 -0
- /package/dist/{util → src/util}/tree.d.ts +0 -0
- /package/dist/{util → src/util}/utils.d.ts +0 -0
- /package/dist/{util → src/util}/watermark.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* App — 路由注册
|
|
4
|
+
*
|
|
5
|
+
* 路由与 mock 菜单数据保持一致:
|
|
6
|
+
* /manage/world → Dashboard (首页欢迎)
|
|
7
|
+
* /app/collection → ListPage (列表页 + 面包屑:应用管理 > 收藏管理)
|
|
8
|
+
* /manage/pms → ListPage (列表页 + 面包屑:系统管理 > 权限列表)
|
|
9
|
+
* /manage/data → SettingPage (带 Tabs 的设置页)
|
|
10
|
+
* /content/articles → ArticlesPage (文章列表,2 级面包屑:内容管理 > 文章列表)
|
|
11
|
+
* /content/articles/detail → DetailPage (3 级面包屑:内容管理 > 文章列表 > 文章详情)
|
|
12
|
+
* /content/category → CategoryPage (分类管理)
|
|
13
|
+
*/
|
|
14
|
+
export default function App(): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'omni-layout/index.less';
|
|
3
|
+
import 'omni-layout/antd.css';
|
|
4
|
+
/**
|
|
5
|
+
* BasicLayout — OmniLayout 的演示包装层
|
|
6
|
+
*
|
|
7
|
+
* 核心要点:
|
|
8
|
+
* 1. useLocation() 获取真实 location,pathname 随路由切换自动更新
|
|
9
|
+
* 2. useHistory() 用于 menuItemRender / tabRender 触发真实路由跳转
|
|
10
|
+
* 3. mockMode=true 所有 API 调用均由 src/mock/data.ts 中的本地数据拦截
|
|
11
|
+
* 4. noticeSwitch=true 展示消息中心徽标
|
|
12
|
+
* 5. siderSearchSwitch=true 展示侧边栏关键字搜索
|
|
13
|
+
*/
|
|
14
|
+
export default function BasicLayout({ children }: {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* DetailPage — 文章详情页(内容管理 > 文章列表 > 文章详情)
|
|
4
|
+
*
|
|
5
|
+
* 演示点(核心):
|
|
6
|
+
* - 3 级面包屑:内容管理 > 文章列表 > 文章详情(由 OmniLayout 根据 routesMap 自动生成)
|
|
7
|
+
* - 路由 /content/articles/detail 与 mock 菜单树中的第三级节点对应
|
|
8
|
+
* - Tab 页签列表新增本条目,侧边菜单高亮到父菜单「文章列表」
|
|
9
|
+
*/
|
|
10
|
+
export default function DetailPage(): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SettingPage — 设置页(系统管理 > 数据权限)
|
|
4
|
+
*
|
|
5
|
+
* 演示点:
|
|
6
|
+
* - PageHeaderWrapper 的 tabList + onTabChange 联动(通过 OmniLayout noPageHeader=false 默认行为)
|
|
7
|
+
* - Tab 切换时内容区域变化,页头 Tabs 与内容保持同步
|
|
8
|
+
* - 面包屑:系统管理 > 数据权限(2 级)
|
|
9
|
+
*
|
|
10
|
+
* 注意:OmniLayout 内置的 PageHeaderWtihTagWrapper 的 tabList 是用于「历史访问 Tab 页签」,
|
|
11
|
+
* 本页面使用独立的 antd Tabs 演示页头级 Tabs 交互。
|
|
12
|
+
*/
|
|
13
|
+
export default function SettingPage(): React.JSX.Element;
|
package/dist/index.css
CHANGED
|
@@ -318,7 +318,8 @@ mark {
|
|
|
318
318
|
content: '';
|
|
319
319
|
}
|
|
320
320
|
.anticon {
|
|
321
|
-
display: inline-
|
|
321
|
+
display: inline-flex;
|
|
322
|
+
align-items: center;
|
|
322
323
|
color: inherit;
|
|
323
324
|
font-style: normal;
|
|
324
325
|
line-height: 0;
|
|
@@ -2087,11 +2088,21 @@ html {
|
|
|
2087
2088
|
/* stylelint-disable */
|
|
2088
2089
|
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
2089
2090
|
.ant-pro-page-header-wrap-children-content {
|
|
2090
|
-
margin:
|
|
2091
|
+
margin: 12px 24px 0;
|
|
2091
2092
|
}
|
|
2092
2093
|
.ant-pro-page-header-wrap-page-header-warp {
|
|
2093
2094
|
background-color: #fff;
|
|
2094
2095
|
}
|
|
2096
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header {
|
|
2097
|
+
padding: 16px 24px 0;
|
|
2098
|
+
}
|
|
2099
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-heading {
|
|
2100
|
+
margin-bottom: 0;
|
|
2101
|
+
}
|
|
2102
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-footer {
|
|
2103
|
+
padding: 0;
|
|
2104
|
+
margin-top: 4px;
|
|
2105
|
+
}
|
|
2095
2106
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-detail {
|
|
2096
2107
|
display: flex;
|
|
2097
2108
|
}
|
|
@@ -2100,7 +2111,7 @@ html {
|
|
|
2100
2111
|
width: 100%;
|
|
2101
2112
|
}
|
|
2102
2113
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title-content {
|
|
2103
|
-
margin-bottom:
|
|
2114
|
+
margin-bottom: 12px;
|
|
2104
2115
|
}
|
|
2105
2116
|
@media screen and (max-width: 576px) {
|
|
2106
2117
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content {
|
|
@@ -2119,12 +2130,12 @@ html {
|
|
|
2119
2130
|
width: 100%;
|
|
2120
2131
|
}
|
|
2121
2132
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title {
|
|
2122
|
-
margin-bottom:
|
|
2133
|
+
margin-bottom: 12px;
|
|
2123
2134
|
}
|
|
2124
2135
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-logo,
|
|
2125
2136
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content,
|
|
2126
2137
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2127
|
-
margin-bottom:
|
|
2138
|
+
margin-bottom: 12px;
|
|
2128
2139
|
}
|
|
2129
2140
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2130
2141
|
min-width: 242px;
|
package/dist/index.esm.css
CHANGED
|
@@ -318,7 +318,8 @@ mark {
|
|
|
318
318
|
content: '';
|
|
319
319
|
}
|
|
320
320
|
.anticon {
|
|
321
|
-
display: inline-
|
|
321
|
+
display: inline-flex;
|
|
322
|
+
align-items: center;
|
|
322
323
|
color: inherit;
|
|
323
324
|
font-style: normal;
|
|
324
325
|
line-height: 0;
|
|
@@ -2087,11 +2088,21 @@ html {
|
|
|
2087
2088
|
/* stylelint-disable */
|
|
2088
2089
|
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
2089
2090
|
.ant-pro-page-header-wrap-children-content {
|
|
2090
|
-
margin:
|
|
2091
|
+
margin: 12px 24px 0;
|
|
2091
2092
|
}
|
|
2092
2093
|
.ant-pro-page-header-wrap-page-header-warp {
|
|
2093
2094
|
background-color: #fff;
|
|
2094
2095
|
}
|
|
2096
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header {
|
|
2097
|
+
padding: 16px 24px 0;
|
|
2098
|
+
}
|
|
2099
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-heading {
|
|
2100
|
+
margin-bottom: 0;
|
|
2101
|
+
}
|
|
2102
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-footer {
|
|
2103
|
+
padding: 0;
|
|
2104
|
+
margin-top: 4px;
|
|
2105
|
+
}
|
|
2095
2106
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-detail {
|
|
2096
2107
|
display: flex;
|
|
2097
2108
|
}
|
|
@@ -2100,7 +2111,7 @@ html {
|
|
|
2100
2111
|
width: 100%;
|
|
2101
2112
|
}
|
|
2102
2113
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title-content {
|
|
2103
|
-
margin-bottom:
|
|
2114
|
+
margin-bottom: 12px;
|
|
2104
2115
|
}
|
|
2105
2116
|
@media screen and (max-width: 576px) {
|
|
2106
2117
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content {
|
|
@@ -2119,12 +2130,12 @@ html {
|
|
|
2119
2130
|
width: 100%;
|
|
2120
2131
|
}
|
|
2121
2132
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title {
|
|
2122
|
-
margin-bottom:
|
|
2133
|
+
margin-bottom: 12px;
|
|
2123
2134
|
}
|
|
2124
2135
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-logo,
|
|
2125
2136
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content,
|
|
2126
2137
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2127
|
-
margin-bottom:
|
|
2138
|
+
margin-bottom: 12px;
|
|
2128
2139
|
}
|
|
2129
2140
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2130
2141
|
min-width: 242px;
|