beer-assembly-biz 1.1.3-alpha.16 → 1.1.3-alpha.17
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/layout/AppLayout.d.ts +12 -0
- package/layout/AppLayout.js +27 -19
- package/package.json +1 -1
package/layout/AppLayout.d.ts
CHANGED
|
@@ -66,6 +66,18 @@ export declare type LayoutProps = {
|
|
|
66
66
|
* App列表 (切换应用)
|
|
67
67
|
*/
|
|
68
68
|
apps: App[];
|
|
69
|
+
/**
|
|
70
|
+
* 菜单宽度.
|
|
71
|
+
*/
|
|
72
|
+
siderWidth?: number;
|
|
73
|
+
/**
|
|
74
|
+
* 菜单选项高度.
|
|
75
|
+
*/
|
|
76
|
+
siderMenusItemHeight?: number;
|
|
77
|
+
/**
|
|
78
|
+
* 菜单类型.
|
|
79
|
+
*/
|
|
80
|
+
siderMenuType?: 'sub' | 'group';
|
|
69
81
|
/**
|
|
70
82
|
* 布局内容
|
|
71
83
|
*/
|
package/layout/AppLayout.js
CHANGED
|
@@ -158,7 +158,9 @@ export const AppLayout = (props) => {
|
|
|
158
158
|
.ant-pro-sider-collapsed-button {
|
|
159
159
|
inset-block-start: 15px;
|
|
160
160
|
}
|
|
161
|
-
`,
|
|
161
|
+
`, style: {
|
|
162
|
+
minWidth: 1000
|
|
163
|
+
}, selectedKeys: pathKeys, locale: "zh-CN", navTheme: "light", fixSiderbar: true, layout: "mix", contentWidth: "Fluid", splitMenus: false, bgLayoutImgList: [
|
|
162
164
|
{
|
|
163
165
|
src: ImageLayout01,
|
|
164
166
|
left: 85,
|
|
@@ -177,26 +179,26 @@ export const AppLayout = (props) => {
|
|
|
177
179
|
left: 0,
|
|
178
180
|
width: '331px'
|
|
179
181
|
}
|
|
180
|
-
], siderWidth:
|
|
181
|
-
bgLayout: '#
|
|
182
|
+
], siderWidth: props?.siderWidth ?? 190, breakpoint: props?.siderMenuType === 'group' ? 'xs' : undefined, token: {
|
|
183
|
+
bgLayout: '#F5F7FA',
|
|
182
184
|
header: {
|
|
183
185
|
heightLayoutHeader: 48
|
|
184
186
|
},
|
|
185
187
|
sider: {
|
|
186
|
-
menuHeight: token.controlHeight
|
|
188
|
+
menuHeight: props?.siderMenusItemHeight ?? token.controlHeight,
|
|
187
189
|
paddingBlockLayoutMenu: 4,
|
|
188
190
|
paddingInlineLayoutMenu: 4,
|
|
189
191
|
colorMenuBackground: '#fff',
|
|
190
|
-
colorTextMenu: '
|
|
191
|
-
colorTextMenuSelected: 'rgba(0,0,0,0.
|
|
192
|
+
colorTextMenu: 'rgba(0,0,0,0.75)',
|
|
193
|
+
colorTextMenuSelected: 'rgba(0,0,0,0.85)',
|
|
192
194
|
colorBgMenuItemSelected: 'rgba(0,0,0,0.08)'
|
|
193
195
|
},
|
|
194
196
|
pageContainer: {
|
|
195
197
|
paddingInlinePageContainerContent: 0,
|
|
196
198
|
paddingBlockPageContainerContent: 0
|
|
197
199
|
}
|
|
198
|
-
}, siderMenuType: 'sub', fixedHeader: true, collapsedButtonRender: (collapsed, reactNode) => {
|
|
199
|
-
return isMobile ? undefined : reactNode;
|
|
200
|
+
}, siderMenuType: props?.siderMenuType ?? 'sub', fixedHeader: true, collapsedButtonRender: (collapsed, reactNode) => {
|
|
201
|
+
return isMobile || props?.siderMenuType === 'group' ? undefined : reactNode;
|
|
200
202
|
}, appList: (props.apps?.length || 0) > 1 || collapsed ? props.apps?.map(it => {
|
|
201
203
|
return {
|
|
202
204
|
...it,
|
|
@@ -217,7 +219,8 @@ export const AppLayout = (props) => {
|
|
|
217
219
|
textIndent: 10,
|
|
218
220
|
fontSize: token.fontSize + 2,
|
|
219
221
|
color: '#333',
|
|
220
|
-
fontWeight: 600
|
|
222
|
+
fontWeight: 600,
|
|
223
|
+
minWidth: ((props?.siderWidth ?? 190) - 30)
|
|
221
224
|
} }, app?.name));
|
|
222
225
|
}, menu: {
|
|
223
226
|
collapsedShowTitle: false,
|
|
@@ -226,35 +229,40 @@ export const AppLayout = (props) => {
|
|
|
226
229
|
request: async () => {
|
|
227
230
|
return requestMenuItems();
|
|
228
231
|
}
|
|
229
|
-
}, subMenuItemRender: (
|
|
232
|
+
}, subMenuItemRender: (menuDataItemProps, _defaultDom, menuProps) => {
|
|
233
|
+
if (props?.siderMenuType === 'group') {
|
|
234
|
+
return React.createElement("span", { style: {
|
|
235
|
+
marginLeft: 4,
|
|
236
|
+
color: 'rgba(0,0,0,0.55)',
|
|
237
|
+
fontSize: token.fontSize - 2
|
|
238
|
+
} }, menuDataItemProps.name);
|
|
239
|
+
}
|
|
230
240
|
return React.createElement("div", { style: {
|
|
231
|
-
height: token.controlHeight
|
|
241
|
+
height: props?.siderMenusItemHeight ?? token.controlHeight,
|
|
232
242
|
fontSize: token.fontSize,
|
|
233
243
|
display: 'flex',
|
|
234
244
|
alignItems: 'center',
|
|
235
245
|
justifyContent: menuProps.collapsed ? 'center' : undefined,
|
|
236
246
|
cursor: 'pointer',
|
|
237
|
-
width: '100%'
|
|
238
|
-
color: '#0c0d0e'
|
|
247
|
+
width: '100%'
|
|
239
248
|
} },
|
|
240
|
-
React.createElement("img", { src: (
|
|
249
|
+
React.createElement("img", { src: (menuDataItemProps.icon || '') === '' ? undefined : menuDataItemProps.icon?.toString(), style: {
|
|
241
250
|
width: 20,
|
|
242
251
|
display: 'block',
|
|
243
|
-
marginInlineEnd:
|
|
252
|
+
marginInlineEnd: menuDataItemProps.collapsed ? 0 : 4
|
|
244
253
|
}, alt: "" }),
|
|
245
|
-
menuProps.collapsed ? undefined :
|
|
254
|
+
menuProps.collapsed ? undefined : menuDataItemProps.name);
|
|
246
255
|
}, menuItemRender: (props, defaultDom, menuProps) => {
|
|
247
256
|
const isSub = (props.locale?.toString()
|
|
248
257
|
?.split('.') || []).length > 2;
|
|
249
258
|
return React.createElement("a", { style: {
|
|
250
259
|
fontSize: token.fontSize,
|
|
251
260
|
userSelect: 'none',
|
|
252
|
-
height: token.controlHeight
|
|
261
|
+
height: props?.siderMenusItemHeight ?? token.controlHeight,
|
|
253
262
|
display: 'flex',
|
|
254
263
|
alignItems: 'center',
|
|
255
264
|
justifyContent: menuProps.collapsed && !isSub ? 'center' : undefined,
|
|
256
|
-
cursor: 'pointer'
|
|
257
|
-
color: '#0c0d0e'
|
|
265
|
+
cursor: 'pointer'
|
|
258
266
|
}, onClick: (e) => {
|
|
259
267
|
e.preventDefault();
|
|
260
268
|
if (props.isUrl || !props.path) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beer-assembly-biz",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.1.3-alpha.
|
|
4
|
+
"version": "1.1.3-alpha.17",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"pub-w": "tsc && copy package.json .\\dist\\package.json && npm publish ./dist",
|
|
7
7
|
"copy": "cp -a src/rich/AIEditor.css dist/rich/AIEditor.css && cp -a src/icon dist/icon && cp -a src/images dist/images",
|