fix: 预警记录 查看大图 pxtorem

This commit is contained in:
苑宏博 2024-05-10 11:42:49 +08:00
parent 9ed531d9da
commit 8486837339
2 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@ import React, { useImperativeHandle, useRef, useState, forwardRef, useContext }
import { Modal, ModalProps, Space, SpaceProps } from 'antd'; import { Modal, ModalProps, Space, SpaceProps } from 'antd';
import theme from 'antd/lib/theme'; import theme from 'antd/lib/theme';
import { DownloadOutlined } from '@ant-design/icons'; import { DownloadOutlined } from '@ant-design/icons';
import { pxToRem } from 'packages/func/src';
import { ConfigProvider, CropperImage } from '@zhst/meta'; import { ConfigProvider, CropperImage } from '@zhst/meta';
import './index.less' import './index.less'
@ -86,7 +87,7 @@ export const ViewLargerImageModal = forwardRef<ViewLargerImageModalRef, ViewLarg
> >
<Space size={0} {...spaceProps}> <Space size={0} {...spaceProps}>
<div className={`${componentName}-left-img`}> <div className={`${componentName}-left-img`}>
<div style={{ width: 789, height: 444, ...imgStyle }}> <div style={{ width: `${pxToRem('789px')}`, height: `${pxToRem('444px')}`, ...imgStyle }}>
<CropperImage <CropperImage
// editAble={false} // editAble={false}
// selectAble={false} // selectAble={false}

View File

@ -3,7 +3,7 @@ import { theme } from 'antd/lib';
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { ConfigProvider, CropperImage } from '@zhst/meta'; import { ConfigProvider, CropperImage } from '@zhst/meta';
import { pxToRem } from 'packages/func/src';
import './index.less' import './index.less'
export interface IRecord { export interface IRecord {
@ -105,7 +105,7 @@ export const WarningRecordCard: React.FC<WarningRecordCardProps> = (props) => {
<div className={componentName} key={id} onClick={handleClick} style={style}> <div className={componentName} key={id} onClick={handleClick} style={style}>
<Card <Card
cover={ cover={
<div style={{ width: 336, height: 203, ...imgStyle }}> <div style={{ width: `${pxToRem("356px")}`, height: `${pxToRem("203px")}`, ...imgStyle }}>
<CropperImage <CropperImage
// 无法触发 图片点击时间需要 加 selectAble // 无法触发 图片点击时间需要 加 selectAble
selectAble={false} selectAble={false}
@ -114,7 +114,7 @@ export const WarningRecordCard: React.FC<WarningRecordCardProps> = (props) => {
/> />
</div> </div>
} }
style={{ width: 356, height: 302, padding: 10, borderRadius: 4, ...selectedCardStyle, ...cardStyle }} style={{ width: `${pxToRem("356px")}`, height: `${pxToRem("302px")}`, padding: `${pxToRem("10px")}`, borderRadius: `${pxToRem("4px")}`, ...selectedCardStyle, ...cardStyle }}
{...cardProps} {...cardProps}
> >
<div className={`${componentName}-left-context`}> <div className={`${componentName}-left-context`}>