@vtj/materials 0.9.30 → 0.10.1-alpha.0
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/assets/antdv/index.umd.js +2 -2
- package/dist/assets/charts/index.umd.js +2 -2
- package/dist/assets/element/index.umd.js +2 -2
- package/dist/assets/ui/index.umd.js +2 -2
- package/dist/assets/uni-h5/index.umd.js +7 -0
- package/dist/assets/vant/index.umd.js +5 -5
- package/dist/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/deps/@vtj/icons/style.css +1 -1
- package/dist/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/deps/@vtj/uni/index.umd.js +7 -0
- package/dist/deps/@vtj/uni/style.css +1 -0
- package/dist/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/deps/@vueuse/core/index.iife.min.js +1 -1
- package/dist/deps/uni-app/index.umd.js +1 -0
- package/dist/deps/uni-h5/index.umd.js +19 -0
- package/dist/deps/uni-h5/style.css +1 -0
- package/dist/deps/uni-h5-vue/index.umd.js +8 -0
- package/package.json +15 -8
- package/src/uni-app/index.ts +1 -0
- package/src/uni-h5/components/Switch.ts +36 -0
- package/src/uni-h5/components/audio.ts +69 -0
- package/src/uni-h5/components/button.ts +206 -0
- package/src/uni-h5/components/canvas.ts +50 -0
- package/src/uni-h5/components/checkbox.ts +81 -0
- package/src/uni-h5/components/coverImage.ts +18 -0
- package/src/uni-h5/components/coverView.ts +19 -0
- package/src/uni-h5/components/editor.ts +49 -0
- package/src/uni-h5/components/form.ts +53 -0
- package/src/uni-h5/components/icon.ts +44 -0
- package/src/uni-h5/components/image.ts +80 -0
- package/src/uni-h5/components/index.ts +119 -0
- package/src/uni-h5/components/input.ts +220 -0
- package/src/uni-h5/components/label.ts +17 -0
- package/src/uni-h5/components/map.ts +207 -0
- package/src/uni-h5/components/matchMedia.ts +59 -0
- package/src/uni-h5/components/movableArea.ts +31 -0
- package/src/uni-h5/components/movableView.ts +97 -0
- package/src/uni-h5/components/navigator.ts +90 -0
- package/src/uni-h5/components/picker.ts +81 -0
- package/src/uni-h5/components/pickerView.ts +163 -0
- package/src/uni-h5/components/progress.ts +71 -0
- package/src/uni-h5/components/radio.ts +127 -0
- package/src/uni-h5/components/richText.ts +67 -0
- package/src/uni-h5/components/scrollView.ts +157 -0
- package/src/uni-h5/components/slider.ts +75 -0
- package/src/uni-h5/components/swiper.ts +220 -0
- package/src/uni-h5/components/text.ts +38 -0
- package/src/uni-h5/components/textarea.ts +169 -0
- package/src/uni-h5/components/video.ts +276 -0
- package/src/uni-h5/components/view.ts +39 -0
- package/src/uni-h5/components/webView.ts +54 -0
- package/src/uni-h5/index.ts +11 -0
- package/src/uni-h5/style.scss +59 -0
- package/src/uni-h5-vue/index.ts +2 -0
- package/src/version.ts +2 -2
@@ -0,0 +1,276 @@
|
|
1
|
+
import type { MaterialDescription } from '@vtj/core';
|
2
|
+
|
3
|
+
const desc: MaterialDescription = {
|
4
|
+
name: 'Video',
|
5
|
+
label: '视频播放组件',
|
6
|
+
categoryId: 'media',
|
7
|
+
props: [
|
8
|
+
{
|
9
|
+
name: 'src',
|
10
|
+
title: '要播放视频的资源地址',
|
11
|
+
setters: 'StringSetter'
|
12
|
+
},
|
13
|
+
{
|
14
|
+
name: 'autoplay',
|
15
|
+
title: '是否自动播放',
|
16
|
+
defaultValue: false,
|
17
|
+
setters: 'BooleanSetter'
|
18
|
+
},
|
19
|
+
{
|
20
|
+
name: 'loop',
|
21
|
+
title: '是否循环播放',
|
22
|
+
defaultValue: false,
|
23
|
+
setters: 'BooleanSetter'
|
24
|
+
},
|
25
|
+
{
|
26
|
+
name: 'muted',
|
27
|
+
title: '是否静音播放',
|
28
|
+
defaultValue: false,
|
29
|
+
setters: 'BooleanSetter'
|
30
|
+
},
|
31
|
+
{
|
32
|
+
name: 'initial-time',
|
33
|
+
title: '指定视频初始播放位置,单位为秒(s)',
|
34
|
+
setters: 'NumberSetter'
|
35
|
+
},
|
36
|
+
{
|
37
|
+
name: 'duration',
|
38
|
+
title: '指定视频时长,单位为秒(s)',
|
39
|
+
setters: 'NumberSetter'
|
40
|
+
},
|
41
|
+
{
|
42
|
+
name: 'controls',
|
43
|
+
title: '是否显示默认播放控件(播放/暂停按钮、播放进度、时间)',
|
44
|
+
defaultValue: true,
|
45
|
+
setters: 'BooleanSetter'
|
46
|
+
},
|
47
|
+
{
|
48
|
+
name: 'danmu-list',
|
49
|
+
title: '弹幕列表',
|
50
|
+
setters: 'ExpressionSetter'
|
51
|
+
},
|
52
|
+
{
|
53
|
+
name: 'danmu-btn',
|
54
|
+
title: '是否显示弹幕按钮,只在初始化时有效,不能动态变更',
|
55
|
+
defaultValue: false,
|
56
|
+
setters: 'BooleanSetter'
|
57
|
+
},
|
58
|
+
{
|
59
|
+
name: 'enable-danmu',
|
60
|
+
title: '是否展示弹幕,只在初始化时有效,不能动态变更',
|
61
|
+
defaultValue: false,
|
62
|
+
setters: 'BooleanSetter'
|
63
|
+
},
|
64
|
+
{
|
65
|
+
name: 'page-gesture',
|
66
|
+
title: '在非全屏模式下,是否开启亮度与音量调节手势',
|
67
|
+
defaultValue: false,
|
68
|
+
setters: 'BooleanSetter'
|
69
|
+
},
|
70
|
+
{
|
71
|
+
name: 'direction',
|
72
|
+
title: '设置全屏时视频的方向,不指定则根据宽高比自动判断',
|
73
|
+
setters: 'SelectSetter',
|
74
|
+
options: [
|
75
|
+
{ label: '0', value: 0 },
|
76
|
+
{ label: '90', value: 90 },
|
77
|
+
{ label: '-90', value: -90 }
|
78
|
+
]
|
79
|
+
},
|
80
|
+
{
|
81
|
+
name: 'show-progress',
|
82
|
+
title: '若不设置,宽度大于240时才会显示',
|
83
|
+
defaultValue: true,
|
84
|
+
setters: 'BooleanSetter'
|
85
|
+
},
|
86
|
+
{
|
87
|
+
name: 'show-fullscreen-btn',
|
88
|
+
title: '是否显示全屏按钮',
|
89
|
+
defaultValue: true,
|
90
|
+
setters: 'BooleanSetter'
|
91
|
+
},
|
92
|
+
{
|
93
|
+
name: 'show-play-btn',
|
94
|
+
title: '是否显示视频底部控制栏的播放按钮',
|
95
|
+
defaultValue: true,
|
96
|
+
setters: 'BooleanSetter'
|
97
|
+
},
|
98
|
+
{
|
99
|
+
name: 'show-center-play-btn',
|
100
|
+
title: '是否显示视频中间的播放按钮',
|
101
|
+
defaultValue: true,
|
102
|
+
setters: 'BooleanSetter'
|
103
|
+
},
|
104
|
+
{
|
105
|
+
name: 'show-loading',
|
106
|
+
title: '是否显示loading控件',
|
107
|
+
defaultValue: true,
|
108
|
+
setters: 'BooleanSetter'
|
109
|
+
},
|
110
|
+
{
|
111
|
+
name: 'enable-progress-gesture',
|
112
|
+
title: '是否开启控制进度的手势',
|
113
|
+
defaultValue: true,
|
114
|
+
setters: 'BooleanSetter'
|
115
|
+
},
|
116
|
+
{
|
117
|
+
name: 'object-fit',
|
118
|
+
title: '视频的表现形式',
|
119
|
+
defaultValue: 'contain',
|
120
|
+
setters: 'SelectSetter',
|
121
|
+
options: ['contain', 'fill', 'cover']
|
122
|
+
},
|
123
|
+
{
|
124
|
+
name: 'poster',
|
125
|
+
title:
|
126
|
+
'视频封面的图片网络资源地址,如果 controls 属性值为 false 则设置 poster 无效 ',
|
127
|
+
setters: 'StringSetter'
|
128
|
+
},
|
129
|
+
{
|
130
|
+
name: 'show-mute-btn',
|
131
|
+
title: '是否显示静音按钮',
|
132
|
+
defaultValue: false,
|
133
|
+
setters: 'BooleanSetter'
|
134
|
+
},
|
135
|
+
{
|
136
|
+
name: 'title',
|
137
|
+
title: '视频的标题,全屏时在顶部展示',
|
138
|
+
setters: 'StringSetter'
|
139
|
+
},
|
140
|
+
{
|
141
|
+
name: 'play-btn-position',
|
142
|
+
title: '播放按钮的位置',
|
143
|
+
defaultValue: 'bottom',
|
144
|
+
setters: 'SelectSetter',
|
145
|
+
options: ['bottom', 'center']
|
146
|
+
},
|
147
|
+
{
|
148
|
+
name: 'mobilenet-hint-type',
|
149
|
+
title: '移动网络提醒样式:0是不提醒,1是提醒,默认值为1',
|
150
|
+
defaultValue: 1,
|
151
|
+
setters: 'SelectSetter',
|
152
|
+
options: [
|
153
|
+
{ label: '0', value: 0 },
|
154
|
+
{ label: '1', value: 1 }
|
155
|
+
]
|
156
|
+
},
|
157
|
+
{
|
158
|
+
name: 'enable-play-gesture',
|
159
|
+
title: '是否开启播放手势,即双击切换播放/暂停',
|
160
|
+
defaultValue: false,
|
161
|
+
setters: 'BooleanSetter'
|
162
|
+
},
|
163
|
+
{
|
164
|
+
name: 'auto-pause-if-navigate',
|
165
|
+
title: '当跳转到其它小程序页面时,是否自动暂停本页面的视频',
|
166
|
+
defaultValue: true,
|
167
|
+
setters: 'BooleanSetter'
|
168
|
+
},
|
169
|
+
{
|
170
|
+
name: 'auto-pause-if-open-native',
|
171
|
+
title: '当跳转到其它微信原生页面时,是否自动暂停本页面的视频',
|
172
|
+
defaultValue: true,
|
173
|
+
setters: 'BooleanSetter'
|
174
|
+
},
|
175
|
+
{
|
176
|
+
name: 'vslide-gesture',
|
177
|
+
title: '在非全屏模式下,是否开启亮度与音量调节手势(同 page-gesture)',
|
178
|
+
defaultValue: false,
|
179
|
+
setters: 'BooleanSetter'
|
180
|
+
},
|
181
|
+
{
|
182
|
+
name: 'vslide-gesture-in-fullscreen',
|
183
|
+
title: '在全屏模式下,是否开启亮度与音量调节手势',
|
184
|
+
defaultValue: true,
|
185
|
+
setters: 'BooleanSetter'
|
186
|
+
},
|
187
|
+
{
|
188
|
+
name: 'ad-unit-id',
|
189
|
+
title: '视频前贴广告单元ID',
|
190
|
+
setters: 'StringSetter'
|
191
|
+
},
|
192
|
+
{
|
193
|
+
name: 'poster-for-crawler',
|
194
|
+
title: '用于给搜索等场景作为视频封面展示',
|
195
|
+
setters: 'StringSetter'
|
196
|
+
},
|
197
|
+
{
|
198
|
+
name: 'codec',
|
199
|
+
title: '解码器选择',
|
200
|
+
defaultValue: 'hardware',
|
201
|
+
setters: 'SelectSetter',
|
202
|
+
options: ['hardware', 'software']
|
203
|
+
},
|
204
|
+
{
|
205
|
+
name: 'http-cache',
|
206
|
+
title: '是否对 http、https 视频源开启本地缓存',
|
207
|
+
defaultValue: true,
|
208
|
+
setters: 'BooleanSetter'
|
209
|
+
},
|
210
|
+
{
|
211
|
+
name: 'play-strategy',
|
212
|
+
title: '播放策略',
|
213
|
+
defaultValue: 0,
|
214
|
+
setters: 'SelectSetter',
|
215
|
+
options: [
|
216
|
+
{ label: '0', value: 0 },
|
217
|
+
{ label: '1', value: 1 },
|
218
|
+
{ label: '2', value: 2 }
|
219
|
+
]
|
220
|
+
},
|
221
|
+
{
|
222
|
+
name: 'header',
|
223
|
+
title: 'HTTP 请求 Header',
|
224
|
+
setters: 'ObjectSetter'
|
225
|
+
},
|
226
|
+
{
|
227
|
+
name: 'is-live',
|
228
|
+
title: '是否为直播源',
|
229
|
+
defaultValue: false,
|
230
|
+
setters: 'BooleanSetter'
|
231
|
+
}
|
232
|
+
],
|
233
|
+
events: [
|
234
|
+
'play',
|
235
|
+
'pause',
|
236
|
+
'ended',
|
237
|
+
'timeupdate',
|
238
|
+
'fullscreenchange',
|
239
|
+
'waiting',
|
240
|
+
'error',
|
241
|
+
'progress',
|
242
|
+
'loadeddata',
|
243
|
+
'loadstart',
|
244
|
+
'seeked',
|
245
|
+
'seeking',
|
246
|
+
'loadedmetadata',
|
247
|
+
'fullscreenclick',
|
248
|
+
'controlstoggle'
|
249
|
+
],
|
250
|
+
snippet: {
|
251
|
+
props: {
|
252
|
+
style: {
|
253
|
+
width: '300px',
|
254
|
+
height: '225px'
|
255
|
+
},
|
256
|
+
src: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4',
|
257
|
+
'enable-danmu': true,
|
258
|
+
'danmu-btn': true,
|
259
|
+
controls: true,
|
260
|
+
danmuList: [
|
261
|
+
{
|
262
|
+
text: '第 1s 出现的弹幕',
|
263
|
+
color: '#ff0000',
|
264
|
+
time: 1
|
265
|
+
},
|
266
|
+
{
|
267
|
+
text: '第 3s 出现的弹幕',
|
268
|
+
color: '#ff00ff',
|
269
|
+
time: 3
|
270
|
+
}
|
271
|
+
]
|
272
|
+
}
|
273
|
+
}
|
274
|
+
};
|
275
|
+
|
276
|
+
export default desc;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import type { MaterialDescription } from '@vtj/core';
|
2
|
+
|
3
|
+
const desc: MaterialDescription = {
|
4
|
+
name: 'View',
|
5
|
+
label: '视图',
|
6
|
+
categoryId: 'container',
|
7
|
+
props: [
|
8
|
+
{
|
9
|
+
name: 'hover-class',
|
10
|
+
defaultValue: 'none',
|
11
|
+
title: '指定按下去的样式类。当 hover-class="none" 时,没有点击态效果',
|
12
|
+
setters: 'InputSetter'
|
13
|
+
},
|
14
|
+
{
|
15
|
+
name: 'hover-stop-propagation',
|
16
|
+
defaultValue: false,
|
17
|
+
title:
|
18
|
+
'指定是否阻止本节点的祖先节点出现点击态,App、H5、支付宝小程序、百度小程序不支持(支付宝小程序、百度小程序文档中都有此属性,实测未支持)',
|
19
|
+
setters: 'BooleanSetter'
|
20
|
+
},
|
21
|
+
{
|
22
|
+
name: 'hover-start-time',
|
23
|
+
defaultValue: 50,
|
24
|
+
title: '按住后多久出现点击态,单位毫秒',
|
25
|
+
setters: 'NumberSetter'
|
26
|
+
},
|
27
|
+
{
|
28
|
+
name: 'hover-stay-time',
|
29
|
+
defaultValue: 400,
|
30
|
+
title: '手指松开后点击态保留时间,单位毫秒',
|
31
|
+
setters: 'NumberSetter'
|
32
|
+
}
|
33
|
+
],
|
34
|
+
snippet: {
|
35
|
+
children: '视图内容'
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
export default desc;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import type { MaterialDescription } from '@vtj/core';
|
2
|
+
|
3
|
+
const desc: MaterialDescription = {
|
4
|
+
name: 'WebView',
|
5
|
+
label: '浏览器组件',
|
6
|
+
categoryId: 'media',
|
7
|
+
props: [
|
8
|
+
{
|
9
|
+
name: 'src',
|
10
|
+
title: 'webview 指向网页的链接',
|
11
|
+
setters: 'StringSetter'
|
12
|
+
},
|
13
|
+
{
|
14
|
+
name: 'allow',
|
15
|
+
title: '用于为 iframe 指定其特征策略',
|
16
|
+
setters: 'StringSetter'
|
17
|
+
},
|
18
|
+
{
|
19
|
+
name: 'sandbox',
|
20
|
+
title: '该属性对呈现在 iframe 框架中的内容启用一些额外的限制条件',
|
21
|
+
setters: 'StringSetter'
|
22
|
+
},
|
23
|
+
{
|
24
|
+
name: 'fullscreen',
|
25
|
+
title: '是否铺满整个页面',
|
26
|
+
defaultValue: true,
|
27
|
+
setters: 'BooleanSetter'
|
28
|
+
},
|
29
|
+
{
|
30
|
+
name: 'webview-styles',
|
31
|
+
title: 'webview 的样式',
|
32
|
+
setters: 'ObjectSetter'
|
33
|
+
},
|
34
|
+
{
|
35
|
+
name: 'update-title',
|
36
|
+
title: '是否自动更新当前页面标题',
|
37
|
+
defaultValue: true,
|
38
|
+
setters: 'BooleanSetter'
|
39
|
+
}
|
40
|
+
],
|
41
|
+
events: ['message', 'onPostMessage', 'load', 'error'],
|
42
|
+
snippet: {
|
43
|
+
props: {
|
44
|
+
'webview-styles': {
|
45
|
+
progress: {
|
46
|
+
color: '#FF3333'
|
47
|
+
}
|
48
|
+
},
|
49
|
+
src: 'https://uniapp.dcloud.io/static/web-view.html'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
};
|
53
|
+
|
54
|
+
export default desc;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
@use '@dcloudio/uni-h5/style/ad-content-page.css';
|
2
|
+
@use '@dcloudio/uni-h5/style/ad-draw.css';
|
3
|
+
@use '@dcloudio/uni-h5/style/ad.css';
|
4
|
+
@use '@dcloudio/uni-h5/style/api/action-sheet.css';
|
5
|
+
@use '@dcloudio/uni-h5/style/api/location-picker.css';
|
6
|
+
@use '@dcloudio/uni-h5/style/api/location-view.css';
|
7
|
+
@use '@dcloudio/uni-h5/style/api/modal.css';
|
8
|
+
@use '@dcloudio/uni-h5/style/api/toast.css';
|
9
|
+
@use '@dcloudio/uni-h5/style/camera.css';
|
10
|
+
@use '@dcloudio/uni-h5/style/cover-image.css';
|
11
|
+
@use '@dcloudio/uni-h5/style/cover-view.css';
|
12
|
+
@use '@dcloudio/uni-h5/style/framework/async.css';
|
13
|
+
@use '@dcloudio/uni-h5/style/framework/base.css';
|
14
|
+
@use '@dcloudio/uni-h5/style/framework/layout.css';
|
15
|
+
@use '@dcloudio/uni-h5/style/framework/nvue.css';
|
16
|
+
@use '@dcloudio/uni-h5/style/framework/pageHead.css';
|
17
|
+
@use '@dcloudio/uni-h5/style/framework/pageRefresh.css';
|
18
|
+
@use '@dcloudio/uni-h5/style/framework/shadow.css';
|
19
|
+
@use '@dcloudio/uni-h5/style/framework/tabBar.css';
|
20
|
+
@use '@dcloudio/uni-h5/style/framework/uvue.css';
|
21
|
+
@use '@dcloudio/uni-h5/style/live-player.css';
|
22
|
+
@use '@dcloudio/uni-h5/style/live-pusher.css';
|
23
|
+
@use '@dcloudio/uni-h5/style/map.css';
|
24
|
+
@use '@dcloudio/uni-h5/style/picker.css';
|
25
|
+
@use '@dcloudio/uni-h5/style/video.css';
|
26
|
+
@use '@dcloudio/uni-h5/style/web-view.css';
|
27
|
+
@use '@dcloudio/uni-components/style/button.css';
|
28
|
+
@use '@dcloudio/uni-components/style/canvas.css';
|
29
|
+
@use '@dcloudio/uni-components/style/checkbox-group.css';
|
30
|
+
@use '@dcloudio/uni-components/style/checkbox.css';
|
31
|
+
@use '@dcloudio/uni-components/style/editor.css';
|
32
|
+
@use '@dcloudio/uni-components/style/form.css';
|
33
|
+
@use '@dcloudio/uni-components/style/icon.css';
|
34
|
+
@use '@dcloudio/uni-components/style/image.css';
|
35
|
+
@use '@dcloudio/uni-components/style/input.css';
|
36
|
+
@use '@dcloudio/uni-components/style/label.css';
|
37
|
+
@use '@dcloudio/uni-components/style/list-item.css';
|
38
|
+
@use '@dcloudio/uni-components/style/list-view.css';
|
39
|
+
@use '@dcloudio/uni-components/style/movable-area.css';
|
40
|
+
@use '@dcloudio/uni-components/style/movable-view.css';
|
41
|
+
@use '@dcloudio/uni-components/style/navigator.css';
|
42
|
+
@use '@dcloudio/uni-components/style/picker-view-column.css';
|
43
|
+
@use '@dcloudio/uni-components/style/picker-view.css';
|
44
|
+
@use '@dcloudio/uni-components/style/progress.css';
|
45
|
+
@use '@dcloudio/uni-components/style/radio-group.css';
|
46
|
+
@use '@dcloudio/uni-components/style/radio.css';
|
47
|
+
@use '@dcloudio/uni-components/style/refresher.css';
|
48
|
+
@use '@dcloudio/uni-components/style/resize-sensor.css';
|
49
|
+
@use '@dcloudio/uni-components/style/rich-text.css';
|
50
|
+
@use '@dcloudio/uni-components/style/scroll-view.css';
|
51
|
+
@use '@dcloudio/uni-components/style/slider.css';
|
52
|
+
@use '@dcloudio/uni-components/style/sticky-header.css';
|
53
|
+
@use '@dcloudio/uni-components/style/sticky-section.css';
|
54
|
+
@use '@dcloudio/uni-components/style/swiper-item.css';
|
55
|
+
@use '@dcloudio/uni-components/style/swiper.css';
|
56
|
+
@use '@dcloudio/uni-components/style/switch.css';
|
57
|
+
@use '@dcloudio/uni-components/style/text.css';
|
58
|
+
@use '@dcloudio/uni-components/style/textarea.css';
|
59
|
+
@use '@dcloudio/uni-components/style/view.css';
|
package/src/version.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/materials
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.
|
5
|
+
* @version 0.10.1-alpha.0
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export const version = '0.
|
8
|
+
export const version = '0.10.1-alpha.0';
|