Commit b3476e55 authored by 邓超's avatar 邓超

fix: 修改web配置

parent e40fbba7
Pipeline #53455 passed with stages
......@@ -177,7 +177,11 @@ const StandingBook = props => {
if (res.msg === 'Ok' && res.data.root) {
console.log(res.data.root);
setKeepTableData(res.data.root);
setMaxLength(res.data.root.length + 1);
const maxOrder = res.data.root.reduce((pre, cur) =>
pre.order > cur.order ? pre.order : cur.order,
);
setMaxLength(maxOrder + 1);
// setMaxLength(res.data.root.length + 1);
let arr = formateArrDataA(res.data.root, 'type');
let newArr = [];
let dataList = [];
......@@ -290,7 +294,8 @@ const StandingBook = props => {
}
}
console.log(aa);
setMaxLength(aa.length + 1);
// const maxOrder = aa.reduce((pre, cur) => (pre.order > cur.order ? pre.order : cur.order));
// setMaxLength(maxOrder + 1);
let arr = formateArrDataA(aa, 'type');
console.log(arr);
setShowSearchStyle(true);
......@@ -399,6 +404,7 @@ const StandingBook = props => {
tableData.map((item, index) => {
return (
<div
title={`${item}(${allData[item] ? allData[item].length : 0})`}
className={classnames({
[styles.listItem]: true,
[styles.pickItem]: item === pickItem,
......
......@@ -26,14 +26,16 @@ const { Option } = Select;
const plainOptions = ['搜索', '消息', '反馈'];
const defaultCheckedList = ['搜索', '消息'];
const colorList = [
{ key: '薄暮', color: '#F5222D' },
{ key: '火山', color: '#FA541C' },
{ key: '日暮', color: '#FAAD14' },
{ key: '明青', color: '#13C2C2' },
{ key: '极光绿', color: '#52C41A' },
{ key: '拂晓蓝', color: '#1890FF' },
{ key: '极客蓝', color: '#2F54EB' },
{ key: '酱紫', color: '#722ED1' },
{
key: '科技蓝',
color: '#0087F7',
headerColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
},
{
key: '环保绿',
color: '#009C73',
headerColor: 'linear-gradient(0deg, #008E64 0%, #00AE73 100%)',
},
];
export default props => {
......@@ -83,21 +85,27 @@ export default props => {
console.log(config, 'config');
form.setFieldsValue({
...config,
primaryColor: config.primaryColor ? config.primaryColor : '#1890FF',
primaryColor: config.primaryColor ? config.primaryColor : '#0087F7',
navTheme: config.navTheme ? config.navTheme : 'light',
headerPrimaryColor: config.headerPrimaryColor ? config.headerPrimaryColor : '#1890FF',
headerPrimaryColor: config.headerPrimaryColor
? config.headerPrimaryColor
: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
});
setColor(config.headerPrimaryColor ? config.headerPrimaryColor : '#1890FF');
setColor(
config.headerPrimaryColor
? config.headerPrimaryColor
: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
);
} else {
setColor('#1890FF');
setColor('linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)');
form.setFieldsValue({
messageMarking: 'All',
messageVoice: true,
hideMap: false,
loginTemplate: 'Default.html',
primaryColor: '#1890FF',
primaryColor: '#0087F7',
navTheme: 'dark',
headerPrimaryColor: '#1890FF',
headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
});
}
} else {
......@@ -129,9 +137,10 @@ export default props => {
validate.topMenu = checkedList.toString();
console.log(validate);
if (validate) {
const colorIndex = colorList.findIndex(item => item.color === validate.primaryColor);
onOk({
...validate,
headerPrimaryColor: validate.primaryColor,
headerPrimaryColor: colorList[colorIndex].headerColor,
mode: 'single',
menu: 'banner-left',
});
......@@ -292,13 +301,7 @@ export default props => {
</div>
</div>
</Form.Item> */}
<Form.Item name="navTheme" label="菜单">
<Radio.Group>
<Radio value="dark"></Radio>
<Radio value="light"></Radio>
</Radio.Group>
</Form.Item>
<Form.Item name="primaryColor" label="基础">
<Form.Item name="primaryColor" label="主题色">
<Select placeholder="请选择颜色">
{colorList.map(item => (
<Option value={item.color} key={item.color}>
......@@ -317,6 +320,12 @@ export default props => {
))}
</Select>
</Form.Item>
<Form.Item name="navTheme" label="菜单">
<Radio.Group>
<Radio value="dark"></Radio>
<Radio value="light"></Radio>
</Radio.Group>
</Form.Item>
<Form.Item>
<Switch
......
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