提交 eaa42ece 编写于 作者: S siyi98

更改TR目录结构

上级 e4d67695
......@@ -38,7 +38,8 @@
"@ant-design/icons": "^4.2.2",
"dayjs": "^1.8.29",
"form-render": "1.x",
"lodash.get": "^4.4.2"
"lodash.get": "^4.4.2",
"unstated-next": "^1.1.0"
},
"devDependencies": {
"umi-request": "^1.3.5"
......
import React, { useEffect, useRef, useState } from 'react';
import { useTable } from './hooks';
import { useTable } from '../utils/hooks';
import { Button } from 'antd';
import SearchForm, { useForm } from 'form-render';
......
import React, { useEffect, useRef } from 'react';
import { useTable } from './hooks';
import { useTable } from '../utils/hooks';
import { Table, Radio, Space } from 'antd';
import { getDate, getDateTime, getMoneyType } from './utils';
import { getDate, getDateTime, getMoneyType } from '../utils';
import { renderDom } from './field';
import ErrorBoundary from './components/ErrorBoundary';
import ToolBarAction from './components/ToolBarAction';
import ErrorBoundary from './ErrorBoundary';
import ToolBarAction from './ToolBarAction';
import { ProTableProps } from './typing';
import { ProTableProps } from '../typing';
const ProTable = (props: ProTableProps) => {
if (props.dataSource) {
......
import React from 'react';
import { ColumnHeightOutlined } from '@ant-design/icons';
import { Menu, Dropdown, Tooltip } from 'antd';
import { useTable } from '../../hooks';
import { useTable } from '../../utils/hooks';
export type DensitySize = 'middle' | 'small' | 'default' | undefined;
......
import React from 'react';
import { useTable } from '../../hooks';
import { useTable } from '../../utils/hooks';
import { Tooltip } from 'antd';
import { ReloadOutlined } from '@ant-design/icons';
......
import React, { useRef, forwardRef, useImperativeHandle } from 'react';
import { useSet, useTable } from './hooks';
import { Ctx } from './context';
import Search from './Search';
import Table from './Table';
import { useSet, useTable } from './utils/hooks';
import { Ctx } from './utils/context';
import Search from './components/Search';
import Table from './components/Table';
import { message, ConfigProvider } from 'antd';
import { isObj } from './utils';
import _get from 'lodash.get';
......
import React from 'react';
import { Tag, Tooltip } from 'antd';
import { getDateTime, getDate } from './utils';
const PrompText = ({ text = '', prompText }) => (
<Tooltip title={prompText || text}>
<span>{text}</span>
</Tooltip>
);
export default {
tags: tags => (
<div>
{tags.map(tag => {
return (
<Tag color="volcano" key={tag}>
{tag.toUpperCase()}
</Tag>
);
})}
</div>
),
dateTime: value => getDateTime(value),
date: value => getDate(value),
tooltip: text => <PrompText text={text} />,
status: value => {
switch (value.status) {
case 'Default':
return <Tag color="blue">{value.text}</Tag>;
case 'Error':
return <Tag color="red">{value.text}</Tag>;
case 'Success':
return <Tag color="green">{value.text}</Tag>;
default:
return <Tag color="blue">{value.text}</Tag>;
}
},
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册