@chlp-tech/rpa-ui 0.0.17-beta-2 → 0.0.18
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.
|
@@ -26,12 +26,14 @@ import classNames from "classnames";
|
|
|
26
26
|
import styles from "./index.module.less";
|
|
27
27
|
import { useTranslation } from 'react-i18next';
|
|
28
28
|
var AccountSelect = function AccountSelect(props) {
|
|
29
|
+
var _useTranslation = useTranslation(),
|
|
30
|
+
t = _useTranslation.t;
|
|
29
31
|
var _props$placeholder = props.placeholder,
|
|
30
|
-
placeholder = _props$placeholder === void 0 ? '请选择账号'
|
|
32
|
+
placeholder = _props$placeholder === void 0 ? t('请选择账号', {
|
|
33
|
+
ns: 'publish'
|
|
34
|
+
}) : _props$placeholder,
|
|
31
35
|
_props$multiple = props.multiple,
|
|
32
36
|
multiple = _props$multiple === void 0 ? false : _props$multiple;
|
|
33
|
-
var _useTranslation = useTranslation(),
|
|
34
|
-
t = _useTranslation.t;
|
|
35
37
|
var _React$useState = React.useState(false),
|
|
36
38
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
37
39
|
open = _React$useState2[0],
|
|
@@ -202,13 +204,17 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
202
204
|
var getTipsText = function getTipsText() {
|
|
203
205
|
switch (item.disabledState) {
|
|
204
206
|
case 1:
|
|
205
|
-
return t('
|
|
207
|
+
return t('mediaAccount:请勿选择语言不统一的账号', {
|
|
206
208
|
ns: 'common'
|
|
207
209
|
});
|
|
208
210
|
case 2:
|
|
209
|
-
return '
|
|
211
|
+
return t('mediaAccount:账号Token失效,请重新授权该账号,恢复账号绑定状态', {
|
|
212
|
+
ns: 'common'
|
|
213
|
+
});
|
|
210
214
|
case 3:
|
|
211
|
-
return '
|
|
215
|
+
return t('mediaAccount:暂无该账号的运营权限', {
|
|
216
|
+
ns: 'common'
|
|
217
|
+
});
|
|
212
218
|
default:
|
|
213
219
|
return null;
|
|
214
220
|
}
|
|
@@ -235,7 +241,9 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
235
241
|
}, /*#__PURE__*/React.createElement(TextEllipsis, {
|
|
236
242
|
lines: 1,
|
|
237
243
|
showTooltip: false
|
|
238
|
-
}, item.remark || '
|
|
244
|
+
}, item.remark || t('无备注', {
|
|
245
|
+
ns: 'common'
|
|
246
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
239
247
|
className: styles.countryAndLanguage
|
|
240
248
|
}, /*#__PURE__*/React.createElement(TextEllipsis, {
|
|
241
249
|
lines: 1,
|
|
@@ -249,7 +257,9 @@ var AccountSelect = function AccountSelect(props) {
|
|
|
249
257
|
}, item.ownerUserName && ((_item$ownerUserName2 = item.ownerUserName) === null || _item$ownerUserName2 === void 0 ? void 0 : _item$ownerUserName2.length) > 4 ? "".concat((_item$ownerUserName3 = item.ownerUserName) === null || _item$ownerUserName3 === void 0 ? void 0 : _item$ownerUserName3.slice(0, 4), "...") : item.ownerUserName)))));
|
|
250
258
|
}), optionList.length <= 0 && /*#__PURE__*/React.createElement(Empty, {
|
|
251
259
|
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
252
|
-
description: "
|
|
260
|
+
description: t("暂无数据", {
|
|
261
|
+
ns: 'common'
|
|
262
|
+
})
|
|
253
263
|
}))) : null;
|
|
254
264
|
}
|
|
255
265
|
}, renderAccountView());
|
|
@@ -11,6 +11,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
11
11
|
import React, { useState, useEffect, useMemo } from "react";
|
|
12
12
|
import { Form, Input, Select, Button, Modal, Badge, DatePicker, Space } from "antd";
|
|
13
13
|
import styles from "./index.module.less";
|
|
14
|
+
import { useTranslation } from "react-i18next";
|
|
14
15
|
var Option = Select.Option;
|
|
15
16
|
var RangePicker = DatePicker.RangePicker;
|
|
16
17
|
var LinkedFilter = function LinkedFilter(props) {
|
|
@@ -23,6 +24,8 @@ var LinkedFilter = function LinkedFilter(props) {
|
|
|
23
24
|
var initialSelectValue = ((_config$find = config.find(function (item) {
|
|
24
25
|
return !isShow.includes(item.key);
|
|
25
26
|
})) === null || _config$find === void 0 ? void 0 : _config$find.key) || null;
|
|
27
|
+
var _useTranslation = useTranslation(),
|
|
28
|
+
t = _useTranslation.t;
|
|
26
29
|
var _useState = useState(initialSelectValue),
|
|
27
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28
31
|
singleSelectValue = _useState2[0],
|
|
@@ -223,13 +226,21 @@ var LinkedFilter = function LinkedFilter(props) {
|
|
|
223
226
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
224
227
|
onClick: showMultiSelectModal,
|
|
225
228
|
icon: multipleIcon
|
|
226
|
-
}, props.moreFilterText || '更多筛选'
|
|
227
|
-
|
|
229
|
+
}, props.moreFilterText || t('更多筛选', {
|
|
230
|
+
ns: 'common'
|
|
231
|
+
})))), /*#__PURE__*/React.createElement(Modal, {
|
|
232
|
+
title: props.moreFilterText || t('更多筛选', {
|
|
233
|
+
ns: 'common'
|
|
234
|
+
}),
|
|
228
235
|
open: isModalVisible,
|
|
229
236
|
onOk: handleModalOk,
|
|
230
237
|
onCancel: handleModalCancel,
|
|
231
|
-
cancelText: ((_props$moreModalConfi = props.moreModalConfig) === null || _props$moreModalConfi === void 0 ? void 0 : _props$moreModalConfi.cancelNode) || '取消',
|
|
232
|
-
|
|
238
|
+
cancelText: ((_props$moreModalConfi = props.moreModalConfig) === null || _props$moreModalConfi === void 0 ? void 0 : _props$moreModalConfi.cancelNode) || t('取消', {
|
|
239
|
+
ns: 'common'
|
|
240
|
+
}),
|
|
241
|
+
okText: ((_props$moreModalConfi2 = props.moreModalConfig) === null || _props$moreModalConfi2 === void 0 ? void 0 : _props$moreModalConfi2.confirmNode) || t('确定', {
|
|
242
|
+
ns: 'common'
|
|
243
|
+
})
|
|
233
244
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
234
245
|
form: multilineForm,
|
|
235
246
|
labelCol: {
|