环境变量值增加复制功能

This commit is contained in:
whyour 2022-11-03 17:34:36 +08:00
parent 73c6fd18ed
commit 19a58a3510
3 changed files with 8 additions and 5 deletions

View File

@ -1037,6 +1037,7 @@ const Crontab = () => {
const tabClick = (key: string) => { const tabClick = (key: string) => {
const view = enabledCronViews.find((x) => x.id == key); const view = enabledCronViews.find((x) => x.id == key);
setSelectedRowIds([]);
setPageConf({ ...pageConf, page: 1 }); setPageConf({ ...pageConf, page: 1 });
setViewConf(view ? view : null); setViewConf(view ? view : null);
}; };

View File

@ -286,7 +286,7 @@ const Dependence = () => {
setTimeout(() => { setTimeout(() => {
if (selectedRowIds.length === 0 || selectedIds.length === 0) { if (selectedRowIds.length === 0 || selectedIds.length === 0) {
setTableScrollHeight(getTableScroll({ extraHeight: 87 })); setTableScrollHeight(getTableScroll({ extraHeight: 59 }));
} }
}); });
}; };
@ -370,7 +370,7 @@ const Dependence = () => {
useEffect(() => { useEffect(() => {
if (tableRef.current) { if (tableRef.current) {
setTableScrollHeight(getTableScroll({ extraHeight: 87 })); setTableScrollHeight(getTableScroll({ extraHeight: 59 }));
} }
}, []); }, []);
@ -470,6 +470,7 @@ const Dependence = () => {
); );
const onTabChange = (activeKey: string) => { const onTabChange = (activeKey: string) => {
setSelectedRowIds([]);
setType(activeKey); setType(activeKey);
}; };

View File

@ -134,6 +134,7 @@ const Env = () => {
textAlign: 'left', textAlign: 'left',
}} }}
ellipsis={{ tooltip: text, rows: 2 }} ellipsis={{ tooltip: text, rows: 2 }}
copyable
> >
{text} {text}
</Paragraph> </Paragraph>
@ -410,7 +411,7 @@ const Env = () => {
setTimeout(() => { setTimeout(() => {
if (selectedRowIds.length === 0 || selectedIds.length === 0) { if (selectedRowIds.length === 0 || selectedIds.length === 0) {
setTableScrollHeight(getTableScroll({ extraHeight: 87 })); setTableScrollHeight(getTableScroll({ extraHeight: 59 }));
} }
}); });
}; };
@ -510,7 +511,7 @@ const Env = () => {
useEffect(() => { useEffect(() => {
if (tableRef.current) { if (tableRef.current) {
setTableScrollHeight(getTableScroll({ extraHeight: 87 })); setTableScrollHeight(getTableScroll({ extraHeight: 59 }));
} }
}, []); }, []);
@ -598,7 +599,7 @@ const Env = () => {
scroll={{ x: 1000, y: tableScrollHeight }} scroll={{ x: 1000, y: tableScrollHeight }}
components={components} components={components}
loading={loading} loading={loading}
onRow={(record: any, index: number) => { onRow={(record: any, index: number | undefined) => {
return { return {
index, index,
moveRow, moveRow,