wargerm 0.7.7 → 0.7.9
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/components/Cascader/index.d.ts +3 -3
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/ModalTips/dialog.d.ts +1 -1
- package/dist/components/ModalTips/index.d.ts +1 -1
- package/dist/components/NtTable/index.d.ts +2 -8
- package/dist/components/WForm/index.d.ts +2 -2
- package/dist/index.esm.js +40 -16
- package/dist/index.js +40 -16
- package/package.json +1 -1
@@ -1,9 +1,9 @@
|
|
1
1
|
import { FC } from 'react';
|
2
2
|
import { CascaderProps } from 'antd';
|
3
|
-
export declare type ICascader =
|
3
|
+
export declare type ICascader = {
|
4
4
|
request?: () => Promise<any>;
|
5
|
-
onLoad?: (options
|
5
|
+
onLoad?: (options?: Record<string, any>[]) => void;
|
6
6
|
params?: Record<string, any>;
|
7
|
-
}
|
7
|
+
} & CascaderProps<any>;
|
8
8
|
declare const WCascader: FC<ICascader>;
|
9
9
|
export default WCascader;
|
@@ -34,7 +34,7 @@ declare class Modal extends React.PureComponent<Props> {
|
|
34
34
|
titleRef: React.RefObject<any>;
|
35
35
|
renderTop: () => JSX.Element;
|
36
36
|
componentDidMount(): void;
|
37
|
-
renderContent: () =>
|
37
|
+
renderContent: () => any;
|
38
38
|
render(): JSX.Element;
|
39
39
|
}
|
40
40
|
export default Modal;
|
@@ -26,7 +26,7 @@ declare class Modal extends React.PureComponent<Props> {
|
|
26
26
|
static hidden: () => void;
|
27
27
|
renderFooter: () => JSX.Element | null;
|
28
28
|
renderTop: () => JSX.Element;
|
29
|
-
renderContent: () =>
|
29
|
+
renderContent: () => any;
|
30
30
|
render(): JSX.Element;
|
31
31
|
}
|
32
32
|
export default Modal;
|
@@ -25,7 +25,7 @@ interface ColumnProps {
|
|
25
25
|
colSize?: number;
|
26
26
|
initialValue?: any;
|
27
27
|
request?: () => Promise<any>;
|
28
|
-
render?: (text: string, record: Record<string, any>, index: number) => ReactNode;
|
28
|
+
render?: (text: string, record: Record<string, any>, index: number, rIndex: number) => ReactNode;
|
29
29
|
}
|
30
30
|
interface IRowSelection {
|
31
31
|
type: 'checkbox' | 'radio';
|
@@ -88,11 +88,5 @@ declare type Props = {
|
|
88
88
|
frameBoxDirection?: 'in' | 'out';
|
89
89
|
none?: ReactNode;
|
90
90
|
};
|
91
|
-
declare
|
92
|
-
declare namespace NtTable {
|
93
|
-
var defaultProps: {
|
94
|
-
rowKey: string;
|
95
|
-
};
|
96
|
-
}
|
97
|
-
declare const _default: React.MemoExoticComponent<typeof NtTable>;
|
91
|
+
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
98
92
|
export default _default;
|
@@ -34,7 +34,7 @@ declare type defaultColConfig = {
|
|
34
34
|
xl: 8;
|
35
35
|
xxl: 6;
|
36
36
|
};
|
37
|
-
export
|
37
|
+
export declare type Isearch = {
|
38
38
|
labelWidth?: number | 'auto';
|
39
39
|
span?: number | defaultColConfig;
|
40
40
|
filterType?: 'query' | 'light';
|
@@ -48,7 +48,7 @@ export interface Isearch {
|
|
48
48
|
transform?: (value: any) => any;
|
49
49
|
optionDomReverse?: boolean;
|
50
50
|
optionRender?: ((searchConfig: any, formProps: any, dom: any) => ReactNode[]) | false;
|
51
|
-
}
|
51
|
+
} | false;
|
52
52
|
export interface WFormProps extends FormProps {
|
53
53
|
className?: string;
|
54
54
|
style?: React.CSSProperties;
|
package/dist/index.esm.js
CHANGED
@@ -3135,7 +3135,7 @@ var RangePicker$1 = function RangePicker(props) {
|
|
3135
3135
|
onChange: function onChange(v) {
|
3136
3136
|
var _momentValue3, _momentValue4, _momentValue5, _momentValue6;
|
3137
3137
|
|
3138
|
-
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue3 = momentValue(v[0])) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue4 = momentValue(v[1])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || ''], [((_momentValue5 = momentValue(v[0])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue6 = momentValue(v[1])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '']);
|
3138
|
+
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([v && ((_momentValue3 = momentValue(v[0])) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', v && ((_momentValue4 = momentValue(v[1])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || ''], [v && ((_momentValue5 = momentValue(v[0])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', v && ((_momentValue6 = momentValue(v[1])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '']);
|
3139
3139
|
}
|
3140
3140
|
}, extraProps));
|
3141
3141
|
};
|
@@ -7735,7 +7735,8 @@ function getWeekDays(date) {
|
|
7735
7735
|
*/
|
7736
7736
|
|
7737
7737
|
function getWeekList(date) {
|
7738
|
-
|
7738
|
+
// let weekOfDay = dayjs(date).day()+1; //一周的第一天是从星期天开始
|
7739
|
+
var weekOfDay = dayjs(date).day(); //计算今天是从星期一开始
|
7739
7740
|
// let last_monday = dayjs().startOf('day').subtract(weekOfDay - 1, 'days').format('YYYY-MM-DD');//周一日期
|
7740
7741
|
// let last_sunday = dayjs().startOf('day').subtract(weekOfDay - 7, 'days').format('YYYY-MM-DD');//周日日期
|
7741
7742
|
|
@@ -10991,6 +10992,8 @@ function DhPlayer(_ref, ref) {
|
|
10991
10992
|
api = _notification$useNoti2[0],
|
10992
10993
|
contextHolder = _notification$useNoti2[1];
|
10993
10994
|
|
10995
|
+
var errorTipsRef = useRef(false);
|
10996
|
+
|
10994
10997
|
var initVideo = function initVideo() {
|
10995
10998
|
var vmPlayer = new VideoPlayer({
|
10996
10999
|
videoId: videoId,
|
@@ -11022,14 +11025,19 @@ function DhPlayer(_ref, ref) {
|
|
11022
11025
|
setDhErrorMsg(err.message);
|
11023
11026
|
|
11024
11027
|
if (err.code == 1001) {
|
11028
|
+
if (errorTipsRef.current) return;
|
11025
11029
|
api.error({
|
11026
11030
|
message: "".concat(err.message),
|
11027
11031
|
description: /*#__PURE__*/React.createElement("span", null, "\u8BF7\u4E0B\u8F7D\u63D2\u4EF6\u540E\uFF0C\u53CC\u51FB\u8FD0\u884C\uFF1A", /*#__PURE__*/React.createElement("a", {
|
11028
|
-
href: "https://static.eblssmart.com/lfhz/DHPlayer_x64.zip"
|
11032
|
+
href: "https://static.eblssmart.com/lfhz/DHPlayer_x64.zip",
|
11033
|
+
style: {
|
11034
|
+
'textDecoration': 'underline'
|
11035
|
+
}
|
11029
11036
|
}, "\u70B9\u51FB\u4E0B\u8F7D")),
|
11030
11037
|
placement: 'top',
|
11031
11038
|
duration: null
|
11032
11039
|
});
|
11040
|
+
errorTipsRef.current = true;
|
11033
11041
|
} else {
|
11034
11042
|
api.error({
|
11035
11043
|
message: "\u63D0\u793A",
|
@@ -11205,6 +11213,7 @@ function DhPlayer(_ref, ref) {
|
|
11205
11213
|
|
11206
11214
|
|
11207
11215
|
var realByUrl = function realByUrl(o) {
|
11216
|
+
errorTipsRef.current = false;
|
11208
11217
|
videoPlayer.realByUrl(o);
|
11209
11218
|
}; // 全屏
|
11210
11219
|
|
@@ -11221,6 +11230,7 @@ function DhPlayer(_ref, ref) {
|
|
11221
11230
|
|
11222
11231
|
var hideWindow = function hideWindow() {
|
11223
11232
|
setDhErrorMsg('插件已隐藏');
|
11233
|
+
errorTipsRef.current = false;
|
11224
11234
|
videoPlayer.hide();
|
11225
11235
|
}; //显示窗口
|
11226
11236
|
|
@@ -11249,6 +11259,7 @@ function DhPlayer(_ref, ref) {
|
|
11249
11259
|
}, [num, showBar, visible, draggable, division, request]);
|
11250
11260
|
useEffect(function () {
|
11251
11261
|
return function () {
|
11262
|
+
errorTipsRef.current = false;
|
11252
11263
|
videoPlayer && videoPlayer.destroy().then(function () {
|
11253
11264
|
setDhErrorMsg('插件已销毁');
|
11254
11265
|
destroySuccess && destroySuccess();
|
@@ -11513,10 +11524,10 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11513
11524
|
player.current = undefined;
|
11514
11525
|
setReady(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
11515
11526
|
}, [muted, isLoop, videoUrls, autoplay, videoInit, onEnd, onPlayNextBtnClick]);
|
11516
|
-
var getRef = useCallback(function (
|
11517
|
-
if (
|
11527
|
+
var getRef = useCallback(function (r) {
|
11528
|
+
if (r && visible) {
|
11518
11529
|
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
11519
|
-
el:
|
11530
|
+
el: r,
|
11520
11531
|
url: videoUrls[0],
|
11521
11532
|
playNext: {
|
11522
11533
|
urlList: videoUrls.slice(1)
|
@@ -11593,7 +11604,7 @@ function FrameBox$1(_ref) {
|
|
11593
11604
|
|
11594
11605
|
var _excluded$o = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
|
11595
11606
|
|
11596
|
-
function NtTable(_ref) {
|
11607
|
+
function NtTable(_ref, ref) {
|
11597
11608
|
var _formSearchRef$curren4, _classnames2, _columns$, _columns$2;
|
11598
11609
|
|
11599
11610
|
var columns = _ref.columns,
|
@@ -11780,7 +11791,7 @@ function NtTable(_ref) {
|
|
11780
11791
|
return renderThFc(columns, layerIndex * 32);
|
11781
11792
|
}, [columns]);
|
11782
11793
|
|
11783
|
-
var renderTd = function renderTd(record) {
|
11794
|
+
var renderTd = function renderTd(record, rIndex) {
|
11784
11795
|
var renderThFc = function renderThFc(columns) {
|
11785
11796
|
var showColumns = columns.filter(function (c) {
|
11786
11797
|
return !c.hideInTable;
|
@@ -11830,7 +11841,7 @@ function NtTable(_ref) {
|
|
11830
11841
|
overflow: 'hidden',
|
11831
11842
|
textOverflow: 'ellipsis'
|
11832
11843
|
}
|
11833
|
-
}, c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data = columnsFields[c.dataIndex].find(function (item) {
|
11844
|
+
}, c.render ? c.render(record[c.dataIndex], record, index, rIndex) : columnsFields[c.dataIndex] ? (_columnsFields$c$data = columnsFields[c.dataIndex].find(function (item) {
|
11834
11845
|
return item.value == record[c.dataIndex];
|
11835
11846
|
})) === null || _columnsFields$c$data === void 0 ? void 0 : _columnsFields$c$data.label : record[c.dataIndex])));
|
11836
11847
|
} else {
|
@@ -11856,9 +11867,9 @@ function NtTable(_ref) {
|
|
11856
11867
|
overflow: 'hidden',
|
11857
11868
|
textOverflow: 'ellipsis'
|
11858
11869
|
}
|
11859
|
-
}, c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data2 = columnsFields[c.dataIndex].find(function (item) {
|
11870
|
+
}, c.render ? c.render(record[c.dataIndex], record, index, rIndex) : columnsFields[c.dataIndex] ? (_columnsFields$c$data2 = columnsFields[c.dataIndex].find(function (item) {
|
11860
11871
|
return item.value == record[c.dataIndex];
|
11861
|
-
})) === null || _columnsFields$c$data2 === void 0 ? void 0 : _columnsFields$c$data2.label : record[c.dataIndex]) : c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? ((_columnsFields$c$data3 = columnsFields[c.dataIndex].find(function (item) {
|
11872
|
+
})) === null || _columnsFields$c$data2 === void 0 ? void 0 : _columnsFields$c$data2.label : record[c.dataIndex]) : c.render ? c.render(record[c.dataIndex], record, index, rIndex) : columnsFields[c.dataIndex] ? ((_columnsFields$c$data3 = columnsFields[c.dataIndex].find(function (item) {
|
11862
11873
|
return item.value == record[c.dataIndex];
|
11863
11874
|
})) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label) && ((_columnsFields$c$data4 = columnsFields[c.dataIndex].find(function (item) {
|
11864
11875
|
return item.value == record[c.dataIndex];
|
@@ -11942,7 +11953,7 @@ function NtTable(_ref) {
|
|
11942
11953
|
rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$onSelec5 = rowSelection.onSelect) === null || _rowSelection$onSelec5 === void 0 ? void 0 : _rowSelection$onSelec5.call(rowSelection, record, event.target.checked, [record], event.nativeEvent);
|
11943
11954
|
rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$onChang3 = rowSelection.onChange) === null || _rowSelection$onChang3 === void 0 ? void 0 : _rowSelection$onChang3.call(rowSelection, _toConsumableArray(new Set([].concat(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || []), [key]))), [record]);
|
11944
11955
|
}
|
11945
|
-
})), renderTd(record));
|
11956
|
+
})), renderTd(record, index));
|
11946
11957
|
};
|
11947
11958
|
|
11948
11959
|
var _useState9 = useState([]),
|
@@ -11985,6 +11996,22 @@ function NtTable(_ref) {
|
|
11985
11996
|
paginationParams = _useState18[0],
|
11986
11997
|
setpaginationParams = _useState18[1];
|
11987
11998
|
|
11999
|
+
var refresh = function refresh(isRest) {
|
12000
|
+
if (isRest) {
|
12001
|
+
onReset();
|
12002
|
+
} else {
|
12003
|
+
var _formSearchRef$curren5;
|
12004
|
+
|
12005
|
+
(_formSearchRef$curren5 = formSearchRef.current) === null || _formSearchRef$curren5 === void 0 ? void 0 : _formSearchRef$curren5.handleSearch();
|
12006
|
+
}
|
12007
|
+
};
|
12008
|
+
|
12009
|
+
useImperativeHandle(ref, function () {
|
12010
|
+
return {
|
12011
|
+
formSearchRef: formSearchRef.current,
|
12012
|
+
refresh: refresh
|
12013
|
+
};
|
12014
|
+
});
|
11988
12015
|
useEffect(function () {
|
11989
12016
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
11990
12017
|
var requestParams, res;
|
@@ -12164,10 +12191,7 @@ function NtTable(_ref) {
|
|
12164
12191
|
}, paginationParams)));
|
12165
12192
|
}
|
12166
12193
|
|
12167
|
-
|
12168
|
-
rowKey: 'key'
|
12169
|
-
};
|
12170
|
-
var index$9 = /*#__PURE__*/memo(NtTable);
|
12194
|
+
var index$9 = /*#__PURE__*/React.forwardRef(NtTable);
|
12171
12195
|
|
12172
12196
|
/*
|
12173
12197
|
* @Author: lijin
|
package/dist/index.js
CHANGED
@@ -3179,7 +3179,7 @@ var RangePicker$1 = function RangePicker(props) {
|
|
3179
3179
|
onChange: function onChange(v) {
|
3180
3180
|
var _momentValue3, _momentValue4, _momentValue5, _momentValue6;
|
3181
3181
|
|
3182
|
-
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue3 = momentValue(v[0])) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue4 = momentValue(v[1])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || ''], [((_momentValue5 = momentValue(v[0])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue6 = momentValue(v[1])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '']);
|
3182
|
+
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([v && ((_momentValue3 = momentValue(v[0])) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', v && ((_momentValue4 = momentValue(v[1])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || ''], [v && ((_momentValue5 = momentValue(v[0])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', v && ((_momentValue6 = momentValue(v[1])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '']);
|
3183
3183
|
}
|
3184
3184
|
}, extraProps));
|
3185
3185
|
};
|
@@ -7779,7 +7779,8 @@ function getWeekDays(date) {
|
|
7779
7779
|
*/
|
7780
7780
|
|
7781
7781
|
function getWeekList(date) {
|
7782
|
-
|
7782
|
+
// let weekOfDay = dayjs(date).day()+1; //一周的第一天是从星期天开始
|
7783
|
+
var weekOfDay = dayjs__default['default'](date).day(); //计算今天是从星期一开始
|
7783
7784
|
// let last_monday = dayjs().startOf('day').subtract(weekOfDay - 1, 'days').format('YYYY-MM-DD');//周一日期
|
7784
7785
|
// let last_sunday = dayjs().startOf('day').subtract(weekOfDay - 7, 'days').format('YYYY-MM-DD');//周日日期
|
7785
7786
|
|
@@ -11035,6 +11036,8 @@ function DhPlayer(_ref, ref) {
|
|
11035
11036
|
api = _notification$useNoti2[0],
|
11036
11037
|
contextHolder = _notification$useNoti2[1];
|
11037
11038
|
|
11039
|
+
var errorTipsRef = React.useRef(false);
|
11040
|
+
|
11038
11041
|
var initVideo = function initVideo() {
|
11039
11042
|
var vmPlayer = new VideoPlayer({
|
11040
11043
|
videoId: videoId,
|
@@ -11066,14 +11069,19 @@ function DhPlayer(_ref, ref) {
|
|
11066
11069
|
setDhErrorMsg(err.message);
|
11067
11070
|
|
11068
11071
|
if (err.code == 1001) {
|
11072
|
+
if (errorTipsRef.current) return;
|
11069
11073
|
api.error({
|
11070
11074
|
message: "".concat(err.message),
|
11071
11075
|
description: /*#__PURE__*/React__default['default'].createElement("span", null, "\u8BF7\u4E0B\u8F7D\u63D2\u4EF6\u540E\uFF0C\u53CC\u51FB\u8FD0\u884C\uFF1A", /*#__PURE__*/React__default['default'].createElement("a", {
|
11072
|
-
href: "https://static.eblssmart.com/lfhz/DHPlayer_x64.zip"
|
11076
|
+
href: "https://static.eblssmart.com/lfhz/DHPlayer_x64.zip",
|
11077
|
+
style: {
|
11078
|
+
'textDecoration': 'underline'
|
11079
|
+
}
|
11073
11080
|
}, "\u70B9\u51FB\u4E0B\u8F7D")),
|
11074
11081
|
placement: 'top',
|
11075
11082
|
duration: null
|
11076
11083
|
});
|
11084
|
+
errorTipsRef.current = true;
|
11077
11085
|
} else {
|
11078
11086
|
api.error({
|
11079
11087
|
message: "\u63D0\u793A",
|
@@ -11249,6 +11257,7 @@ function DhPlayer(_ref, ref) {
|
|
11249
11257
|
|
11250
11258
|
|
11251
11259
|
var realByUrl = function realByUrl(o) {
|
11260
|
+
errorTipsRef.current = false;
|
11252
11261
|
videoPlayer.realByUrl(o);
|
11253
11262
|
}; // 全屏
|
11254
11263
|
|
@@ -11265,6 +11274,7 @@ function DhPlayer(_ref, ref) {
|
|
11265
11274
|
|
11266
11275
|
var hideWindow = function hideWindow() {
|
11267
11276
|
setDhErrorMsg('插件已隐藏');
|
11277
|
+
errorTipsRef.current = false;
|
11268
11278
|
videoPlayer.hide();
|
11269
11279
|
}; //显示窗口
|
11270
11280
|
|
@@ -11293,6 +11303,7 @@ function DhPlayer(_ref, ref) {
|
|
11293
11303
|
}, [num, showBar, visible, draggable, division, request]);
|
11294
11304
|
React.useEffect(function () {
|
11295
11305
|
return function () {
|
11306
|
+
errorTipsRef.current = false;
|
11296
11307
|
videoPlayer && videoPlayer.destroy().then(function () {
|
11297
11308
|
setDhErrorMsg('插件已销毁');
|
11298
11309
|
destroySuccess && destroySuccess();
|
@@ -11557,10 +11568,10 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11557
11568
|
player.current = undefined;
|
11558
11569
|
setReady(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
11559
11570
|
}, [muted, isLoop, videoUrls, autoplay, videoInit, onEnd, onPlayNextBtnClick]);
|
11560
|
-
var getRef = React.useCallback(function (
|
11561
|
-
if (
|
11571
|
+
var getRef = React.useCallback(function (r) {
|
11572
|
+
if (r && visible) {
|
11562
11573
|
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
11563
|
-
el:
|
11574
|
+
el: r,
|
11564
11575
|
url: videoUrls[0],
|
11565
11576
|
playNext: {
|
11566
11577
|
urlList: videoUrls.slice(1)
|
@@ -11637,7 +11648,7 @@ function FrameBox$1(_ref) {
|
|
11637
11648
|
|
11638
11649
|
var _excluded$o = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
|
11639
11650
|
|
11640
|
-
function NtTable(_ref) {
|
11651
|
+
function NtTable(_ref, ref) {
|
11641
11652
|
var _formSearchRef$curren4, _classnames2, _columns$, _columns$2;
|
11642
11653
|
|
11643
11654
|
var columns = _ref.columns,
|
@@ -11824,7 +11835,7 @@ function NtTable(_ref) {
|
|
11824
11835
|
return renderThFc(columns, layerIndex * 32);
|
11825
11836
|
}, [columns]);
|
11826
11837
|
|
11827
|
-
var renderTd = function renderTd(record) {
|
11838
|
+
var renderTd = function renderTd(record, rIndex) {
|
11828
11839
|
var renderThFc = function renderThFc(columns) {
|
11829
11840
|
var showColumns = columns.filter(function (c) {
|
11830
11841
|
return !c.hideInTable;
|
@@ -11874,7 +11885,7 @@ function NtTable(_ref) {
|
|
11874
11885
|
overflow: 'hidden',
|
11875
11886
|
textOverflow: 'ellipsis'
|
11876
11887
|
}
|
11877
|
-
}, c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data = columnsFields[c.dataIndex].find(function (item) {
|
11888
|
+
}, c.render ? c.render(record[c.dataIndex], record, index, rIndex) : columnsFields[c.dataIndex] ? (_columnsFields$c$data = columnsFields[c.dataIndex].find(function (item) {
|
11878
11889
|
return item.value == record[c.dataIndex];
|
11879
11890
|
})) === null || _columnsFields$c$data === void 0 ? void 0 : _columnsFields$c$data.label : record[c.dataIndex])));
|
11880
11891
|
} else {
|
@@ -11900,9 +11911,9 @@ function NtTable(_ref) {
|
|
11900
11911
|
overflow: 'hidden',
|
11901
11912
|
textOverflow: 'ellipsis'
|
11902
11913
|
}
|
11903
|
-
}, c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data2 = columnsFields[c.dataIndex].find(function (item) {
|
11914
|
+
}, c.render ? c.render(record[c.dataIndex], record, index, rIndex) : columnsFields[c.dataIndex] ? (_columnsFields$c$data2 = columnsFields[c.dataIndex].find(function (item) {
|
11904
11915
|
return item.value == record[c.dataIndex];
|
11905
|
-
})) === null || _columnsFields$c$data2 === void 0 ? void 0 : _columnsFields$c$data2.label : record[c.dataIndex]) : c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? ((_columnsFields$c$data3 = columnsFields[c.dataIndex].find(function (item) {
|
11916
|
+
})) === null || _columnsFields$c$data2 === void 0 ? void 0 : _columnsFields$c$data2.label : record[c.dataIndex]) : c.render ? c.render(record[c.dataIndex], record, index, rIndex) : columnsFields[c.dataIndex] ? ((_columnsFields$c$data3 = columnsFields[c.dataIndex].find(function (item) {
|
11906
11917
|
return item.value == record[c.dataIndex];
|
11907
11918
|
})) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label) && ((_columnsFields$c$data4 = columnsFields[c.dataIndex].find(function (item) {
|
11908
11919
|
return item.value == record[c.dataIndex];
|
@@ -11986,7 +11997,7 @@ function NtTable(_ref) {
|
|
11986
11997
|
rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$onSelec5 = rowSelection.onSelect) === null || _rowSelection$onSelec5 === void 0 ? void 0 : _rowSelection$onSelec5.call(rowSelection, record, event.target.checked, [record], event.nativeEvent);
|
11987
11998
|
rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$onChang3 = rowSelection.onChange) === null || _rowSelection$onChang3 === void 0 ? void 0 : _rowSelection$onChang3.call(rowSelection, _toConsumableArray(new Set([].concat(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || []), [key]))), [record]);
|
11988
11999
|
}
|
11989
|
-
})), renderTd(record));
|
12000
|
+
})), renderTd(record, index));
|
11990
12001
|
};
|
11991
12002
|
|
11992
12003
|
var _useState9 = React.useState([]),
|
@@ -12029,6 +12040,22 @@ function NtTable(_ref) {
|
|
12029
12040
|
paginationParams = _useState18[0],
|
12030
12041
|
setpaginationParams = _useState18[1];
|
12031
12042
|
|
12043
|
+
var refresh = function refresh(isRest) {
|
12044
|
+
if (isRest) {
|
12045
|
+
onReset();
|
12046
|
+
} else {
|
12047
|
+
var _formSearchRef$curren5;
|
12048
|
+
|
12049
|
+
(_formSearchRef$curren5 = formSearchRef.current) === null || _formSearchRef$curren5 === void 0 ? void 0 : _formSearchRef$curren5.handleSearch();
|
12050
|
+
}
|
12051
|
+
};
|
12052
|
+
|
12053
|
+
React.useImperativeHandle(ref, function () {
|
12054
|
+
return {
|
12055
|
+
formSearchRef: formSearchRef.current,
|
12056
|
+
refresh: refresh
|
12057
|
+
};
|
12058
|
+
});
|
12032
12059
|
React.useEffect(function () {
|
12033
12060
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
12034
12061
|
var requestParams, res;
|
@@ -12208,10 +12235,7 @@ function NtTable(_ref) {
|
|
12208
12235
|
}, paginationParams)));
|
12209
12236
|
}
|
12210
12237
|
|
12211
|
-
|
12212
|
-
rowKey: 'key'
|
12213
|
-
};
|
12214
|
-
var index$9 = /*#__PURE__*/React.memo(NtTable);
|
12238
|
+
var index$9 = /*#__PURE__*/React__default['default'].forwardRef(NtTable);
|
12215
12239
|
|
12216
12240
|
/*
|
12217
12241
|
* @Author: lijin
|