component-shipinlv 1.0.16 → 1.0.17
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/VideoPublish/creat-task/hour-enabled.d.ts +8 -0
- package/dist/VideoPublish/creat-task/hour-enabled.js +38 -0
- package/dist/VideoPublish/creat-task/hour-enabled.less +21 -0
- package/dist/VideoPublish/creat-task/index.js +14 -0
- package/dist/types/VideoPublish.d.ts +1 -0
- package/package.json +1 -1
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "./hour-enabled.less";
|
3
|
+
interface Props {
|
4
|
+
hourEnabled: number[];
|
5
|
+
onHourEnabled: (hourEnabled: number[]) => void;
|
6
|
+
}
|
7
|
+
declare const VideoPublishCreateTaskHourSelect: React.FC<Props>;
|
8
|
+
export default VideoPublishCreateTaskHourSelect;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "./hour-enabled.less";
|
3
|
+
import { Col, Row } from "antd";
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
var VideoPublishCreateTaskHourSelect = function VideoPublishCreateTaskHourSelect(_ref) {
|
7
|
+
var _ref$hourEnabled = _ref.hourEnabled,
|
8
|
+
hourEnabled = _ref$hourEnabled === void 0 ? [] : _ref$hourEnabled,
|
9
|
+
_ref$onHourEnabled = _ref.onHourEnabled,
|
10
|
+
onHourEnabled = _ref$onHourEnabled === void 0 ? function () {} : _ref$onHourEnabled;
|
11
|
+
var onHour = function onHour(hour) {
|
12
|
+
var index = hourEnabled.indexOf(hour);
|
13
|
+
if (index > -1) {
|
14
|
+
hourEnabled.splice(index, 1);
|
15
|
+
} else {
|
16
|
+
hourEnabled.push(hour);
|
17
|
+
}
|
18
|
+
onHourEnabled(hourEnabled);
|
19
|
+
};
|
20
|
+
return /*#__PURE__*/_jsx("div", {
|
21
|
+
className: "videoPublishCreatTaskHourSelect",
|
22
|
+
children: /*#__PURE__*/_jsx(Row, {
|
23
|
+
children: Array(24).join(',').split(',').map(function (item, i) {
|
24
|
+
return /*#__PURE__*/_jsx(Col, {
|
25
|
+
span: 3,
|
26
|
+
children: /*#__PURE__*/_jsxs("div", {
|
27
|
+
className: "items-hour ".concat(hourEnabled.includes(i) ? 'active' : ''),
|
28
|
+
onClick: function onClick() {
|
29
|
+
return onHour(i);
|
30
|
+
},
|
31
|
+
children: [i, ":00"]
|
32
|
+
})
|
33
|
+
}, i);
|
34
|
+
})
|
35
|
+
})
|
36
|
+
});
|
37
|
+
};
|
38
|
+
export default VideoPublishCreateTaskHourSelect;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.videoPublishCreatTaskHourSelect{
|
2
|
+
max-width: 720px;
|
3
|
+
.items-hour{
|
4
|
+
background-color: #F2F2F2;
|
5
|
+
padding: 7px 0;
|
6
|
+
line-height: 1em;
|
7
|
+
margin: 0 3px 3px 0;
|
8
|
+
text-align: center;
|
9
|
+
border-radius: 2px;
|
10
|
+
-webkit-user-select: none;
|
11
|
+
-ms-user-select: none;
|
12
|
+
user-select: none;
|
13
|
+
cursor: pointer;
|
14
|
+
transition: all 0.3s ease-in-out;
|
15
|
+
-webkit-transition: all 0.3s ease-in-out;
|
16
|
+
&.active{
|
17
|
+
background-color: #722ED1;
|
18
|
+
color: #FFF;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -16,6 +16,7 @@ import { useRequest } from "@umijs/hooks";
|
|
16
16
|
import * as VideoPublishController from "../../service/api/VideoPublishController";
|
17
17
|
import VideoPlatformLogo from "../../component/video-platform/logo";
|
18
18
|
import fileSelect from "../../base/fileSelect";
|
19
|
+
import VideoPublishCreateTaskHourEnabled from "./hour-enabled";
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
20
21
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
21
22
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -36,6 +37,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
36
37
|
salesVideoRateType: 'hour',
|
37
38
|
salesDayMaxCount: 2,
|
38
39
|
salesVideoKindRateType: '',
|
40
|
+
hourEnabled: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
|
39
41
|
videoList: []
|
40
42
|
}),
|
41
43
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -457,6 +459,18 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
457
459
|
children: "\u4E00\u6B21\u6027\u5168\u53D1\u5E03"
|
458
460
|
})]
|
459
461
|
})
|
462
|
+
}), /*#__PURE__*/_jsx(Divider, {
|
463
|
+
orientation: "left",
|
464
|
+
children: "\u54EA\u4E9B\u5C0F\u65F6\u533A\u95F4\u53EF\u53D1"
|
465
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
466
|
+
label: "\u65F6\u95F4\u6BB5",
|
467
|
+
children: /*#__PURE__*/_jsx(VideoPublishCreateTaskHourEnabled, {
|
468
|
+
hourEnabled: formData.hourEnabled,
|
469
|
+
onHourEnabled: function onHourEnabled(hourEnabled) {
|
470
|
+
formData.hourEnabled = hourEnabled;
|
471
|
+
setFormData(_objectSpread({}, formData));
|
472
|
+
}
|
473
|
+
})
|
460
474
|
}), /*#__PURE__*/_jsx(Divider, {
|
461
475
|
orientation: "left",
|
462
476
|
children: "\u5176\u4ED6\u8BBE\u7F6E"
|