@vtx/player 0.0.13 → 0.0.16
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/lib/bill-player/index.d.ts +1 -1
- package/lib/bill-player/index.js +4 -4
- package/lib/bill-player/index.js.map +1 -1
- package/lib/controls/index.d.ts +1 -1
- package/lib/controls/index.js +4 -4
- package/lib/controls/index.js.map +1 -1
- package/lib/controls/style/css.js +10 -0
- package/lib/controls/style/css.js.map +1 -1
- package/lib/controls/style/index.d.ts +5 -0
- package/lib/controls/style/index.js +10 -0
- package/lib/controls/style/index.js.map +1 -1
- package/lib/history-control/index.d.ts +2 -2
- package/lib/history-control/index.js +10 -10
- package/lib/history-control/index.js.map +1 -1
- package/lib/history-control/style/css.js +8 -0
- package/lib/history-control/style/css.js.map +1 -1
- package/lib/history-control/style/index.d.ts +4 -0
- package/lib/history-control/style/index.js +8 -0
- package/lib/history-control/style/index.js.map +1 -1
- package/lib/history-player/index.js +6 -6
- package/lib/history-player/index.js.map +1 -1
- package/lib/history-player/style/css.js +4 -0
- package/lib/history-player/style/css.js.map +1 -1
- package/lib/history-player/style/index.d.ts +2 -0
- package/lib/history-player/style/index.js +4 -0
- package/lib/history-player/style/index.js.map +1 -1
- package/lib/live-control/style/css.js +4 -0
- package/lib/live-control/style/css.js.map +1 -1
- package/lib/live-control/style/index.d.ts +3 -0
- package/lib/live-control/style/index.js +4 -0
- package/lib/live-control/style/index.js.map +1 -1
- package/lib/live-player/demo/src/components/lib/vtx-color-picker/style/index.css +12 -0
- package/lib/live-player/demo/src/components/lib/vtx-color-picker/style/index.less +12 -0
- package/lib/live-player/demo/src/components/lib/vtx-combogrid/style/index.css +24 -0
- package/lib/live-player/demo/src/components/lib/vtx-combogrid/style/index.less +29 -0
- package/lib/live-player/demo/src/components/lib/vtx-datagrid/style/index.css +136 -0
- package/lib/live-player/demo/src/components/lib/vtx-datagrid/style/index.less +166 -0
- package/lib/live-player/demo/src/components/lib/vtx-date-picker/style/index.css +29 -0
- package/lib/live-player/demo/src/components/lib/vtx-date-picker/style/index.less +39 -0
- package/lib/live-player/demo/src/components/lib/vtx-editor/style/index.css +6 -0
- package/lib/live-player/demo/src/components/lib/vtx-editor/style/index.less +8 -0
- package/lib/live-player/demo/src/components/lib/vtx-ellipsis-text/style/index.css +13 -0
- package/lib/live-player/demo/src/components/lib/vtx-ellipsis-text/style/index.less +13 -0
- package/lib/live-player/demo/src/components/lib/vtx-export/style/index.css +8 -0
- package/lib/live-player/demo/src/components/lib/vtx-export/style/index.less +6 -0
- package/lib/live-player/demo/src/components/lib/vtx-form-layout/demo/Modal.css +42 -0
- package/lib/live-player/demo/src/components/lib/vtx-form-layout/demo/Modal.less +43 -0
- package/lib/live-player/demo/src/components/lib/vtx-form-layout/style/index.css +224 -0
- package/lib/live-player/demo/src/components/lib/vtx-form-layout/style/index.less +211 -0
- package/lib/live-player/demo/src/components/lib/vtx-image/style/index.css +46 -0
- package/lib/live-player/demo/src/components/lib/vtx-image/style/index.less +63 -0
- package/lib/live-player/demo/src/components/lib/vtx-import/style/index.css +3 -0
- package/lib/live-player/demo/src/components/lib/vtx-import/style/index.less +8 -0
- package/lib/live-player/demo/src/components/lib/vtx-input/style/index.css +22 -0
- package/lib/live-player/demo/src/components/lib/vtx-input/style/index.less +24 -0
- package/lib/live-player/demo/src/components/lib/vtx-modal/style/index.css +80 -0
- package/lib/live-player/demo/src/components/lib/vtx-modal/style/index.less +95 -0
- package/lib/live-player/demo/src/components/lib/vtx-page-layout/style/index.css +115 -0
- package/lib/live-player/demo/src/components/lib/vtx-page-layout/style/index.less +138 -0
- package/lib/live-player/demo/src/components/lib/vtx-rps-frame/style/index.css +8 -0
- package/lib/live-player/demo/src/components/lib/vtx-rps-frame/style/index.less +8 -0
- package/lib/live-player/demo/src/components/lib/vtx-scrollable-row/style/index.css +111 -0
- package/lib/live-player/demo/src/components/lib/vtx-scrollable-row/style/index.less +113 -0
- package/lib/live-player/demo/src/components/lib/vtx-search/style/index.css +84 -0
- package/lib/live-player/demo/src/components/lib/vtx-search/style/index.less +83 -0
- package/lib/live-player/demo/src/components/lib/vtx-select/style/index.css +68 -0
- package/lib/live-player/demo/src/components/lib/vtx-select/style/index.less +68 -0
- package/lib/live-player/demo/src/components/lib/vtx-signature/style/index.css +35 -0
- package/lib/live-player/demo/src/components/lib/vtx-signature/style/index.less +33 -0
- package/lib/live-player/demo/src/components/lib/vtx-split-pane/style/index.css +59 -0
- package/lib/live-player/demo/src/components/lib/vtx-split-pane/style/index.less +60 -0
- package/lib/live-player/demo/src/components/lib/vtx-statistics-column/style/index.css +55 -0
- package/lib/live-player/demo/src/components/lib/vtx-statistics-column/style/index.less +59 -0
- package/lib/live-player/demo/src/components/lib/vtx-upload/style/index.css +54 -0
- package/lib/live-player/demo/src/components/lib/vtx-upload/style/index.less +61 -0
- package/lib/live-player/demo/src/components/lib/vtx-ztree/style/index.css +29 -0
- package/lib/live-player/demo/src/components/lib/vtx-ztree/style/index.less +30 -0
- package/lib/live-player/demo/src/components/lib/vtx-ztree-select/style/index.css +66 -0
- package/lib/live-player/demo/src/components/lib/vtx-ztree-select/style/index.less +74 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/be-input/style/index.css +13 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/be-input/style/index.less +16 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/theme/dark.css +17 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/theme/dark.less +19 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/theme/default.css +16 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/theme/default.less +16 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/theme/global.css +18 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/theme/global.less +61 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-car-history/style/index.css +3 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-car-history/style/index.less +5 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-chart/style/index.css +9 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-chart/style/index.less +10 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-filter/style/index.css +109 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-filter/style/index.less +142 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-info-collection/style/index.css +22 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-info-collection/style/index.less +18 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-stat-collection/style/index.css +37 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-stat-collection/style/index.less +41 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-sub-tabs/style/index.css +42 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-sub-tabs/style/index.less +50 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-table/style/index.css +150 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vm-table/style/index.less +187 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-base-modal/style/index.css +412 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-base-modal/style/index.less +469 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-community-modal/style/index.css +52 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-community-modal/style/index.less +43 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-construction-site-modal/style/index.css +108 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-construction-site-modal/style/index.less +95 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-full-screen-base-modal/style/index.css +81 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-full-screen-base-modal/style/index.less +96 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-cylinder-file-modal/style/index.css +3 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-cylinder-file-modal/style/index.less +7 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-cylinder-file-modal/style/lastProcessFlow.css +67 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-cylinder-file-modal/style/lastProcessFlow.less +69 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-enterprise-modal/style/index.css +6 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-enterprise-modal/style/index.less +7 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-filling-station-modal/style/index.css +6 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-filling-station-modal/style/index.less +7 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-security-check-modal/style/index.css +0 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-security-check-modal/style/index.less +1 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-staff-modal/style/index.css +9 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-staff-modal/style/index.less +13 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-supply-station-modal/style/index.css +6 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-supply-station-modal/style/index.less +7 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-user-modal/style/index.css +0 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-gas-user-modal/style/index.less +1 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-vehicle-modal/style/index.css +245 -0
- package/lib/live-player/demo/src/components/vtxModals/lib/vtx-vehicle-modal/style/index.less +218 -0
- package/lib/live-player/demo/src/global.css +6 -0
- package/lib/live-player/demo/src/global.less +6 -0
- package/lib/live-player/demo/src/layouts/menu/index.css +31 -0
- package/lib/live-player/demo/src/layouts/menu/index.less +30 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Cover/index.css +370 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Cover/index.less +235 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Earth/images/map2.jpg +0 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Earth/images/map_inverted.png +0 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Earth/images/radial_layers_medium2.jpg +0 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Earth/images/universe4.jpg +0 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Earth/index.css +10 -0
- package/lib/live-player/demo/src/pages/carHistory/components/Earth/index.less +10 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/index.d.ts +221 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/api/fetch.d.ts +12 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/api/index.d.ts +15 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/api/types.d.ts +107 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/bill-player/index.d.ts +21 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/controls/index.d.ts +52 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/history-control/index.d.ts +39 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/history-player/index.d.ts +31 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/live-channel-player/index.d.ts +16 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/live-control/index.d.ts +35 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/live-player/index.d.ts +22 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/components/player/index.d.ts +84 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/context/index.d.ts +8 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/hooks/useSettings.d.ts +9 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/icons/index.d.ts +54 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/main.d.ts +8 -0
- package/lib/live-player/demo/src/pages/carHistory/components/video/types/utils/index.d.ts +60 -0
- package/lib/live-player/demo/src/pages/carHistory/index.css +13 -0
- package/lib/live-player/demo/src/pages/carHistory/index.less +13 -0
- package/lib/live-player/demo/src/pages/demo/index.css +0 -0
- package/lib/live-player/demo/src/pages/demo/index.less +0 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/AMap/AMap.css +27 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/AMap/AMap.less +27 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/BMap/Map.css +26 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/BMap/Map.less +28 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/GMap/Map.css +88 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/GMap/Map.less +87 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/Map.css +7 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/Map.less +9 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/OMap/Map.css +76 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/OMap/Map.less +70 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/OlMap/Map.css +169 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/OlMap/Map.less +165 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/TMap/TMap.css +31 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/TMap/TMap.less +37 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/images/defaultMarker.png +0 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxMap/images/defaultMarker_selected.png +0 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxModal/VtxModal.css +62 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxModal/VtxModal.less +67 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxModal/VtxModalAntd3.css +62 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxModal/VtxModalAntd3.less +67 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxSearchMap/VtxSearchMap.css +171 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxSearchMap/VtxSearchMap.less +171 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
- package/lib/live-player/demo/src/pages/test/components/map/VtxSearchMap/VtxSearchMapAntd3.less +1 -0
- package/lib/live-player/demo/src/pages/test/lib/be-input/style/index.css +13 -0
- package/lib/live-player/demo/src/pages/test/lib/be-input/style/index.less +16 -0
- package/lib/live-player/demo/src/pages/test/lib/theme/dark.css +16 -0
- package/lib/live-player/demo/src/pages/test/lib/theme/dark.less +18 -0
- package/lib/live-player/demo/src/pages/test/lib/theme/default.css +16 -0
- package/lib/live-player/demo/src/pages/test/lib/theme/default.less +16 -0
- package/lib/live-player/demo/src/pages/test/lib/theme/global.css +18 -0
- package/lib/live-player/demo/src/pages/test/lib/theme/global.less +61 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-car-history/style/index.css +3 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-car-history/style/index.less +5 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-chart/style/index.css +9 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-chart/style/index.less +10 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-filter/style/index.css +112 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-filter/style/index.less +146 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-info-collection/style/index.css +17 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-info-collection/style/index.less +17 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-stat-collection/style/index.css +38 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-stat-collection/style/index.less +41 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-sub-tabs/style/index.css +42 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-sub-tabs/style/index.less +50 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-table/style/index.css +150 -0
- package/lib/live-player/demo/src/pages/test/lib/vm-table/style/index.less +187 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-base-modal/style/index.css +122 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-base-modal/style/index.less +123 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-community-modal/style/index.css +47 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-community-modal/style/index.less +41 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-construction-site-modal/style/index.css +100 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-construction-site-modal/style/index.less +90 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-vehicle-modal/style/index.css +228 -0
- package/lib/live-player/demo/src/pages/test/lib/vtx-vehicle-modal/style/index.less +201 -0
- package/lib/live-player/style/css.js +2 -0
- package/lib/live-player/style/css.js.map +1 -1
- package/lib/live-player/style/index.d.ts +1 -0
- package/lib/live-player/style/index.js +2 -0
- package/lib/live-player/style/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,8 +9,14 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
9
9
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
|
|
12
|
+
var _controls = require("../controls");
|
|
13
|
+
|
|
14
|
+
var _icons = require("../icons");
|
|
15
|
+
|
|
12
16
|
var _player = _interopRequireDefault(require("../player"));
|
|
13
17
|
|
|
18
|
+
var _utils = require("../utils");
|
|
19
|
+
|
|
14
20
|
var _ahooks = require("ahooks");
|
|
15
21
|
|
|
16
22
|
var _slider = _interopRequireDefault(require("antd/lib/slider"));
|
|
@@ -19,12 +25,6 @@ var _space = _interopRequireDefault(require("antd/lib/space"));
|
|
|
19
25
|
|
|
20
26
|
var _moment = _interopRequireDefault(require("moment"));
|
|
21
27
|
|
|
22
|
-
var _controls = require("@/controls");
|
|
23
|
-
|
|
24
|
-
var _icons = require("@/icons");
|
|
25
|
-
|
|
26
|
-
var _utils = require("@/utils");
|
|
27
|
-
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
29
|
|
|
30
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HistoryPlayer","forwardRef","props","ref","url","type","width","height","captureName","controlBottom","startTime","endTime","onTimeChange","showInfo","info","totalTime","moment","diff","containerRef","useRef","wrapRef","controlsRef","playerRef","useFullscreen","isFullscreen","toggleFullscreen","useSetState","play","error","loading","id","guidGenerator","volume","currentTime","progress","controls","state","setState","useImperativeHandle","seekTo","time","player","current","Promise","reject","useEffect","container","Player","live","console","log","playBack","then","onTimeUpdate","speed","Math","floor","add","format","TimeFormat","params","destroy","handleCapture","e","capture","stopPropagation","handleFullScreen","resize","handleSlider","value","handlePause","pause","handleResume","resume","_jsxs","Object","assign","className","style","children","_jsx","LoadingState","InfoPanel","bottom","PauseIcon","onClick","PlayIcon","secondsToTime","Slider","disabled","tipFormatter","onChange","Space","size","align","VolumeControl","defaultValue","SpeedControl","CaptureIcon","ExitFullScreenIcon","FullScreenIcon","displayName"],"sources":["history-player/index.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\nimport Player from '../player';\nimport { useFullscreen, useSetState } from 'ahooks';\n// import { Slider, Space } from 'antd';\nimport Slider from 'antd/lib/slider';\nimport Space from 'antd/lib/space';\nimport moment from 'moment';\nimport { InfoPanel, LoadingState, SpeedControl, VolumeControl } from '@/controls';\nimport { CaptureIcon, ExitFullScreenIcon, FullScreenIcon, PauseIcon, PlayIcon } from '@/icons';\nimport { TimeFormat, guidGenerator, secondsToTime } from '@/utils';\nexport const HistoryPlayer = forwardRef((props, ref) => {\n const { url, type, width = '100%', height = '100%', captureName, controlBottom = 0, startTime, endTime, onTimeChange, showInfo = false, info = [], } = props;\n const totalTime = moment(endTime).diff(moment(startTime), 'seconds');\n const containerRef = useRef(null);\n const wrapRef = useRef(null);\n const controlsRef = useRef(null);\n const playerRef = useRef();\n const [isFullscreen, { toggleFullscreen }] = useFullscreen(wrapRef);\n const [state, setState] = useSetState({\n play: false,\n error: false,\n loading: false,\n id: 'vtx_hk_player_' + guidGenerator(),\n volume: 0,\n currentTime: 0,\n progress: 0,\n controls: {\n progress: true,\n },\n });\n useImperativeHandle(ref, () => {\n return {\n seekTo: (time) => {\n const player = playerRef.current;\n if (player) {\n const currentTime = moment(time).diff(moment(startTime), 'seconds');\n return player.seekTo(currentTime);\n }\n else {\n return Promise.reject();\n }\n },\n };\n });\n useEffect(() => {\n const container = containerRef.current;\n if (!url || !container)\n return;\n const player = new Player({ url, container, live: false, startTime, endTime, type });\n playerRef.current = player;\n setState({ loading: true, controls: { progress: player.type === 'hk_ws' } });\n console.log(player.type);\n player\n .playBack()\n .then(() => setState({ play: true, error: false }))\n .catch(() => setState({ error: true }))\n .finally(() => setState({ loading: false }));\n player.onTimeUpdate((currentTime, speed) => {\n setState({ currentTime, progress: Math.floor((currentTime / totalTime) * 100) });\n onTimeChange &&\n onTimeChange(moment(startTime).add(currentTime, 'seconds').format(TimeFormat.params), speed);\n });\n return () => {\n player.destroy();\n setState({ error: false, loading: false, play: false });\n };\n }, [url, startTime, endTime]);\n /** 截图方法 */\n const handleCapture = (e) => {\n const player = playerRef.current;\n player && player.capture(captureName);\n e.stopPropagation();\n };\n /** 全屏方法 */\n const handleFullScreen = (e) => {\n toggleFullscreen();\n const player = playerRef.current;\n player && player.resize();\n e.stopPropagation();\n };\n /** 进度条控制器 */\n const handleSlider = (value) => {\n const currentTime = Math.floor((totalTime * value) / 100);\n const player = playerRef.current;\n setState({ progress: value });\n player === null || player === void 0 ? void 0 : player.seekTo(currentTime);\n };\n /** 暂停方法 */\n const handlePause = () => {\n const player = playerRef.current;\n player === null || player === void 0 ? void 0 : player.pause(() => {\n setState({ play: false });\n });\n };\n /** 恢复播放方法 */\n const handleResume = () => {\n const player = playerRef.current;\n player === null || player === void 0 ? void 0 : player.resume(() => {\n setState({ play: true });\n });\n };\n return (_jsxs(\"div\", Object.assign({ className: \"vtx-history-player\", ref: wrapRef, style: { width, height } }, { children: [_jsx(\"div\", { ref: containerRef, style: { height: '100%', width: '100%' }, id: state.id }), state.loading && _jsx(LoadingState, {}), _jsx(InfoPanel, { showInfo: showInfo, info: info }), _jsxs(\"div\", Object.assign({ className: \"controls\", ref: controlsRef, style: { bottom: controlBottom } }, { children: [state.play ? (_jsx(PauseIcon, { onClick: handlePause })) : (_jsx(PlayIcon, { onClick: handleResume })), _jsxs(\"div\", Object.assign({ className: \"time\" }, { children: [_jsx(\"span\", Object.assign({ className: \"current\" }, { children: secondsToTime(state.currentTime) })), _jsxs(\"span\", Object.assign({ className: \"total\" }, { children: [\"/\", secondsToTime(totalTime)] }))] })), _jsx(\"div\", Object.assign({ className: \"slider\" }, { children: _jsx(Slider, { disabled: !state.controls.progress, tipFormatter: null, onChange: handleSlider, value: state.progress }) })), _jsxs(Space, Object.assign({ className: \"right\", size: 12, align: \"center\" }, { children: [_jsx(VolumeControl, { player: playerRef.current, defaultValue: 0, container: controlsRef.current }), _jsx(SpeedControl, { player: playerRef.current, container: controlsRef.current }), _jsx(CaptureIcon, { onClick: handleCapture }), isFullscreen ? (_jsx(ExitFullScreenIcon, { onClick: handleFullScreen })) : (_jsx(FullScreenIcon, { onClick: handleFullScreen }))] }))] }))] })));\n});\nHistoryPlayer.displayName = 'HistoryPlayer';\nexport default HistoryPlayer;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AACO,IAAMA,aAAa,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACpD,IAAQC,GAAR,GAAuJF,KAAvJ,CAAQE,GAAR;EAAA,IAAaC,IAAb,GAAuJH,KAAvJ,CAAaG,IAAb;EAAA,mBA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AI,IAAAwD,eAAA,EAAKmB,yBAAL,EAAyB;UAAEd,OAAO,EAAEnB;QAAX,CAAzB,CAAJ,GAAgE,IAAAc,eAAA,EAAKoB,qBAAL,EAAqB;UAAEf,OAAO,EAAEnB;QAAX,CAArB,CAApT;MAAZ,CAAjE,CAAb,CAArjB;IAAZ,CAA7F,CAAb,CAA3L;EAAZ,CAA3F,CAAb,CAAR;AACH,CA5F4B,CAAtB;;AA6FPlE,aAAa,CAACqG,WAAd,GAA4B,eAA5B;eACerG,a"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["HistoryPlayer","forwardRef","props","ref","url","type","width","height","captureName","controlBottom","startTime","endTime","onTimeChange","showInfo","info","totalTime","moment","diff","containerRef","useRef","wrapRef","controlsRef","playerRef","useFullscreen","isFullscreen","toggleFullscreen","useSetState","play","error","loading","id","guidGenerator","volume","currentTime","progress","controls","state","setState","useImperativeHandle","seekTo","time","player","current","Promise","reject","useEffect","container","Player","live","console","log","playBack","then","onTimeUpdate","speed","Math","floor","add","format","TimeFormat","params","destroy","handleCapture","e","capture","stopPropagation","handleFullScreen","resize","handleSlider","value","handlePause","pause","handleResume","resume","_jsxs","Object","assign","className","style","children","_jsx","LoadingState","InfoPanel","bottom","PauseIcon","onClick","PlayIcon","secondsToTime","Slider","disabled","tipFormatter","onChange","Space","size","align","VolumeControl","defaultValue","SpeedControl","CaptureIcon","ExitFullScreenIcon","FullScreenIcon","displayName"],"sources":["history-player/index.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\nimport { InfoPanel, LoadingState, SpeedControl, VolumeControl } from '../controls';\nimport { CaptureIcon, ExitFullScreenIcon, FullScreenIcon, PauseIcon, PlayIcon } from '../icons';\nimport Player from '../player';\nimport { TimeFormat, guidGenerator, secondsToTime } from '../utils';\nimport { useFullscreen, useSetState } from 'ahooks';\n// import { Slider, Space } from 'antd';\nimport Slider from 'antd/lib/slider';\nimport Space from 'antd/lib/space';\nimport moment from 'moment';\nexport const HistoryPlayer = forwardRef((props, ref) => {\n const { url, type, width = '100%', height = '100%', captureName, controlBottom = 0, startTime, endTime, onTimeChange, showInfo = false, info = [], } = props;\n const totalTime = moment(endTime).diff(moment(startTime), 'seconds');\n const containerRef = useRef(null);\n const wrapRef = useRef(null);\n const controlsRef = useRef(null);\n const playerRef = useRef();\n const [isFullscreen, { toggleFullscreen }] = useFullscreen(wrapRef);\n const [state, setState] = useSetState({\n play: false,\n error: false,\n loading: false,\n id: 'vtx_hk_player_' + guidGenerator(),\n volume: 0,\n currentTime: 0,\n progress: 0,\n controls: {\n progress: true,\n },\n });\n useImperativeHandle(ref, () => {\n return {\n seekTo: (time) => {\n const player = playerRef.current;\n if (player) {\n const currentTime = moment(time).diff(moment(startTime), 'seconds');\n return player.seekTo(currentTime);\n }\n else {\n return Promise.reject();\n }\n },\n };\n });\n useEffect(() => {\n const container = containerRef.current;\n if (!url || !container)\n return;\n const player = new Player({ url, container, live: false, startTime, endTime, type });\n playerRef.current = player;\n setState({ loading: true, controls: { progress: player.type === 'hk_ws' } });\n console.log(player.type);\n player\n .playBack()\n .then(() => setState({ play: true, error: false }))\n .catch(() => setState({ error: true }))\n .finally(() => setState({ loading: false }));\n player.onTimeUpdate((currentTime, speed) => {\n setState({ currentTime, progress: Math.floor((currentTime / totalTime) * 100) });\n onTimeChange &&\n onTimeChange(moment(startTime).add(currentTime, 'seconds').format(TimeFormat.params), speed);\n });\n return () => {\n player.destroy();\n setState({ error: false, loading: false, play: false });\n };\n }, [url, startTime, endTime]);\n /** 截图方法 */\n const handleCapture = (e) => {\n const player = playerRef.current;\n player && player.capture(captureName);\n e.stopPropagation();\n };\n /** 全屏方法 */\n const handleFullScreen = (e) => {\n toggleFullscreen();\n const player = playerRef.current;\n player && player.resize();\n e.stopPropagation();\n };\n /** 进度条控制器 */\n const handleSlider = (value) => {\n const currentTime = Math.floor((totalTime * value) / 100);\n const player = playerRef.current;\n setState({ progress: value });\n player === null || player === void 0 ? void 0 : player.seekTo(currentTime);\n };\n /** 暂停方法 */\n const handlePause = () => {\n const player = playerRef.current;\n player === null || player === void 0 ? void 0 : player.pause(() => {\n setState({ play: false });\n });\n };\n /** 恢复播放方法 */\n const handleResume = () => {\n const player = playerRef.current;\n player === null || player === void 0 ? void 0 : player.resume(() => {\n setState({ play: true });\n });\n };\n return (_jsxs(\"div\", Object.assign({ className: \"vtx-history-player\", ref: wrapRef, style: { width, height } }, { children: [_jsx(\"div\", { ref: containerRef, style: { height: '100%', width: '100%' }, id: state.id }), state.loading && _jsx(LoadingState, {}), _jsx(InfoPanel, { showInfo: showInfo, info: info }), _jsxs(\"div\", Object.assign({ className: \"controls\", ref: controlsRef, style: { bottom: controlBottom } }, { children: [state.play ? (_jsx(PauseIcon, { onClick: handlePause })) : (_jsx(PlayIcon, { onClick: handleResume })), _jsxs(\"div\", Object.assign({ className: \"time\" }, { children: [_jsx(\"span\", Object.assign({ className: \"current\" }, { children: secondsToTime(state.currentTime) })), _jsxs(\"span\", Object.assign({ className: \"total\" }, { children: [\"/\", secondsToTime(totalTime)] }))] })), _jsx(\"div\", Object.assign({ className: \"slider\" }, { children: _jsx(Slider, { disabled: !state.controls.progress, tipFormatter: null, onChange: handleSlider, value: state.progress }) })), _jsxs(Space, Object.assign({ className: \"right\", size: 12, align: \"center\" }, { children: [_jsx(VolumeControl, { player: playerRef.current, defaultValue: 0, container: controlsRef.current }), _jsx(SpeedControl, { player: playerRef.current, container: controlsRef.current }), _jsx(CaptureIcon, { onClick: handleCapture }), isFullscreen ? (_jsx(ExitFullScreenIcon, { onClick: handleFullScreen })) : (_jsx(FullScreenIcon, { onClick: handleFullScreen }))] }))] }))] })));\n});\nHistoryPlayer.displayName = 'HistoryPlayer';\nexport default HistoryPlayer;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;AACO,IAAM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S,CAACoB,OAApB;UAA6BI,SAAS,EAAEzB,WAAW,CAACqB;QAApD,CAAnB,CAAtG,EAAyL,IAAAsC,eAAA,EAAKkB,kBAAL,EAAkB;UAAEb,OAAO,EAAEvB;QAAX,CAAlB,CAAzL,EAAwOtC,YAAY,GAAI,IAAAwD,eAAA,EAAKmB,yBAAL,EAAyB;UAAEd,OAAO,EAAEnB;QAAX,CAAzB,CAAJ,GAAgE,IAAAc,eAAA,EAAKoB,qBAAL,EAAqB;UAAEf,OAAO,EAAEnB;QAAX,CAArB,CAApT;MAAZ,CAAjE,CAAb,CAArjB;IAAZ,CAA7F,CAAb,CAA3L;EAAZ,CAA3F,CAAb,CAAR;AACH,CA5F4B,CAAtB;;AA6FPlE,aAAa,CAACqG,WAAd,GAA4B,eAA5B;eACerG,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["history-player/style/index.js"],"sourcesContent":["import '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["history-player/style/index.js"],"sourcesContent":["import \"antd/lib/slider/style\";\nimport \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["history-player/style/index.js"],"sourcesContent":["import '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["history-player/style/index.js"],"sourcesContent":["import \"antd/lib/slider/style\";\nimport \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["live-control/style/index.js"],"sourcesContent":["import '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["live-control/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport \"antd/lib/tooltip/style\";\nimport '../../controls/style';\nimport \"antd/lib/space/style\";\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["live-control/style/index.js"],"sourcesContent":["import '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["live-control/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport \"antd/lib/tooltip/style\";\nimport '../../controls/style';\nimport \"antd/lib/space/style\";\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AAEA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.vtx-color-picker .ant-input-group-addon {
|
|
2
|
+
width: 37px;
|
|
3
|
+
}
|
|
4
|
+
.vtx-color-picker .rc-color-picker-wrap {
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 50%;
|
|
7
|
+
left: 50%;
|
|
8
|
+
line-height: 0;
|
|
9
|
+
-webkit-transform: translate(-50%, -50%);
|
|
10
|
+
-ms-transform: translate(-50%, -50%);
|
|
11
|
+
transform: translate(-50%, -50%);
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.vtx-combogrid-popover {
|
|
2
|
+
width: 550px;
|
|
3
|
+
}
|
|
4
|
+
.vtx-combogrid-popover .ant-form-item {
|
|
5
|
+
margin-bottom: 12px;
|
|
6
|
+
}
|
|
7
|
+
.vtx-combogrid-btns {
|
|
8
|
+
line-height: 32px;
|
|
9
|
+
}
|
|
10
|
+
.vtx-combogrid-btns button + button {
|
|
11
|
+
margin-left: 4px;
|
|
12
|
+
}
|
|
13
|
+
.vtx-combogrid-main {
|
|
14
|
+
height: 400px;
|
|
15
|
+
}
|
|
16
|
+
.vtx-combogrid-dropdown {
|
|
17
|
+
padding-top: 0;
|
|
18
|
+
}
|
|
19
|
+
.vtx-combogrid-dropdown .ant-popover-arrow {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
.vtx-combogrid-dropdown .ant-pagination.mini .ant-pagination-item {
|
|
23
|
+
line-height: 24px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@prefix-cls: vtx-combogrid;
|
|
2
|
+
|
|
3
|
+
.@{prefix-cls} {
|
|
4
|
+
&-popover {
|
|
5
|
+
width: 550px;
|
|
6
|
+
.ant-form-item {
|
|
7
|
+
margin-bottom: 12px;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
&-btns {
|
|
11
|
+
line-height: 32px;
|
|
12
|
+
button + button {
|
|
13
|
+
margin-left: 4px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
&-main {
|
|
17
|
+
height: 400px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-dropdown {
|
|
21
|
+
padding-top: 0;
|
|
22
|
+
.ant-popover-arrow {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
.ant-pagination.mini .ant-pagination-item {
|
|
26
|
+
line-height: 24px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
.vtx-datagrid {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
}
|
|
5
|
+
.vtx-datagrid-fit {
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
8
|
+
.vtx-datagrid-fit .ant-table-header::-webkit-scrollbar,
|
|
9
|
+
.vtx-datagrid-fit .ant-table-body::-webkit-scrollbar {
|
|
10
|
+
width: 5px;
|
|
11
|
+
background-color: hsla(0, 0%, 80%, 0.08);
|
|
12
|
+
}
|
|
13
|
+
.vtx-datagrid-fit .ant-table-header::-webkit-scrollbar-thumb,
|
|
14
|
+
.vtx-datagrid-fit .ant-table-body::-webkit-scrollbar-thumb {
|
|
15
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
16
|
+
border-radius: 3px;
|
|
17
|
+
}
|
|
18
|
+
.vtx-datagrid-fit .ant-table-fixed-header .ant-table-scroll .ant-table-header {
|
|
19
|
+
min-width: 5px !important;
|
|
20
|
+
}
|
|
21
|
+
.vtx-datagrid-fit .ant-table-pagination {
|
|
22
|
+
position: absolute;
|
|
23
|
+
right: 0;
|
|
24
|
+
bottom: 0;
|
|
25
|
+
}
|
|
26
|
+
.vtx-datagrid-fit .ant-spin-nested-loading {
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
.vtx-datagrid-fit .ant-spin-nested-loading .ant-spin-container {
|
|
30
|
+
position: relative;
|
|
31
|
+
height: 100%;
|
|
32
|
+
}
|
|
33
|
+
.vtx-datagrid-fit .ant-spin-nested-loading .ant-spin-container .ant-table {
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
.vtx-datagrid .ant-table-has-fix-right .ant-table-body::-webkit-scrollbar {
|
|
37
|
+
width: 17px;
|
|
38
|
+
}
|
|
39
|
+
.vtx-datagrid-userAgent-mac .ant-table-has-fix-right .ant-table-body::-webkit-scrollbar {
|
|
40
|
+
width: 15px;
|
|
41
|
+
}
|
|
42
|
+
.vtx-datagrid .ant-table-thead > tr > th {
|
|
43
|
+
background-color: #edf6ff;
|
|
44
|
+
}
|
|
45
|
+
.vtx-datagrid .ant-table-tbody > tr:nth-child(even) {
|
|
46
|
+
background: #f6f6f6;
|
|
47
|
+
}
|
|
48
|
+
.vtx-datagrid .ant-table-tbody > tr.ant-table-placeholder {
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: 0;
|
|
51
|
+
bottom: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
border-top: none;
|
|
55
|
+
}
|
|
56
|
+
.vtx-datagrid .ant-table-tbody > tr.ant-table-placeholder > td.ant-table-cell {
|
|
57
|
+
display: table;
|
|
58
|
+
width: 100%;
|
|
59
|
+
border-right: none !important;
|
|
60
|
+
}
|
|
61
|
+
.vtx-datagrid-alert {
|
|
62
|
+
margin-bottom: 8px;
|
|
63
|
+
}
|
|
64
|
+
.vtx-datagrid-alert-message {
|
|
65
|
+
color: rgba(0, 0, 0, 0.65);
|
|
66
|
+
}
|
|
67
|
+
.vtx-datagrid-alert-info-content > strong {
|
|
68
|
+
margin: 0 4px;
|
|
69
|
+
color: #13c2c2;
|
|
70
|
+
}
|
|
71
|
+
.vtx-datagrid-alert-info-option {
|
|
72
|
+
margin-left: 10px;
|
|
73
|
+
}
|
|
74
|
+
.vtx-datagrid-nodata .ant-table-scroll {
|
|
75
|
+
overflow-y: hidden;
|
|
76
|
+
}
|
|
77
|
+
.vtx-datagrid-toolbar {
|
|
78
|
+
display: table;
|
|
79
|
+
width: 100%;
|
|
80
|
+
margin: 16px 0;
|
|
81
|
+
color: rgba(0, 0, 0, 0.85);
|
|
82
|
+
}
|
|
83
|
+
.vtx-datagrid-toolbar-left,
|
|
84
|
+
.vtx-datagrid-toolbar-right {
|
|
85
|
+
display: inline-block;
|
|
86
|
+
display: table-cell;
|
|
87
|
+
vertical-align: middle;
|
|
88
|
+
}
|
|
89
|
+
.vtx-datagrid-toolbar-left {
|
|
90
|
+
color: rgba(0, 0, 0, 0.85);
|
|
91
|
+
font-size: 16px;
|
|
92
|
+
}
|
|
93
|
+
.vtx-datagrid-toolbar-right {
|
|
94
|
+
float: right;
|
|
95
|
+
}
|
|
96
|
+
.vtx-datagrid-toolbar-setting-item {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
margin-left: 16px;
|
|
99
|
+
color: inherit;
|
|
100
|
+
font-size: 16px;
|
|
101
|
+
vertical-align: middle;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
.vtx-datagrid-toolbar-setting-item:hover {
|
|
105
|
+
color: rgba(0, 0, 0, 0.75);
|
|
106
|
+
}
|
|
107
|
+
.vtx-datagrid-column-setting-title {
|
|
108
|
+
height: 32px;
|
|
109
|
+
line-height: 32px;
|
|
110
|
+
}
|
|
111
|
+
.vtx-datagrid-column-setting-title a {
|
|
112
|
+
display: inline-block;
|
|
113
|
+
float: right;
|
|
114
|
+
vertical-align: middle;
|
|
115
|
+
}
|
|
116
|
+
.vtx-datagrid-column-setting-checkbox-wrapper {
|
|
117
|
+
color: rgba(0, 0, 0, 0.85);
|
|
118
|
+
vertical-align: middle;
|
|
119
|
+
}
|
|
120
|
+
.vtx-datagrid-space-item {
|
|
121
|
+
display: inline-block;
|
|
122
|
+
vertical-align: middle;
|
|
123
|
+
}
|
|
124
|
+
.vtx-datagrid .react-resizable {
|
|
125
|
+
position: relative;
|
|
126
|
+
background-clip: padding-box;
|
|
127
|
+
}
|
|
128
|
+
.vtx-datagrid .react-resizable-handle {
|
|
129
|
+
position: absolute;
|
|
130
|
+
right: -5px;
|
|
131
|
+
bottom: 0;
|
|
132
|
+
z-index: 1;
|
|
133
|
+
width: 10px;
|
|
134
|
+
height: 100%;
|
|
135
|
+
cursor: col-resize;
|
|
136
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
@prefix-cls: vtx-datagrid;
|
|
3
|
+
|
|
4
|
+
.@{prefix-cls} {
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
&-fit {
|
|
8
|
+
height: 100%;
|
|
9
|
+
.ant-table-header,
|
|
10
|
+
.ant-table-body {
|
|
11
|
+
&::-webkit-scrollbar {
|
|
12
|
+
width: 5px;
|
|
13
|
+
background-color: hsla(0, 0%, 80%, 0.08);
|
|
14
|
+
}
|
|
15
|
+
&::-webkit-scrollbar-thumb {
|
|
16
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
17
|
+
border-radius: 3px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ant-table-fixed-header .ant-table-scroll .ant-table-header {
|
|
22
|
+
min-width: 5px !important;
|
|
23
|
+
}
|
|
24
|
+
.ant-table-pagination {
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
}
|
|
29
|
+
.ant-spin-nested-loading {
|
|
30
|
+
height: 100%;
|
|
31
|
+
.ant-spin-container {
|
|
32
|
+
position: relative;
|
|
33
|
+
height: 100%;
|
|
34
|
+
.ant-table {
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// 固定列目前没有办法用细的滚动条
|
|
41
|
+
.ant-table-has-fix-right {
|
|
42
|
+
.ant-table-body {
|
|
43
|
+
&::-webkit-scrollbar {
|
|
44
|
+
width: 17px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// mac 和 windows下有差异,window chrome下滚动条宽度17px,mac chrome下15px
|
|
49
|
+
&-userAgent-mac {
|
|
50
|
+
.ant-table-has-fix-right {
|
|
51
|
+
.ant-table-body {
|
|
52
|
+
&::-webkit-scrollbar {
|
|
53
|
+
width: 15px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.ant-table-thead > tr > th when(@theme=default) {
|
|
59
|
+
// antd4.0 半透明会重叠
|
|
60
|
+
// background-color: fade(#1890ff, 8);
|
|
61
|
+
background-color: rgba(237, 246, 255, 1);
|
|
62
|
+
}
|
|
63
|
+
.ant-table-tbody > tr {
|
|
64
|
+
&:nth-child(even) when(@theme=default) {
|
|
65
|
+
background: #f6f6f6;
|
|
66
|
+
}
|
|
67
|
+
&.ant-table-placeholder {
|
|
68
|
+
position: absolute;
|
|
69
|
+
right: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
left: 0;
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
border-top: none;
|
|
74
|
+
& > td.ant-table-cell {
|
|
75
|
+
display: table;
|
|
76
|
+
width: 100%;
|
|
77
|
+
border-right: none !important;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// fix: checkbox 选中时 固定列 最上面一层透明会 和下面重叠
|
|
82
|
+
// .ant-table-tbody > tr.ant-table-row-selected td {
|
|
83
|
+
// background: transparent;
|
|
84
|
+
// }
|
|
85
|
+
&-alert {
|
|
86
|
+
margin-bottom: 8px;
|
|
87
|
+
&-message when(@theme=default) {
|
|
88
|
+
color: fade(@black, 65%);
|
|
89
|
+
}
|
|
90
|
+
&-message when(@theme=dark) {
|
|
91
|
+
color: @text-color;
|
|
92
|
+
}
|
|
93
|
+
&-info-content > strong {
|
|
94
|
+
margin: 0 4px;
|
|
95
|
+
color: #13c2c2;
|
|
96
|
+
}
|
|
97
|
+
&-info-option {
|
|
98
|
+
margin-left: 10px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
&-nodata {
|
|
102
|
+
.ant-table-scroll {
|
|
103
|
+
overflow-y: hidden;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
&-toolbar {
|
|
107
|
+
display: table;
|
|
108
|
+
width: 100%;
|
|
109
|
+
margin: 16px 0;
|
|
110
|
+
color: @text-color;
|
|
111
|
+
}
|
|
112
|
+
&-toolbar-left,
|
|
113
|
+
&-toolbar-right {
|
|
114
|
+
display: inline-block;
|
|
115
|
+
display: table-cell;
|
|
116
|
+
vertical-align: middle;
|
|
117
|
+
}
|
|
118
|
+
&-toolbar-left {
|
|
119
|
+
color: @text-color;
|
|
120
|
+
font-size: 16px;
|
|
121
|
+
}
|
|
122
|
+
&-toolbar-right {
|
|
123
|
+
float: right;
|
|
124
|
+
}
|
|
125
|
+
&-toolbar-setting-item {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
margin-left: 16px;
|
|
128
|
+
color: @icon-color;
|
|
129
|
+
font-size: 16px;
|
|
130
|
+
vertical-align: middle;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
&:hover {
|
|
133
|
+
color: @icon-color-hover;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
&-column-setting-title {
|
|
137
|
+
height: 32px;
|
|
138
|
+
line-height: 32px;
|
|
139
|
+
a {
|
|
140
|
+
display: inline-block;
|
|
141
|
+
float: right;
|
|
142
|
+
vertical-align: middle;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
&-column-setting-checkbox-wrapper {
|
|
146
|
+
color: @text-color;
|
|
147
|
+
vertical-align: middle;
|
|
148
|
+
}
|
|
149
|
+
&-space-item {
|
|
150
|
+
display: inline-block;
|
|
151
|
+
vertical-align: middle;
|
|
152
|
+
}
|
|
153
|
+
.react-resizable {
|
|
154
|
+
position: relative;
|
|
155
|
+
background-clip: padding-box;
|
|
156
|
+
}
|
|
157
|
+
.react-resizable-handle {
|
|
158
|
+
position: absolute;
|
|
159
|
+
right: -5px;
|
|
160
|
+
bottom: 0;
|
|
161
|
+
z-index: 1;
|
|
162
|
+
width: 10px;
|
|
163
|
+
height: 100%;
|
|
164
|
+
cursor: col-resize;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.vtx-qdate-wrap {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.vtx-qdate-wrap .ant-calendar-picker-input {
|
|
5
|
+
color: transparent;
|
|
6
|
+
}
|
|
7
|
+
.vtx-qdate-input-wrap {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 50%;
|
|
10
|
+
left: 12px;
|
|
11
|
+
margin-top: -16px;
|
|
12
|
+
}
|
|
13
|
+
.vtx-qdate-extra-footer {
|
|
14
|
+
text-align: center;
|
|
15
|
+
}
|
|
16
|
+
.vtx-qdate-text-year:hover,
|
|
17
|
+
.vtx-qdate-text-date:hover,
|
|
18
|
+
.vtx-qdate-text-month:hover,
|
|
19
|
+
.vtx-qdate-text-time:hover {
|
|
20
|
+
text-decoration: underline;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
.vtx-qdate-text-time::before {
|
|
24
|
+
content: ' ';
|
|
25
|
+
}
|
|
26
|
+
.vtx-qdate-text-month:not(:first-child)::before,
|
|
27
|
+
.vtx-qdate-text-date:not(:first-child)::before {
|
|
28
|
+
content: '-';
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@prefix-cls: vtx-qdate;
|
|
2
|
+
|
|
3
|
+
.@{prefix-cls} {
|
|
4
|
+
&-wrap {
|
|
5
|
+
position: relative;
|
|
6
|
+
|
|
7
|
+
.ant-calendar-picker-input {
|
|
8
|
+
color: transparent;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-input-wrap {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 50%;
|
|
15
|
+
left: 12px;
|
|
16
|
+
margin-top: -16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-extra-footer {
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-text-year:hover,
|
|
24
|
+
&-text-date:hover,
|
|
25
|
+
&-text-month:hover,
|
|
26
|
+
&-text-time:hover {
|
|
27
|
+
text-decoration: underline;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-text-time::before {
|
|
32
|
+
content: ' ';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-text-month:not(:first-child)::before,
|
|
36
|
+
&-text-date:not(:first-child)::before {
|
|
37
|
+
content: '-';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.vtx-ellipsis-text {
|
|
2
|
+
margin: 0;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
text-overflow: ellipsis;
|
|
5
|
+
}
|
|
6
|
+
.vtx-ellipsis-text--single {
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
}
|
|
9
|
+
.vtx-ellipsis-text--multi {
|
|
10
|
+
display: -webkit-box;
|
|
11
|
+
-webkit-line-clamp: 2;
|
|
12
|
+
-webkit-box-orient: vertical;
|
|
13
|
+
}
|