@chlp-tech/rpa-ui 0.0.11-beta.6 → 0.0.11-beta.8
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.
|
@@ -15,7 +15,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
16
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
import React from "react";
|
|
18
|
+
import React, { useEffect } from "react";
|
|
19
19
|
import DownIcon from "./imgs/down.svg";
|
|
20
20
|
import UpIcon from "./imgs/up.svg";
|
|
21
21
|
import { Col, Empty, Input, Popover, Row, Tooltip } from "antd";
|
|
@@ -40,6 +40,12 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
40
40
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
41
41
|
selectedKeys = _React$useState6[0],
|
|
42
42
|
setSelectedKeys = _React$useState6[1];
|
|
43
|
+
useEffect(function () {
|
|
44
|
+
setOptionList(props.options || []);
|
|
45
|
+
}, [props.options]);
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
setSelectedKeys(props.defaultSelectList || []);
|
|
48
|
+
}, [props.defaultSelectList]);
|
|
43
49
|
var handleClearAll = function handleClearAll() {
|
|
44
50
|
var _props$onChange;
|
|
45
51
|
setSelectedKeys([]);
|
|
@@ -110,6 +110,28 @@ var MediaCardList = function MediaCardList(props) {
|
|
|
110
110
|
};
|
|
111
111
|
var ReleaseVideoCard = function ReleaseVideoCard(props) {
|
|
112
112
|
var _props$mediaInfo, _props$countData$view, _props$countData, _props$countData$like, _props$countData2, _props$countData$comm, _props$countData3, _ref2, _props$editComponent, _props$detailComponen;
|
|
113
|
+
var dropMenus = function dropMenus() {
|
|
114
|
+
var list = [];
|
|
115
|
+
if ([1, 6].includes(props.status)) {
|
|
116
|
+
list.push({
|
|
117
|
+
label: /*#__PURE__*/React.createElement("div", null, props.status === 1 ? '启用' : '暂停'),
|
|
118
|
+
key: 'pause',
|
|
119
|
+
onClick: function onClick() {
|
|
120
|
+
var _props$onPauseOrStart;
|
|
121
|
+
return props === null || props === void 0 || (_props$onPauseOrStart = props.onPauseOrStart) === null || _props$onPauseOrStart === void 0 ? void 0 : _props$onPauseOrStart.call(props, props.id);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
list.push({
|
|
126
|
+
label: '删除',
|
|
127
|
+
key: 'delete',
|
|
128
|
+
onClick: function onClick() {
|
|
129
|
+
var _props$onDelete;
|
|
130
|
+
return props === null || props === void 0 || (_props$onDelete = props.onDelete) === null || _props$onDelete === void 0 ? void 0 : _props$onDelete.call(props, props.id);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
return list;
|
|
134
|
+
};
|
|
113
135
|
return /*#__PURE__*/React.createElement("div", {
|
|
114
136
|
className: styles['card']
|
|
115
137
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -194,23 +216,10 @@ var ReleaseVideoCard = function ReleaseVideoCard(props) {
|
|
|
194
216
|
marginRight: 12,
|
|
195
217
|
cursor: 'pointer'
|
|
196
218
|
}
|
|
197
|
-
}, [0, 1].includes(props.status) ? /*#__PURE__*/React.createElement(React.Fragment, null, (_props$editComponent = props.editComponent) !== null && _props$editComponent !== void 0 ? _props$editComponent : /*#__PURE__*/React.createElement("span", null, "\u7F16\u8F91")) : [2, 3].includes(props.status) ? /*#__PURE__*/React.createElement(React.Fragment, null, (_props$detailComponen = props.detailComponent) !== null && _props$detailComponen !== void 0 ? _props$detailComponen : /*#__PURE__*/React.createElement("span", null, "\u8BE6\u60C5")) : null), [0, 1].includes(props.status) ? /*#__PURE__*/React.createElement(Dropdown, {
|
|
219
|
+
}, [0, 1].includes(props.status) ? /*#__PURE__*/React.createElement(React.Fragment, null, (_props$editComponent = props.editComponent) !== null && _props$editComponent !== void 0 ? _props$editComponent : /*#__PURE__*/React.createElement("span", null, "\u7F16\u8F91")) : [2, 3].includes(props.status) ? /*#__PURE__*/React.createElement(React.Fragment, null, (_props$detailComponen = props.detailComponent) !== null && _props$detailComponen !== void 0 ? _props$detailComponen : /*#__PURE__*/React.createElement("span", null, "\u8BE6\u60C5")) : null), [0, 1, 6].includes(props.status) ? /*#__PURE__*/React.createElement(Dropdown, {
|
|
198
220
|
trigger: ['click'],
|
|
199
221
|
menu: {
|
|
200
|
-
items:
|
|
201
|
-
label: /*#__PURE__*/React.createElement("div", null, props.isPaused ? '启用' : '暂停'),
|
|
202
|
-
key: 'pause',
|
|
203
|
-
onClick: function onClick() {
|
|
204
|
-
var _props$onPauseOrStart;
|
|
205
|
-
return props === null || props === void 0 || (_props$onPauseOrStart = props.onPauseOrStart) === null || _props$onPauseOrStart === void 0 ? void 0 : _props$onPauseOrStart.call(props, props.id);
|
|
206
|
-
}
|
|
207
|
-
}, {
|
|
208
|
-
label: '删除',
|
|
209
|
-
key: 'delete',
|
|
210
|
-
onClick: function onClick() {
|
|
211
|
-
return (props === null || props === void 0 ? void 0 : props.onDelete) && props.onDelete(props.id);
|
|
212
|
-
}
|
|
213
|
-
}]
|
|
222
|
+
items: dropMenus()
|
|
214
223
|
}
|
|
215
224
|
}, /*#__PURE__*/React.createElement("div", {
|
|
216
225
|
style: {
|