mtxt-ui3 0.0.2
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 +23 -0
- package/dist/components/index.cjs +9809 -0
- package/dist/components/index.d.ts +677 -0
- package/dist/components/index.js +9784 -0
- package/dist/components/style.css +1 -0
- package/dist/directives/index.cjs +89 -0
- package/dist/directives/index.d.ts +15 -0
- package/dist/directives/index.js +84 -0
- package/dist/hooks/index.cjs +6216 -0
- package/dist/hooks/index.d.ts +127 -0
- package/dist/hooks/index.js +6199 -0
- package/dist/index.cjs +10297 -0
- package/dist/index.d.ts +1084 -0
- package/dist/index.js +10280 -0
- package/dist/style.css +2 -0
- package/dist/utils/index.cjs +515 -0
- package/dist/utils/index.d.ts +162 -0
- package/dist/utils/index.js +493 -0
- package/dist/video/index.cjs +6305 -0
- package/dist/video/index.d.ts +79 -0
- package/dist/video/index.js +6296 -0
- package/dist/video/style.css +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.playVideos{display:flex;flex-direction:column;height:100%;padding-left:20px}.playVideos .operate{display:flex;justify-content:space-between;margin:5px 0}.playVideos .operate .button{cursor:pointer}.playVideos .grid{display:grid;flex:1;overflow:hidden}.playVideos .grid .video{background:#000;border:1px solid hsla(216,7%,59%,.3);height:100%;object-fit:fill;overflow:hidden;width:100%}.playVideos .grid.full{height:100%;left:0;position:fixed;top:0;width:100%;z-index:10}.playVideos .type1{grid-template-columns:1fr;grid-template-rows:1fr}.playVideos .type4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.playVideos .type8{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type8 .video:first-child{grid-column:1/4;grid-row:1/4}.playVideos .type9{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.playVideos .type13{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type13 .video:first-child{grid-column:1/3;grid-row:1/3}.playVideos .type16{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}@keyframes moveBottom{0%{bottom:0}to{bottom:-66px}}.videoComponent{background:#000;height:100%;position:relative;width:100%}.videoComponent.fill{object-fit:fill}.videoComponent.contain{object-fit:contain}.videoBox{height:100%;overflow:hidden;position:relative}.videoBox:hover .selectFields{animation-duration:1s;animation-fill-mode:both;animation-name:moveBottom}.videoBox:hover .footer-min{display:flex}.videoBox:hover .footer-min .name-min span,.videoBox:hover .footer-min .tool{display:block}.videoBox .selectFields{background:rgba(0,0,0,.3);bottom:0;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr;height:66px;position:absolute;width:100%}.videoBox .selectFields .info{border:0;color:#fff;line-height:33px;overflow:hidden;padding:0 5px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.videoBox .selectFields .info .value{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.videoBox .footer-min{align-items:center;backdrop-filter:blur(10px);background:hsla(0,0%,100%,.04);border-radius:4px 4px 0 0;bottom:0;display:none;height:44px;justify-content:space-between;position:absolute;width:100%}.videoBox .footer-min .name-min{align-items:center;display:flex;padding-left:15px}.videoBox .footer-min .name-min span{color:#fff;display:none;font-size:16px;font-weight:600}.videoBox .footer-min .tool{display:none}.videoBox .footer-min .tool img{cursor:pointer;height:20px;margin-right:15px;width:20px}.videoControls{align-items:center;display:flex;flex-direction:column;width:100%}.videoControls .videoControl{height:126px;position:relative;width:126px}.videoControls .videoControl .bg{height:100%;position:relative;width:100%}.videoControls .videoControl img{cursor:pointer;position:absolute}.videoControls .videoControl .up{left:52px;top:14px}.videoControls .videoControl .lup{left:26px;top:26px;transform:rotate(-45deg)}.videoControls .videoControl .rup{left:78px;top:27px;transform:rotate(45deg)}.videoControls .videoControl .left{left:14px;top:52px;transform:rotate(-90deg)}.videoControls .videoControl .right{left:90px;top:52px;transform:rotate(90deg)}.videoControls .videoControl .ldown{left:26px;top:78px;transform:rotate(215deg)}.videoControls .videoControl .down{left:52px;top:90px;transform:rotate(180deg)}.videoControls .videoControl .rdown{left:78px;top:78px;transform:rotate(135deg)}.videoControls .btns{background:#e0e7f2;border-radius:19px;height:28px;margin:8px 8px 0;padding:3px;width:56px}.videoControls .btns img{cursor:pointer;margin-right:1px}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const focusDirective = {
|
|
6
|
+
mounted(el, {
|
|
7
|
+
value
|
|
8
|
+
}) {
|
|
9
|
+
if (value !== false) {
|
|
10
|
+
el.focus();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const getScale = el => {
|
|
16
|
+
const parent = el.parentElement;
|
|
17
|
+
if (!parent) return;
|
|
18
|
+
const zoom = getComputedStyle(parent).getPropertyValue("zoom");
|
|
19
|
+
if (zoom !== "1") {
|
|
20
|
+
if (zoom !== "1") {
|
|
21
|
+
return {
|
|
22
|
+
x: Number(zoom)
|
|
23
|
+
};
|
|
24
|
+
} else {
|
|
25
|
+
return getScale(parent);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return getScale(parent);
|
|
29
|
+
};
|
|
30
|
+
const autoScroll = {
|
|
31
|
+
mounted(el, {
|
|
32
|
+
value = "ant-table-body",
|
|
33
|
+
modifiers
|
|
34
|
+
}) {
|
|
35
|
+
let timer;
|
|
36
|
+
let timer2;
|
|
37
|
+
let hover = false;
|
|
38
|
+
let wait = false;
|
|
39
|
+
const {
|
|
40
|
+
self
|
|
41
|
+
} = modifiers;
|
|
42
|
+
const onmouseenter = () => hover = true;
|
|
43
|
+
const onmouseleave = () => hover = false;
|
|
44
|
+
const scrollEl = self ? el : el.querySelector(`.${value}`);
|
|
45
|
+
if (!scrollEl) return;
|
|
46
|
+
const startScroll = () => {
|
|
47
|
+
if (!document.contains(el)) {
|
|
48
|
+
timer && clearInterval(timer);
|
|
49
|
+
el.removeEventListener("mouseenter", onmouseenter);
|
|
50
|
+
el.removeEventListener("mouseleave", onmouseleave);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (hover) return;
|
|
54
|
+
const scale = getScale(scrollEl);
|
|
55
|
+
const scrollElHeight = scrollEl.getBoundingClientRect().height / (scale?.y ?? 1);
|
|
56
|
+
const step = Math.ceil(1 / (scale?.x ?? 1));
|
|
57
|
+
if (scrollElHeight >= scrollEl.scrollHeight) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!hover && scrollEl.scrollTop + scrollElHeight > scrollEl.scrollHeight - step) {
|
|
61
|
+
if (timer2) return;
|
|
62
|
+
timer2 = setTimeout(() => {
|
|
63
|
+
if (!hover) {
|
|
64
|
+
scrollEl.scrollTop = 0;
|
|
65
|
+
}
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
if (!hover) {
|
|
68
|
+
wait = false;
|
|
69
|
+
}
|
|
70
|
+
}, 1e3);
|
|
71
|
+
timer2 = null;
|
|
72
|
+
}, 1e3);
|
|
73
|
+
wait = true;
|
|
74
|
+
} else {
|
|
75
|
+
if (!wait) {
|
|
76
|
+
scrollEl.scrollTo({
|
|
77
|
+
top: scrollEl.scrollTop + step
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
timer = setInterval(startScroll, 100);
|
|
83
|
+
el.addEventListener("mouseenter", onmouseenter);
|
|
84
|
+
el.addEventListener("mouseleave", onmouseleave);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.autoScroll = autoScroll;
|
|
89
|
+
exports.focusDirective = focusDirective;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Directive } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 输入框自动获取焦点
|
|
5
|
+
*/
|
|
6
|
+
declare const focusDirective: Directive;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 列表自动滚动
|
|
10
|
+
* 用法 v-autoScroll={'class'} class: 需要滚动的类名,必须是指令所在元素的子元素
|
|
11
|
+
* 修饰符: self:作用在v-autoScoll本身的元素上
|
|
12
|
+
*/
|
|
13
|
+
declare const autoScroll: Directive;
|
|
14
|
+
|
|
15
|
+
export { autoScroll, focusDirective };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const focusDirective = {
|
|
2
|
+
mounted(el, {
|
|
3
|
+
value
|
|
4
|
+
}) {
|
|
5
|
+
if (value !== false) {
|
|
6
|
+
el.focus();
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const getScale = el => {
|
|
12
|
+
const parent = el.parentElement;
|
|
13
|
+
if (!parent) return;
|
|
14
|
+
const zoom = getComputedStyle(parent).getPropertyValue("zoom");
|
|
15
|
+
if (zoom !== "1") {
|
|
16
|
+
if (zoom !== "1") {
|
|
17
|
+
return {
|
|
18
|
+
x: Number(zoom)
|
|
19
|
+
};
|
|
20
|
+
} else {
|
|
21
|
+
return getScale(parent);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return getScale(parent);
|
|
25
|
+
};
|
|
26
|
+
const autoScroll = {
|
|
27
|
+
mounted(el, {
|
|
28
|
+
value = "ant-table-body",
|
|
29
|
+
modifiers
|
|
30
|
+
}) {
|
|
31
|
+
let timer;
|
|
32
|
+
let timer2;
|
|
33
|
+
let hover = false;
|
|
34
|
+
let wait = false;
|
|
35
|
+
const {
|
|
36
|
+
self
|
|
37
|
+
} = modifiers;
|
|
38
|
+
const onmouseenter = () => hover = true;
|
|
39
|
+
const onmouseleave = () => hover = false;
|
|
40
|
+
const scrollEl = self ? el : el.querySelector(`.${value}`);
|
|
41
|
+
if (!scrollEl) return;
|
|
42
|
+
const startScroll = () => {
|
|
43
|
+
if (!document.contains(el)) {
|
|
44
|
+
timer && clearInterval(timer);
|
|
45
|
+
el.removeEventListener("mouseenter", onmouseenter);
|
|
46
|
+
el.removeEventListener("mouseleave", onmouseleave);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (hover) return;
|
|
50
|
+
const scale = getScale(scrollEl);
|
|
51
|
+
const scrollElHeight = scrollEl.getBoundingClientRect().height / (scale?.y ?? 1);
|
|
52
|
+
const step = Math.ceil(1 / (scale?.x ?? 1));
|
|
53
|
+
if (scrollElHeight >= scrollEl.scrollHeight) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (!hover && scrollEl.scrollTop + scrollElHeight > scrollEl.scrollHeight - step) {
|
|
57
|
+
if (timer2) return;
|
|
58
|
+
timer2 = setTimeout(() => {
|
|
59
|
+
if (!hover) {
|
|
60
|
+
scrollEl.scrollTop = 0;
|
|
61
|
+
}
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
if (!hover) {
|
|
64
|
+
wait = false;
|
|
65
|
+
}
|
|
66
|
+
}, 1e3);
|
|
67
|
+
timer2 = null;
|
|
68
|
+
}, 1e3);
|
|
69
|
+
wait = true;
|
|
70
|
+
} else {
|
|
71
|
+
if (!wait) {
|
|
72
|
+
scrollEl.scrollTo({
|
|
73
|
+
top: scrollEl.scrollTop + step
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
timer = setInterval(startScroll, 100);
|
|
79
|
+
el.addEventListener("mouseenter", onmouseenter);
|
|
80
|
+
el.addEventListener("mouseleave", onmouseleave);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export { autoScroll, focusDirective };
|