@dfsj/components 3.7.1-alpha.4 → 3.7.2-alpha.1
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/components/Boards/src/Boards.vue.d.ts +11 -0
- package/dist/components/Boards/src/Boards.vue2.js +21 -17
- package/dist/components/Boards/src/hooKs/useStyle.d.ts +9 -0
- package/dist/components/Boards/src/hooKs/useStyle.js +5 -5
- package/dist/components/Boards/src/props.d.ts +5 -0
- package/dist/components/Boards/src/props.js +2 -1
- package/dist/components/ClickOutSide/src/ClickOutSide.vue2.js +1 -1
- package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +16 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +173 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +19 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +2 -2
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +16 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +7 -7
- package/dist/components/DatePicker/src/index.d.ts +26 -20
- package/dist/components/DatePicker/src/index.js +4 -4
- package/dist/components/Descriptions/src/Descriptions.vue.d.ts +97 -0
- package/dist/components/Descriptions/src/Descriptions.vue2.js +4 -4
- package/dist/components/Editor/src/Editor.vue.d.ts +4 -4
- package/dist/components/Editor/src/Editor.vue2.js +5 -5
- package/dist/components/Form/src/Form.vue.d.ts +481 -447
- package/dist/components/Form/src/Form.vue2.js +30 -24
- package/dist/components/Form/src/components/useRenderCheckbox.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderCheckbox.js +8 -8
- package/dist/components/Form/src/components/useRenderRadio.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderRadio.js +8 -8
- package/dist/components/Form/src/components/useRenderSelect.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderSelect.js +11 -11
- package/dist/components/Form/src/helper/componentMap.d.ts +5 -0
- package/dist/components/Form/src/helper/index.d.ts +7 -0
- package/dist/components/Form/src/helper/index.js +7 -7
- package/dist/components/Form/src/types/index.d.ts +2 -2
- package/dist/components/Form/src/useForm.js +63 -63
- package/dist/components/Highlight/src/Highlight.vue.d.ts +4 -4
- package/dist/components/Highlight/src/Highlight.vue2.js +3 -3
- package/dist/components/Icon/src/Icon.vue.d.ts +8 -8
- package/dist/components/Icon/src/Icon.vue2.js +11 -11
- package/dist/components/InputPassword/src/InputPassword.vue.d.ts +27 -0
- package/dist/components/Modal/src/BasicModal.vue.d.ts +22 -22
- package/dist/components/Modal/src/BasicModal.vue2.js +11 -11
- package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +4 -4
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +2 -2
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +18 -18
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +2 -2
- package/dist/components/Modal/src/hooks/useModalDrag.js +4 -4
- package/dist/components/Modal/src/hooks/useTimeout.d.ts +15 -0
- package/dist/components/Modal/src/hooks/useTimeout.js +1 -1
- package/dist/components/Modal/src/props.d.ts +11 -11
- package/dist/components/Modal/src/utils/index.d.ts +3 -0
- package/dist/components/Modal/src/utils/index.js +1 -1
- package/dist/components/NodeAxis/src/BCanvasNodeRender.d.ts +19 -0
- package/dist/components/NodeAxis/src/CanvasNodeRender.js +35 -35
- package/dist/components/NodeAxis/src/NodeAxis.d.ts +12 -0
- package/dist/components/NodeAxis/src/NodeAxis.vue.d.ts +17 -0
- package/dist/components/NodeAxis/src/NodeAxis.vue2.js +1 -1
- package/dist/components/NodeAxis/src/NodeModel.js +10 -10
- package/dist/components/NodeAxis/src/NodeRender.js +3 -3
- package/dist/components/NodeAxis/src/TimerNodePlayer.d.ts +19 -0
- package/dist/components/NodeAxis/src/TimerNodePlayer.js +4 -4
- package/dist/components/NodeAxis/src/interface/NodePlayer.d.ts +9 -0
- package/dist/components/Stateful/src/Stateful.vue.d.ts +2 -2
- package/dist/components/Stateful/src/Stateful.vue2.js +6 -6
- package/dist/components/Stateful/src/props.d.ts +1 -1
- package/dist/components/Table/src/Table.vue.d.ts +732 -645
- package/dist/components/Table/src/Table.vue2.js +10 -10
- package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +30 -0
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +20 -20
- package/dist/components/Table/src/components/TableActions.vue.d.ts +229 -0
- package/dist/components/Table/src/components/TableActions.vue2.js +1 -1
- package/dist/components/Table/src/helper/index.d.ts +2 -0
- package/dist/components/Table/src/useTable.js +50 -50
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +8 -8
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +2 -2
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +16 -16
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +2 -2
- package/dist/components/UnifyChart/src/hooks/useLoader.js +19 -19
- package/dist/components/UnifyChart/src/hooks/useRender.js +3 -3
- package/dist/components/UnifyChart/src/props.d.ts +13 -13
- package/dist/components/UnifyChart/src/useDownLoad.d.ts +9 -0
- package/dist/components/UnifyChart/src/useDownLoad.js +27 -0
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +14 -14
- package/dist/components/Video/src/VideoPlayer.vue2.js +5 -5
- package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +34 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +4 -4
- package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +7 -0
- package/dist/components/Video/src/abstract/Observable.d.ts +6 -0
- package/dist/components/Video/src/abstract/VideoControl.d.ts +32 -0
- package/dist/components/Video/src/abstract/VideoControl.js +13 -13
- package/dist/components/Video/src/control/DaHua.d.ts +12 -0
- package/dist/components/Video/src/control/DaHua.js +8 -8
- package/dist/components/Video/src/control/Hikvision.d.ts +28 -0
- package/dist/components/Video/src/control/Hikvision.js +12 -12
- package/dist/components/Video/src/control/VideoFactory.d.ts +3 -0
- package/dist/components/Video/src/enums/CommonEnum.d.ts +26 -0
- package/dist/components/Visual/src/BufferLayerPlayer.js +65 -68
- package/dist/components/Visual/src/ResolvableLayerProvider.js +5 -5
- package/dist/components/Visual/src/resolvers/IntervalResolver.js +9 -9
- package/dist/components/Visual/src/utils/NodeMath.js +1 -1
- package/dist/components/Windows/src/ModalWrap.vue2.js +16 -16
- package/dist/components/Windows/src/Windows.vue2.js +2 -2
- package/dist/directives/clickOutside.js +3 -3
- package/dist/directives/repeatClick.js +1 -1
- package/dist/directives/resizable.js +4 -4
- package/dist/helper/lang.d.ts +1 -0
- package/dist/index.min.css +3 -3
- package/dist/node_modules/.pnpm/@vueuse_core@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/core/index.js +393 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/shared/index.js +53 -0
- package/dist/utils/index.d.ts +11 -0
- package/package.json +11 -11
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var defOptions = {
|
|
2
|
+
name: '图表图片',
|
|
3
|
+
suffix: '.png',
|
|
4
|
+
pixelRatio: 2,
|
|
5
|
+
backgroundColor: '#fff'
|
|
6
|
+
};
|
|
7
|
+
function useDownLoad(getFn) {
|
|
8
|
+
var downloadImg = function downloadImg(options) {
|
|
9
|
+
var def = Object.assign({}, defOptions, options);
|
|
10
|
+
var chartIns = typeof getFn == 'function' ? getFn() : getFn;
|
|
11
|
+
var imgUrl = chartIns === null || chartIns === void 0 ? void 0 : chartIns.getDataURL({
|
|
12
|
+
pixelRatio: def.pixelRatio,
|
|
13
|
+
backgroundColor: def.backgroundColor
|
|
14
|
+
});
|
|
15
|
+
var tempA = document.createElement('a');
|
|
16
|
+
tempA.download = def.name + def.suffix;
|
|
17
|
+
tempA.href = imgUrl;
|
|
18
|
+
document.body.appendChild(tempA);
|
|
19
|
+
tempA.click();
|
|
20
|
+
tempA.remove();
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
downloadImg: downloadImg
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useDownLoad };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
host: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
2
|
+
host: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
3
3
|
default: string;
|
|
4
4
|
};
|
|
5
|
-
port: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
5
|
+
port: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
channel: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
8
|
+
channel: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
|
-
username: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
11
|
+
username: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
12
12
|
default: string;
|
|
13
13
|
};
|
|
14
|
-
password: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
14
|
+
password: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
|
-
streamType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
17
|
+
streamType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
18
18
|
default: string;
|
|
19
19
|
};
|
|
20
|
-
videoType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
20
|
+
videoType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
21
21
|
default: string;
|
|
22
22
|
} & {
|
|
23
23
|
default: string;
|
|
@@ -25,25 +25,25 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
25
25
|
}>, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
26
26
|
[key: string]: any;
|
|
27
27
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
-
host: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
28
|
+
host: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
29
29
|
default: string;
|
|
30
30
|
};
|
|
31
|
-
port: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
31
|
+
port: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
|
-
channel: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
34
|
+
channel: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
35
35
|
default: string;
|
|
36
36
|
};
|
|
37
|
-
username: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
37
|
+
username: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
38
38
|
default: string;
|
|
39
39
|
};
|
|
40
|
-
password: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
40
|
+
password: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
41
41
|
default: string;
|
|
42
42
|
};
|
|
43
|
-
streamType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
43
|
+
streamType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
44
44
|
default: string;
|
|
45
45
|
};
|
|
46
|
-
videoType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").
|
|
46
|
+
videoType: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
47
47
|
default: string;
|
|
48
48
|
} & {
|
|
49
49
|
default: string;
|
|
@@ -7,7 +7,7 @@ import propTypes from 'vue-types';
|
|
|
7
7
|
import script$1 from './VideoPlayerToolbar.vue2.js';
|
|
8
8
|
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
var _hoisted_1 = {
|
|
12
12
|
style: {
|
|
13
13
|
"color": "white"
|
|
@@ -31,7 +31,7 @@ var script = defineComponent({
|
|
|
31
31
|
var isPlay = ref(false);
|
|
32
32
|
var isFullscreen = ref(false);
|
|
33
33
|
var props = __props;
|
|
34
|
-
var componentId = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance ===
|
|
34
|
+
var componentId = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.uid;
|
|
35
35
|
onMounted(function () {
|
|
36
36
|
nextTick(function () {
|
|
37
37
|
instance = VideoFactory.create(props.videoType, _objectSpread({
|
|
@@ -55,12 +55,12 @@ var script = defineComponent({
|
|
|
55
55
|
function stop() {
|
|
56
56
|
var _instance, _instance$stop;
|
|
57
57
|
console.log('props.control', instance);
|
|
58
|
-
(_instance = instance) === null || _instance ===
|
|
58
|
+
(_instance = instance) === null || _instance === void 0 || (_instance$stop = _instance.stop) === null || _instance$stop === void 0 || _instance$stop.call(_instance);
|
|
59
59
|
}
|
|
60
60
|
function play() {
|
|
61
61
|
var _instance2, _instance2$play;
|
|
62
62
|
console.log('props.control', instance);
|
|
63
|
-
(_instance2 = instance) === null || _instance2 ===
|
|
63
|
+
(_instance2 = instance) === null || _instance2 === void 0 || (_instance2$play = _instance2.play) === null || _instance2$play === void 0 || _instance2$play.call(_instance2);
|
|
64
64
|
}
|
|
65
65
|
function toggleFullScreen() {
|
|
66
66
|
isFullscreen.value = !isFullscreen.value;
|
|
@@ -68,7 +68,7 @@ var script = defineComponent({
|
|
|
68
68
|
}
|
|
69
69
|
onBeforeUnmount(function () {
|
|
70
70
|
var _instance3, _instance3$dispose;
|
|
71
|
-
(_instance3 = instance) === null || _instance3 ===
|
|
71
|
+
(_instance3 = instance) === null || _instance3 === void 0 || (_instance3$dispose = _instance3.dispose) === null || _instance3$dispose === void 0 || _instance3$dispose.call(_instance3);
|
|
72
72
|
instance = null;
|
|
73
73
|
});
|
|
74
74
|
function downloadFile() {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
domRef: import("vue-types").VueTypeValidableDef<any, import("vue-types/dist/shared/vue-types.d8e57a80").b<any>>;
|
|
3
|
+
stop: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
4
|
+
default: (...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
play: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
7
|
+
default: (...args: any[]) => any;
|
|
8
|
+
};
|
|
9
|
+
isPlay: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>>;
|
|
10
|
+
isFullscreen: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>>;
|
|
11
|
+
toggleFullscreenFn: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
12
|
+
default: (...args: any[]) => any;
|
|
13
|
+
};
|
|
14
|
+
}>, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
domRef: import("vue-types").VueTypeValidableDef<any, import("vue-types/dist/shared/vue-types.d8e57a80").b<any>>;
|
|
18
|
+
stop: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
19
|
+
default: (...args: any[]) => any;
|
|
20
|
+
};
|
|
21
|
+
play: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
22
|
+
default: (...args: any[]) => any;
|
|
23
|
+
};
|
|
24
|
+
isPlay: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>>;
|
|
25
|
+
isFullscreen: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>>;
|
|
26
|
+
toggleFullscreenFn: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
27
|
+
default: (...args: any[]) => any;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {
|
|
30
|
+
stop: (...args: any[]) => any;
|
|
31
|
+
play: (...args: any[]) => any;
|
|
32
|
+
toggleFullscreenFn: (...args: any[]) => any;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, toRefs, computed, openBlock, createElementBlock, renderSlot, createVNode, unref, mergeProps, withModifiers } from 'vue';
|
|
2
|
-
import { useFullscreen } from '../../../node_modules/.pnpm/@vueuse_core@
|
|
2
|
+
import { useFullscreen } from '../../../node_modules/.pnpm/@vueuse_core@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/core/index.js';
|
|
3
3
|
import '../../Icon/src/Icon.vue.js';
|
|
4
4
|
import '../../Icon/src/SvgIcon.vue.js';
|
|
5
5
|
import propTypes from 'vue-types';
|
|
@@ -36,16 +36,16 @@ var script = defineComponent({
|
|
|
36
36
|
function playToggle() {
|
|
37
37
|
if (isPlay.value) {
|
|
38
38
|
var _props$stop;
|
|
39
|
-
(_props$stop = props.stop) === null || _props$stop ===
|
|
39
|
+
(_props$stop = props.stop) === null || _props$stop === void 0 || _props$stop.call(props);
|
|
40
40
|
} else {
|
|
41
41
|
var _props$play;
|
|
42
|
-
(_props$play = props.play) === null || _props$play ===
|
|
42
|
+
(_props$play = props.play) === null || _props$play === void 0 || _props$play.call(props);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
function fullToggle() {
|
|
46
46
|
var _props$toggleFullscre;
|
|
47
47
|
toggleDom();
|
|
48
|
-
(_props$toggleFullscre = props.toggleFullscreenFn) === null || _props$toggleFullscre ===
|
|
48
|
+
(_props$toggleFullscre = props.toggleFullscreenFn) === null || _props$toggleFullscre === void 0 || _props$toggleFullscre.call(props);
|
|
49
49
|
}
|
|
50
50
|
return function (_ctx, _cache) {
|
|
51
51
|
return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default"), createVNode(unref(script$1), mergeProps({
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import AbstractVideoControl from "./AbstractVideoControl";
|
|
2
|
+
import Observable from "./Observable";
|
|
3
|
+
export interface VideoBaseOpt {
|
|
4
|
+
ip: string;
|
|
5
|
+
port: string | number;
|
|
6
|
+
channel: string | number;
|
|
7
|
+
username: string;
|
|
8
|
+
streamType: string | number;
|
|
9
|
+
password: string;
|
|
10
|
+
wrapEl: any;
|
|
11
|
+
canvasEl: any;
|
|
12
|
+
videoEl: any;
|
|
13
|
+
needPlugin: boolean;
|
|
14
|
+
needLogin: boolean;
|
|
15
|
+
}
|
|
16
|
+
export default class VideoControl extends Observable implements AbstractVideoControl {
|
|
17
|
+
ip: string;
|
|
18
|
+
port: string | number;
|
|
19
|
+
channel: string | number;
|
|
20
|
+
streamType: string | number;
|
|
21
|
+
username: string;
|
|
22
|
+
password: string;
|
|
23
|
+
wrapEl: any;
|
|
24
|
+
isPlayback: boolean;
|
|
25
|
+
playbackIndex: number;
|
|
26
|
+
state: object;
|
|
27
|
+
player: any;
|
|
28
|
+
needPlugin: boolean;
|
|
29
|
+
needLogin: boolean;
|
|
30
|
+
constructor(opt: Partial<VideoBaseOpt>);
|
|
31
|
+
get identify(): string;
|
|
32
|
+
}
|
|
@@ -13,19 +13,19 @@ var VideoControl = /*#__PURE__*/function (_Observable) {
|
|
|
13
13
|
var _this;
|
|
14
14
|
_classCallCheck(this, VideoControl);
|
|
15
15
|
_this = _callSuper(this, VideoControl);
|
|
16
|
-
_defineProperty(_this, "ip",
|
|
17
|
-
_defineProperty(_this, "port",
|
|
18
|
-
_defineProperty(_this, "channel",
|
|
19
|
-
_defineProperty(_this, "streamType",
|
|
20
|
-
_defineProperty(_this, "username",
|
|
21
|
-
_defineProperty(_this, "password",
|
|
22
|
-
_defineProperty(_this, "wrapEl",
|
|
23
|
-
_defineProperty(_this, "isPlayback",
|
|
24
|
-
_defineProperty(_this, "playbackIndex",
|
|
25
|
-
_defineProperty(_this, "state",
|
|
26
|
-
_defineProperty(_this, "player",
|
|
27
|
-
_defineProperty(_this, "needPlugin",
|
|
28
|
-
_defineProperty(_this, "needLogin",
|
|
16
|
+
_defineProperty(_this, "ip", void 0);
|
|
17
|
+
_defineProperty(_this, "port", void 0);
|
|
18
|
+
_defineProperty(_this, "channel", void 0);
|
|
19
|
+
_defineProperty(_this, "streamType", void 0);
|
|
20
|
+
_defineProperty(_this, "username", void 0);
|
|
21
|
+
_defineProperty(_this, "password", void 0);
|
|
22
|
+
_defineProperty(_this, "wrapEl", void 0);
|
|
23
|
+
_defineProperty(_this, "isPlayback", void 0);
|
|
24
|
+
_defineProperty(_this, "playbackIndex", void 0);
|
|
25
|
+
_defineProperty(_this, "state", void 0);
|
|
26
|
+
_defineProperty(_this, "player", void 0);
|
|
27
|
+
_defineProperty(_this, "needPlugin", void 0);
|
|
28
|
+
_defineProperty(_this, "needLogin", void 0);
|
|
29
29
|
console.log('opt', opt);
|
|
30
30
|
_this.ip = opt.ip;
|
|
31
31
|
_this.port = opt.port;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import VideoControl, { VideoBaseOpt } from "../abstract/VideoControl";
|
|
2
|
+
export default class DaHua extends VideoControl {
|
|
3
|
+
canvasEl: any;
|
|
4
|
+
videoEl: any;
|
|
5
|
+
constructor(opts: Partial<VideoBaseOpt>);
|
|
6
|
+
generateEl(): void;
|
|
7
|
+
removeEl(): void;
|
|
8
|
+
login(): void;
|
|
9
|
+
stop(): void;
|
|
10
|
+
play(isPlayback?: boolean): void;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
@@ -8,8 +8,8 @@ import VideoControl from '../abstract/VideoControl.js';
|
|
|
8
8
|
import { EventEnum } from '../enums/CommonEnum.js';
|
|
9
9
|
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
12
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e, _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
var DEF = {
|
|
15
15
|
ip: '172.168.1.247',
|
|
@@ -24,8 +24,8 @@ var DaHua = /*#__PURE__*/function (_VideoControl) {
|
|
|
24
24
|
var _this;
|
|
25
25
|
_classCallCheck(this, DaHua);
|
|
26
26
|
_this = _callSuper(this, DaHua, [_objectSpread(_objectSpread({}, DEF), opts)]);
|
|
27
|
-
_defineProperty(_this, "canvasEl",
|
|
28
|
-
_defineProperty(_this, "videoEl",
|
|
27
|
+
_defineProperty(_this, "canvasEl", void 0);
|
|
28
|
+
_defineProperty(_this, "videoEl", void 0);
|
|
29
29
|
_this.isPlayback = false;
|
|
30
30
|
_this.playbackIndex = 0;
|
|
31
31
|
_this.generateEl();
|
|
@@ -49,7 +49,7 @@ var DaHua = /*#__PURE__*/function (_VideoControl) {
|
|
|
49
49
|
key: "removeEl",
|
|
50
50
|
value: function removeEl() {
|
|
51
51
|
var remove = function remove(el) {
|
|
52
|
-
var parent = el === null || el ===
|
|
52
|
+
var parent = el === null || el === void 0 ? void 0 : el.parentNode;
|
|
53
53
|
if (parent) {
|
|
54
54
|
parent.removeChild(el);
|
|
55
55
|
}
|
|
@@ -77,7 +77,7 @@ var DaHua = /*#__PURE__*/function (_VideoControl) {
|
|
|
77
77
|
key: "stop",
|
|
78
78
|
value: function stop() {
|
|
79
79
|
var _this$player, _this$player$pause;
|
|
80
|
-
this === null || this ===
|
|
80
|
+
this === null || this === void 0 || (_this$player = this.player) === null || _this$player === void 0 || (_this$player$pause = _this$player.pause) === null || _this$player$pause === void 0 || _this$player$pause.call(_this$player);
|
|
81
81
|
this.dispatch(EventEnum.PAUSE, {
|
|
82
82
|
type: 'Pause',
|
|
83
83
|
target: this
|
|
@@ -143,8 +143,8 @@ var DaHua = /*#__PURE__*/function (_VideoControl) {
|
|
|
143
143
|
type: 'dispose',
|
|
144
144
|
target: this
|
|
145
145
|
});
|
|
146
|
-
this.player && ((_this$player2 = this.player) === null || _this$player2 ===
|
|
147
|
-
this.player && ((_this$player3 = this.player) === null || _this$player3 ===
|
|
146
|
+
this.player && ((_this$player2 = this.player) === null || _this$player2 === void 0 || (_this$player2$stop = _this$player2.stop) === null || _this$player2$stop === void 0 ? void 0 : _this$player2$stop.call(_this$player2));
|
|
147
|
+
this.player && ((_this$player3 = this.player) === null || _this$player3 === void 0 || (_this$player3$close = _this$player3.close) === null || _this$player3$close === void 0 ? void 0 : _this$player3$close.call(_this$player3));
|
|
148
148
|
this.removeEl();
|
|
149
149
|
this.player = null;
|
|
150
150
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import VideoControl, { VideoBaseOpt } from '../abstract/VideoControl';
|
|
2
|
+
interface IHikvision {
|
|
3
|
+
elId: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
szBasePath: string;
|
|
7
|
+
}
|
|
8
|
+
type HikvisionOpt = Partial<VideoBaseOpt> & IHikvision;
|
|
9
|
+
export default class Hikvision extends VideoControl {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
elId: string;
|
|
13
|
+
container: any;
|
|
14
|
+
szBasePath: string;
|
|
15
|
+
constructor(opts: Partial<HikvisionOpt>);
|
|
16
|
+
get pluginElId(): string;
|
|
17
|
+
generateEl(): void;
|
|
18
|
+
removeEl(): void;
|
|
19
|
+
checkPlugin(): boolean;
|
|
20
|
+
play(): void;
|
|
21
|
+
stop(): void;
|
|
22
|
+
dispose(): void;
|
|
23
|
+
login(): void;
|
|
24
|
+
logout(): void;
|
|
25
|
+
fullScreen(flag: boolean): void;
|
|
26
|
+
downloadPlugin(): void;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -8,8 +8,8 @@ import VideoControl from '../abstract/VideoControl.js';
|
|
|
8
8
|
import { EventEnum } from '../enums/CommonEnum.js';
|
|
9
9
|
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
12
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e, _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
var DEF = {
|
|
15
15
|
ip: '172.168.1.247',
|
|
@@ -29,11 +29,11 @@ var Hikvision = /*#__PURE__*/function (_VideoControl) {
|
|
|
29
29
|
_classCallCheck(this, Hikvision);
|
|
30
30
|
var def = _objectSpread(_objectSpread({}, DEF), opts);
|
|
31
31
|
_this = _callSuper(this, Hikvision, [def]);
|
|
32
|
-
_defineProperty(_this, "width",
|
|
33
|
-
_defineProperty(_this, "height",
|
|
34
|
-
_defineProperty(_this, "elId",
|
|
35
|
-
_defineProperty(_this, "container",
|
|
36
|
-
_defineProperty(_this, "szBasePath",
|
|
32
|
+
_defineProperty(_this, "width", void 0);
|
|
33
|
+
_defineProperty(_this, "height", void 0);
|
|
34
|
+
_defineProperty(_this, "elId", void 0);
|
|
35
|
+
_defineProperty(_this, "container", void 0);
|
|
36
|
+
_defineProperty(_this, "szBasePath", void 0);
|
|
37
37
|
_this.isPlayback = false;
|
|
38
38
|
_this.playbackIndex = 0;
|
|
39
39
|
_this.needPlugin = true;
|
|
@@ -84,7 +84,7 @@ var Hikvision = /*#__PURE__*/function (_VideoControl) {
|
|
|
84
84
|
value: function generateEl() {
|
|
85
85
|
var _this$width, _this$height;
|
|
86
86
|
this.container = document.createElement('div');
|
|
87
|
-
this.container.style.cssText = "width: ".concat((_this$width = this.width) !== null && _this$width !==
|
|
87
|
+
this.container.style.cssText = "width: ".concat((_this$width = this.width) !== null && _this$width !== void 0 ? _this$width : '100%', ";height: ").concat((_this$height = this.height) !== null && _this$height !== void 0 ? _this$height : '100%', ";");
|
|
88
88
|
this.container.setAttribute('id', this.pluginElId);
|
|
89
89
|
if (this.wrapEl) {
|
|
90
90
|
this.wrapEl.appendChild(this.container);
|
|
@@ -94,7 +94,7 @@ var Hikvision = /*#__PURE__*/function (_VideoControl) {
|
|
|
94
94
|
key: "removeEl",
|
|
95
95
|
value: function removeEl() {
|
|
96
96
|
var remove = function remove(el) {
|
|
97
|
-
var parent = el === null || el ===
|
|
97
|
+
var parent = el === null || el === void 0 ? void 0 : el.parentNode;
|
|
98
98
|
if (parent) {
|
|
99
99
|
parent.removeChild(el);
|
|
100
100
|
}
|
|
@@ -123,7 +123,7 @@ var Hikvision = /*#__PURE__*/function (_VideoControl) {
|
|
|
123
123
|
value: function play() {
|
|
124
124
|
var _WebVideoCtrl,
|
|
125
125
|
_this2 = this;
|
|
126
|
-
var oWndInfo = (_WebVideoCtrl = WebVideoCtrl) === null || _WebVideoCtrl ===
|
|
126
|
+
var oWndInfo = (_WebVideoCtrl = WebVideoCtrl) === null || _WebVideoCtrl === void 0 ? void 0 : _WebVideoCtrl.I_GetWindowStatus(0);
|
|
127
127
|
var startRealPlay = function startRealPlay() {
|
|
128
128
|
WebVideoCtrl.I_StartRealPlay(_this2.identify, {
|
|
129
129
|
iStreamType: _this2.streamType,
|
|
@@ -199,7 +199,7 @@ var Hikvision = /*#__PURE__*/function (_VideoControl) {
|
|
|
199
199
|
port = this.port,
|
|
200
200
|
username = this.username,
|
|
201
201
|
password = this.password;
|
|
202
|
-
(_WebVideoCtrl2 = WebVideoCtrl) === null || _WebVideoCtrl2 ===
|
|
202
|
+
(_WebVideoCtrl2 = WebVideoCtrl) === null || _WebVideoCtrl2 === void 0 || _WebVideoCtrl2.I_Login(ip, 1, port, username, password, {
|
|
203
203
|
timeout: 3000,
|
|
204
204
|
success: function success(xmlDoc) {
|
|
205
205
|
console.log('登录成功', xmlDoc);
|
|
@@ -219,7 +219,7 @@ var Hikvision = /*#__PURE__*/function (_VideoControl) {
|
|
|
219
219
|
value: function logout() {
|
|
220
220
|
var _WebVideoCtrl3,
|
|
221
221
|
_this5 = this;
|
|
222
|
-
(_WebVideoCtrl3 = WebVideoCtrl) === null || _WebVideoCtrl3 ===
|
|
222
|
+
(_WebVideoCtrl3 = WebVideoCtrl) === null || _WebVideoCtrl3 === void 0 || _WebVideoCtrl3.I_Logout(this.identify).then(function () {
|
|
223
223
|
console.log('退出成功');
|
|
224
224
|
}, function () {
|
|
225
225
|
console.log('退出失败');
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum EHiStateCode {
|
|
2
|
+
ERROR_CODE_UNKNOWN = 1000,
|
|
3
|
+
ERROR_CODE_NETWORKERROR = 1001,
|
|
4
|
+
ERROR_CODE_PARAMERROR = 1002,
|
|
5
|
+
ERROR_CODE_LOGIN_NOLOGIN = 2000,
|
|
6
|
+
ERROR_CODE_LOGIN_REPEATLOGIN = 2001,
|
|
7
|
+
ERROR_CODE_LOGIN_NOSUPPORT = 2002,
|
|
8
|
+
ERROR_CODE_PLAY_PLUGININITFAIL = 3000,
|
|
9
|
+
ERROR_CODE_PLAY_NOREPEATPLAY = 3001,
|
|
10
|
+
ERROR_CODE_PLAY_PLAYBACKABNORMAL = 3002,
|
|
11
|
+
ERROR_CODE_PLAY_PLAYBACKSTOP = 3003,
|
|
12
|
+
ERROR_CODE_PLAY_NOFREESPACE = 3004,
|
|
13
|
+
ERROR_CODE_TALK_FAIL = 5000
|
|
14
|
+
}
|
|
15
|
+
export declare enum VideoType {
|
|
16
|
+
DaHua = "DaHua",
|
|
17
|
+
Hikvision = "Hikvision"
|
|
18
|
+
}
|
|
19
|
+
export declare enum EventEnum {
|
|
20
|
+
READY = "READY",
|
|
21
|
+
PLAY = "PLAY",
|
|
22
|
+
PAUSE = "PAUSE",
|
|
23
|
+
DISPOSE = "DISPOSE",
|
|
24
|
+
ERROR = "ERROR",
|
|
25
|
+
PLUGIN = "PLUGIN"
|
|
26
|
+
}
|