Compare commits
No commits in common. "7143b29fb3b7a1b1e7d38143eae612553d0bf37f" and "4a658573bb8a13526ff2ecbd5413324a1512e942" have entirely different histories.
7143b29fb3
...
4a658573bb
|
|
@ -1,18 +0,0 @@
|
||||||
import type { FC, ReactNode } from "react";
|
|
||||||
|
|
||||||
export interface HeaderBackProps {
|
|
||||||
/** 标题 */
|
|
||||||
title: ReactNode;
|
|
||||||
/** 历史记录对象,用于返回上一页,默认使用 window.history.back */
|
|
||||||
history?: {
|
|
||||||
goBack?: () => void;
|
|
||||||
[key: string]: any;
|
|
||||||
};
|
|
||||||
/** 是否显示返回按钮,默认为 true */
|
|
||||||
previous?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 头部返回组件 */
|
|
||||||
declare const HeaderBack: FC<HeaderBackProps>;
|
|
||||||
|
|
||||||
export default HeaderBack;
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
import { ArrowLeftOutlined } from "@ant-design/icons";
|
|
||||||
import { Divider } from "antd";
|
|
||||||
import "./index.less";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头部返回组件
|
|
||||||
*/
|
|
||||||
function HeaderBack(props) {
|
|
||||||
const { title, history, previous = true } = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="header-back">
|
|
||||||
<div className="action">
|
|
||||||
{
|
|
||||||
previous
|
|
||||||
&& (
|
|
||||||
<>
|
|
||||||
<div
|
|
||||||
className="back"
|
|
||||||
onClick={() => history?.goBack?.() || window.history.back()}
|
|
||||||
>
|
|
||||||
<ArrowLeftOutlined style={{ fontSize: 14 }} />
|
|
||||||
<span>返回</span>
|
|
||||||
</div>
|
|
||||||
<Divider type="vertical" style={{ backgroundColor: "#dcdfe6", marginLeft: 15, marginRight: 15 }} />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
<div className="title">{title}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HeaderBack;
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
.header-back {
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-bottom: 1px solid #dcdfe6;
|
|
||||||
|
|
||||||
.action {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.back {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 17px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,13 @@
|
||||||
import { Button, Col, Form, Input, Modal, Row, Spin } from "antd";
|
import { Button, Col, Form, Input, Modal, Row, Spin } from "antd";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
|
||||||
/**
|
const MapSelector = ({
|
||||||
* 定位组件弹窗
|
|
||||||
*/
|
|
||||||
const MapSelector = (props) => {
|
|
||||||
const {
|
|
||||||
visible,
|
visible,
|
||||||
onClose,
|
onClose,
|
||||||
longitude,
|
longitude,
|
||||||
latitude,
|
latitude,
|
||||||
onConfirm,
|
onConfirm, // 新增确认回调
|
||||||
} = props;
|
}) => {
|
||||||
|
|
||||||
const mapContainerRef = useRef(null);
|
const mapContainerRef = useRef(null);
|
||||||
const mapInstanceRef = useRef(null);
|
const mapInstanceRef = useRef(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,6 @@ import { Button, Col, Form, Input, Row } from "antd";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import MapSelector from "./MapSelector";
|
import MapSelector from "./MapSelector";
|
||||||
|
|
||||||
/**
|
|
||||||
* 定位组件
|
|
||||||
*/
|
|
||||||
const Map = (props) => {
|
const Map = (props) => {
|
||||||
const {
|
const {
|
||||||
longitudeProps = "longitude",
|
longitudeProps = "longitude",
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,6 @@ import { useState } from "react";
|
||||||
import { Document, Page, pdfjs } from "react-pdf";
|
import { Document, Page, pdfjs } from "react-pdf";
|
||||||
import { getFileUrl } from "../../utils/index";
|
import { getFileUrl } from "../../utils/index";
|
||||||
|
|
||||||
/**
|
|
||||||
* PDF查看组件
|
|
||||||
*/
|
|
||||||
function Pdf(props) {
|
function Pdf(props) {
|
||||||
const {
|
const {
|
||||||
visible = false,
|
visible = false,
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,8 @@
|
||||||
import { Image } from "antd";
|
import { Image } from "antd";
|
||||||
import { getFileUrl } from "../../utils/index";
|
import { getFileUrl } from "../../utils/index";
|
||||||
|
|
||||||
/**
|
|
||||||
* 在查看页面中图片预览组件
|
|
||||||
*/
|
|
||||||
const PreviewImg = (props) => {
|
const PreviewImg = (props) => {
|
||||||
const { files = [], fileUrlKey = "filePath" } = props;
|
const { files = [], fileUrlKey = "filePath" } = props;
|
||||||
|
|
||||||
const fileUrl = getFileUrl();
|
const fileUrl = getFileUrl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,6 @@ import { Button, Space } from "antd";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Pdf from "../Pdf";
|
import Pdf from "../Pdf";
|
||||||
|
|
||||||
/**
|
|
||||||
* 在查看页面中PDF查看组件
|
|
||||||
*/
|
|
||||||
const PreviewPdf = (props) => {
|
const PreviewPdf = (props) => {
|
||||||
const {
|
const {
|
||||||
files = [],
|
files = [],
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ function TablePro(props) {
|
||||||
rowKey = 'id',
|
rowKey = 'id',
|
||||||
...restProps
|
...restProps
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const storeIndex = props.storeIndex || `${window.process.env.app.antd["ant-prefix"]}_${Math.random().toString(36).substring(2)}`;
|
const storeIndex = props.storeIndex || `${window.process.env.app.antd["ant-prefix"]}_${Math.random().toString(36).substring(2)}`;
|
||||||
function calcColumns() {
|
function calcColumns() {
|
||||||
showIndex && columns.unshift(getIndexColumn(props.pagination));
|
showIndex && columns.unshift(getIndexColumn(props.pagination));
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import { Tag, Tooltip } from "antd";
|
import { Tag, Tooltip } from "antd";
|
||||||
import PreviewImg from "~/components/PreviewImg";
|
import PreviewImg from "~/components/PreviewImg";
|
||||||
|
|
||||||
/**
|
|
||||||
* 在表格组件中图片查看组件
|
|
||||||
*/
|
|
||||||
const TooltipPreviewImg = (props) => {
|
const TooltipPreviewImg = (props) => {
|
||||||
const { files = [], fileUrlKey = "filePath" } = props;
|
const { files = [], fileUrlKey = "filePath" } = props;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "zy-react-library",
|
"name": "zy-react-library",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.0.11",
|
"version": "1.0.10",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "LiuJiaNan",
|
"author": "LiuJiaNan",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue