crud-page-react 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useState, useEffect, useRef, useCallback } from 'react';
3
3
  import { DatePicker, Form, Row, Col, Space, Button, Input, Switch, Radio, Select, InputNumber, Tooltip, Popconfirm, Dropdown, Table, message, Tag, Modal, Divider, Card, Checkbox, Typography } from 'antd';
4
- import { SearchOutlined, ReloadOutlined, EyeOutlined, EditOutlined, DeleteOutlined, MoreOutlined, CopyOutlined, FormOutlined, CodeOutlined, PlusOutlined } from '@ant-design/icons';
4
+ import { SearchOutlined, ReloadOutlined, EyeOutlined, EditOutlined, DeleteOutlined, CopyOutlined, MoreOutlined, FormOutlined, CodeOutlined, PlusOutlined } from '@ant-design/icons';
5
5
  import dayjs from 'dayjs';
6
6
  import customParseFormat from 'dayjs/plugin/customParseFormat';
7
7
 
@@ -270,7 +270,7 @@ function DynamicTable({ schema, data, loading, pagination, onView, onEdit, onDel
270
270
  return (jsx(Popconfirm, { title: (_b = (_a = action.confirm) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : '确定删除?', description: (_c = action.confirm) === null || _c === void 0 ? void 0 : _c.content, onConfirm: () => onDelete(record), okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88", okButtonProps: { danger: true }, children: jsx(Tooltip, { title: action.label, children: jsx(Button, { type: "link", size: "small", danger: true, icon: jsx(DeleteOutlined, {}) }) }) }, action.key));
271
271
  }
272
272
  return null;
273
- }), customActions.length > 0 && (jsx(Dropdown, { menu: { items: dropdownItems }, trigger: ['click'], placement: "bottomRight", children: jsx(Tooltip, { title: "\u5176\u5B83\u64CD\u4F5C", children: jsx(Button, { type: "link", size: "small", icon: jsx(MoreOutlined, {}) }) }) })), jsx(Tooltip, { title: "\u590D\u5236 JSON", children: jsx(Button, { type: "link", size: "small", icon: jsx(CopyOutlined, {}), onClick: () => copyJson(record) }) })] }));
273
+ }), jsx(Tooltip, { title: "\u590D\u5236 JSON", children: jsx(Button, { type: "link", size: "small", icon: jsx(CopyOutlined, {}), onClick: () => copyJson(record) }) }), customActions.length > 0 && (jsx(Dropdown, { menu: { items: dropdownItems }, trigger: ['click'], placement: "bottomRight", children: jsx(Tooltip, { title: "\u5176\u5B83\u64CD\u4F5C", children: jsx(Button, { type: "link", size: "small", icon: jsx(MoreOutlined, {}) }) }) }))] }));
274
274
  },
275
275
  });
276
276
  return (jsx(Table, { rowKey: (_a = schema.rowKey) !== null && _a !== void 0 ? _a : 'id', columns: columns, dataSource: data, loading: loading, scroll: { x: 'max-content' }, pagination: {