feat:svg添加成功
This commit is contained in:
parent
ec3bb0cdef
commit
bad15eb312
Binary file not shown.
Before Width: | Height: | Size: 868 KiB |
File diff suppressed because one or more lines are too long
|
@ -20,6 +20,7 @@ export default function RootLayout({
|
||||||
<head>
|
<head>
|
||||||
<title>任务管理</title>
|
<title>任务管理</title>
|
||||||
<link rel="icon" href="/favicon.ico"/>
|
<link rel="icon" href="/favicon.ico"/>
|
||||||
|
<script src="/static/iconfont.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body style={{margin: 0}}>{children}</body>
|
<body style={{margin: 0}}>{children}</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -6,7 +6,14 @@
|
||||||
padding: 6rem;
|
padding: 6rem;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
.icon {
|
||||||
|
/* em 当前元素的 font-size 值,如果元素没有显式设置 font-size,则继承父元素的 font-size。 控制与字体大小相关的属性*/
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
vertical-align: -0.15em;
|
||||||
|
fill: currentColor;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.description {
|
.description {
|
||||||
display: inherit;
|
display: inherit;
|
||||||
justify-content: inherit;
|
justify-content: inherit;
|
||||||
|
@ -22,6 +29,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
/* 始终基于根字体,更稳定,实现全局尺寸控制(避免嵌套问题)*/
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,3 +16,6 @@ input[type='number']::-webkit-outer-spin-button {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
|
@ -1,3 +1,17 @@
|
||||||
.ant-select-selection-overflow-item-suffix{
|
.ant-select-selection-overflow-item-suffix{
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
.container{
|
||||||
|
padding: 0 20px;
|
||||||
|
display: flex;
|
||||||
|
/* 决定主轴方向 */
|
||||||
|
flex-direction: row;
|
||||||
|
/* 交叉轴对齐方式,垂直居中 */
|
||||||
|
align-items: center;
|
||||||
|
/* 主轴对齐方式,水平居中(可选) */
|
||||||
|
justify-content: space-between;
|
||||||
|
/* 是否换行*/
|
||||||
|
flex-wrap: wrap;
|
||||||
|
/* 多行时的垂直对齐 */
|
||||||
|
align-content: space-between;
|
||||||
|
}
|
||||||
|
|
|
@ -31,7 +31,8 @@ export const TitleOperation: React.FC<TitleOperationProps> = ({
|
||||||
expectStartTimeParseResult[0] && expectStartTimeParseResult[0].value ? dayjs(expectStartTimeParseResult[0].value.toString()) : undefined,
|
expectStartTimeParseResult[0] && expectStartTimeParseResult[0].value ? dayjs(expectStartTimeParseResult[0].value.toString()) : undefined,
|
||||||
expectStartTimeParseResult[1] && expectStartTimeParseResult[1].value ? dayjs(expectStartTimeParseResult[1].value.toString()) : undefined
|
expectStartTimeParseResult[1] && expectStartTimeParseResult[1].value ? dayjs(expectStartTimeParseResult[1].value.toString()) : undefined
|
||||||
];
|
];
|
||||||
return <Space style={{marginTop: 0, "height": "42px", "alignContent": "center"}}>
|
return <div className="container">
|
||||||
|
<Space style={{marginTop: 0, "height": "42px", "alignContent": "center"}}>
|
||||||
<DetailModelForm haveButton={true} open={false} operationId={OPERATION_BUTTON_TYPE.ADD}
|
<DetailModelForm haveButton={true} open={false} operationId={OPERATION_BUTTON_TYPE.ADD}
|
||||||
description='添加主线任务' reloadData={refreshData}/>
|
description='添加主线任务' reloadData={refreshData}/>
|
||||||
{
|
{
|
||||||
|
@ -113,7 +114,9 @@ export const TitleOperation: React.FC<TitleOperationProps> = ({
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</Space>
|
</Space>
|
||||||
|
<svg style={{height: "32px", width: "32px", alignItems: "center"}} className="icon" aria-hidden="true">
|
||||||
|
<use xlinkHref="#icon-user__easyico"></use>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
import type {ActionType, FormInstance, ProColumns, ProFormInstance} from '@ant-design/pro-components';
|
import type {ActionType, FormInstance, ProColumns, ProFormInstance} from '@ant-design/pro-components';
|
||||||
import {ProTable, TableDropdown} from '@ant-design/pro-components';
|
import {ProTable, TableDropdown} from '@ant-design/pro-components';
|
||||||
import {Button, DatePicker, Dropdown, Space, Switch, Tag, Tooltip} from 'antd';
|
import {Button, DatePicker, Dropdown, Space, Switch, Tag, Tooltip} from 'antd';
|
||||||
import React, {useContext, useEffect, useRef} from 'react';
|
import React, {Fragment, useContext, useEffect, useRef} from 'react';
|
||||||
import {DataType} from "@/lib/definitions";
|
import {DataType} from "@/lib/definitions";
|
||||||
import {
|
import {
|
||||||
getTaskTreeResult,
|
getTaskTreeResult,
|
||||||
|
@ -21,6 +21,7 @@ import '@/ui/task/project/TreeTablePro.modules.css'
|
||||||
import {useSearchParams} from "next/navigation";
|
import {useSearchParams} from "next/navigation";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const TreeTablePro: React.FC = () => {
|
const TreeTablePro: React.FC = () => {
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
const formRef = useRef<ProFormInstance>();
|
const formRef = useRef<ProFormInstance>();
|
||||||
|
@ -33,12 +34,6 @@ const TreeTablePro: React.FC = () => {
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
console.log("TreeTablePro",useSearchParams().get('pid'))
|
console.log("TreeTablePro",useSearchParams().get('pid'))
|
||||||
const columns: ProColumns<DataType>[] = [
|
const columns: ProColumns<DataType>[] = [
|
||||||
{
|
|
||||||
key:'code',
|
|
||||||
title: '任务编码',
|
|
||||||
dataIndex: 'code',
|
|
||||||
width: '10%',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
title: '任务名称',
|
title: '任务名称',
|
||||||
|
@ -55,6 +50,14 @@ const TreeTablePro: React.FC = () => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
render:(_, record)=>{
|
||||||
|
return <Fragment>
|
||||||
|
<svg className="icon" aria-hidden="true">
|
||||||
|
<use xlinkHref="#icon-tuandui"></use>
|
||||||
|
</svg>
|
||||||
|
{record.name}
|
||||||
|
</Fragment>
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'description',
|
key: 'description',
|
||||||
|
|
Loading…
Reference in New Issue