zhytech-ui 1.1.39 → 1.1.40
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/README.md +5 -0
- package/dist/src/components/filePreview/components/videoPreview.vue.d.ts +11 -48
- package/dist/src/components/filePreview/index.vue.d.ts +9 -2
- package/dist/src/components/filePreview/types/filePreviewType.d.ts +99 -86
- package/dist/style.css +1 -1
- package/dist/zhytech-ui.es.js +17890 -15608
- package/dist/zhytech-ui.umd.js +235 -31
- package/package.json +107 -106
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { videoConfigType } from '../types/filePreviewType';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
3
3
|
src: {
|
|
4
4
|
type: StringConstructor;
|
|
5
5
|
required: true;
|
|
@@ -8,28 +8,7 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
8
8
|
type: globalThis.PropType<videoConfigType>;
|
|
9
9
|
default: () => {};
|
|
10
10
|
};
|
|
11
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
-
canplay: (...args: any[]) => void;
|
|
13
|
-
canplaythrough: (...args: any[]) => void;
|
|
14
|
-
durationchange: (...args: any[]) => void;
|
|
15
|
-
ended: (...args: any[]) => void;
|
|
16
|
-
error: (...args: any[]) => void;
|
|
17
|
-
loadeddata: (...args: any[]) => void;
|
|
18
|
-
loadedmetadata: (...args: any[]) => void;
|
|
19
|
-
loadstart: (...args: any[]) => void;
|
|
20
|
-
pause: (...args: any[]) => void;
|
|
21
|
-
play: (...args: any[]) => void;
|
|
22
|
-
playing: (...args: any[]) => void;
|
|
23
|
-
progress: (...args: any[]) => void;
|
|
24
|
-
ratechange: (...args: any[]) => void;
|
|
25
|
-
stalled: (...args: any[]) => void;
|
|
26
|
-
timeupdate: (...args: any[]) => void;
|
|
27
|
-
volumechange: (...args: any[]) => void;
|
|
28
|
-
waiting: (...args: any[]) => void;
|
|
29
|
-
mirrorChange: (...args: any[]) => void;
|
|
30
|
-
loopChange: (...args: any[]) => void;
|
|
31
|
-
lightOffChange: (...args: any[]) => void;
|
|
32
|
-
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
11
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
33
12
|
src: {
|
|
34
13
|
type: StringConstructor;
|
|
35
14
|
required: true;
|
|
@@ -38,30 +17,14 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
38
17
|
type: globalThis.PropType<videoConfigType>;
|
|
39
18
|
default: () => {};
|
|
40
19
|
};
|
|
41
|
-
}>> & Readonly<{
|
|
42
|
-
onCanplay?: ((...args: any[]) => any) | undefined;
|
|
43
|
-
onCanplaythrough?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
onDurationchange?: ((...args: any[]) => any) | undefined;
|
|
45
|
-
onEnded?: ((...args: any[]) => any) | undefined;
|
|
46
|
-
onError?: ((...args: any[]) => any) | undefined;
|
|
47
|
-
onLoadeddata?: ((...args: any[]) => any) | undefined;
|
|
48
|
-
onLoadedmetadata?: ((...args: any[]) => any) | undefined;
|
|
49
|
-
onLoadstart?: ((...args: any[]) => any) | undefined;
|
|
50
|
-
onPause?: ((...args: any[]) => any) | undefined;
|
|
51
|
-
onPlay?: ((...args: any[]) => any) | undefined;
|
|
52
|
-
onPlaying?: ((...args: any[]) => any) | undefined;
|
|
53
|
-
onProgress?: ((...args: any[]) => any) | undefined;
|
|
54
|
-
onRatechange?: ((...args: any[]) => any) | undefined;
|
|
55
|
-
onStalled?: ((...args: any[]) => any) | undefined;
|
|
56
|
-
onTimeupdate?: ((...args: any[]) => any) | undefined;
|
|
57
|
-
onVolumechange?: ((...args: any[]) => any) | undefined;
|
|
58
|
-
onWaiting?: ((...args: any[]) => any) | undefined;
|
|
59
|
-
onMirrorChange?: ((...args: any[]) => any) | undefined;
|
|
60
|
-
onLoopChange?: ((...args: any[]) => any) | undefined;
|
|
61
|
-
onLightOffChange?: ((...args: any[]) => any) | undefined;
|
|
62
|
-
}>, {
|
|
20
|
+
}>> & Readonly<{}>, {
|
|
63
21
|
options: videoConfigType;
|
|
64
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
65
|
-
|
|
66
|
-
}
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>, {
|
|
23
|
+
default?(_: {}): any;
|
|
24
|
+
}>;
|
|
67
25
|
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileView, previewOption } from './types/filePreviewType';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
3
3
|
fileList: {
|
|
4
4
|
type: globalThis.PropType<fileView[]>;
|
|
5
5
|
required: true;
|
|
@@ -19,5 +19,12 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
19
19
|
};
|
|
20
20
|
}>> & Readonly<{}>, {
|
|
21
21
|
option: previewOption;
|
|
22
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>, {
|
|
23
|
+
videoSlot?(_: {}): any;
|
|
24
|
+
}>;
|
|
23
25
|
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -15,160 +15,172 @@ export interface fileView {
|
|
|
15
15
|
*/
|
|
16
16
|
extensionName: string;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
type videoSlotConfig = {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* 是否显示视频插槽,默认false
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
show?: boolean;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* 视频插槽宽度,默认auto
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
width?: string;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* 视频插槽高度,默认auto
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
height?: string;
|
|
31
|
+
};
|
|
32
|
+
export type videoConfigType = {
|
|
31
33
|
/**
|
|
32
34
|
* 视频名称,默认空
|
|
33
35
|
*/
|
|
34
36
|
title?: string;
|
|
35
37
|
/**
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
type?: string;
|
|
39
|
-
/**
|
|
40
|
-
* 视频封面,默认空
|
|
41
|
-
*/
|
|
42
|
-
poster?: string;
|
|
43
|
-
/**
|
|
44
|
-
* 静音,默认false
|
|
38
|
+
* 是否禁止快进,默认false
|
|
45
39
|
*/
|
|
46
|
-
|
|
40
|
+
notAllowedSeek?: boolean;
|
|
47
41
|
/**
|
|
48
|
-
*
|
|
42
|
+
* 视频插槽配置
|
|
49
43
|
*/
|
|
50
|
-
|
|
44
|
+
videoSlot?: videoSlotConfig;
|
|
51
45
|
/**
|
|
52
|
-
*
|
|
46
|
+
* 视频组件实例化完成事件
|
|
53
47
|
*/
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 播放倍速,默认['0.5','0.75','1','1.25','1.5','2']
|
|
57
|
-
*/
|
|
58
|
-
speedRate?: string[];
|
|
59
|
-
/**
|
|
60
|
-
* 自动播放,默认false
|
|
61
|
-
*/
|
|
62
|
-
autoPlay?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* 循环播放,默认false
|
|
65
|
-
*/
|
|
66
|
-
loop?: boolean;
|
|
48
|
+
onReady?: Function;
|
|
67
49
|
/**
|
|
68
|
-
*
|
|
50
|
+
* 播放器创建video完成,可以开始播放
|
|
69
51
|
*/
|
|
70
|
-
|
|
52
|
+
onComplete?: Function;
|
|
71
53
|
/**
|
|
72
|
-
*
|
|
54
|
+
* 播放事件,默认空
|
|
73
55
|
*/
|
|
74
|
-
|
|
56
|
+
onPlay?: Function;
|
|
75
57
|
/**
|
|
76
|
-
*
|
|
58
|
+
* 暂停事件,默认空
|
|
77
59
|
*/
|
|
78
|
-
|
|
60
|
+
onPause?: Function;
|
|
79
61
|
/**
|
|
80
|
-
*
|
|
62
|
+
* 播放结束事件,默认空
|
|
81
63
|
*/
|
|
82
|
-
|
|
64
|
+
onEnd?: Function;
|
|
83
65
|
/**
|
|
84
|
-
*
|
|
66
|
+
* 错误事件,默认空
|
|
85
67
|
*/
|
|
86
|
-
|
|
68
|
+
onError?: Function;
|
|
87
69
|
/**
|
|
88
|
-
*
|
|
70
|
+
* 时间更新事件,默认空
|
|
89
71
|
*/
|
|
90
|
-
|
|
72
|
+
onTimeupdate?: Function;
|
|
91
73
|
/**
|
|
92
|
-
*
|
|
74
|
+
* 视频封面,默认空
|
|
93
75
|
*/
|
|
94
|
-
|
|
76
|
+
poster?: string;
|
|
95
77
|
/**
|
|
96
|
-
*
|
|
78
|
+
* 自动播放,默认false
|
|
97
79
|
*/
|
|
98
|
-
|
|
80
|
+
autoPlay?: boolean;
|
|
99
81
|
/**
|
|
100
|
-
*
|
|
82
|
+
* 是否自动静音自动播放,如果autoplay为false,则该属性的作用为默认静音播放
|
|
101
83
|
*/
|
|
102
|
-
|
|
84
|
+
autoplayMuted?: boolean;
|
|
103
85
|
/**
|
|
104
|
-
*
|
|
86
|
+
* 是否默认初始化video,当autoplay为true时,该配置为false无效
|
|
105
87
|
*/
|
|
106
|
-
|
|
88
|
+
videoInit?: boolean;
|
|
107
89
|
/**
|
|
108
|
-
*
|
|
90
|
+
* 初始起播时间,仅点播,默认值: 0
|
|
109
91
|
*/
|
|
110
|
-
|
|
92
|
+
startTime?: number;
|
|
111
93
|
/**
|
|
112
|
-
*
|
|
94
|
+
* seek操作结束之后播放器的状态,如果取值为auto,则维持原播放状态, 默认是seek之后直接播放
|
|
95
|
+
* 默认值: play; play 播放;pause 暂停; auto 保持操作前的状态
|
|
113
96
|
*/
|
|
114
|
-
|
|
97
|
+
seekedStatus?: "pause" | "play" | "auto" | undefined;
|
|
115
98
|
/**
|
|
116
|
-
*
|
|
99
|
+
* 默认起播倍速,参考值0.5/0.75/1/1.5/2
|
|
117
100
|
*/
|
|
118
|
-
|
|
101
|
+
defaultPlaybackRate?: number;
|
|
119
102
|
/**
|
|
120
|
-
*
|
|
103
|
+
* 倍速插件显示列表,当该配置为false的时候,相当于禁用倍速切换插件,也可以传入一组配置项
|
|
104
|
+
* 播放倍速,默认值: [0.5, 0.75, 1, 1.5, 2]
|
|
121
105
|
*/
|
|
122
|
-
|
|
106
|
+
playbackRate?: boolean | Array<number> | {};
|
|
123
107
|
/**
|
|
124
|
-
*
|
|
108
|
+
* 是否开启快捷键,该配置项用于快捷键功能的开关
|
|
125
109
|
*/
|
|
126
|
-
|
|
110
|
+
keyShortcut?: boolean;
|
|
127
111
|
/**
|
|
128
|
-
*
|
|
112
|
+
* 是否启用流式布局,启用流式布局时根据width、height计算播放器宽高比,若width和height不是Number类型,默认使用16:9比例
|
|
129
113
|
*/
|
|
130
|
-
|
|
114
|
+
fluid?: boolean;
|
|
131
115
|
/**
|
|
132
|
-
*
|
|
116
|
+
* 播放器容器尺寸适配方式,在视频资源初始化之后,根据获取到的videoWidth和videoHeight的比例对播放器容器宽高进行调整
|
|
117
|
+
* 默认值: fixed
|
|
118
|
+
* fixed 保持容器宽/高,不做适配
|
|
119
|
+
* fixWidth 保持容器宽度,适配高度
|
|
120
|
+
* fixHeight 保持容器高度,适配宽度
|
|
121
|
+
* auto 根据视频溢出宽/高,适配容器宽/高
|
|
133
122
|
*/
|
|
134
|
-
|
|
123
|
+
fitVideoSize?: "fixWidth" | "fixHeight" | "fixed" | undefined;
|
|
135
124
|
/**
|
|
136
|
-
*
|
|
125
|
+
* video画面填充模式
|
|
126
|
+
* 默认值: auto
|
|
127
|
+
* fillWidth 填充宽度,高度溢出则裁剪高度
|
|
128
|
+
* fillHeight 填充高度,宽度溢出则裁剪宽度
|
|
129
|
+
* fill 拉伸填充
|
|
130
|
+
* contain 保持宽高比,缩放至一边填满容器,另一边将添加“黑边”
|
|
131
|
+
* auto 默认值,同浏览器默认
|
|
137
132
|
*/
|
|
138
|
-
|
|
133
|
+
videoFillMode?: "auto" | "fill" | "fillHeight" | "fillWidth" | "cover" | "contain" | undefined;
|
|
139
134
|
/**
|
|
140
|
-
*
|
|
135
|
+
* 是否启用内联播放模式,该配置项只在移动端生效,当设置了该属性为true的时候,将会在初始化video/audio的时候,设置playsinline、webkit-playsinline、x5-playsinline三个属性为true,
|
|
136
|
+
* iOS10以下系统safari不支持playsinline,默认播放即进入系统全屏
|
|
141
137
|
*/
|
|
142
|
-
|
|
138
|
+
playsInline?: boolean;
|
|
143
139
|
/**
|
|
144
|
-
*
|
|
140
|
+
* 是否循环播放,默认false
|
|
145
141
|
*/
|
|
146
|
-
|
|
142
|
+
loop?: boolean;
|
|
147
143
|
/**
|
|
148
|
-
*
|
|
144
|
+
* 播放器进度条故事点信息,具体数据结构如下
|
|
145
|
+
* const progressDot = [
|
|
146
|
+
* {
|
|
147
|
+
* id: 0, // 唯一标识,用于删除的时候索引
|
|
148
|
+
* time: 10, // 展示的时间点,例子为在播放到10s钟的时候展示
|
|
149
|
+
* text: 'Demo', // hover的时候展示文案,可以为空
|
|
150
|
+
* duration: 5, // 展示时间跨度,单位为s
|
|
151
|
+
* style: { // 指定样式
|
|
152
|
+
* backgroundColor: 'red'
|
|
153
|
+
* }
|
|
154
|
+
* },
|
|
155
|
+
* ...
|
|
156
|
+
* ]
|
|
149
157
|
*/
|
|
150
|
-
|
|
158
|
+
progressDot?: Array<Record<string, any>>;
|
|
151
159
|
/**
|
|
152
|
-
*
|
|
160
|
+
* 是否开启画面和控制栏分离模式,设置为false,控制栏将会常驻,与视频画面不重叠
|
|
153
161
|
*/
|
|
154
|
-
|
|
162
|
+
marginControls?: boolean;
|
|
155
163
|
/**
|
|
156
|
-
*
|
|
164
|
+
* pc端: 是否单击播放器区域切换播放/暂停
|
|
165
|
+
* mobile端: closeVideoDblclick 为是否通关闭video的click/touchend行为切换播放暂停
|
|
166
|
+
* 默认值: false
|
|
157
167
|
*/
|
|
158
|
-
|
|
168
|
+
closeVideoClick?: boolean;
|
|
159
169
|
/**
|
|
160
|
-
*
|
|
170
|
+
* 视频音量大小,默认1
|
|
161
171
|
*/
|
|
162
|
-
|
|
172
|
+
volume?: number;
|
|
163
173
|
/**
|
|
164
|
-
*
|
|
174
|
+
* pc端: 是否关闭双击播放器进入全屏的能力
|
|
175
|
+
* mobile端: 是否关闭双击切换暂停/播放的能力
|
|
165
176
|
*/
|
|
166
|
-
|
|
177
|
+
closeVideoDblclick?: boolean;
|
|
167
178
|
/**
|
|
168
|
-
*
|
|
179
|
+
* 用户鼠标离开播放器区域之后,控制栏隐藏延时时间,如果想要鼠标移出播放器区域就隐藏,则配置为0(只在pc端生效)
|
|
180
|
+
* 单位ms,默认值: 3000
|
|
169
181
|
*/
|
|
170
|
-
|
|
171
|
-
}
|
|
182
|
+
leavePlayerTime?: number;
|
|
183
|
+
};
|
|
172
184
|
/**
|
|
173
185
|
* @description: 文档管理中文件上传参数类型
|
|
174
186
|
*/
|
|
@@ -190,3 +202,4 @@ export interface previewOption {
|
|
|
190
202
|
*/
|
|
191
203
|
autoplayAudio?: boolean;
|
|
192
204
|
}
|
|
205
|
+
export {};
|