omni-layout 0.0.5-beta.1 → 0.0.5-beta.3
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 +38 -4
- package/dist/index.esm.css +38 -4
- package/dist/index.esm.js +2 -2
- package/dist/index.js +1946 -124
- package/dist/{RouteContext.d.ts → src/RouteContext.d.ts} +1 -1
- package/dist/src/compontent/PageHeader/index.d.ts +14 -0
- package/dist/{compontent → src/compontent}/PageHeaderWrapper/index.d.ts +2 -2
- package/dist/{compontent → src/compontent}/PageHeaderWtihTagWrapper/index.d.ts +2 -2
- package/dist/{compontent → src/compontent}/app/index.d.ts +1 -1
- package/dist/{compontent → src/compontent}/defaultSettings.d.ts +3 -2
- 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 +5 -3
- package/dist/{compontent → src/compontent}/sidemenu/BaseMenu.d.ts +4 -5
- package/dist/{compontent → src/compontent}/test/index.d.ts +2 -2
- package/dist/{compontent → src/compontent}/typings.d.ts +27 -6
- package/dist/{index.d.ts → src/index.d.ts} +1 -1
- 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 +2 -2
- package/dist/src/util/icon.d.ts +2 -0
- package/dist/src/util/request.d.ts +11 -0
- package/package.json +13 -12
- 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}/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/{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
|
@@ -1766,6 +1766,17 @@ html {
|
|
|
1766
1766
|
padding-right: 15px;
|
|
1767
1767
|
width: 35px;
|
|
1768
1768
|
cursor: pointer;
|
|
1769
|
+
border: 0;
|
|
1770
|
+
background: transparent;
|
|
1771
|
+
outline: none;
|
|
1772
|
+
line-height: 49px;
|
|
1773
|
+
}
|
|
1774
|
+
.omni-layout-app .omni-notice-box .tool-head-close:focus,
|
|
1775
|
+
.omni-layout-app .omni-notice-box .tool-head-close:active {
|
|
1776
|
+
outline: none;
|
|
1777
|
+
}
|
|
1778
|
+
.omni-layout-app .omni-notice-box .tool-head-close .anticon {
|
|
1779
|
+
color: #666;
|
|
1769
1780
|
}
|
|
1770
1781
|
.omni-layout-app .omni-notice-box .tool-head-close,
|
|
1771
1782
|
.omni-layout-app .omni-notice-box .tool-head-title,
|
|
@@ -1837,6 +1848,19 @@ html {
|
|
|
1837
1848
|
color: #2684ff;
|
|
1838
1849
|
padding-top: 0;
|
|
1839
1850
|
}
|
|
1851
|
+
.omni-layout-app .omni-notice-box .message-dd-hover button {
|
|
1852
|
+
color: #2684ff;
|
|
1853
|
+
padding-top: 0;
|
|
1854
|
+
border: 0;
|
|
1855
|
+
background: transparent;
|
|
1856
|
+
cursor: pointer;
|
|
1857
|
+
line-height: 21px;
|
|
1858
|
+
font-size: 12px;
|
|
1859
|
+
}
|
|
1860
|
+
.omni-layout-app .omni-notice-box .message-dd-hover button:focus,
|
|
1861
|
+
.omni-layout-app .omni-notice-box .message-dd-hover button:active {
|
|
1862
|
+
outline: none;
|
|
1863
|
+
}
|
|
1840
1864
|
.omni-layout-app .omni-notice-box .nav-message-text {
|
|
1841
1865
|
float: left;
|
|
1842
1866
|
width: 120px;
|
|
@@ -2088,11 +2112,21 @@ html {
|
|
|
2088
2112
|
/* stylelint-disable */
|
|
2089
2113
|
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
2090
2114
|
.ant-pro-page-header-wrap-children-content {
|
|
2091
|
-
margin:
|
|
2115
|
+
margin: 12px 24px 0;
|
|
2092
2116
|
}
|
|
2093
2117
|
.ant-pro-page-header-wrap-page-header-warp {
|
|
2094
2118
|
background-color: #fff;
|
|
2095
2119
|
}
|
|
2120
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header {
|
|
2121
|
+
padding: 16px 24px 0;
|
|
2122
|
+
}
|
|
2123
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-heading {
|
|
2124
|
+
margin-bottom: 0;
|
|
2125
|
+
}
|
|
2126
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-footer {
|
|
2127
|
+
padding: 0;
|
|
2128
|
+
margin-top: 4px;
|
|
2129
|
+
}
|
|
2096
2130
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-detail {
|
|
2097
2131
|
display: flex;
|
|
2098
2132
|
}
|
|
@@ -2101,7 +2135,7 @@ html {
|
|
|
2101
2135
|
width: 100%;
|
|
2102
2136
|
}
|
|
2103
2137
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title-content {
|
|
2104
|
-
margin-bottom:
|
|
2138
|
+
margin-bottom: 12px;
|
|
2105
2139
|
}
|
|
2106
2140
|
@media screen and (max-width: 576px) {
|
|
2107
2141
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content {
|
|
@@ -2120,12 +2154,12 @@ html {
|
|
|
2120
2154
|
width: 100%;
|
|
2121
2155
|
}
|
|
2122
2156
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title {
|
|
2123
|
-
margin-bottom:
|
|
2157
|
+
margin-bottom: 12px;
|
|
2124
2158
|
}
|
|
2125
2159
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-logo,
|
|
2126
2160
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content,
|
|
2127
2161
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2128
|
-
margin-bottom:
|
|
2162
|
+
margin-bottom: 12px;
|
|
2129
2163
|
}
|
|
2130
2164
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2131
2165
|
min-width: 242px;
|
package/dist/index.esm.css
CHANGED
|
@@ -1766,6 +1766,17 @@ html {
|
|
|
1766
1766
|
padding-right: 15px;
|
|
1767
1767
|
width: 35px;
|
|
1768
1768
|
cursor: pointer;
|
|
1769
|
+
border: 0;
|
|
1770
|
+
background: transparent;
|
|
1771
|
+
outline: none;
|
|
1772
|
+
line-height: 49px;
|
|
1773
|
+
}
|
|
1774
|
+
.omni-layout-app .omni-notice-box .tool-head-close:focus,
|
|
1775
|
+
.omni-layout-app .omni-notice-box .tool-head-close:active {
|
|
1776
|
+
outline: none;
|
|
1777
|
+
}
|
|
1778
|
+
.omni-layout-app .omni-notice-box .tool-head-close .anticon {
|
|
1779
|
+
color: #666;
|
|
1769
1780
|
}
|
|
1770
1781
|
.omni-layout-app .omni-notice-box .tool-head-close,
|
|
1771
1782
|
.omni-layout-app .omni-notice-box .tool-head-title,
|
|
@@ -1837,6 +1848,19 @@ html {
|
|
|
1837
1848
|
color: #2684ff;
|
|
1838
1849
|
padding-top: 0;
|
|
1839
1850
|
}
|
|
1851
|
+
.omni-layout-app .omni-notice-box .message-dd-hover button {
|
|
1852
|
+
color: #2684ff;
|
|
1853
|
+
padding-top: 0;
|
|
1854
|
+
border: 0;
|
|
1855
|
+
background: transparent;
|
|
1856
|
+
cursor: pointer;
|
|
1857
|
+
line-height: 21px;
|
|
1858
|
+
font-size: 12px;
|
|
1859
|
+
}
|
|
1860
|
+
.omni-layout-app .omni-notice-box .message-dd-hover button:focus,
|
|
1861
|
+
.omni-layout-app .omni-notice-box .message-dd-hover button:active {
|
|
1862
|
+
outline: none;
|
|
1863
|
+
}
|
|
1840
1864
|
.omni-layout-app .omni-notice-box .nav-message-text {
|
|
1841
1865
|
float: left;
|
|
1842
1866
|
width: 120px;
|
|
@@ -2088,11 +2112,21 @@ html {
|
|
|
2088
2112
|
/* stylelint-disable */
|
|
2089
2113
|
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
2090
2114
|
.ant-pro-page-header-wrap-children-content {
|
|
2091
|
-
margin:
|
|
2115
|
+
margin: 12px 24px 0;
|
|
2092
2116
|
}
|
|
2093
2117
|
.ant-pro-page-header-wrap-page-header-warp {
|
|
2094
2118
|
background-color: #fff;
|
|
2095
2119
|
}
|
|
2120
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header {
|
|
2121
|
+
padding: 16px 24px 0;
|
|
2122
|
+
}
|
|
2123
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-heading {
|
|
2124
|
+
margin-bottom: 0;
|
|
2125
|
+
}
|
|
2126
|
+
.ant-pro-page-header-wrap-page-header-warp .ant-page-header-footer {
|
|
2127
|
+
padding: 0;
|
|
2128
|
+
margin-top: 4px;
|
|
2129
|
+
}
|
|
2096
2130
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-detail {
|
|
2097
2131
|
display: flex;
|
|
2098
2132
|
}
|
|
@@ -2101,7 +2135,7 @@ html {
|
|
|
2101
2135
|
width: 100%;
|
|
2102
2136
|
}
|
|
2103
2137
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title-content {
|
|
2104
|
-
margin-bottom:
|
|
2138
|
+
margin-bottom: 12px;
|
|
2105
2139
|
}
|
|
2106
2140
|
@media screen and (max-width: 576px) {
|
|
2107
2141
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content {
|
|
@@ -2120,12 +2154,12 @@ html {
|
|
|
2120
2154
|
width: 100%;
|
|
2121
2155
|
}
|
|
2122
2156
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-title {
|
|
2123
|
-
margin-bottom:
|
|
2157
|
+
margin-bottom: 12px;
|
|
2124
2158
|
}
|
|
2125
2159
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-logo,
|
|
2126
2160
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-content,
|
|
2127
2161
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2128
|
-
margin-bottom:
|
|
2162
|
+
margin-bottom: 12px;
|
|
2129
2163
|
}
|
|
2130
2164
|
.ant-pro-page-header-wrap-main .ant-pro-page-header-wrap-extraContent {
|
|
2131
2165
|
min-width: 242px;
|