wargerm 0.4.11 → 0.4.12
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/index.css +18 -0
- package/dist/index.esm.css +18 -0
- package/dist/index.esm.js +61 -71
- package/dist/index.js +61 -71
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -1409,6 +1409,15 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
|
|
1409
1409
|
[data-prefers-color='dark'] .btnbox:hover {
|
1410
1410
|
background: #0f6ab7;
|
1411
1411
|
}
|
1412
|
+
[data-prefers-color='dark'] .videoContainer {
|
1413
|
+
width: 100%;
|
1414
|
+
height: 100%;
|
1415
|
+
display: grid;
|
1416
|
+
grid-template-columns: 1fr;
|
1417
|
+
grid-template-rows: 1fr;
|
1418
|
+
grid-gap: 1px 1px;
|
1419
|
+
background: #0f6ab7;
|
1420
|
+
}
|
1412
1421
|
|
1413
1422
|
/* Color
|
1414
1423
|
----------------------- */
|
@@ -2781,6 +2790,15 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
|
|
2781
2790
|
[data-prefers-color='light'] .btnbox:hover {
|
2782
2791
|
background: #0f6ab7;
|
2783
2792
|
}
|
2793
|
+
[data-prefers-color='light'] .videoContainer {
|
2794
|
+
width: 100%;
|
2795
|
+
height: 100%;
|
2796
|
+
display: grid;
|
2797
|
+
grid-template-columns: 1fr;
|
2798
|
+
grid-template-rows: 1fr;
|
2799
|
+
grid-gap: 1px 1px;
|
2800
|
+
background: #0f6ab7;
|
2801
|
+
}
|
2784
2802
|
|
2785
2803
|
.frame {
|
2786
2804
|
width: 40px;
|
package/dist/index.esm.css
CHANGED
@@ -1409,6 +1409,15 @@ button[data-prefers-color='dark'] .swiper-pagination-bullet {
|
|
1409
1409
|
[data-prefers-color='dark'] .btnbox:hover {
|
1410
1410
|
background: #0f6ab7;
|
1411
1411
|
}
|
1412
|
+
[data-prefers-color='dark'] .videoContainer {
|
1413
|
+
width: 100%;
|
1414
|
+
height: 100%;
|
1415
|
+
display: grid;
|
1416
|
+
grid-template-columns: 1fr;
|
1417
|
+
grid-template-rows: 1fr;
|
1418
|
+
grid-gap: 1px 1px;
|
1419
|
+
background: #0f6ab7;
|
1420
|
+
}
|
1412
1421
|
|
1413
1422
|
/* Color
|
1414
1423
|
----------------------- */
|
@@ -2781,6 +2790,15 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
|
|
2781
2790
|
[data-prefers-color='light'] .btnbox:hover {
|
2782
2791
|
background: #0f6ab7;
|
2783
2792
|
}
|
2793
|
+
[data-prefers-color='light'] .videoContainer {
|
2794
|
+
width: 100%;
|
2795
|
+
height: 100%;
|
2796
|
+
display: grid;
|
2797
|
+
grid-template-columns: 1fr;
|
2798
|
+
grid-template-rows: 1fr;
|
2799
|
+
grid-gap: 1px 1px;
|
2800
|
+
background: #0f6ab7;
|
2801
|
+
}
|
2784
2802
|
|
2785
2803
|
.frame {
|
2786
2804
|
width: 40px;
|
package/dist/index.esm.js
CHANGED
@@ -8535,7 +8535,7 @@ Table.defaultProps = {
|
|
8535
8535
|
var _excluded$8 = ["height", "width", "count", "style", "numberStyle"],
|
8536
8536
|
_excluded2$2 = ["count", "numberCount", "width", "height", "marginRight"];
|
8537
8537
|
|
8538
|
-
var Number
|
8538
|
+
var Number = function Number(_ref) {
|
8539
8539
|
var height = _ref.height,
|
8540
8540
|
width = _ref.width,
|
8541
8541
|
_ref$count = _ref.count,
|
@@ -8657,7 +8657,7 @@ var Number$1 = function Number(_ref) {
|
|
8657
8657
|
})))));
|
8658
8658
|
};
|
8659
8659
|
|
8660
|
-
Number
|
8660
|
+
Number.defaultProps = {
|
8661
8661
|
width: 28,
|
8662
8662
|
height: 40
|
8663
8663
|
};
|
@@ -8694,7 +8694,7 @@ var Index$7 = function Index(props) {
|
|
8694
8694
|
display: 'flex'
|
8695
8695
|
}
|
8696
8696
|
}, numberList.map(function (res, index) {
|
8697
|
-
return /*#__PURE__*/React.createElement(Number
|
8697
|
+
return /*#__PURE__*/React.createElement(Number, _objectSpread2({
|
8698
8698
|
key: index,
|
8699
8699
|
width: width,
|
8700
8700
|
height: height,
|
@@ -10986,15 +10986,6 @@ function Xgplay(_ref) {
|
|
10986
10986
|
type = _ref.type;
|
10987
10987
|
var ref = useRef(null);
|
10988
10988
|
useEffect(function () {
|
10989
|
-
player = new HlsJsPlayer(_objectSpread2({
|
10990
|
-
el: ref.current,
|
10991
|
-
width: '100%',
|
10992
|
-
height: '100%',
|
10993
|
-
autoplay: true,
|
10994
|
-
isLive: true,
|
10995
|
-
autoplayMuted: true
|
10996
|
-
}, config));
|
10997
|
-
|
10998
10989
|
if (type.indexOf('hls') !== -1) {
|
10999
10990
|
player = new HlsJsPlayer(_objectSpread2({
|
11000
10991
|
el: ref.current,
|
@@ -11067,30 +11058,52 @@ function VideoPlayer(_ref) {
|
|
11067
11058
|
config = _ref$config === void 0 ? {} : _ref$config,
|
11068
11059
|
_ref$url = _ref.url,
|
11069
11060
|
url = _ref$url === void 0 ? [] : _ref$url;
|
11061
|
+
var layouts = [{
|
11062
|
+
title: '1x1布局',
|
11063
|
+
style: {
|
11064
|
+
gridTemplateColumns: '1fr',
|
11065
|
+
gridTemplateRows: '1fr'
|
11066
|
+
},
|
11067
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
11068
|
+
type: "icon-dantupailie"
|
11069
|
+
}),
|
11070
|
+
span: 1
|
11071
|
+
}, {
|
11072
|
+
title: '2x2布局',
|
11073
|
+
style: {
|
11074
|
+
gridTemplateColumns: '1fr 1fr',
|
11075
|
+
gridTemplateRows: '1fr 1fr'
|
11076
|
+
},
|
11077
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
11078
|
+
type: "icon-split-screen-compare-full"
|
11079
|
+
}),
|
11080
|
+
span: 4
|
11081
|
+
}, {
|
11082
|
+
title: '3x3布局',
|
11083
|
+
style: {
|
11084
|
+
gridTemplateColumns: '1fr 1fr 1fr',
|
11085
|
+
gridTemplateRows: '1fr 1fr 1fr'
|
11086
|
+
},
|
11087
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
11088
|
+
type: "icon-all-full",
|
11089
|
+
className: "f21"
|
11090
|
+
}),
|
11091
|
+
span: 9
|
11092
|
+
}];
|
11070
11093
|
|
11071
|
-
var _useState = useState(
|
11094
|
+
var _useState = useState(0),
|
11072
11095
|
_useState2 = _slicedToArray(_useState, 2),
|
11073
|
-
|
11074
|
-
|
11075
|
-
|
11076
|
-
var _useState3 = useState(1),
|
11077
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
11078
|
-
colNumber = _useState4[0],
|
11079
|
-
setColNumber = _useState4[1];
|
11096
|
+
currentLayoutIndex = _useState2[0],
|
11097
|
+
setCurrentLayoutIndex = _useState2[1];
|
11080
11098
|
|
11081
11099
|
var domRef = useRef(null);
|
11082
11100
|
var contentRef = useRef(null);
|
11083
|
-
|
11084
|
-
|
11085
|
-
|
11086
|
-
|
11087
|
-
return /*#__PURE__*/React.createElement(_Col, {
|
11088
|
-
span: 24 / colCountKey,
|
11101
|
+
var renderDom = useMemo(function () {
|
11102
|
+
var arr = new Array(layouts[currentLayoutIndex].span).fill(0);
|
11103
|
+
return arr.map(function (item, index) {
|
11104
|
+
return /*#__PURE__*/React.createElement("div", {
|
11089
11105
|
key: index,
|
11090
|
-
className: "camera"
|
11091
|
-
style: {
|
11092
|
-
height: (Number(style.height) - 30) / colNumber
|
11093
|
-
}
|
11106
|
+
className: "camera"
|
11094
11107
|
}, url[index] ? /*#__PURE__*/React.createElement(Xgplay, {
|
11095
11108
|
type: url[index],
|
11096
11109
|
config: _objectSpread2({
|
@@ -11106,7 +11119,7 @@ function VideoPlayer(_ref) {
|
|
11106
11119
|
}
|
11107
11120
|
}));
|
11108
11121
|
});
|
11109
|
-
};
|
11122
|
+
}, [currentLayoutIndex]);
|
11110
11123
|
|
11111
11124
|
function exitFullscreen() {
|
11112
11125
|
if (document.exitFullscreen) {
|
@@ -11132,47 +11145,24 @@ function VideoPlayer(_ref) {
|
|
11132
11145
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
11133
11146
|
style: style,
|
11134
11147
|
ref: contentRef
|
11135
|
-
}, /*#__PURE__*/React.createElement(_Row, {
|
11136
|
-
ref: domRef
|
11137
|
-
}, renderDom()), footer ? /*#__PURE__*/React.createElement("div", {
|
11138
|
-
className: "tools"
|
11139
11148
|
}, /*#__PURE__*/React.createElement("div", {
|
11140
|
-
|
11141
|
-
|
11142
|
-
|
11143
|
-
|
11144
|
-
|
11145
|
-
},
|
11146
|
-
|
11147
|
-
|
11148
|
-
|
11149
|
-
|
11150
|
-
|
11151
|
-
|
11152
|
-
|
11153
|
-
|
11154
|
-
|
11155
|
-
}
|
11156
|
-
}
|
11157
|
-
placement: "top",
|
11158
|
-
title: '2x2布局'
|
11159
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
11160
|
-
type: "icon-split-screen-compare-full"
|
11161
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
11162
|
-
className: "btnbox",
|
11163
|
-
onClick: function onClick() {
|
11164
|
-
setColNumber(3);
|
11165
|
-
setColCountKey(3);
|
11166
|
-
}
|
11167
|
-
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
11168
|
-
placement: "top",
|
11169
|
-
title: '3x3布局'
|
11170
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
11171
|
-
type: "icon-all-full",
|
11172
|
-
style: {
|
11173
|
-
fontSize: 21
|
11174
|
-
}
|
11175
|
-
})))) : null));
|
11149
|
+
ref: domRef,
|
11150
|
+
className: "videoContainer",
|
11151
|
+
style: layouts[currentLayoutIndex].style
|
11152
|
+
}, renderDom), footer ? /*#__PURE__*/React.createElement("div", {
|
11153
|
+
className: "tools"
|
11154
|
+
}, layouts.map(function (item, index) {
|
11155
|
+
return /*#__PURE__*/React.createElement("div", {
|
11156
|
+
key: index,
|
11157
|
+
className: "btnbox",
|
11158
|
+
onClick: function onClick() {
|
11159
|
+
return setCurrentLayoutIndex(index);
|
11160
|
+
}
|
11161
|
+
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
11162
|
+
placement: "top",
|
11163
|
+
title: item.title
|
11164
|
+
}, item.icon));
|
11165
|
+
})) : null));
|
11176
11166
|
}
|
11177
11167
|
|
11178
11168
|
export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, index$1 as Card, WCascader as Cascader, Index$3 as Checkbox, Index$8 as CountUp, Index$1 as DatePicker, index as IconFont, Index as Input, WInputNumber as InputNumber, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, Index$7 as Number, NumericInput, Index$2 as Radio, Select, Index$a as Swiper, WSwitch as Switch, index$2 as TabelCard, Table, Index$6 as TreeSelect, VideoPlayer, Index$5 as WDatePicker, WForm$1 as WForm, WebsocketHeart };
|
package/dist/index.js
CHANGED
@@ -8573,7 +8573,7 @@ Table.defaultProps = {
|
|
8573
8573
|
var _excluded$8 = ["height", "width", "count", "style", "numberStyle"],
|
8574
8574
|
_excluded2$2 = ["count", "numberCount", "width", "height", "marginRight"];
|
8575
8575
|
|
8576
|
-
var Number
|
8576
|
+
var Number = function Number(_ref) {
|
8577
8577
|
var height = _ref.height,
|
8578
8578
|
width = _ref.width,
|
8579
8579
|
_ref$count = _ref.count,
|
@@ -8695,7 +8695,7 @@ var Number$1 = function Number(_ref) {
|
|
8695
8695
|
})))));
|
8696
8696
|
};
|
8697
8697
|
|
8698
|
-
Number
|
8698
|
+
Number.defaultProps = {
|
8699
8699
|
width: 28,
|
8700
8700
|
height: 40
|
8701
8701
|
};
|
@@ -8732,7 +8732,7 @@ var Index$7 = function Index(props) {
|
|
8732
8732
|
display: 'flex'
|
8733
8733
|
}
|
8734
8734
|
}, numberList.map(function (res, index) {
|
8735
|
-
return /*#__PURE__*/React__default['default'].createElement(Number
|
8735
|
+
return /*#__PURE__*/React__default['default'].createElement(Number, _objectSpread2({
|
8736
8736
|
key: index,
|
8737
8737
|
width: width,
|
8738
8738
|
height: height,
|
@@ -11024,15 +11024,6 @@ function Xgplay(_ref) {
|
|
11024
11024
|
type = _ref.type;
|
11025
11025
|
var ref = React.useRef(null);
|
11026
11026
|
React.useEffect(function () {
|
11027
|
-
player = new HlsJsPlayer__default['default'](_objectSpread2({
|
11028
|
-
el: ref.current,
|
11029
|
-
width: '100%',
|
11030
|
-
height: '100%',
|
11031
|
-
autoplay: true,
|
11032
|
-
isLive: true,
|
11033
|
-
autoplayMuted: true
|
11034
|
-
}, config));
|
11035
|
-
|
11036
11027
|
if (type.indexOf('hls') !== -1) {
|
11037
11028
|
player = new HlsJsPlayer__default['default'](_objectSpread2({
|
11038
11029
|
el: ref.current,
|
@@ -11105,30 +11096,52 @@ function VideoPlayer(_ref) {
|
|
11105
11096
|
config = _ref$config === void 0 ? {} : _ref$config,
|
11106
11097
|
_ref$url = _ref.url,
|
11107
11098
|
url = _ref$url === void 0 ? [] : _ref$url;
|
11099
|
+
var layouts = [{
|
11100
|
+
title: '1x1布局',
|
11101
|
+
style: {
|
11102
|
+
gridTemplateColumns: '1fr',
|
11103
|
+
gridTemplateRows: '1fr'
|
11104
|
+
},
|
11105
|
+
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
11106
|
+
type: "icon-dantupailie"
|
11107
|
+
}),
|
11108
|
+
span: 1
|
11109
|
+
}, {
|
11110
|
+
title: '2x2布局',
|
11111
|
+
style: {
|
11112
|
+
gridTemplateColumns: '1fr 1fr',
|
11113
|
+
gridTemplateRows: '1fr 1fr'
|
11114
|
+
},
|
11115
|
+
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
11116
|
+
type: "icon-split-screen-compare-full"
|
11117
|
+
}),
|
11118
|
+
span: 4
|
11119
|
+
}, {
|
11120
|
+
title: '3x3布局',
|
11121
|
+
style: {
|
11122
|
+
gridTemplateColumns: '1fr 1fr 1fr',
|
11123
|
+
gridTemplateRows: '1fr 1fr 1fr'
|
11124
|
+
},
|
11125
|
+
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
11126
|
+
type: "icon-all-full",
|
11127
|
+
className: "f21"
|
11128
|
+
}),
|
11129
|
+
span: 9
|
11130
|
+
}];
|
11108
11131
|
|
11109
|
-
var _useState = React.useState(
|
11132
|
+
var _useState = React.useState(0),
|
11110
11133
|
_useState2 = _slicedToArray(_useState, 2),
|
11111
|
-
|
11112
|
-
|
11113
|
-
|
11114
|
-
var _useState3 = React.useState(1),
|
11115
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
11116
|
-
colNumber = _useState4[0],
|
11117
|
-
setColNumber = _useState4[1];
|
11134
|
+
currentLayoutIndex = _useState2[0],
|
11135
|
+
setCurrentLayoutIndex = _useState2[1];
|
11118
11136
|
|
11119
11137
|
var domRef = React.useRef(null);
|
11120
11138
|
var contentRef = React.useRef(null);
|
11121
|
-
|
11122
|
-
|
11123
|
-
|
11124
|
-
|
11125
|
-
return /*#__PURE__*/React__default['default'].createElement(_Col__default['default'], {
|
11126
|
-
span: 24 / colCountKey,
|
11139
|
+
var renderDom = React.useMemo(function () {
|
11140
|
+
var arr = new Array(layouts[currentLayoutIndex].span).fill(0);
|
11141
|
+
return arr.map(function (item, index) {
|
11142
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
11127
11143
|
key: index,
|
11128
|
-
className: "camera"
|
11129
|
-
style: {
|
11130
|
-
height: (Number(style.height) - 30) / colNumber
|
11131
|
-
}
|
11144
|
+
className: "camera"
|
11132
11145
|
}, url[index] ? /*#__PURE__*/React__default['default'].createElement(Xgplay, {
|
11133
11146
|
type: url[index],
|
11134
11147
|
config: _objectSpread2({
|
@@ -11144,7 +11157,7 @@ function VideoPlayer(_ref) {
|
|
11144
11157
|
}
|
11145
11158
|
}));
|
11146
11159
|
});
|
11147
|
-
};
|
11160
|
+
}, [currentLayoutIndex]);
|
11148
11161
|
|
11149
11162
|
function exitFullscreen() {
|
11150
11163
|
if (document.exitFullscreen) {
|
@@ -11170,47 +11183,24 @@ function VideoPlayer(_ref) {
|
|
11170
11183
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
11171
11184
|
style: style,
|
11172
11185
|
ref: contentRef
|
11173
|
-
}, /*#__PURE__*/React__default['default'].createElement(_Row__default['default'], {
|
11174
|
-
ref: domRef
|
11175
|
-
}, renderDom()), footer ? /*#__PURE__*/React__default['default'].createElement("div", {
|
11176
|
-
className: "tools"
|
11177
11186
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
11178
|
-
|
11179
|
-
|
11180
|
-
|
11181
|
-
|
11182
|
-
|
11183
|
-
},
|
11184
|
-
|
11185
|
-
|
11186
|
-
|
11187
|
-
|
11188
|
-
|
11189
|
-
|
11190
|
-
|
11191
|
-
|
11192
|
-
|
11193
|
-
}
|
11194
|
-
}
|
11195
|
-
placement: "top",
|
11196
|
-
title: '2x2布局'
|
11197
|
-
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
11198
|
-
type: "icon-split-screen-compare-full"
|
11199
|
-
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
11200
|
-
className: "btnbox",
|
11201
|
-
onClick: function onClick() {
|
11202
|
-
setColNumber(3);
|
11203
|
-
setColCountKey(3);
|
11204
|
-
}
|
11205
|
-
}, /*#__PURE__*/React__default['default'].createElement(_Tooltip__default['default'], {
|
11206
|
-
placement: "top",
|
11207
|
-
title: '3x3布局'
|
11208
|
-
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
11209
|
-
type: "icon-all-full",
|
11210
|
-
style: {
|
11211
|
-
fontSize: 21
|
11212
|
-
}
|
11213
|
-
})))) : null));
|
11187
|
+
ref: domRef,
|
11188
|
+
className: "videoContainer",
|
11189
|
+
style: layouts[currentLayoutIndex].style
|
11190
|
+
}, renderDom), footer ? /*#__PURE__*/React__default['default'].createElement("div", {
|
11191
|
+
className: "tools"
|
11192
|
+
}, layouts.map(function (item, index) {
|
11193
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
11194
|
+
key: index,
|
11195
|
+
className: "btnbox",
|
11196
|
+
onClick: function onClick() {
|
11197
|
+
return setCurrentLayoutIndex(index);
|
11198
|
+
}
|
11199
|
+
}, /*#__PURE__*/React__default['default'].createElement(_Tooltip__default['default'], {
|
11200
|
+
placement: "top",
|
11201
|
+
title: item.title
|
11202
|
+
}, item.icon));
|
11203
|
+
})) : null));
|
11214
11204
|
}
|
11215
11205
|
|
11216
11206
|
exports.AutoScroll = Index$9;
|