component-shipinlv 1.0.30 → 1.0.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Button, Form, Space } from 'antd';
2
+ import { Button, Form, Space, Divider } from 'antd';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  var AuthUserOffline = function AuthUserOffline(_ref) {
@@ -13,15 +13,12 @@ var AuthUserOffline = function AuthUserOffline(_ref) {
13
13
  children: /*#__PURE__*/_jsxs(Form, {
14
14
  children: [/*#__PURE__*/_jsx(Form.Item, {
15
15
  children: message
16
- }), /*#__PURE__*/_jsx(Form.Item, {
16
+ }), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx("div", {
17
+ style: {
18
+ textAlign: "right"
19
+ },
17
20
  children: /*#__PURE__*/_jsxs(Space, {
18
21
  children: [/*#__PURE__*/_jsx(Button, {
19
- type: "primary",
20
- onClick: function onClick() {
21
- return onConfirm();
22
- },
23
- children: "\u7EE7\u7EED\u767B\u5F55"
24
- }), /*#__PURE__*/_jsx(Button, {
25
22
  type: "link",
26
23
  danger: true,
27
24
  ghost: true,
@@ -29,6 +26,12 @@ var AuthUserOffline = function AuthUserOffline(_ref) {
29
26
  return onCancel();
30
27
  },
31
28
  children: "\u53D6\u6D88"
29
+ }), /*#__PURE__*/_jsx(Button, {
30
+ type: "primary",
31
+ onClick: function onClick() {
32
+ return onConfirm();
33
+ },
34
+ children: "\u7EE7\u7EED\u767B\u5F55"
32
35
  })]
33
36
  })
34
37
  })]
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
2
2
  var _templateObject, _templateObject2, _templateObject3;
3
3
  import styled from 'styled-components';
4
4
  export default {
5
- videoPublishCreateTask: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 12px 0 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n .groupIcon{\n color: blue;\n }\n .rateSelect{\n width: 120px;\n }\n .normalVideo{\n color: blue;\n }\n .shoppingCart{\n color: #F60;\n }\n .selectFile{\n padding: 12px 0 0;\n }\n .submits{\n text-align: right;\n padding: 0 0 36px 0;\n }\n "]))),
5
+ videoPublishCreateTask: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 12px 0 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n .groupIcon{\n color: blue;\n }\n .rateSelect{\n width: 120px;\n }\n .normalVideo{\n color: blue;\n }\n .shoppingCart{\n color: #F60;\n }\n .selectFile{\n padding: 12px 0 0;\n }\n .submits{\n text-align: right;\n padding: 0 0 36px 0;\n }\n .accountListWarp{\n display: flex;\n flex-direction: row;\n .accountList{\n flex: 2;\n margin-left: 5px;\n }\n .renew{\n font-size: 20px;\n padding: 0 12px;\n }\n }\n "]))),
6
6
  followerCount: styled.small(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: #F2F2F2;\n border-radius: 3px;\n font-size: smaller;\n line-height: 1em;\n margin-left: 3px;\n padding: 2px 3px;\n\n "]))),
7
7
  notLoginValid: styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 5px;\n\n "])))
8
8
  };
@@ -4,8 +4,8 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import React, { useState } from "react";
6
6
  import styles from "./index.css";
7
- import { Alert, Button, ConfigProvider, DatePicker, Divider, Form, InputNumber, Radio, Select, Switch, Tag } from "antd";
8
- import { PlusOutlined, ShoppingOutlined, UsergroupAddOutlined, VideoCameraOutlined } from "@ant-design/icons";
7
+ import { Alert, Button, ConfigProvider, DatePicker, Divider, Form, InputNumber, Radio, Select, Switch, Tag, Tooltip } from "antd";
8
+ import { PlusOutlined, RedoOutlined, ShoppingOutlined, UsergroupAddOutlined, VideoCameraOutlined } from "@ant-design/icons";
9
9
  import PageContentWarp from "../../UI/PageContentWarp";
10
10
  import { TreeSelect } from 'antd';
11
11
  import isInClient from "../../lib/isInClient";
@@ -123,9 +123,9 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
123
123
  setTreeVideoAccountData(treeData);
124
124
  }
125
125
  }),
126
- run = _useRequest.run,
127
- loading = _useRequest.loading,
128
- error = _useRequest.error;
126
+ runAccountList = _useRequest.run,
127
+ loadingAccountList = _useRequest.loading,
128
+ errorAccountList = _useRequest.error;
129
129
  var _useRequest2 = useRequest(function (data) {
130
130
  return VideoPublishController.taskCreate(data, {
131
131
  env: env
@@ -248,12 +248,38 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
248
248
  console.log('values:', data);
249
249
  runTask(data);
250
250
  };
251
+ var onAccountList = /*#__PURE__*/function () {
252
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
253
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
254
+ while (1) switch (_context2.prev = _context2.next) {
255
+ case 0:
256
+ if (!loadingAccountList) {
257
+ _context2.next = 2;
258
+ break;
259
+ }
260
+ return _context2.abrupt("return");
261
+ case 2:
262
+ _context2.next = 4;
263
+ return runAccountList().catch(function (err) {});
264
+ case 4:
265
+ Tool.toast('账户列表已刷新');
266
+ case 5:
267
+ case "end":
268
+ return _context2.stop();
269
+ }
270
+ }, _callee2);
271
+ }));
272
+ return function onAccountList() {
273
+ return _ref3.apply(this, arguments);
274
+ };
275
+ }();
251
276
  var formLabelSpan = 3;
252
277
  return /*#__PURE__*/_jsx(styles.videoPublishCreateTask, {
253
- children: /*#__PURE__*/_jsxs(PageContentWarp, {
254
- loading: loading,
255
- error: error,
256
- onReload: run,
278
+ children: /*#__PURE__*/_jsxs(PageContentWarp
279
+ // loading={loading}
280
+ , {
281
+ error: errorAccountList,
282
+ onReload: runAccountList,
257
283
  children: [disabled && /*#__PURE__*/_jsx(Alert, {
258
284
  message: "\u529F\u80FD\u5347\u7EA7\u4E2D\uFF0C\u5373\u5C06\u5F00\u653E\uFF0C\u656C\u8BF7\u671F\u5F85",
259
285
  type: "warning",
@@ -344,25 +370,39 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
344
370
  }), /*#__PURE__*/_jsx(Divider, {
345
371
  orientation: "left",
346
372
  children: "\u9009\u62E9\u8D26\u6237"
347
- }), /*#__PURE__*/_jsx(Form.Item, {
348
- label: "\u8D26\u53F7",
349
- extra: "\u6BCF\u4E2A\u89C6\u9891\u53EA\u53D1\u4E00\u4E2A\u8D26\u6237",
350
- name: "accountList",
351
- rules: [{
352
- required: true,
353
- message: '请选择账户'
354
- }],
355
- children: /*#__PURE__*/_jsx(TreeSelect, {
356
- treeData: treeVideoAccountData
357
- // value={ [] }
358
- ,
359
- onChange: function onChange(idList) {
360
- console.log('TreeSelect:', idList);
373
+ }), /*#__PURE__*/_jsxs("div", {
374
+ className: "accountListWarp",
375
+ children: [/*#__PURE__*/_jsx(Form.Item, {
376
+ label: "\u8D26\u53F7",
377
+ extra: "\u6BCF\u4E2A\u89C6\u9891\u53EA\u53D1\u4E00\u4E2A\u8D26\u6237",
378
+ name: "accountList",
379
+ className: "accountList",
380
+ rules: [{
381
+ required: true,
382
+ message: '请选择账户'
383
+ }],
384
+ children: /*#__PURE__*/_jsx(TreeSelect, {
385
+ disabled: loadingAccountList,
386
+ treeData: treeVideoAccountData
387
+ // value={ [] }
388
+ ,
389
+ onChange: function onChange(idList) {
390
+ console.log('TreeSelect:', idList);
391
+ },
392
+ treeCheckable: !loadingAccountList,
393
+ showCheckedStrategy: TreeSelect.SHOW_PARENT,
394
+ placeholder: "\u8BF7\u9009\u62E9 \u8D26\u6237/\u7EC4"
395
+ })
396
+ }), /*#__PURE__*/_jsx("a", {
397
+ className: "renew ".concat(loadingAccountList ? 'disabled' : ''),
398
+ onClick: function onClick() {
399
+ return onAccountList();
361
400
  },
362
- treeCheckable: true,
363
- showCheckedStrategy: TreeSelect.SHOW_PARENT,
364
- placeholder: "\u8BF7\u9009\u62E9 \u8D26\u6237/\u7EC4"
365
- })
401
+ children: /*#__PURE__*/_jsx(Tooltip, {
402
+ title: "\u5237\u65B0\u8D26\u6237\u5217\u8868",
403
+ children: /*#__PURE__*/_jsx(RedoOutlined, {})
404
+ })
405
+ })]
366
406
  }), /*#__PURE__*/_jsxs(Divider, {
367
407
  orientation: "left",
368
408
  children: [/*#__PURE__*/_jsx(VideoCameraOutlined, {
@@ -53,7 +53,7 @@ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
53
53
  className: "title",
54
54
  children: /*#__PURE__*/_jsx(TextInput, {
55
55
  className: "remarkInput",
56
- maxLength: 20,
56
+ maxLength: 30,
57
57
  label: title || '',
58
58
  value: title || '',
59
59
  onFinish: function onFinish(title) {
package/dist/global.less CHANGED
@@ -5,4 +5,13 @@
5
5
 
6
6
  #root{
7
7
  min-height: 100vh;
8
+
9
+
10
+ }
11
+
12
+ a{
13
+ &.disabled{
14
+ color: #CCC;
15
+ cursor: not-allowed;
16
+ }
8
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",