linkmore-design 1.1.13-alpha.4 → 1.1.13-alpha.6
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/Button/demos/ghost.d.ts +2 -0
- package/dist/Descriptions/Cell.d.ts +1 -0
- package/dist/Descriptions/Item.d.ts +1 -0
- package/dist/LmDrag/LmDrag.d.ts +4 -0
- package/dist/LmDrag/components/DndContainer.d.ts +3 -0
- package/dist/LmDrag/components/sortableBox.d.ts +5 -0
- package/dist/LmDrag/components/sortableItem.d.ts +7 -0
- package/dist/LmDrag/demos/basic.d.ts +2 -0
- package/dist/LmDrag/index.d.ts +10 -0
- package/dist/LmDrag/style/index.d.ts +1 -0
- package/dist/LmDrag/style/variables.d.ts +1 -0
- package/dist/LmDrag/wrapper/Root.d.ts +3 -0
- package/dist/LmEditTable/EditTable.d.ts +15 -3
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/dist/LmUpload/fns/index.d.ts +1 -0
- package/dist/QuickMenu/index.d.ts +2 -1
- package/dist/Select/index.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.umd.js +804 -119
- package/dist/index.umd.min.js +9 -9
- package/dist/variables.css +67 -25
- package/es/Button/index.js +4 -3
- package/es/Button/style/index.css +28 -25
- package/es/Button/style/variables.css +28 -25
- package/es/Descriptions/Cell.d.ts +1 -0
- package/es/Descriptions/Cell.js +5 -2
- package/es/Descriptions/Item.d.ts +1 -0
- package/es/Descriptions/Row.js +6 -1
- package/es/InputNumber/index.js +7 -9
- package/es/LmDrag/LmDrag.d.ts +4 -0
- package/es/LmDrag/LmDrag.js +30 -0
- package/es/LmDrag/components/DndContainer.d.ts +3 -0
- package/es/LmDrag/components/DndContainer.js +121 -0
- package/es/LmDrag/components/sortableBox.d.ts +5 -0
- package/es/LmDrag/components/sortableBox.js +23 -0
- package/es/LmDrag/components/sortableItem.d.ts +7 -0
- package/es/LmDrag/components/sortableItem.js +41 -0
- package/es/LmDrag/index.d.ts +10 -0
- package/es/LmDrag/index.js +3 -0
- package/es/LmDrag/style/index.css +0 -0
- package/es/LmDrag/style/index.d.ts +1 -0
- package/es/LmDrag/style/index.js +1 -0
- package/es/LmDrag/style/variables.css +0 -0
- package/es/LmDrag/style/variables.d.ts +1 -0
- package/es/LmDrag/style/variables.js +1 -0
- package/es/LmDrag/wrapper/Root.d.ts +3 -0
- package/es/LmDrag/wrapper/Root.js +12 -0
- package/es/LmEditTable/EditTable.d.ts +15 -3
- package/es/LmEditTable/EditTable.js +147 -67
- package/es/LmEditTable/sortableItemCol.js +38 -11
- package/es/LmEditTable/util.js +16 -5
- package/es/LmFilter/components/DropdownFIlter.js +27 -6
- package/es/LmFilter/style/index.css +12 -0
- package/es/LmFilter/style/variables.css +12 -0
- package/es/LmUpload/LmUpload.js +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.js +4 -3
- package/es/LmUpload/UploadList/index.js +52 -2
- package/es/LmUpload/fns/index.d.ts +1 -0
- package/es/LmUpload/fns/index.js +19 -3
- package/es/QuickMenu/index.d.ts +2 -1
- package/es/QuickMenu/index.js +11 -12
- package/es/Select/index.d.ts +3 -0
- package/es/Select/index.js +28 -1
- package/es/Select/style/index.css +27 -0
- package/es/Select/style/variables.css +27 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/styles/variables.css +67 -25
- package/lib/Button/index.js +4 -3
- package/lib/Button/style/index.css +28 -25
- package/lib/Button/style/variables.css +28 -25
- package/lib/Descriptions/Cell.d.ts +1 -0
- package/lib/Descriptions/Cell.js +5 -2
- package/lib/Descriptions/Item.d.ts +1 -0
- package/lib/Descriptions/Row.js +6 -1
- package/lib/InputNumber/index.js +9 -9
- package/lib/LmDrag/LmDrag.d.ts +4 -0
- package/lib/LmDrag/LmDrag.js +44 -0
- package/lib/LmDrag/components/DndContainer.d.ts +3 -0
- package/lib/LmDrag/components/DndContainer.js +138 -0
- package/lib/LmDrag/components/sortableBox.d.ts +5 -0
- package/lib/LmDrag/components/sortableBox.js +37 -0
- package/lib/LmDrag/components/sortableItem.d.ts +7 -0
- package/lib/LmDrag/components/sortableItem.js +54 -0
- package/lib/LmDrag/index.d.ts +10 -0
- package/lib/LmDrag/index.js +19 -0
- package/lib/LmDrag/style/index.css +0 -0
- package/lib/LmDrag/style/index.d.ts +1 -0
- package/lib/LmDrag/style/index.js +3 -0
- package/lib/LmDrag/style/variables.css +0 -0
- package/lib/LmDrag/style/variables.d.ts +1 -0
- package/lib/LmDrag/style/variables.js +3 -0
- package/lib/LmDrag/wrapper/Root.d.ts +3 -0
- package/lib/LmDrag/wrapper/Root.js +26 -0
- package/lib/LmEditTable/EditTable.d.ts +15 -3
- package/lib/LmEditTable/EditTable.js +146 -66
- package/lib/LmEditTable/sortableItemCol.js +34 -8
- package/lib/LmEditTable/util.js +15 -4
- package/lib/LmFilter/components/DropdownFIlter.js +27 -6
- package/lib/LmFilter/style/index.css +12 -0
- package/lib/LmFilter/style/variables.css +12 -0
- package/lib/LmUpload/LmUpload.js +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.js +4 -3
- package/lib/LmUpload/UploadList/index.js +53 -2
- package/lib/LmUpload/fns/index.d.ts +1 -0
- package/lib/LmUpload/fns/index.js +19 -3
- package/lib/QuickMenu/index.d.ts +2 -1
- package/lib/QuickMenu/index.js +11 -12
- package/lib/Select/index.d.ts +3 -0
- package/lib/Select/index.js +29 -1
- package/lib/Select/style/index.css +27 -0
- package/lib/Select/style/variables.css +27 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +15 -1
- package/lib/styles/variables.css +67 -25
- package/package.json +1 -1
|
@@ -23,6 +23,18 @@ interface ILmEditTable extends TableProps<any> {
|
|
|
23
23
|
};
|
|
24
24
|
/** 是否为强制更新 */
|
|
25
25
|
shouldUpdate?: boolean;
|
|
26
|
+
rowSelection?: TableProps<any>['rowSelection'] & {
|
|
27
|
+
selectedRows?: Record<string, any>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface CountdownHandle {
|
|
31
|
+
setRow: (data: any) => void;
|
|
32
|
+
getCheckboxRecords: () => any[];
|
|
33
|
+
clearSelect: () => void;
|
|
34
|
+
customSetCheckboxRecords: (data: any[]) => void;
|
|
35
|
+
deleteRowData: (record: string | Record<string, any>) => void;
|
|
36
|
+
addRowData: (record: string | Record<string, any>, defaultValue?: Record<string, any> | Record<string, any>[], addInChild?: boolean) => void;
|
|
37
|
+
valid: () => void;
|
|
26
38
|
}
|
|
27
39
|
interface ILmColumns extends TableColumnType<any> {
|
|
28
40
|
editable?: 'input' | 'number' | 'inputRange' | 'date' | 'select' | 'multiple' | 'checkbox' | 'radio' | 'switch' | 'upload' | 'operate' | 'lm_edit_opetate' | 'render';
|
|
@@ -37,11 +49,11 @@ interface ILmColumns extends TableColumnType<any> {
|
|
|
37
49
|
export declare type TLmEditTable = {
|
|
38
50
|
onChange?: (data: any[]) => void;
|
|
39
51
|
columns: ILmColumns[];
|
|
40
|
-
virtual
|
|
52
|
+
virtual?: boolean;
|
|
41
53
|
} & ILmEditTable;
|
|
42
54
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
43
55
|
onChange?: (data: any[]) => void;
|
|
44
56
|
columns: ILmColumns[];
|
|
45
|
-
virtual
|
|
46
|
-
} & ILmEditTable & React.RefAttributes<
|
|
57
|
+
virtual?: boolean;
|
|
58
|
+
} & ILmEditTable & React.RefAttributes<CountdownHandle>>>;
|
|
47
59
|
export default _default;
|
|
@@ -494,7 +494,16 @@ var EditableCell = function EditableCell(props) {
|
|
|
494
494
|
};
|
|
495
495
|
|
|
496
496
|
var Control = function Control(con) {
|
|
497
|
+
var _a;
|
|
498
|
+
|
|
497
499
|
var resultComponentProps = (0, _lodash.isFunction)(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
|
|
500
|
+
|
|
501
|
+
if ((0, _lodash.isFunction)(componentProps) && ((_a = col === null || col === void 0 ? void 0 : col.newOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
502
|
+
resultComponentProps = Object.assign(Object.assign({}, resultComponentProps), {
|
|
503
|
+
options: col === null || col === void 0 ? void 0 : col.newOptions
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
|
|
498
507
|
var clearAttrComponentProps = (0, _lodash.omit)(resultComponentProps, ['optionOnly', 'isOnlyValue', 'quickcopy']);
|
|
499
508
|
|
|
500
509
|
switch (con) {
|
|
@@ -521,8 +530,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
521
530
|
|
|
522
531
|
case 'inputRange':
|
|
523
532
|
return /*#__PURE__*/_react.default.createElement(InputRange, Object.assign({
|
|
524
|
-
onChange: handleFormItemChange
|
|
525
|
-
ref: inputRef
|
|
533
|
+
onChange: handleFormItemChange
|
|
526
534
|
}, resultComponentProps, {
|
|
527
535
|
record: record,
|
|
528
536
|
rowIndex: rowIndex,
|
|
@@ -615,7 +623,6 @@ var EditableCell = function EditableCell(props) {
|
|
|
615
623
|
return /*#__PURE__*/_react.default.createElement(Opetate, Object.assign({
|
|
616
624
|
record: record,
|
|
617
625
|
rowKey: rowKey,
|
|
618
|
-
ref: inputRef,
|
|
619
626
|
handleAdd: handleTableRowAdd,
|
|
620
627
|
handleDelete: handleTableRowDelete,
|
|
621
628
|
getLength: getLength,
|
|
@@ -624,7 +631,8 @@ var EditableCell = function EditableCell(props) {
|
|
|
624
631
|
|
|
625
632
|
case 'render':
|
|
626
633
|
{
|
|
627
|
-
var
|
|
634
|
+
var _resultComponentProps = resultComponentProps,
|
|
635
|
+
render = _resultComponentProps.render;
|
|
628
636
|
var fromData = form.getFieldsValue();
|
|
629
637
|
return render === null || render === void 0 ? void 0 : render(Object.assign(Object.assign({}, !(0, _util.isObjEmpty)(fromData) ? Object.assign(Object.assign({}, record), (0, _defineProperty2.default)({}, dataIndex, fromData[dataIndex])) : record), {
|
|
630
638
|
onChange: save
|
|
@@ -733,7 +741,8 @@ var EditableCell = function EditableCell(props) {
|
|
|
733
741
|
var MemoEditableCell = /*#__PURE__*/(0, _react.memo)(EditableCell, function (prev, next) {
|
|
734
742
|
var pickProps = ['record', 'colIndex'];
|
|
735
743
|
var p = (0, _lodash.pick)(prev, pickProps);
|
|
736
|
-
var n = (0, _lodash.pick)(next, pickProps);
|
|
744
|
+
var n = (0, _lodash.pick)(next, pickProps);
|
|
745
|
+
console.log(prev, next, 222); // console.log(prev, next, '22', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
737
746
|
|
|
738
747
|
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
739
748
|
|
|
@@ -744,6 +753,8 @@ var MemoEditableCell = /*#__PURE__*/(0, _react.memo)(EditableCell, function (pre
|
|
|
744
753
|
return (0, _lodash.isEqual)(p, n);
|
|
745
754
|
});
|
|
746
755
|
var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
756
|
+
var _a, _b;
|
|
757
|
+
|
|
747
758
|
var defaultData = props.value,
|
|
748
759
|
columns = props.columns,
|
|
749
760
|
isEdit = props.isEdit,
|
|
@@ -787,19 +798,31 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
787
798
|
var _useState7 = (0, _react.useState)({}),
|
|
788
799
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
789
800
|
_valid = _useState8[0],
|
|
790
|
-
setValid = _useState8[1];
|
|
801
|
+
setValid = _useState8[1]; // const [localRowSelectList, setLocalRowSelectList] = useState([])
|
|
791
802
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
803
|
+
|
|
804
|
+
var transformRowSelect = function transformRowSelect(selectedRowKeys, selectedRows, info) {
|
|
805
|
+
var _a;
|
|
806
|
+
|
|
807
|
+
return (_a = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) === null || _a === void 0 ? void 0 : _a.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
var _useControllableValue3 = (0, _ahooks.useControllableValue)({
|
|
811
|
+
value: {
|
|
812
|
+
selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || []
|
|
813
|
+
},
|
|
814
|
+
onChange: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) ? transformRowSelect : undefined
|
|
815
|
+
}),
|
|
816
|
+
_useControllableValue4 = (0, _slicedToArray2.default)(_useControllableValue3, 2),
|
|
817
|
+
localRowSelectList = _useControllableValue4[0],
|
|
818
|
+
setLocalRowSelectList = _useControllableValue4[1];
|
|
796
819
|
/** 当前展开的列 */
|
|
797
820
|
|
|
798
821
|
|
|
799
|
-
var
|
|
800
|
-
|
|
801
|
-
expandedRowKeys =
|
|
802
|
-
setExpandedRowKeys =
|
|
822
|
+
var _useState9 = (0, _react.useState)([]),
|
|
823
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
824
|
+
expandedRowKeys = _useState10[0],
|
|
825
|
+
setExpandedRowKeys = _useState10[1];
|
|
803
826
|
|
|
804
827
|
var dataSourceRef = (0, _react.useRef)(dataSource);
|
|
805
828
|
var deepDataSourceRef = (0, _react.useRef)((0, _util.deepDataSourcePreKeys)(dataSource, _rowKey));
|
|
@@ -843,25 +866,20 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
843
866
|
setDataSource(res); // onChange?.(res)
|
|
844
867
|
};
|
|
845
868
|
/** 本地缓存一个选择数据 */
|
|
869
|
+
// useEffect(() => {
|
|
870
|
+
// if (rowSelection) {
|
|
871
|
+
// const { selectedRowKeys } = rowSelection
|
|
872
|
+
// if (selectedRowKeys) {
|
|
873
|
+
// setLocalRowSelectList(localRowSelectList || [])
|
|
874
|
+
// }
|
|
875
|
+
// }
|
|
876
|
+
// }, [rowSelection])
|
|
877
|
+
// const editTableRowChange = (selectRows) => {
|
|
878
|
+
// setLocalRowSelectList(selectRows)
|
|
879
|
+
// ;(rowSelection?.onChange as any)?.(selectRows)
|
|
880
|
+
// }
|
|
846
881
|
|
|
847
882
|
|
|
848
|
-
(0, _react.useEffect)(function () {
|
|
849
|
-
if (rowSelection) {
|
|
850
|
-
var selectedRowKeys = rowSelection.selectedRowKeys;
|
|
851
|
-
|
|
852
|
-
if (selectedRowKeys) {
|
|
853
|
-
setLocalRowSelectList(localRowSelectList || []);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}, [rowSelection]);
|
|
857
|
-
|
|
858
|
-
var editTableRowChange = function editTableRowChange(selectRows) {
|
|
859
|
-
var _a;
|
|
860
|
-
|
|
861
|
-
setLocalRowSelectList(selectRows);
|
|
862
|
-
(_a = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) === null || _a === void 0 ? void 0 : _a.call(rowSelection, selectRows);
|
|
863
|
-
};
|
|
864
|
-
|
|
865
883
|
var handleSave = function handleSave(row, options) {
|
|
866
884
|
var _a, _b;
|
|
867
885
|
|
|
@@ -951,7 +969,8 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
951
969
|
var handleTableRowDelete = function handleTableRowDelete(key) {
|
|
952
970
|
var _a, _b, _c;
|
|
953
971
|
|
|
954
|
-
var
|
|
972
|
+
var rkey = (0, _lodash.isObject)(key) ? key[_rowKey] : key;
|
|
973
|
+
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
955
974
|
|
|
956
975
|
if (preKeys.length > 1) {
|
|
957
976
|
/** 说明删除的是children中的数据 */
|
|
@@ -995,30 +1014,46 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
995
1014
|
/** 快捷添加 */
|
|
996
1015
|
|
|
997
1016
|
|
|
998
|
-
var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren) {
|
|
1017
|
+
var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren, defaultRecord) {
|
|
999
1018
|
var _a, _b;
|
|
1000
1019
|
|
|
1001
|
-
var
|
|
1020
|
+
var rkey = (0, _lodash.isObject)(record) ? record[_rowKey] : record;
|
|
1021
|
+
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
1022
|
+
console.log(record, isAppendInChindren, defaultRecord, '333', preKeys);
|
|
1002
1023
|
var res = (0, _immer.produce)(dataSourceRef.current, function (draft) {
|
|
1003
|
-
var _a, _b, _c, _d;
|
|
1024
|
+
var _a, _b, _c, _d, _e;
|
|
1004
1025
|
|
|
1005
|
-
if (preKeys.length > 1) {
|
|
1026
|
+
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
1006
1027
|
var deeps = function deeps(children) {
|
|
1007
1028
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
1008
|
-
var _a;
|
|
1029
|
+
var _a, _b;
|
|
1009
1030
|
|
|
1010
1031
|
if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
|
|
1011
|
-
if (item[_rowKey] ===
|
|
1032
|
+
if (item[_rowKey] === rkey) {
|
|
1012
1033
|
if (isAppendInChindren) {
|
|
1013
1034
|
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
1014
|
-
|
|
1035
|
+
if (Array.isArray(defaultRecord)) {
|
|
1036
|
+
var _a2;
|
|
1037
|
+
|
|
1038
|
+
(_a = item === null || item === void 0 ? void 0 : item.children) === null || _a === void 0 ? void 0 : (_a2 = _a).push.apply(_a2, (0, _toConsumableArray2.default)(defaultRecord));
|
|
1039
|
+
} else {
|
|
1040
|
+
(_b = item === null || item === void 0 ? void 0 : item.children) === null || _b === void 0 ? void 0 : _b.push(defaultRecord || (0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now())));
|
|
1041
|
+
}
|
|
1015
1042
|
} else {
|
|
1016
|
-
|
|
1043
|
+
if (Array.isArray(defaultRecord)) {
|
|
1044
|
+
item.children = (0, _toConsumableArray2.default)(defaultRecord);
|
|
1045
|
+
} else {
|
|
1046
|
+
item.children = [defaultRecord || (0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now()))];
|
|
1047
|
+
}
|
|
1017
1048
|
}
|
|
1018
1049
|
|
|
1019
1050
|
!expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat((0, _toConsumableArray2.default)(expandedRowKeys), [item[_rowKey]]));
|
|
1020
1051
|
} else {
|
|
1021
|
-
|
|
1052
|
+
if (Array.isArray(defaultRecord)) {
|
|
1053
|
+
children.splice.apply(children, [index + 1, 0].concat((0, _toConsumableArray2.default)(defaultRecord)));
|
|
1054
|
+
} else {
|
|
1055
|
+
children.splice(index + 1, 0, defaultRecord || (0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now())));
|
|
1056
|
+
}
|
|
1022
1057
|
}
|
|
1023
1058
|
} else if (item.children) {
|
|
1024
1059
|
deeps(item.children);
|
|
@@ -1030,20 +1065,32 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1030
1065
|
deeps(draft);
|
|
1031
1066
|
} else {
|
|
1032
1067
|
var index = draft.findIndex(function (item) {
|
|
1033
|
-
return
|
|
1068
|
+
return rkey === item[_rowKey];
|
|
1034
1069
|
});
|
|
1035
1070
|
|
|
1036
1071
|
if (index !== -1) {
|
|
1037
1072
|
if (isAppendInChindren) {
|
|
1038
1073
|
if ((_a = draft[index].children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1039
|
-
|
|
1074
|
+
if (Array.isArray(defaultRecord)) {
|
|
1075
|
+
var _b2;
|
|
1076
|
+
|
|
1077
|
+
(_b = draft[index].children) === null || _b === void 0 ? void 0 : (_b2 = _b).push.apply(_b2, (0, _toConsumableArray2.default)(defaultRecord));
|
|
1078
|
+
} else {
|
|
1079
|
+
(_c = draft[index].children) === null || _c === void 0 ? void 0 : _c.push(defaultRecord || (0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now())));
|
|
1080
|
+
}
|
|
1040
1081
|
} else {
|
|
1041
|
-
draft[index].children = [(0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now()))];
|
|
1082
|
+
draft[index].children = Array.isArray(defaultRecord) ? (0, _toConsumableArray2.default)(defaultRecord) : [defaultRecord || (0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now()))];
|
|
1042
1083
|
}
|
|
1043
1084
|
|
|
1044
|
-
!expandedRowKeys.includes((
|
|
1085
|
+
!expandedRowKeys.includes((_d = draft[index]) === null || _d === void 0 ? void 0 : _d[_rowKey]) && setExpandedRowKeys([].concat((0, _toConsumableArray2.default)(expandedRowKeys), [(_e = draft[index]) === null || _e === void 0 ? void 0 : _e[_rowKey]]));
|
|
1045
1086
|
} else {
|
|
1046
|
-
|
|
1087
|
+
if (Array.isArray(defaultRecord)) {
|
|
1088
|
+
console.log(1);
|
|
1089
|
+
draft.splice.apply(draft, [index + 1, 0].concat((0, _toConsumableArray2.default)(defaultRecord)));
|
|
1090
|
+
} else {
|
|
1091
|
+
console.log(2);
|
|
1092
|
+
draft.splice(index + 1, 0, defaultRecord || (0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now())));
|
|
1093
|
+
}
|
|
1047
1094
|
}
|
|
1048
1095
|
}
|
|
1049
1096
|
}
|
|
@@ -1068,8 +1115,9 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1068
1115
|
var hasOnlyOptionsDatas = columns.filter(function (item) {
|
|
1069
1116
|
var _a;
|
|
1070
1117
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1118
|
+
var resultComponentProps = (0, _lodash.isFunction)(item === null || item === void 0 ? void 0 : item.componentProps) ? (_a = item === null || item === void 0 ? void 0 : item.componentProps) === null || _a === void 0 ? void 0 : _a.call(item, {}, item) : item === null || item === void 0 ? void 0 : item.componentProps;
|
|
1119
|
+
return resultComponentProps === null || resultComponentProps === void 0 ? void 0 : resultComponentProps.optionOnly;
|
|
1120
|
+
}); // const hasOnlyOptionsDatas = columns.filter((item) => item?.componentProps?.optionOnly)
|
|
1073
1121
|
|
|
1074
1122
|
if (hasOnlyOptionsDatas.length) {
|
|
1075
1123
|
return hasOnlyOptionsDatas === null || hasOnlyOptionsDatas === void 0 ? void 0 : hasOnlyOptionsDatas.map(function (item) {
|
|
@@ -1083,9 +1131,13 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1083
1131
|
|
|
1084
1132
|
var DisableOptions = (0, _react.useMemo)(function () {
|
|
1085
1133
|
var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1088
|
-
|
|
1134
|
+
var _a;
|
|
1135
|
+
|
|
1136
|
+
var resultComponentProps = (0, _lodash.isFunction)(item.componentProps) ? (_a = item.componentProps) === null || _a === void 0 ? void 0 : _a.call(item, {}, item) : item.componentProps;
|
|
1137
|
+
|
|
1138
|
+
var _ref9 = resultComponentProps || {},
|
|
1139
|
+
optionOnly = _ref9.optionOnly,
|
|
1140
|
+
options = _ref9.options;
|
|
1089
1141
|
|
|
1090
1142
|
if (optionOnly && options) {
|
|
1091
1143
|
var dataIndex = item.dataIndex;
|
|
@@ -1097,6 +1149,13 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1097
1149
|
disabled: !!dataIndexData.includes(o === null || o === void 0 ? void 0 : o.value)
|
|
1098
1150
|
});
|
|
1099
1151
|
});
|
|
1152
|
+
|
|
1153
|
+
if ((0, _lodash.isFunction)(item.componentProps)) {
|
|
1154
|
+
return Object.assign(Object.assign({}, item), {
|
|
1155
|
+
newOptions: newOptions
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1100
1159
|
return Object.assign(Object.assign({}, item), {
|
|
1101
1160
|
componentProps: Object.assign(Object.assign({}, item.componentProps), {
|
|
1102
1161
|
options: newOptions
|
|
@@ -1124,7 +1183,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1124
1183
|
fixed: 'left',
|
|
1125
1184
|
render: function render(_, record) {
|
|
1126
1185
|
return /*#__PURE__*/_react.default.createElement(_DragHandle.default, {
|
|
1127
|
-
id: record[_rowKey] || record.id
|
|
1186
|
+
id: record[_rowKey] || (record === null || record === void 0 ? void 0 : record.id)
|
|
1128
1187
|
});
|
|
1129
1188
|
}
|
|
1130
1189
|
} : null, indexCol ? (0, _lodash.isBoolean)(indexCol) ? {
|
|
@@ -1267,6 +1326,25 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1267
1326
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
1268
1327
|
return {
|
|
1269
1328
|
setRow: handleSave,
|
|
1329
|
+
getCheckboxRecords: function getCheckboxRecords() {
|
|
1330
|
+
return localRowSelectList.selectedRows;
|
|
1331
|
+
},
|
|
1332
|
+
deleteRowData: function deleteRowData(data) {
|
|
1333
|
+
return handleTableRowDelete(data);
|
|
1334
|
+
},
|
|
1335
|
+
addRowData: function addRowData(data, defaultValue, addInChild) {
|
|
1336
|
+
return handleTableRowAdd(data, addInChild, defaultValue);
|
|
1337
|
+
},
|
|
1338
|
+
clearSelect: function clearSelect() {
|
|
1339
|
+
setLocalRowSelectList({
|
|
1340
|
+
selectedRows: []
|
|
1341
|
+
});
|
|
1342
|
+
},
|
|
1343
|
+
customSetCheckboxRecords: function customSetCheckboxRecords(value) {
|
|
1344
|
+
setLocalRowSelectList({
|
|
1345
|
+
selectedRows: value
|
|
1346
|
+
});
|
|
1347
|
+
},
|
|
1270
1348
|
valid: function valid() {
|
|
1271
1349
|
return _valid;
|
|
1272
1350
|
}
|
|
@@ -1332,17 +1410,18 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1332
1410
|
bordered: true,
|
|
1333
1411
|
pagination: false,
|
|
1334
1412
|
// components={tableComponents}
|
|
1335
|
-
rowSelection: !rowSelection ? undefined : {
|
|
1413
|
+
rowSelection: !rowSelection ? undefined : Object.assign(Object.assign({
|
|
1336
1414
|
fixed: true,
|
|
1337
1415
|
type: 'checkbox',
|
|
1338
|
-
columnWidth: 36
|
|
1339
|
-
|
|
1340
|
-
|
|
1416
|
+
columnWidth: 36
|
|
1417
|
+
}, rowSelection), {
|
|
1418
|
+
selectedRowKeys: (_a = localRowSelectList === null || localRowSelectList === void 0 ? void 0 : localRowSelectList.selectedRows) === null || _a === void 0 ? void 0 : _a.map(function (v) {
|
|
1419
|
+
return (0, _lodash.isObject)(v) ? v[_rowKey] : v;
|
|
1341
1420
|
}),
|
|
1342
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
1343
|
-
|
|
1421
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
1422
|
+
setLocalRowSelectList(selectedRowKeys, selectedRows, info);
|
|
1344
1423
|
}
|
|
1345
|
-
},
|
|
1424
|
+
}),
|
|
1346
1425
|
dataSource: dataSource
|
|
1347
1426
|
})))), isShowAddAction && /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
1348
1427
|
className: "lm_editTable_add_bar",
|
|
@@ -1373,17 +1452,18 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1373
1452
|
return setExpandedRowKeys(expandedRows);
|
|
1374
1453
|
}
|
|
1375
1454
|
},
|
|
1376
|
-
rowSelection: !rowSelection ? undefined : {
|
|
1455
|
+
rowSelection: !rowSelection ? undefined : Object.assign(Object.assign({
|
|
1377
1456
|
fixed: true,
|
|
1378
1457
|
type: 'checkbox',
|
|
1379
|
-
columnWidth: 36
|
|
1380
|
-
|
|
1381
|
-
|
|
1458
|
+
columnWidth: 36
|
|
1459
|
+
}, rowSelection), {
|
|
1460
|
+
selectedRowKeys: (_b = localRowSelectList === null || localRowSelectList === void 0 ? void 0 : localRowSelectList.selectedRows) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
1461
|
+
return (0, _lodash.isObject)(v) ? v[_rowKey] : v;
|
|
1382
1462
|
}),
|
|
1383
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
1384
|
-
|
|
1463
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
1464
|
+
setLocalRowSelectList(selectedRowKeys, selectedRows, info);
|
|
1385
1465
|
}
|
|
1386
|
-
},
|
|
1466
|
+
}),
|
|
1387
1467
|
dataSource: dataSource
|
|
1388
1468
|
})), isShowAddAction && /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
1389
1469
|
className: "lm_editTable_add_bar",
|
|
@@ -26,21 +26,47 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
26
26
|
return t;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
// interface ItemType {
|
|
30
|
+
// children: React.ReactNode
|
|
31
|
+
// }
|
|
32
|
+
// interface ItemInstance {}
|
|
33
|
+
// @ts-ignore
|
|
29
34
|
var Item = /*#__PURE__*/(0, _react.forwardRef)(function (_a, ref) {
|
|
30
35
|
var children = _a.children,
|
|
31
|
-
props = __rest(_a, ["children"]);
|
|
36
|
+
props = __rest(_a, ["children"]); // const rProps = omit({ ...props, ...children.props }, [
|
|
37
|
+
// 'isSticky',
|
|
38
|
+
// 'colStart',
|
|
39
|
+
// 'colEnd',
|
|
40
|
+
// 'prefixCls',
|
|
41
|
+
// 'fixLeft',
|
|
42
|
+
// 'fixRight',
|
|
43
|
+
// 'lastFixLeft',
|
|
44
|
+
// 'firstFixRight',
|
|
45
|
+
// 'lastFixRight',
|
|
46
|
+
// 'firstFixLeft',
|
|
47
|
+
// 'isSticky',
|
|
48
|
+
// 'additionalProps',
|
|
49
|
+
// 'rowType',
|
|
50
|
+
// ])
|
|
32
51
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
/*#__PURE__*/
|
|
55
|
+
// <th {...rProps} ref={ref as any} />
|
|
56
|
+
_react.default.createElement("th", Object.assign({}, props, children.props, {
|
|
57
|
+
ref: ref
|
|
58
|
+
})) // <th {...props} ref={ref as any}>
|
|
59
|
+
// {(children as any)?.props?.children || children}
|
|
60
|
+
// </th>
|
|
61
|
+
|
|
62
|
+
);
|
|
39
63
|
});
|
|
40
64
|
|
|
41
65
|
function SortableItem(props) {
|
|
66
|
+
var id = props.id;
|
|
67
|
+
|
|
42
68
|
var _useSortable = (0, _sortable.useSortable)({
|
|
43
|
-
id:
|
|
69
|
+
id: id
|
|
44
70
|
}),
|
|
45
71
|
attributes = _useSortable.attributes,
|
|
46
72
|
listeners = _useSortable.listeners,
|
package/lib/LmEditTable/util.js
CHANGED
|
@@ -84,7 +84,7 @@ function getExpandStatus(children) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
87
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
88
88
|
|
|
89
89
|
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
90
90
|
|
|
@@ -109,7 +109,14 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
if ((((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.optionOnly) || ((_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.optionOnly)) && !(0, _lodash.isEqual)((_e = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _e === void 0 ? void 0 : _e.options, (_f = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _f === void 0 ? void 0 : _f.options)) {
|
|
112
|
-
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if ((((_g = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _g === void 0 ? void 0 : _g.options) || ((_h = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _h === void 0 ? void 0 : _h.options)) && !(0, _lodash.isEqual)((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.options, (_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.options)) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (((0, _lodash.isFunction)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) || (0, _lodash.isFunction)(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) && !(0, _lodash.isEqual)(prevCol.newOptions, nextCol.newOptions) && !(0, _lodash.isEqual)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) {
|
|
113
120
|
return false;
|
|
114
121
|
}
|
|
115
122
|
|
|
@@ -118,13 +125,17 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
|
118
125
|
return false;
|
|
119
126
|
}
|
|
120
127
|
|
|
128
|
+
if (next.className.indexOf('drag-visible') > -1) {
|
|
129
|
+
return (0, _lodash.isEqual)(prev.style, next.style);
|
|
130
|
+
}
|
|
131
|
+
|
|
121
132
|
if (next.className.indexOf('ant-table-selection-column') > -1) {
|
|
122
|
-
return (0, _lodash.isEqual)((
|
|
133
|
+
return (0, _lodash.isEqual)((_m = (_l = prev.children) === null || _l === void 0 ? void 0 : _l[1]) === null || _m === void 0 ? void 0 : _m.props, (_p = (_o = next.children) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.props);
|
|
123
134
|
}
|
|
124
135
|
/** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
|
|
125
136
|
|
|
126
137
|
|
|
127
|
-
if (((
|
|
138
|
+
if (((_q = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _q === void 0 ? void 0 : _q.quickcopy) || ((_r = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _r === void 0 ? void 0 : _r.quickcopy)) {
|
|
128
139
|
var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
|
|
129
140
|
var p = (0, _lodash.pick)(prev, pickProps);
|
|
130
141
|
var n = (0, _lodash.pick)(next, pickProps);
|
|
@@ -201,7 +201,7 @@ var ItemLabel = /*#__PURE__*/_react.default.memo(function (_ref3) {
|
|
|
201
201
|
} catch (error) {
|
|
202
202
|
return filterValue;
|
|
203
203
|
}
|
|
204
|
-
}, [type, filterValue]);
|
|
204
|
+
}, [type, data, filterValue]);
|
|
205
205
|
|
|
206
206
|
if (isString) {
|
|
207
207
|
return /*#__PURE__*/_react.default.createElement("span", null, String);
|
|
@@ -216,7 +216,8 @@ var FilterItem = /*#__PURE__*/_react.default.memo(function (_ref4) {
|
|
|
216
216
|
var filterValue = instance.filterValue,
|
|
217
217
|
setFilterValue = instance.setFilterValue;
|
|
218
218
|
var title = item.title,
|
|
219
|
-
colon = item.colon
|
|
219
|
+
colon = item.colon,
|
|
220
|
+
clearIconTrigger = item.clearIconTrigger; // 是否有筛选值/是否处于筛选状态
|
|
220
221
|
|
|
221
222
|
var active = (0, _react.useMemo)(function () {
|
|
222
223
|
return (0, _utils.getIsHas)(filterValue);
|
|
@@ -231,6 +232,29 @@ var FilterItem = /*#__PURE__*/_react.default.memo(function (_ref4) {
|
|
|
231
232
|
e.stopPropagation();
|
|
232
233
|
setFilterValue((0, _utils.getValueForType)(item.type));
|
|
233
234
|
}
|
|
235
|
+
}; // Icon展示方式
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
var Icon = function Icon() {
|
|
239
|
+
// hover时出现清空
|
|
240
|
+
if (clearIconTrigger === 'hover') {
|
|
241
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.IconFont, {
|
|
242
|
+
type: "lmweb-close-circle-fill",
|
|
243
|
+
onClick: handleClear,
|
|
244
|
+
className: "icon_clear"
|
|
245
|
+
}), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.IconFont, {
|
|
246
|
+
type: "lmweb-down",
|
|
247
|
+
className: "icon_down"
|
|
248
|
+
}));
|
|
249
|
+
} // 日期类型并且未选中时返回日期自带icon
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
if (item.type === 'date' && !active) return null; // 选中时展示清楚按钮
|
|
253
|
+
|
|
254
|
+
return /*#__PURE__*/_react.default.createElement(_linkmoreDesign.IconFont, {
|
|
255
|
+
type: active ? 'lmweb-close-circle-fill' : 'lmweb-down',
|
|
256
|
+
onClick: handleClear
|
|
257
|
+
});
|
|
234
258
|
};
|
|
235
259
|
|
|
236
260
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (title || showColon) && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -244,10 +268,7 @@ var FilterItem = /*#__PURE__*/_react.default.memo(function (_ref4) {
|
|
|
244
268
|
item: item
|
|
245
269
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
246
270
|
className: "filter_item_icon addon_after"
|
|
247
|
-
},
|
|
248
|
-
type: active ? 'lmweb-close-circle-fill' : 'lmweb-down',
|
|
249
|
-
onClick: handleClear
|
|
250
|
-
}) : null));
|
|
271
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, null)));
|
|
251
272
|
});
|
|
252
273
|
/*
|
|
253
274
|
* css样式控制
|
|
@@ -108,6 +108,18 @@
|
|
|
108
108
|
.lm_filter_basic_item .filter_item_icon.addon_before {
|
|
109
109
|
color: var(--font-color);
|
|
110
110
|
}
|
|
111
|
+
.lm_filter_basic_item .filter_item_icon .icon_clear {
|
|
112
|
+
display: none;
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
115
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_down {
|
|
116
|
+
display: none;
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_clear {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
opacity: 1;
|
|
122
|
+
}
|
|
111
123
|
.lm_filter_basic_item.expand .filter_item_icon.addon_after {
|
|
112
124
|
transform: rotateX(180deg);
|
|
113
125
|
}
|
|
@@ -108,6 +108,18 @@
|
|
|
108
108
|
.lm_filter_basic_item .filter_item_icon.addon_before {
|
|
109
109
|
color: var(--font-color);
|
|
110
110
|
}
|
|
111
|
+
.lm_filter_basic_item .filter_item_icon .icon_clear {
|
|
112
|
+
display: none;
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
115
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_down {
|
|
116
|
+
display: none;
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_clear {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
opacity: 1;
|
|
122
|
+
}
|
|
111
123
|
.lm_filter_basic_item.expand .filter_item_icon.addon_after {
|
|
112
124
|
transform: rotateX(180deg);
|
|
113
125
|
}
|
package/lib/LmUpload/LmUpload.js
CHANGED
|
@@ -85,7 +85,7 @@ var LmUpload = function LmUpload(_a, ref) {
|
|
|
85
85
|
size: 100,
|
|
86
86
|
fileSize: 10,
|
|
87
87
|
fileSizeType: 'M',
|
|
88
|
-
uid: '
|
|
88
|
+
uid: 'fileName',
|
|
89
89
|
accept: '',
|
|
90
90
|
type: ['jpg', 'jpeg', 'png'],
|
|
91
91
|
listType: 'card',
|
|
@@ -100,6 +100,7 @@ var LmUpload = function LmUpload(_a, ref) {
|
|
|
100
100
|
itemRender: null,
|
|
101
101
|
enabledPreview: true,
|
|
102
102
|
enabledCrop: false,
|
|
103
|
+
enableDrag: false,
|
|
103
104
|
enabledOss: false,
|
|
104
105
|
// oss配置
|
|
105
106
|
ossConfig: function ossConfig() {
|