@nutui/nutui 3.1.12-beta.0 → 3.1.12-beta.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/nutui.d.ts +4 -1
- package/dist/nutui.es.js +3943 -4130
- package/dist/nutui.umd.js +3947 -4201
- package/dist/packages/_es/ActionSheet.js +13 -12
- package/dist/packages/_es/Address.js +63 -49
- package/dist/packages/_es/Avatar.js +4 -5
- package/dist/packages/_es/BackTop.js +72 -109
- package/dist/packages/_es/Badge.js +4 -5
- package/dist/packages/_es/Barrage.js +63 -57
- package/dist/packages/_es/Button.js +5 -6
- package/dist/packages/_es/Calendar.js +27 -18
- package/dist/packages/_es/Card.js +104 -0
- package/dist/packages/_es/Cell.js +5 -13
- package/dist/packages/_es/CellGroup.js +4 -5
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +9 -4
- package/dist/packages/_es/CircleProgress.js +142 -46
- package/dist/packages/_es/Col.js +4 -5
- package/dist/packages/_es/Collapse.js +35 -10
- package/dist/packages/_es/CollapseItem.js +80 -35
- package/dist/packages/_es/CountDown.js +7 -5
- package/dist/packages/_es/CountUp.js +34 -31
- package/dist/packages/_es/DatePicker.js +451 -219
- package/dist/packages/_es/Dialog.js +24 -89
- package/dist/packages/_es/Divider.js +5 -6
- package/dist/packages/_es/Drag.js +76 -50
- package/dist/packages/_es/Elevator.js +81 -52
- package/dist/packages/_es/FixedNav.js +8 -9
- package/dist/packages/_es/Form.js +137 -0
- package/dist/packages/_es/FormItem.js +109 -0
- package/dist/packages/_es/Icon.js +6 -40
- package/dist/packages/_es/ImagePreview.js +23 -21
- package/dist/packages/_es/InfiniteLoading.js +95 -109
- package/dist/packages/_es/Input.js +22 -21
- package/dist/packages/_es/InputNumber.js +24 -18
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +16 -14
- package/dist/packages/_es/MenuItem.js +9 -11
- package/dist/packages/_es/Navbar.js +7 -7
- package/dist/packages/_es/NoticeBar.js +39 -26
- package/dist/packages/_es/Notify.js +30 -166
- package/dist/packages/_es/NumberKeyboard.js +10 -6
- package/dist/packages/_es/OverLay.js +22 -29
- package/dist/packages/_es/Pagination.js +8 -9
- package/dist/packages/_es/Picker.js +61 -447
- package/dist/packages/_es/Popover.js +146 -25
- package/dist/packages/_es/Popup.js +17 -77
- package/dist/packages/_es/Price.js +18 -7
- package/dist/packages/_es/Progress.js +23 -12
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +37 -30
- package/dist/packages/_es/Rate.js +16 -20
- package/dist/packages/_es/Row.js +4 -5
- package/dist/packages/_es/SearchBar.js +7 -5
- package/dist/packages/_es/ShortPassword.js +89 -59
- package/dist/packages/_es/Signature.js +70 -71
- package/dist/packages/_es/Sku.js +54 -79
- package/dist/packages/_es/Step.js +10 -8
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +42 -27
- package/dist/packages/_es/Swiper.js +17 -418
- package/dist/packages/_es/SwiperItem.js +14 -39
- package/dist/packages/_es/Switch.js +4 -5
- package/dist/packages/_es/TabPane.js +4 -5
- package/dist/packages/_es/Tabbar.js +4 -5
- package/dist/packages/_es/TabbarItem.js +8 -9
- package/dist/packages/_es/Tabs.js +22 -16
- package/dist/packages/_es/Tag.js +5 -6
- package/dist/packages/_es/TextArea.js +16 -12
- package/dist/packages/_es/TimeDetail.js +7 -5
- package/dist/packages/_es/TimePannel.js +7 -5
- package/dist/packages/_es/TimeSelect.js +12 -7
- package/dist/packages/_es/Toast.js +41 -163
- package/dist/packages/_es/Uploader.js +109 -149
- package/dist/packages/_es/commonProps.js +30 -0
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +44 -0
- package/dist/packages/_es/index2.js +40 -27
- package/dist/packages/_es/index3.js +413 -7
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/_es/util.js +47 -0
- package/dist/packages/button/index.scss +6 -0
- package/dist/packages/card/index.scss +97 -0
- package/dist/packages/checkbox/index.scss +1 -1
- package/dist/packages/form/index.scss +2 -0
- package/dist/packages/formitem/index.scss +60 -0
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/switch/index.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -2
- package/dist/styles/themes/default.scss +35 -32
- package/dist/styles/variables.scss +11 -1
- package/package.json +2 -2
- package/dist/packages/_es/Video.js +0 -405
- package/dist/packages/_es/plugin-vue_export-helper.js +0 -13
|
@@ -44,6 +44,7 @@ $button-default-bg-color: $white !default;
|
|
|
44
44
|
$button-default-border-color: rgba(204, 204, 204, 1) !default;
|
|
45
45
|
$button-default-color: rgba(102, 102, 102, 1) !default;
|
|
46
46
|
$button-small-height: 28px !default;
|
|
47
|
+
$button-mini-height: 24px !default;
|
|
47
48
|
$button-default-height: 38px !default;
|
|
48
49
|
$button-large-height: 48px !default;
|
|
49
50
|
$button-large-line-height: 46px !default;
|
|
@@ -378,6 +379,11 @@ $searchbar-background: $white !default;
|
|
|
378
379
|
$searchbar-input-background: #f7f7f7 !default;
|
|
379
380
|
$searchbar-right-out-color: $black !default;
|
|
380
381
|
|
|
382
|
+
// form
|
|
383
|
+
$form-item-error-line-color: $primary-color !default;
|
|
384
|
+
$form-item-required-color: $primary-color !default;
|
|
385
|
+
$form-item-error-message-color: $primary-color !default;
|
|
386
|
+
|
|
381
387
|
// sku
|
|
382
388
|
$sku-item-border: 1px solid $primary-color;
|
|
383
389
|
$sku-item-disable-line: line-through;
|
|
@@ -393,6 +399,10 @@ $sku-opetate-bg-buy: linear-gradient(
|
|
|
393
399
|
rgba(255, 195, 13, 1) 69%,
|
|
394
400
|
rgba(255, 207, 13, 1) 100%
|
|
395
401
|
);
|
|
396
|
-
|
|
402
|
+
// card
|
|
403
|
+
$card-font-size-0: $font-size-0;
|
|
404
|
+
$card-font-size-1: $font-size-1;
|
|
405
|
+
$card-font-size-2: $font-size-2;
|
|
406
|
+
$card-font-size-3: $font-size-3;
|
|
397
407
|
@import './mixins/index';
|
|
398
408
|
@import './animation/index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui",
|
|
3
|
-
"version": "3.1.12-beta.
|
|
3
|
+
"version": "3.1.12-beta.1",
|
|
4
4
|
"description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)",
|
|
5
5
|
"main": "dist/nutui.umd.js",
|
|
6
6
|
"module": "dist/nutui.es.js",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"sass": "
|
|
67
|
+
"sass": "~1.32.0",
|
|
68
68
|
"vue-router": "^4.0.11"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
/*!
|
|
21
|
-
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
22
|
-
* (c) 2021 @jdf2e.
|
|
23
|
-
* Released under the MIT License.
|
|
24
|
-
*/
|
|
25
|
-
import { reactive, ref, computed, watch, nextTick, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, createCommentVNode, withDirectives, vShow, normalizeClass, toDisplayString, normalizeStyle, withModifiers } from "vue";
|
|
26
|
-
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
|
-
const throttle = (func, wait, type) => {
|
|
29
|
-
if (type === 1) {
|
|
30
|
-
var previous = 0;
|
|
31
|
-
} else if (type === 2) {
|
|
32
|
-
var timeout;
|
|
33
|
-
}
|
|
34
|
-
return function() {
|
|
35
|
-
let context = this;
|
|
36
|
-
let args = arguments;
|
|
37
|
-
if (type === 1) {
|
|
38
|
-
let now = Date.now();
|
|
39
|
-
if (now - previous > wait) {
|
|
40
|
-
func.apply(context, args);
|
|
41
|
-
previous = now;
|
|
42
|
-
}
|
|
43
|
-
} else if (type === 2) {
|
|
44
|
-
if (!timeout) {
|
|
45
|
-
timeout = setTimeout(() => {
|
|
46
|
-
timeout = null;
|
|
47
|
-
func.apply(context, args);
|
|
48
|
-
}, wait);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
const { create } = createComponent("video");
|
|
54
|
-
const _sfc_main = create({
|
|
55
|
-
props: {
|
|
56
|
-
source: {
|
|
57
|
-
type: Object,
|
|
58
|
-
default: {}
|
|
59
|
-
},
|
|
60
|
-
options: {
|
|
61
|
-
type: Object,
|
|
62
|
-
default: {
|
|
63
|
-
autoplay: false,
|
|
64
|
-
volume: 0.5,
|
|
65
|
-
poster: "",
|
|
66
|
-
loop: false,
|
|
67
|
-
controls: true,
|
|
68
|
-
muted: false,
|
|
69
|
-
disabled: false,
|
|
70
|
-
playsinline: false,
|
|
71
|
-
touchPlay: false,
|
|
72
|
-
preload: ""
|
|
73
|
-
},
|
|
74
|
-
required: true
|
|
75
|
-
},
|
|
76
|
-
model: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: ""
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
components: {},
|
|
82
|
-
emits: ["click", "play", "pause", "playend"],
|
|
83
|
-
setup(props, { emit }) {
|
|
84
|
-
const state = reactive({
|
|
85
|
-
videoElm: null,
|
|
86
|
-
initial: true,
|
|
87
|
-
showToolbox: false,
|
|
88
|
-
player: {
|
|
89
|
-
$player: null,
|
|
90
|
-
pos: null
|
|
91
|
-
},
|
|
92
|
-
progressBar: {
|
|
93
|
-
progressElm: null,
|
|
94
|
-
pos: null
|
|
95
|
-
},
|
|
96
|
-
videoSet: {
|
|
97
|
-
loaded: 0,
|
|
98
|
-
displayTime: "00:00",
|
|
99
|
-
totalTime: "00:00",
|
|
100
|
-
progress: {
|
|
101
|
-
width: 0,
|
|
102
|
-
current: 0
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
state: {
|
|
106
|
-
controlShow: true,
|
|
107
|
-
vol: 0.5,
|
|
108
|
-
currentTime: 0,
|
|
109
|
-
fullScreen: false,
|
|
110
|
-
playing: false,
|
|
111
|
-
isLoading: false,
|
|
112
|
-
isEnd: false,
|
|
113
|
-
isError: false,
|
|
114
|
-
isMuted: false
|
|
115
|
-
},
|
|
116
|
-
showTouchMask: false
|
|
117
|
-
});
|
|
118
|
-
const root = ref();
|
|
119
|
-
const isDisabled = computed(() => {
|
|
120
|
-
return props.options.disabled;
|
|
121
|
-
});
|
|
122
|
-
watch(props.source, (newValue) => {
|
|
123
|
-
if (newValue.src) {
|
|
124
|
-
nextTick(() => {
|
|
125
|
-
state.videoElm.load();
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
watch(props.options, (newValue) => {
|
|
130
|
-
state.state.isMuted = newValue.muted ? newValue.muted : false;
|
|
131
|
-
}, { immediate: true });
|
|
132
|
-
const init = () => {
|
|
133
|
-
state.videoElm = root.value;
|
|
134
|
-
if (props.options.autoplay) {
|
|
135
|
-
state.videoElm.play();
|
|
136
|
-
}
|
|
137
|
-
if (props.options.touchPlay) {
|
|
138
|
-
state.showTouchMask = true;
|
|
139
|
-
}
|
|
140
|
-
if (props.options.playsinline) {
|
|
141
|
-
state.videoElm.setAttribute("playsinline", props.options.playsinline);
|
|
142
|
-
state.videoElm.setAttribute("webkit-playsinline", props.options.playsinline);
|
|
143
|
-
state.videoElm.setAttribute("x5-video-player-type", "h5-page");
|
|
144
|
-
state.videoElm.setAttribute("x5-video-player-fullscreen", false);
|
|
145
|
-
}
|
|
146
|
-
volumeHandle();
|
|
147
|
-
if (state.showToolbox) {
|
|
148
|
-
customerInit();
|
|
149
|
-
} else {
|
|
150
|
-
state.videoElm.addEventListener("play", () => {
|
|
151
|
-
state.state.playing = true;
|
|
152
|
-
emit("play", state.videoElm);
|
|
153
|
-
});
|
|
154
|
-
state.videoElm.addEventListener("pause", () => {
|
|
155
|
-
state.state.playing = false;
|
|
156
|
-
emit("pause", state.videoElm);
|
|
157
|
-
});
|
|
158
|
-
state.videoElm.addEventListener("ended", playEnded);
|
|
159
|
-
state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
const customerInit = () => {
|
|
163
|
-
const $player = root.value;
|
|
164
|
-
const $progress = root.value.getElementsByClassName("progress")[0];
|
|
165
|
-
state.player.$player = $player;
|
|
166
|
-
state.progressBar.progressElm = $progress;
|
|
167
|
-
state.progressBar.pos = $progress.getBoundingClientRect();
|
|
168
|
-
state.videoSet.progress.width = Math.round($progress.getBoundingClientRect().width);
|
|
169
|
-
};
|
|
170
|
-
const play = () => {
|
|
171
|
-
if (props.options.autoplay && props.options.disabled) {
|
|
172
|
-
state.state.playing = true;
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
state.state.playing = !state.state.playing;
|
|
176
|
-
if (state.videoElm) {
|
|
177
|
-
if (state.state.playing) {
|
|
178
|
-
try {
|
|
179
|
-
state.videoElm.play();
|
|
180
|
-
state.videoElm.addEventListener("progress", () => {
|
|
181
|
-
getLoadTime();
|
|
182
|
-
});
|
|
183
|
-
state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
|
|
184
|
-
state.videoElm.addEventListener("ended", playEnded);
|
|
185
|
-
emit("play", state.videoElm);
|
|
186
|
-
} catch (e) {
|
|
187
|
-
handleError();
|
|
188
|
-
}
|
|
189
|
-
} else {
|
|
190
|
-
state.videoElm.pause();
|
|
191
|
-
emit("pause", state.videoElm);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
const timeFormat = (t) => {
|
|
196
|
-
var h = Math.floor(t / 3600);
|
|
197
|
-
if (h < 10) {
|
|
198
|
-
h = "0" + h;
|
|
199
|
-
}
|
|
200
|
-
var m = Math.floor(t % 3600 / 60);
|
|
201
|
-
if (m < 10) {
|
|
202
|
-
m = "0" + m;
|
|
203
|
-
}
|
|
204
|
-
var s = Math.round(t % 3600 % 60);
|
|
205
|
-
if (s < 10) {
|
|
206
|
-
s = "0" + s;
|
|
207
|
-
}
|
|
208
|
-
var str = "";
|
|
209
|
-
if (h != 0) {
|
|
210
|
-
str = h + ":" + m + ":" + s;
|
|
211
|
-
} else {
|
|
212
|
-
str = m + ":" + s;
|
|
213
|
-
}
|
|
214
|
-
return str;
|
|
215
|
-
};
|
|
216
|
-
const getLoadTime = () => {
|
|
217
|
-
if (state.videoSet.loaded)
|
|
218
|
-
state.videoSet.loaded = state.videoElm.buffered.end(0) / state.videoElm.duration * 100;
|
|
219
|
-
};
|
|
220
|
-
const getPlayTime = () => {
|
|
221
|
-
const percent = state.videoElm.currentTime / state.videoElm.duration;
|
|
222
|
-
state.videoSet.progress.current = Math.round(state.videoSet.progress.width * percent);
|
|
223
|
-
state.videoSet.totalTime = timeFormat(state.videoElm.duration);
|
|
224
|
-
state.videoSet.displayTime = timeFormat(state.videoElm.currentTime);
|
|
225
|
-
};
|
|
226
|
-
const playEnded = () => {
|
|
227
|
-
state.state.playing = false;
|
|
228
|
-
state.state.isEnd = true;
|
|
229
|
-
state.videoSet.displayTime = "00:00";
|
|
230
|
-
state.videoSet.progress.current = 0;
|
|
231
|
-
state.videoElm.currentTime = 0;
|
|
232
|
-
emit("playend", state.videoElm);
|
|
233
|
-
};
|
|
234
|
-
const handleError = () => {
|
|
235
|
-
state.state.isError = true;
|
|
236
|
-
};
|
|
237
|
-
const volumeHandle = () => {
|
|
238
|
-
state.state.vol = props.options.volume;
|
|
239
|
-
};
|
|
240
|
-
const handleMuted = () => {
|
|
241
|
-
state.state.isMuted = !state.state.isMuted;
|
|
242
|
-
state.videoElm.muted = state.state.isMuted;
|
|
243
|
-
};
|
|
244
|
-
const touchSlidSrart = () => {
|
|
245
|
-
};
|
|
246
|
-
const touchSlidMove = (e) => {
|
|
247
|
-
let currentX = e.targetTouches[0].pageX;
|
|
248
|
-
let offsetX = currentX - state.progressBar.pos.left;
|
|
249
|
-
if (offsetX <= 0) {
|
|
250
|
-
offsetX = 0;
|
|
251
|
-
}
|
|
252
|
-
if (offsetX >= state.videoSet.progress.width) {
|
|
253
|
-
offsetX = state.videoSet.progress.width;
|
|
254
|
-
}
|
|
255
|
-
state.videoSet.progress.current = offsetX;
|
|
256
|
-
let percent = state.videoSet.progress.current / state.videoSet.progress.width;
|
|
257
|
-
state.videoElm.duration && setPlayTime(percent, state.videoElm.duration);
|
|
258
|
-
};
|
|
259
|
-
const touchSlidEnd = (e) => {
|
|
260
|
-
let currentX = e.changedTouches[0].pageX;
|
|
261
|
-
let offsetX = currentX - state.progressBar.pos.left;
|
|
262
|
-
state.videoSet.progress.current = offsetX;
|
|
263
|
-
let percent = offsetX / state.videoSet.progress.width;
|
|
264
|
-
state.videoElm.duration && setPlayTime(percent, state.videoElm.duration);
|
|
265
|
-
};
|
|
266
|
-
const setPlayTime = (percent, totalTime) => {
|
|
267
|
-
state.videoElm.currentTime = Math.floor(percent * totalTime);
|
|
268
|
-
};
|
|
269
|
-
const retry = () => {
|
|
270
|
-
state.state.isError = false;
|
|
271
|
-
init();
|
|
272
|
-
};
|
|
273
|
-
const fullScreen = () => {
|
|
274
|
-
if (!state.state.fullScreen) {
|
|
275
|
-
state.state.fullScreen = true;
|
|
276
|
-
state.videoElm.webkitRequestFullScreen();
|
|
277
|
-
} else {
|
|
278
|
-
state.state.fullScreen = false;
|
|
279
|
-
document.webkitCancelFullScreen();
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
onMounted(() => {
|
|
283
|
-
init();
|
|
284
|
-
});
|
|
285
|
-
return __spreadProps(__spreadValues(__spreadValues({
|
|
286
|
-
root
|
|
287
|
-
}, toRefs(props)), toRefs(state)), {
|
|
288
|
-
handleError,
|
|
289
|
-
isDisabled,
|
|
290
|
-
play,
|
|
291
|
-
handleMuted,
|
|
292
|
-
touchSlidSrart,
|
|
293
|
-
touchSlidMove,
|
|
294
|
-
touchSlidEnd,
|
|
295
|
-
retry,
|
|
296
|
-
fullScreen
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
const _hoisted_1 = {
|
|
301
|
-
class: "nut-video",
|
|
302
|
-
ref: "videocon"
|
|
303
|
-
};
|
|
304
|
-
const _hoisted_2 = ["muted", "autoplay", "loop", "poster", "controls", "preload"];
|
|
305
|
-
const _hoisted_3 = ["src", "type"];
|
|
306
|
-
const _hoisted_4 = { class: "current-time" };
|
|
307
|
-
const _hoisted_5 = { class: "progress-container" };
|
|
308
|
-
const _hoisted_6 = {
|
|
309
|
-
class: "progress",
|
|
310
|
-
ref: "progressBar"
|
|
311
|
-
};
|
|
312
|
-
const _hoisted_7 = /* @__PURE__ */ createElementVNode("div", { class: "move-handle" }, null, -1);
|
|
313
|
-
const _hoisted_8 = [
|
|
314
|
-
_hoisted_7
|
|
315
|
-
];
|
|
316
|
-
const _hoisted_9 = {
|
|
317
|
-
class: "played",
|
|
318
|
-
ref: "playedBar"
|
|
319
|
-
};
|
|
320
|
-
const _hoisted_10 = { class: "duration-time" };
|
|
321
|
-
const _hoisted_11 = { class: "nut-video-error" };
|
|
322
|
-
const _hoisted_12 = /* @__PURE__ */ createElementVNode("p", { class: "lose" }, "\u89C6\u9891\u52A0\u8F7D\u5931\u8D25", -1);
|
|
323
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
324
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
325
|
-
createElementVNode("video", {
|
|
326
|
-
ref: "root",
|
|
327
|
-
class: "nut-video-player",
|
|
328
|
-
muted: _ctx.options.muted,
|
|
329
|
-
autoplay: _ctx.options.autoplay,
|
|
330
|
-
loop: _ctx.options.loop,
|
|
331
|
-
poster: _ctx.options.poster,
|
|
332
|
-
controls: _ctx.options.controls,
|
|
333
|
-
preload: _ctx.options.preload,
|
|
334
|
-
onError: _cache[0] || (_cache[0] = (...args) => _ctx.handleError && _ctx.handleError(...args))
|
|
335
|
-
}, [
|
|
336
|
-
createElementVNode("source", {
|
|
337
|
-
src: _ctx.source.src,
|
|
338
|
-
type: _ctx.source.type
|
|
339
|
-
}, null, 8, _hoisted_3)
|
|
340
|
-
], 40, _hoisted_2),
|
|
341
|
-
_ctx.showToolbox && !_ctx.isDisabled ? (openBlock(), createElementBlock("div", {
|
|
342
|
-
key: 0,
|
|
343
|
-
class: "playing-mask",
|
|
344
|
-
ref: "touchMask",
|
|
345
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.play && _ctx.play(...args))
|
|
346
|
-
}, null, 512)) : createCommentVNode("", true),
|
|
347
|
-
_ctx.showToolbox && !_ctx.isDisabled ? withDirectives((openBlock(), createElementBlock("div", {
|
|
348
|
-
key: 1,
|
|
349
|
-
class: "nut-video-play-btn",
|
|
350
|
-
ref: "palyBtn",
|
|
351
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.play && _ctx.play(...args))
|
|
352
|
-
}, null, 512)), [
|
|
353
|
-
[vShow, !_ctx.state.playing]
|
|
354
|
-
]) : createCommentVNode("", true),
|
|
355
|
-
withDirectives(createElementVNode("div", {
|
|
356
|
-
class: normalizeClass(["nut-video-controller", { "show-control": !_ctx.state.playing, "hide-control": _ctx.state.playing }])
|
|
357
|
-
}, [
|
|
358
|
-
createElementVNode("div", {
|
|
359
|
-
class: "control-play-btn",
|
|
360
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.play && _ctx.play(...args))
|
|
361
|
-
}),
|
|
362
|
-
createElementVNode("div", _hoisted_4, toDisplayString(_ctx.videoSet.displayTime), 1),
|
|
363
|
-
createElementVNode("div", _hoisted_5, [
|
|
364
|
-
createElementVNode("div", _hoisted_6, [
|
|
365
|
-
createElementVNode("div", {
|
|
366
|
-
class: "buffered",
|
|
367
|
-
style: normalizeStyle({ width: `${_ctx.videoSet.loaded}%` })
|
|
368
|
-
}, null, 4),
|
|
369
|
-
createElementVNode("div", {
|
|
370
|
-
class: "video-ball",
|
|
371
|
-
style: normalizeStyle({
|
|
372
|
-
transform: `translate3d(${_ctx.videoSet.progress.current}px, -50%, 0)`
|
|
373
|
-
}),
|
|
374
|
-
onTouchmove: _cache[4] || (_cache[4] = withModifiers(($event) => _ctx.touchSlidMove($event), ["stop", "prevent"])),
|
|
375
|
-
onTouchstart: _cache[5] || (_cache[5] = withModifiers(($event) => _ctx.touchSlidSrart($event), ["stop"])),
|
|
376
|
-
onTouchend: _cache[6] || (_cache[6] = withModifiers(($event) => _ctx.touchSlidEnd($event), ["stop"]))
|
|
377
|
-
}, _hoisted_8, 36),
|
|
378
|
-
createElementVNode("div", _hoisted_9, null, 512)
|
|
379
|
-
], 512)
|
|
380
|
-
]),
|
|
381
|
-
createElementVNode("div", _hoisted_10, toDisplayString(_ctx.videoSet.totalTime), 1),
|
|
382
|
-
createElementVNode("div", {
|
|
383
|
-
class: normalizeClass(["volume", { muted: _ctx.state.isMuted }]),
|
|
384
|
-
onClick: _cache[7] || (_cache[7] = (...args) => _ctx.handleMuted && _ctx.handleMuted(...args))
|
|
385
|
-
}, null, 2),
|
|
386
|
-
createElementVNode("div", {
|
|
387
|
-
class: "fullscreen-icon",
|
|
388
|
-
onClick: _cache[8] || (_cache[8] = (...args) => _ctx.fullScreen && _ctx.fullScreen(...args))
|
|
389
|
-
})
|
|
390
|
-
], 2), [
|
|
391
|
-
[vShow, _ctx.showToolbox && !_ctx.isDisabled]
|
|
392
|
-
]),
|
|
393
|
-
withDirectives(createElementVNode("div", _hoisted_11, [
|
|
394
|
-
_hoisted_12,
|
|
395
|
-
createElementVNode("p", {
|
|
396
|
-
class: "retry",
|
|
397
|
-
onClick: _cache[9] || (_cache[9] = (...args) => _ctx.retry && _ctx.retry(...args))
|
|
398
|
-
}, "\u70B9\u51FB\u91CD\u8BD5")
|
|
399
|
-
], 512), [
|
|
400
|
-
[vShow, _ctx.state.isError]
|
|
401
|
-
])
|
|
402
|
-
], 512);
|
|
403
|
-
}
|
|
404
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
405
|
-
export { index as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
|
|
3
|
-
* (c) 2021 @jdf2e.
|
|
4
|
-
* Released under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
var _export_sfc = (sfc, props) => {
|
|
7
|
-
const target = sfc.__vccOpts || sfc;
|
|
8
|
-
for (const [key, val] of props) {
|
|
9
|
-
target[key] = val;
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
export { _export_sfc as _ };
|