Commit 14f577bf authored by 杨思琦's avatar 杨思琦

fix: 样式调整

parent 1b14c542
Pipeline #79224 waiting for manual action with stages
......@@ -69,9 +69,10 @@ const arrowSvg = ({ fillColor = '#fff' }) => (
const ArrowIcon = props => <Icon component={arrowSvg} {...props} />;
const optionsWith = [{ label: '按站点', value: 'site' }, { label: '按城市', value: 'city' }];
const HOT = ['HOT', '县', '市', 'New'];
const StationsItem = (item, action, onChangeVisible, actionRef, setMenuLoading) => {
const StationsItem = (item, action, onChangeVisible, actionRef, setMenuLoading, cityData) => {
const changeGroup = (event, data) => {
action.changeGroup && action.changeGroup(event, data, onChangeVisible, actionRef);
window.share.event.emit('updateSite', { ...cityData, currentStationName: data.groupName });
setMenuLoading && setMenuLoading(true);
};
return (
......@@ -97,7 +98,7 @@ const OnlyFocusStations = props => {
<div className={layoutStyles.focusStations} style={{ border: 'none' }}>
<ul>
{Array.isArray(data)
? data.map(item => StationsItem(item, props.action, props.setVisible, props.actionRef, props.setMenuLoading))
? data.map(item => StationsItem(item, props.action, props.setVisible, props.actionRef, props.setMenuLoading, props.data))
: null}
</ul>
</div>
......@@ -128,7 +129,7 @@ const AllStations = props => {
<ul>
{Array.isArray(data)
? data.map(item =>
StationsItem(item, props.action, props.setVisible, props.actionRef, props.setMenuLoading),
StationsItem(item, props.action, props.setVisible, props.actionRef, props.setMenuLoading, props.data),
)
: null}
</ul>
......@@ -352,6 +353,7 @@ const Layout = props => {
setCityLoading(true);
siteAction.getCityStationsForUser(props.global.userInfo?.Groups).then(res => {
setCityData(res);
setCityLoading(false);
});
}
}, [cityData, cityLoading, props.global, props.global.userInfo, siteAction]);
......
......@@ -227,6 +227,22 @@
padding: 0 14px;
// margin-bottom: 0px;
}
:global(.top-nav-menu-userWrapper
li.@{ant-prefix}-menu-item-only-child) {
height: 44px;
line-height: 44px;
margin-top: 0;
margin-bottom: 0;
max-width: 110px;
width: 110px;
padding: 0 14px;
}
:global(.top-nav-menu-userWrapper.wider
li.@{ant-prefix}-menu-item-only-child) {
max-width: 132px;
width: 132px;
}
// :global(.@{ant-prefix}-layout-sider-collapsed .@{ant-prefix}-menu-item.@{ant-prefix}-menu-item-only-child) {
// padding-left: 0px!important;
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment