Commit 1a3e1d2a authored by 皮倩雯's avatar 皮倩雯

fix: '修复图片库展开组件bug'

parent 393b7cd9
Pipeline #54586 canceled with stages
......@@ -6,7 +6,7 @@ import {
AddIntegratedloginSetting,
GetIntegratedloginSetting,
} from '@/services/integratedLogin/api';
import { PlusOutlined, LoadingOutlined, ConsoleSqlOutlined } from '@ant-design/icons';
import { PlusOutlined, LoadingOutlined } from '@ant-design/icons';
import { get, PUBLISH_SERVICE } from '@/services';
import PreviewModal from './PreviewModal';
const { Item } = Form;
......@@ -22,11 +22,11 @@ const colorList = [
color: '#009C73',
headerColor: 'linear-gradient(0deg, #00845D 0%, #02BF87 100%)',
},
{
key: '清澈蓝',
color: '#1890FF',
headerColor: '#1890FF',
},
// {
// key: '清澈蓝',
// color: '#1890FF',
// headerColor: '#1890FF',
// },
];
const Master = props => {
......@@ -157,9 +157,6 @@ const Master = props => {
const onOk = props => {
if (props) {
console.log(props.path);
console.log(process);
console.log(global);
setImageUrl(window.location.origin + `/${props.path}`);
setIm(props.path);
setKeepImgeUrl(props.path);
......
......@@ -34,15 +34,16 @@ const PreviewModal = props => {
.then(res => {
if (res.code === 0) {
let bb = [];
res.data.map(i => {
let aa = [];
res.data.map((i, a) => {
if (i.files.length > 0) {
bb.push(i);
aa.push(i.groupName);
}
});
setKeepGroupName(aa);
setImgData(bb);
let aa = [];
res.data.map(i => {
aa.push(i.groupName);
i.files.map((j, index) => {
if (keepImgeUrl) {
if (j.path == keepImgeUrl) {
......@@ -57,7 +58,6 @@ const PreviewModal = props => {
}
});
});
setKeepGroupName(aa);
} else {
notification.error({
message: '获取失败',
......@@ -80,7 +80,7 @@ const PreviewModal = props => {
};
const handleCollapseChange = key => {
console.log(key);
setKeepGroupName(key);
};
return (
......@@ -98,10 +98,9 @@ const PreviewModal = props => {
getContainer={false}
>
<Collapse
style={{ height: '600px' }}
style={{ height: '600px', overflow: 'scroll' }}
bordered={false}
// defaultActiveKey={keepGroupName}
activeKey={imgData.map(item => item.groupName)}
activeKey={keepGroupName}
onChange={handleCollapseChange}
>
{imgData.map((i, j) => {
......@@ -109,7 +108,6 @@ const PreviewModal = props => {
<Panel
header={i.groupName}
key={i.groupName}
showArrow={false}
style={{
marginBottom: '24px',
overflow: 'hidden',
......
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