hy-dispatch-ui-v3 0.2.88 → 0.2.89
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/tailwind.css +89 -78
- package/es/api/file.mjs +14 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -469
- package/es/components/hyAudioPlayer/audioPlayer2.vue.mjs +1321 -0
- package/es/components/hyAudioPlayer/hyAudioPlayer/audioPlayer.vue.mjs +472 -0
- package/es/components/hyAudioPlayer/{js → hyAudioPlayer/js}/index.mjs +5 -5
- package/es/components/hyAudioPlayer/index.mjs +2 -2
- package/es/components/hyAudioPlayer/locale/en_US.mjs +18 -0
- package/es/components/hyAudioPlayer/locale/index.mjs +2 -0
- package/es/components/hyAudioPlayer/locale/zh_CN.mjs +18 -0
- package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +9 -7
- package/es/components/hyForm/cpns/formItem.vue.mjs +2 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +95 -49
- package/es/components/hyTable/table.vue.mjs +3 -3
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +2 -2
- package/es/components/hyVideoPlayer/videoPlayer2.vue.mjs +615 -336
- package/es/utils/timeUtils.mjs +8 -29
- package/es/version.mjs +1 -1
- package/lib/api/file.js +14 -0
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -469
- package/lib/components/hyAudioPlayer/audioPlayer2.vue.js +1325 -0
- package/lib/components/hyAudioPlayer/hyAudioPlayer/audioPlayer.vue.js +476 -0
- package/lib/components/hyAudioPlayer/{js → hyAudioPlayer/js}/index.js +5 -5
- package/lib/components/hyAudioPlayer/locale/en_US.js +22 -0
- package/lib/components/hyAudioPlayer/locale/index.js +9 -0
- package/lib/components/hyAudioPlayer/locale/zh_CN.js +22 -0
- package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +11 -9
- package/lib/components/hyForm/cpns/formItem.vue.js +2 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +94 -48
- package/lib/components/hyTable/table.vue.js +2 -2
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +2 -2
- package/lib/components/hyVideoPlayer/videoPlayer2.vue.js +614 -335
- package/lib/utils/timeUtils.js +8 -29
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/es/components/hyVideoPlayer/videoPlayer1.vue.mjs +0 -8
- package/es/components/hyVideoPlayer/videoPlayer12.vue.mjs +0 -947
- package/lib/components/hyVideoPlayer/videoPlayer1.vue.js +0 -12
- package/lib/components/hyVideoPlayer/videoPlayer12.vue.js +0 -951
- /package/es/components/hyAudioPlayer/{style → hyAudioPlayer/style}/audioPlayer.scss +0 -0
- /package/lib/components/hyAudioPlayer/{style → hyAudioPlayer/style}/audioPlayer.scss +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { defineComponent, useModel, useTemplateRef, ref, computed, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, renderSlot,
|
|
1
|
+
import { defineComponent, useModel, useTemplateRef, ref, computed, nextTick, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, renderSlot, createVNode, unref, withDirectives, vShow, mergeModels } from 'vue';
|
|
2
|
+
import '../index.mjs';
|
|
3
|
+
import { HyTooltip } from '../hyTooltip/index.mjs';
|
|
2
4
|
|
|
3
5
|
import "./style/radioGroup.scss";
|
|
4
6
|
|
|
@@ -22,6 +24,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
22
24
|
disabled: {
|
|
23
25
|
type: Boolean,
|
|
24
26
|
default: false
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* 是否撑满父容器宽度
|
|
30
|
+
* true:组件宽度占满父级,每一项平均分配宽度
|
|
31
|
+
* false:组件宽度由内容撑开,每一项宽度为自身内容宽度
|
|
32
|
+
*/
|
|
33
|
+
fullWidth: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
25
36
|
}
|
|
26
37
|
}, {
|
|
27
38
|
"modelValue": {
|
|
@@ -35,8 +46,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
35
46
|
const props = __props;
|
|
36
47
|
const emits = __emit;
|
|
37
48
|
const modelValue = useModel(__props, "modelValue");
|
|
49
|
+
const containerRef = useTemplateRef("containerRef");
|
|
38
50
|
const sliderRef = useTemplateRef("sliderRef");
|
|
39
51
|
const selectIndex = ref(0);
|
|
52
|
+
const sliderReady = ref(false);
|
|
40
53
|
const radioProps = computed(() => {
|
|
41
54
|
return {
|
|
42
55
|
value: "value",
|
|
@@ -52,17 +65,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
52
65
|
modelValue.value = value;
|
|
53
66
|
emits("change", value);
|
|
54
67
|
}
|
|
68
|
+
function updateSlider() {
|
|
69
|
+
const slider = sliderRef.value;
|
|
70
|
+
const container = containerRef.value;
|
|
71
|
+
if (!slider || !container || selectIndex.value < 0) return;
|
|
72
|
+
const items = container.querySelectorAll("[data-radio-item]");
|
|
73
|
+
const target = items[selectIndex.value];
|
|
74
|
+
if (!target) return;
|
|
75
|
+
slider.style.left = `${target.offsetLeft}px`;
|
|
76
|
+
slider.style.width = `${target.offsetWidth}px`;
|
|
77
|
+
sliderReady.value = true;
|
|
78
|
+
}
|
|
55
79
|
async function sliderHandler() {
|
|
56
80
|
selectIndex.value = props.options.findIndex((item) => {
|
|
57
81
|
return item[radioProps.value.value] === modelValue.value;
|
|
58
82
|
});
|
|
59
83
|
await nextTick();
|
|
60
|
-
|
|
61
|
-
if (slider) {
|
|
62
|
-
const proportion = 100 / props.options.length;
|
|
63
|
-
const left = selectIndex.value > 0 ? selectIndex.value * proportion : 0;
|
|
64
|
-
slider.style.left = `${left}%`;
|
|
65
|
-
}
|
|
84
|
+
updateSlider();
|
|
66
85
|
}
|
|
67
86
|
watch(
|
|
68
87
|
() => [modelValue.value, props.options],
|
|
@@ -71,6 +90,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
71
90
|
},
|
|
72
91
|
{ immediate: true }
|
|
73
92
|
);
|
|
93
|
+
let resizeObserver = null;
|
|
94
|
+
onMounted(() => {
|
|
95
|
+
if (typeof ResizeObserver === "undefined" || !containerRef.value) return;
|
|
96
|
+
resizeObserver = new ResizeObserver(() => updateSlider());
|
|
97
|
+
resizeObserver.observe(containerRef.value);
|
|
98
|
+
});
|
|
99
|
+
onBeforeUnmount(() => {
|
|
100
|
+
resizeObserver?.disconnect();
|
|
101
|
+
resizeObserver = null;
|
|
102
|
+
});
|
|
74
103
|
__expose({});
|
|
75
104
|
return (_ctx, _cache) => {
|
|
76
105
|
return openBlock(), createElementBlock(
|
|
@@ -78,51 +107,68 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
78
107
|
{
|
|
79
108
|
class: normalizeClass(["hy-radio-group", [
|
|
80
109
|
__props.size === "large" ? "h-[40px]" : __props.size === "small" ? "h-[30px]" : "h-[34px]",
|
|
81
|
-
__props.size === "small" ? "text-xs" : "text-sm"
|
|
110
|
+
__props.size === "small" ? "text-xs" : "text-sm",
|
|
111
|
+
{ "w-fit": !__props.fullWidth }
|
|
82
112
|
]])
|
|
83
113
|
},
|
|
84
114
|
[
|
|
85
|
-
createElementVNode(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
115
|
+
createElementVNode(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
ref_key: "containerRef",
|
|
119
|
+
ref: containerRef,
|
|
120
|
+
class: normalizeClass(["h-full inline-flex box-border relative", { "w-full": __props.fullWidth }])
|
|
121
|
+
},
|
|
122
|
+
[
|
|
123
|
+
(openBlock(true), createElementBlock(
|
|
124
|
+
Fragment,
|
|
125
|
+
null,
|
|
126
|
+
renderList(__props.options, (item, index) => {
|
|
127
|
+
return openBlock(), createElementBlock("div", {
|
|
128
|
+
key: index,
|
|
129
|
+
"data-radio-item": "",
|
|
130
|
+
class: normalizeClass(["h-full flex items-center justify-center text-main whitespace-nowrap user-select-none relative px-3 z-[2]", [
|
|
131
|
+
__props.fullWidth ? "w-0 flex-1" : "w-auto",
|
|
132
|
+
item[radioProps.value.disabled] || __props.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
133
|
+
]]),
|
|
134
|
+
onClick: ($event) => switchSelect(item)
|
|
135
|
+
}, [
|
|
136
|
+
renderSlot(_ctx.$slots, "default", {
|
|
137
|
+
item,
|
|
138
|
+
index
|
|
139
|
+
}, () => [
|
|
140
|
+
createVNode(unref(HyTooltip), {
|
|
141
|
+
"is-always": false,
|
|
142
|
+
"over-line": 1,
|
|
143
|
+
content: item[radioProps.value.label]
|
|
144
|
+
}, null, 8, ["content"])
|
|
145
|
+
])
|
|
146
|
+
], 10, ["onClick"]);
|
|
147
|
+
}),
|
|
148
|
+
128
|
|
149
|
+
/* KEYED_FRAGMENT */
|
|
150
|
+
)),
|
|
151
|
+
withDirectives(createElementVNode(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
ref_key: "sliderRef",
|
|
155
|
+
ref: sliderRef,
|
|
156
|
+
class: normalizeClass(["slider rounded-[2px] box-border absolute h-full top-0 left-0 z-0 duration-500 border border-theme", {
|
|
157
|
+
"opacity-0": !sliderReady.value,
|
|
158
|
+
"opacity-80": __props.disabled
|
|
159
|
+
}]),
|
|
160
|
+
style: { "background": "linear-gradient(180deg, #2a4968 0%, #0ea0bb 100%)" }
|
|
161
|
+
},
|
|
162
|
+
null,
|
|
163
|
+
2
|
|
164
|
+
/* CLASS */
|
|
165
|
+
), [
|
|
166
|
+
[vShow, selectIndex.value >= 0]
|
|
167
|
+
])
|
|
168
|
+
],
|
|
169
|
+
2
|
|
170
|
+
/* CLASS */
|
|
171
|
+
)
|
|
126
172
|
],
|
|
127
173
|
2
|
|
128
174
|
/* CLASS */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useModel, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, toDisplayString,
|
|
1
|
+
import { defineComponent, useModel, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, toDisplayString, renderSlot, withCtx, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers, normalizeStyle, isRef, createTextVNode, mergeModels } from 'vue';
|
|
2
2
|
import { ElTable, ElTableColumn, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem, ElAutoResizer, ElPagination } from 'element-plus';
|
|
3
3
|
import { MoreFilled } from '@element-plus/icons-vue';
|
|
4
4
|
import '../index.mjs';
|
|
@@ -344,6 +344,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
344
344
|
/* TEXT */
|
|
345
345
|
)
|
|
346
346
|
])) : createCommentVNode("v-if", true),
|
|
347
|
+
renderSlot(_ctx.$slots, "operator-right-box"),
|
|
347
348
|
unref(searchPlaceholder) ? (openBlock(), createBlock(unref(HyTooltip), {
|
|
348
349
|
key: 2,
|
|
349
350
|
"is-always": "",
|
|
@@ -378,8 +379,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
378
379
|
]),
|
|
379
380
|
_: 1
|
|
380
381
|
/* STABLE */
|
|
381
|
-
}, 8, ["onClick"]))
|
|
382
|
-
renderSlot(_ctx.$slots, "operator-right-box")
|
|
382
|
+
}, 8, ["onClick"]))
|
|
383
383
|
]),
|
|
384
384
|
_ctx.$slots["operator-left-box"] ? (openBlock(), createElementBlock("div", {
|
|
385
385
|
key: 0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _sfc_main from './videoPlayer2.vue.mjs';
|
|
2
2
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
3
3
|
|
|
4
|
-
import "/data/jenkins-work/workspace/WEB-V3-PROJECT-Web-hy-dispatch-ui@2/tmp/packages/components/hyVideoPlayer/videoPlayer.vue?vue&type=style&index=0&scoped=
|
|
4
|
+
import "/data/jenkins-work/workspace/WEB-V3-PROJECT-Web-hy-dispatch-ui@2/tmp/packages/components/hyVideoPlayer/videoPlayer.vue?vue&type=style&index=0&scoped=96c2e90a&lang.scss";
|
|
5
5
|
|
|
6
|
-
var componnet = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
6
|
+
var componnet = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-96c2e90a"]]);
|
|
7
7
|
|
|
8
8
|
export { componnet as default };
|