gxxc-ui 1.0.0
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/LICENSE +21 -0
- package/README.md +41 -0
- package/dist/AmountCellUI/index.d.ts +11 -0
- package/dist/AmountCellUI/index.js +123 -0
- package/dist/AnchorUI/demo/anchor-button.d.ts +3 -0
- package/dist/AnchorUI/demo/anchor-button.js +85 -0
- package/dist/AnchorUI/demo/use-anchor.d.ts +3 -0
- package/dist/AnchorUI/demo/use-anchor.js +69 -0
- package/dist/AnchorUI/index.d.ts +4 -0
- package/dist/AnchorUI/index.js +56 -0
- package/dist/AnchorUI/index.scss +21 -0
- package/dist/BackUI/index.d.ts +14 -0
- package/dist/BackUI/index.js +35 -0
- package/dist/BackUI/index.scss +26 -0
- package/dist/BroadcastUI/index.d.ts +12 -0
- package/dist/BroadcastUI/index.js +62 -0
- package/dist/BroadcastUI/index.scss +43 -0
- package/dist/ButtonUI/index.d.ts +9 -0
- package/dist/ButtonUI/index.js +17 -0
- package/dist/ButtonUI/index.scss +6 -0
- package/dist/CellUI/index.d.ts +13 -0
- package/dist/CellUI/index.js +78 -0
- package/dist/CellUI/index.scss +28 -0
- package/dist/Components/index.d.ts +2 -0
- package/dist/Components/index.js +4 -0
- package/dist/DateUI/index.d.ts +5 -0
- package/dist/DateUI/index.js +116 -0
- package/dist/DateUI/index.scss +3 -0
- package/dist/DescriptionsUI/index.d.ts +19 -0
- package/dist/DescriptionsUI/index.js +72 -0
- package/dist/DescriptionsUI/index.scss +88 -0
- package/dist/EmptyUI/emptyImage.d.ts +3 -0
- package/dist/EmptyUI/emptyImage.js +12 -0
- package/dist/EmptyUI/index.d.ts +9 -0
- package/dist/EmptyUI/index.js +13 -0
- package/dist/EmptyUI/index.scss +10 -0
- package/dist/FilterUI/index.d.ts +28 -0
- package/dist/FilterUI/index.js +252 -0
- package/dist/FilterUI/index.scss +80 -0
- package/dist/FormUI/index.d.ts +4 -0
- package/dist/FormUI/index.js +45 -0
- package/dist/FormUI/index.scss +64 -0
- package/dist/IconUI/index.d.ts +27 -0
- package/dist/IconUI/index.js +22 -0
- package/dist/IconUI/material/dictionary.d.ts +4 -0
- package/dist/IconUI/material/dictionary.js +71 -0
- package/dist/IconUI/material/dictionary.scss +58 -0
- package/dist/IconUI/material/material.d.ts +16 -0
- package/dist/IconUI/material/material.js +476 -0
- package/dist/IconUI/material/rally.d.ts +22 -0
- package/dist/IconUI/material/rally.js +50 -0
- package/dist/ImageUI/index.d.ts +13 -0
- package/dist/ImageUI/index.js +159 -0
- package/dist/ImageUI/index.scss +59 -0
- package/dist/InputUI/index.d.ts +7 -0
- package/dist/InputUI/index.js +114 -0
- package/dist/InputUI/index.scss +24 -0
- package/dist/LoadingUI/index.d.ts +4 -0
- package/dist/LoadingUI/index.js +13 -0
- package/dist/LoadingUI/index.scss +47 -0
- package/dist/MessageUI/index.d.ts +3 -0
- package/dist/MessageUI/index.js +9 -0
- package/dist/MessageUI/index.scss +50 -0
- package/dist/ModalUI/index.d.ts +4 -0
- package/dist/ModalUI/index.js +98 -0
- package/dist/ModalUI/index.scss +45 -0
- package/dist/NotificationUI/index.d.ts +3 -0
- package/dist/NotificationUI/index.js +30 -0
- package/dist/NotificationUI/index.scss +0 -0
- package/dist/PasswordStrongUI/index.d.ts +8 -0
- package/dist/PasswordStrongUI/index.js +67 -0
- package/dist/PasswordStrongUI/index.scss +35 -0
- package/dist/RichEditorUI/index.d.ts +10 -0
- package/dist/RichEditorUI/index.js +68 -0
- package/dist/RichEditorUI/index.scss +20 -0
- package/dist/SearchUI/index.d.ts +4 -0
- package/dist/SearchUI/index.js +55 -0
- package/dist/SearchUI/index.scss +20 -0
- package/dist/SelectUI/index.d.ts +13 -0
- package/dist/SelectUI/index.js +87 -0
- package/dist/SelectUI/index.scss +13 -0
- package/dist/StatisticUI/index.d.ts +20 -0
- package/dist/StatisticUI/index.js +70 -0
- package/dist/StatisticUI/index.scss +6 -0
- package/dist/SwitchUI/index.d.ts +4 -0
- package/dist/SwitchUI/index.js +24 -0
- package/dist/SwitchUI/index.scss +0 -0
- package/dist/TableUI/demo/index.scss +7 -0
- package/dist/TableUI/demo/setting.d.ts +4 -0
- package/dist/TableUI/demo/setting.js +107 -0
- package/dist/TableUI/index.d.ts +12 -0
- package/dist/TableUI/index.js +109 -0
- package/dist/TableUI/index.scss +40 -0
- package/dist/TableUI/material/Button/index.d.ts +4 -0
- package/dist/TableUI/material/Button/index.js +20 -0
- package/dist/TableUI/material/Button/index.scss +35 -0
- package/dist/TableUI/material/HideMultipleLines/index.d.ts +4 -0
- package/dist/TableUI/material/HideMultipleLines/index.js +48 -0
- package/dist/TableUI/material/HideMultipleLines/index.scss +11 -0
- package/dist/TableUI/material/MultiLine/index.d.ts +4 -0
- package/dist/TableUI/material/MultiLine/index.js +23 -0
- package/dist/TableUI/material/MultiLine/index.scss +25 -0
- package/dist/TableUI/material/Operate/index.d.ts +3 -0
- package/dist/TableUI/material/Operate/index.js +43 -0
- package/dist/TableUI/material/Operate/index.scss +25 -0
- package/dist/TableUI/material/Setting/index.d.ts +3 -0
- package/dist/TableUI/material/Setting/index.js +211 -0
- package/dist/TableUI/material/Setting/index.scss +52 -0
- package/dist/TagUI/index.d.ts +17 -0
- package/dist/TagUI/index.js +118 -0
- package/dist/TagUI/index.scss +41 -0
- package/dist/TestUI/index.d.ts +3 -0
- package/dist/TestUI/index.js +5 -0
- package/dist/TestUI/index.scss +0 -0
- package/dist/TextUI/index.d.ts +7 -0
- package/dist/TextUI/index.js +17 -0
- package/dist/TextUI/index.scss +10 -0
- package/dist/Tiga/demo/demoQuick.d.ts +3 -0
- package/dist/Tiga/demo/demoQuick.js +104 -0
- package/dist/Tiga/demo/demoQuickType.d.ts +8 -0
- package/dist/Tiga/demo/demoQuickType.js +94 -0
- package/dist/Tiga/index.d.ts +4 -0
- package/dist/Tiga/index.js +68 -0
- package/dist/Tiga/index.scss +0 -0
- package/dist/Tiga/material/quickType.d.ts +29 -0
- package/dist/Tiga/material/quickType.js +75 -0
- package/dist/UploadUI/index.d.ts +23 -0
- package/dist/UploadUI/index.js +383 -0
- package/dist/UploadUI/index.scss +202 -0
- package/dist/UploadUI/type.d.ts +4 -0
- package/dist/UploadUI/type.js +30 -0
- package/dist/VesselUI/index.d.ts +3 -0
- package/dist/VesselUI/index.js +199 -0
- package/dist/VesselUI/type.d.ts +64 -0
- package/dist/VesselUI/type.js +1 -0
- package/dist/VideoPreviewUI/index.d.ts +11 -0
- package/dist/VideoPreviewUI/index.js +65 -0
- package/dist/VideoPreviewUI/index.scss +32 -0
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.js +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +34 -0
- package/package.json +87 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Tiga } from "../..";
|
|
4
|
+
|
|
5
|
+
// 费率类型
|
|
6
|
+
export var FEERATETYPE = [{
|
|
7
|
+
value: 1,
|
|
8
|
+
label: '固定费率',
|
|
9
|
+
type: 1
|
|
10
|
+
}, {
|
|
11
|
+
value: 2,
|
|
12
|
+
label: '区间费率',
|
|
13
|
+
type: 2
|
|
14
|
+
}, {
|
|
15
|
+
value: 3,
|
|
16
|
+
label: '抽成费率',
|
|
17
|
+
type: 3
|
|
18
|
+
}];
|
|
19
|
+
var DemoQuickType = function DemoQuickType() {
|
|
20
|
+
var columns1 = [{
|
|
21
|
+
key: 'name',
|
|
22
|
+
name: '姓名'
|
|
23
|
+
}, {
|
|
24
|
+
key: 'age',
|
|
25
|
+
name: '年龄'
|
|
26
|
+
}, {
|
|
27
|
+
key: 'phone',
|
|
28
|
+
name: '电话'
|
|
29
|
+
}, {
|
|
30
|
+
key: 'money',
|
|
31
|
+
name: '金额',
|
|
32
|
+
type: 'amount',
|
|
33
|
+
transform: {
|
|
34
|
+
rule: 'num_expand_100'
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: 'percentage',
|
|
38
|
+
name: '百分比',
|
|
39
|
+
type: 'amount',
|
|
40
|
+
transform: {
|
|
41
|
+
rule: 'num_reduce_100_%'
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
key: 'type',
|
|
45
|
+
name: '标签',
|
|
46
|
+
type: 'tagui',
|
|
47
|
+
transform: {
|
|
48
|
+
ruleList: FEERATETYPE
|
|
49
|
+
}
|
|
50
|
+
}];
|
|
51
|
+
var dataSource = [{
|
|
52
|
+
name: '刘备',
|
|
53
|
+
age: 22,
|
|
54
|
+
phone: 15692837652,
|
|
55
|
+
money: 200,
|
|
56
|
+
percentage: 0.02,
|
|
57
|
+
type: 1
|
|
58
|
+
}, {
|
|
59
|
+
name: '关羽',
|
|
60
|
+
age: 21,
|
|
61
|
+
phone: 17697787678,
|
|
62
|
+
money: 200,
|
|
63
|
+
percentage: 0.2,
|
|
64
|
+
type: 2
|
|
65
|
+
}, {
|
|
66
|
+
name: '张飞',
|
|
67
|
+
age: 18,
|
|
68
|
+
phone: 12392880611,
|
|
69
|
+
money: 200,
|
|
70
|
+
percentage: 0.1,
|
|
71
|
+
type: 3
|
|
72
|
+
}, {
|
|
73
|
+
name: '赵云',
|
|
74
|
+
age: 19,
|
|
75
|
+
phone: 12392880611,
|
|
76
|
+
money: 200,
|
|
77
|
+
percentage: 1,
|
|
78
|
+
type: 1
|
|
79
|
+
}];
|
|
80
|
+
var current = 1;
|
|
81
|
+
var pageSize = 10;
|
|
82
|
+
var total = 4;
|
|
83
|
+
var tableParams = {
|
|
84
|
+
dataSource: dataSource,
|
|
85
|
+
pageSize: pageSize,
|
|
86
|
+
current: current,
|
|
87
|
+
total: total
|
|
88
|
+
};
|
|
89
|
+
return /*#__PURE__*/React.createElement("div", null, "\u91D1\u989D\u6A21\u5F0F", /*#__PURE__*/React.createElement(Tiga, _extends({
|
|
90
|
+
rowKey: "name",
|
|
91
|
+
tableHeader: columns1
|
|
92
|
+
}, tableParams)));
|
|
93
|
+
};
|
|
94
|
+
export default DemoQuickType;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var _excluded = ["dataSource", "initialColumns", "morphColumns", "tableHeader", "tableData", "pageSize", "total", "current", "simplePagination", "clickSimplePagination"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { TableUI } from "./..";
|
|
7
|
+
import quickType from "./material/quickType";
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
var Tiga = function Tiga(props) {
|
|
10
|
+
// tag morphColumns 用这个参数代替initialColumns传入所改变的列
|
|
11
|
+
var dataSource = props.dataSource,
|
|
12
|
+
_props$initialColumns = props.initialColumns,
|
|
13
|
+
initialColumns = _props$initialColumns === void 0 ? [] : _props$initialColumns,
|
|
14
|
+
_props$morphColumns = props.morphColumns,
|
|
15
|
+
morphColumns = _props$morphColumns === void 0 ? [] : _props$morphColumns,
|
|
16
|
+
tableHeader = props.tableHeader,
|
|
17
|
+
tableData = props.tableData,
|
|
18
|
+
pageSize = props.pageSize,
|
|
19
|
+
total = props.total,
|
|
20
|
+
current = props.current,
|
|
21
|
+
_props$simplePaginati = props.simplePagination,
|
|
22
|
+
simplePagination = _props$simplePaginati === void 0 ? false : _props$simplePaginati,
|
|
23
|
+
clickSimplePagination = props.clickSimplePagination,
|
|
24
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
25
|
+
var t_dataSource = dataSource;
|
|
26
|
+
var t_pageSize = pageSize;
|
|
27
|
+
var t_current = current;
|
|
28
|
+
var t_total = total;
|
|
29
|
+
var t_lastPage;
|
|
30
|
+
var t_nextPage;
|
|
31
|
+
|
|
32
|
+
// 特殊字段-完全适配于A/B/OS项目
|
|
33
|
+
if (tableData) {
|
|
34
|
+
// 表格数据
|
|
35
|
+
t_dataSource = tableData === null || tableData === void 0 ? void 0 : tableData.records;
|
|
36
|
+
// 表格页码
|
|
37
|
+
t_pageSize = tableData === null || tableData === void 0 ? void 0 : tableData.size;
|
|
38
|
+
// 表格当前
|
|
39
|
+
t_current = tableData === null || tableData === void 0 ? void 0 : tableData.current;
|
|
40
|
+
// 表格总数
|
|
41
|
+
t_total = tableData === null || tableData === void 0 ? void 0 : tableData.total;
|
|
42
|
+
// 是否有上一页
|
|
43
|
+
t_lastPage = tableData === null || tableData === void 0 ? void 0 : tableData.last;
|
|
44
|
+
// 是否有下一页
|
|
45
|
+
t_nextPage = tableData === null || tableData === void 0 ? void 0 : tableData.next;
|
|
46
|
+
}
|
|
47
|
+
var columns = null;
|
|
48
|
+
var flag = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.every(function (item) {
|
|
49
|
+
return 'name' in item;
|
|
50
|
+
});
|
|
51
|
+
if (flag) {
|
|
52
|
+
var tableColumns = (morphColumns === null || morphColumns === void 0 ? void 0 : morphColumns.length) > 0 ? morphColumns : initialColumns;
|
|
53
|
+
// 进行预设格式处理
|
|
54
|
+
columns = quickType(tableHeader, tableColumns);
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/React.createElement(TableUI, _extends({
|
|
57
|
+
columns: columns,
|
|
58
|
+
dataSource: t_dataSource,
|
|
59
|
+
pageSize: t_pageSize,
|
|
60
|
+
current: t_current,
|
|
61
|
+
total: t_total,
|
|
62
|
+
lastPage: t_lastPage,
|
|
63
|
+
nextPage: t_nextPage,
|
|
64
|
+
simplePagination: simplePagination,
|
|
65
|
+
clickSimplePagination: clickSimplePagination
|
|
66
|
+
}, otherProps));
|
|
67
|
+
};
|
|
68
|
+
export default Tiga;
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** 当前表头类型 */
|
|
2
|
+
export interface TableHeaderItem {
|
|
3
|
+
sort?: number;
|
|
4
|
+
id?: number;
|
|
5
|
+
key?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
disable?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
dataIndex?: string;
|
|
11
|
+
width?: number;
|
|
12
|
+
fixed?: string;
|
|
13
|
+
render?: unknown;
|
|
14
|
+
type?: string;
|
|
15
|
+
transform?: any;
|
|
16
|
+
}
|
|
17
|
+
/** 渲染表格的Columns */
|
|
18
|
+
export interface Columns {
|
|
19
|
+
align?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
dataIndex?: string;
|
|
22
|
+
key?: string;
|
|
23
|
+
width?: number;
|
|
24
|
+
sort?: number;
|
|
25
|
+
render?: any;
|
|
26
|
+
[key: string | number]: any;
|
|
27
|
+
}
|
|
28
|
+
declare const quickType: (tableHeader: TableHeaderItem[], columns: Columns[]) => Columns[];
|
|
29
|
+
export default quickType;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { CellUI, TagUI } from "../..";
|
|
9
|
+
import { num_expand_100, num_reduce_100 } from 'sic-util';
|
|
10
|
+
/** 当前表头类型 */
|
|
11
|
+
|
|
12
|
+
/** 渲染表格的Columns */
|
|
13
|
+
|
|
14
|
+
var quickType = function quickType(tableHeader, columns) {
|
|
15
|
+
var newCol = [];
|
|
16
|
+
tableHeader === null || tableHeader === void 0 || tableHeader.forEach(function (a) {
|
|
17
|
+
if ((a === null || a === void 0 ? void 0 : a.selected) !== false) {
|
|
18
|
+
var obj = {};
|
|
19
|
+
obj.title = a === null || a === void 0 ? void 0 : a.name;
|
|
20
|
+
obj.dataIndex = a === null || a === void 0 ? void 0 : a.key;
|
|
21
|
+
obj.render = function (i) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(CellUI, null, i);
|
|
23
|
+
};
|
|
24
|
+
obj = _objectSpread(_objectSpread({}, a), obj);
|
|
25
|
+
// 金额类型
|
|
26
|
+
if (a.type === 'amount') {
|
|
27
|
+
var _a$transform$realKey, _a$transform, _a$transform2, _a$transform3, _a$transform4;
|
|
28
|
+
var realKey = (_a$transform$realKey = a === null || a === void 0 || (_a$transform = a.transform) === null || _a$transform === void 0 ? void 0 : _a$transform.realKey) !== null && _a$transform$realKey !== void 0 ? _a$transform$realKey : a.key;
|
|
29
|
+
// 金额类型-扩大一百倍
|
|
30
|
+
if (((_a$transform2 = a.transform) === null || _a$transform2 === void 0 ? void 0 : _a$transform2.rule) === 'num_expand_100') {
|
|
31
|
+
obj.render = function (_, item) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(CellUI, null, num_expand_100(item[realKey]));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
// 金额类型-缩小一百倍
|
|
36
|
+
if (((_a$transform3 = a.transform) === null || _a$transform3 === void 0 ? void 0 : _a$transform3.rule) === 'num_reduce_100') {
|
|
37
|
+
obj.render = function (_, item) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(CellUI, null, num_reduce_100(item[realKey]));
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// 金额类型-缩小一百倍+%
|
|
42
|
+
if (((_a$transform4 = a.transform) === null || _a$transform4 === void 0 ? void 0 : _a$transform4.rule) === 'num_reduce_100_%') {
|
|
43
|
+
obj.render = function (_, item) {
|
|
44
|
+
return /*#__PURE__*/React.createElement(CellUI, null, "".concat(num_reduce_100(item[realKey]), "%"));
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (a.type === 'tagui') {
|
|
49
|
+
var _a$transform$realKey2, _a$transform5;
|
|
50
|
+
var _realKey = (_a$transform$realKey2 = a === null || a === void 0 || (_a$transform5 = a.transform) === null || _a$transform5 === void 0 ? void 0 : _a$transform5.realKey) !== null && _a$transform$realKey2 !== void 0 ? _a$transform$realKey2 : a.key;
|
|
51
|
+
obj.render = function (_, item) {
|
|
52
|
+
var _a$transform6;
|
|
53
|
+
var current = (_a$transform6 = a.transform) === null || _a$transform6 === void 0 || (_a$transform6 = _a$transform6.ruleList) === null || _a$transform6 === void 0 || (_a$transform6 = _a$transform6.filter(function (obj) {
|
|
54
|
+
return (obj === null || obj === void 0 ? void 0 : obj.value) === item[_realKey];
|
|
55
|
+
})) === null || _a$transform6 === void 0 ? void 0 : _a$transform6[0];
|
|
56
|
+
return /*#__PURE__*/React.createElement(TagUI, {
|
|
57
|
+
type: current.type
|
|
58
|
+
}, current === null || current === void 0 ? void 0 : current.label);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
columns === null || columns === void 0 || columns.forEach(function (b) {
|
|
62
|
+
if ((a === null || a === void 0 ? void 0 : a.key) === (b === null || b === void 0 ? void 0 : b.key)) {
|
|
63
|
+
obj = _objectSpread(_objectSpread({}, obj), b);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
newCol === null || newCol === void 0 || newCol.push(obj);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
newCol === null || newCol === void 0 || newCol.sort(function (a, b) {
|
|
70
|
+
var _a$sort, _b$sort;
|
|
71
|
+
return ((_a$sort = a === null || a === void 0 ? void 0 : a.sort) !== null && _a$sort !== void 0 ? _a$sort : 2) - ((_b$sort = b === null || b === void 0 ? void 0 : b.sort) !== null && _b$sort !== void 0 ? _b$sort : 1);
|
|
72
|
+
});
|
|
73
|
+
return newCol;
|
|
74
|
+
};
|
|
75
|
+
export default quickType;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { UploadFile, UploadProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './index.scss';
|
|
4
|
+
interface fileListType extends UploadFile {
|
|
5
|
+
url?: string;
|
|
6
|
+
md5?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UploadUIProps extends UploadProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
mode: number;
|
|
11
|
+
value?: fileListType[];
|
|
12
|
+
scene: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
fileType?: string;
|
|
15
|
+
maxSize?: number;
|
|
16
|
+
maxCount?: number;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
backgroundImage?: string;
|
|
19
|
+
getOssDataAPI?: (scene: string, fileName: string, md5: unknown) => Promise<any>;
|
|
20
|
+
onChange?: any;
|
|
21
|
+
}
|
|
22
|
+
declare const UploadUI: (props: UploadUIProps) => React.JSX.Element;
|
|
23
|
+
export default UploadUI;
|