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
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
require('../index.js');
|
|
7
|
+
var index = require('../hyTooltip/index.js');
|
|
6
8
|
|
|
7
9
|
import "./style/radioGroup.scss";
|
|
8
10
|
|
|
@@ -26,6 +28,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
26
28
|
disabled: {
|
|
27
29
|
type: Boolean,
|
|
28
30
|
default: false
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* 是否撑满父容器宽度
|
|
34
|
+
* true:组件宽度占满父级,每一项平均分配宽度
|
|
35
|
+
* false:组件宽度由内容撑开,每一项宽度为自身内容宽度
|
|
36
|
+
*/
|
|
37
|
+
fullWidth: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
29
40
|
}
|
|
30
41
|
}, {
|
|
31
42
|
"modelValue": {
|
|
@@ -39,8 +50,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
39
50
|
const props = __props;
|
|
40
51
|
const emits = __emit;
|
|
41
52
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
53
|
+
const containerRef = vue.useTemplateRef("containerRef");
|
|
42
54
|
const sliderRef = vue.useTemplateRef("sliderRef");
|
|
43
55
|
const selectIndex = vue.ref(0);
|
|
56
|
+
const sliderReady = vue.ref(false);
|
|
44
57
|
const radioProps = vue.computed(() => {
|
|
45
58
|
return {
|
|
46
59
|
value: "value",
|
|
@@ -56,17 +69,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
56
69
|
modelValue.value = value;
|
|
57
70
|
emits("change", value);
|
|
58
71
|
}
|
|
72
|
+
function updateSlider() {
|
|
73
|
+
const slider = sliderRef.value;
|
|
74
|
+
const container = containerRef.value;
|
|
75
|
+
if (!slider || !container || selectIndex.value < 0) return;
|
|
76
|
+
const items = container.querySelectorAll("[data-radio-item]");
|
|
77
|
+
const target = items[selectIndex.value];
|
|
78
|
+
if (!target) return;
|
|
79
|
+
slider.style.left = `${target.offsetLeft}px`;
|
|
80
|
+
slider.style.width = `${target.offsetWidth}px`;
|
|
81
|
+
sliderReady.value = true;
|
|
82
|
+
}
|
|
59
83
|
async function sliderHandler() {
|
|
60
84
|
selectIndex.value = props.options.findIndex((item) => {
|
|
61
85
|
return item[radioProps.value.value] === modelValue.value;
|
|
62
86
|
});
|
|
63
87
|
await vue.nextTick();
|
|
64
|
-
|
|
65
|
-
if (slider) {
|
|
66
|
-
const proportion = 100 / props.options.length;
|
|
67
|
-
const left = selectIndex.value > 0 ? selectIndex.value * proportion : 0;
|
|
68
|
-
slider.style.left = `${left}%`;
|
|
69
|
-
}
|
|
88
|
+
updateSlider();
|
|
70
89
|
}
|
|
71
90
|
vue.watch(
|
|
72
91
|
() => [modelValue.value, props.options],
|
|
@@ -75,6 +94,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
75
94
|
},
|
|
76
95
|
{ immediate: true }
|
|
77
96
|
);
|
|
97
|
+
let resizeObserver = null;
|
|
98
|
+
vue.onMounted(() => {
|
|
99
|
+
if (typeof ResizeObserver === "undefined" || !containerRef.value) return;
|
|
100
|
+
resizeObserver = new ResizeObserver(() => updateSlider());
|
|
101
|
+
resizeObserver.observe(containerRef.value);
|
|
102
|
+
});
|
|
103
|
+
vue.onBeforeUnmount(() => {
|
|
104
|
+
resizeObserver?.disconnect();
|
|
105
|
+
resizeObserver = null;
|
|
106
|
+
});
|
|
78
107
|
__expose({});
|
|
79
108
|
return (_ctx, _cache) => {
|
|
80
109
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -82,51 +111,68 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
82
111
|
{
|
|
83
112
|
class: vue.normalizeClass(["hy-radio-group", [
|
|
84
113
|
__props.size === "large" ? "h-[40px]" : __props.size === "small" ? "h-[30px]" : "h-[34px]",
|
|
85
|
-
__props.size === "small" ? "text-xs" : "text-sm"
|
|
114
|
+
__props.size === "small" ? "text-xs" : "text-sm",
|
|
115
|
+
{ "w-fit": !__props.fullWidth }
|
|
86
116
|
]])
|
|
87
117
|
},
|
|
88
118
|
[
|
|
89
|
-
vue.createElementVNode(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
vue.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
119
|
+
vue.createElementVNode(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
ref_key: "containerRef",
|
|
123
|
+
ref: containerRef,
|
|
124
|
+
class: vue.normalizeClass(["h-full inline-flex box-border relative", { "w-full": __props.fullWidth }])
|
|
125
|
+
},
|
|
126
|
+
[
|
|
127
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
128
|
+
vue.Fragment,
|
|
129
|
+
null,
|
|
130
|
+
vue.renderList(__props.options, (item, index$1) => {
|
|
131
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
132
|
+
key: index$1,
|
|
133
|
+
"data-radio-item": "",
|
|
134
|
+
class: vue.normalizeClass(["h-full flex items-center justify-center text-main whitespace-nowrap user-select-none relative px-3 z-[2]", [
|
|
135
|
+
__props.fullWidth ? "w-0 flex-1" : "w-auto",
|
|
136
|
+
item[radioProps.value.disabled] || __props.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
137
|
+
]]),
|
|
138
|
+
onClick: ($event) => switchSelect(item)
|
|
139
|
+
}, [
|
|
140
|
+
vue.renderSlot(_ctx.$slots, "default", {
|
|
141
|
+
item,
|
|
142
|
+
index: index$1
|
|
143
|
+
}, () => [
|
|
144
|
+
vue.createVNode(vue.unref(index.HyTooltip), {
|
|
145
|
+
"is-always": false,
|
|
146
|
+
"over-line": 1,
|
|
147
|
+
content: item[radioProps.value.label]
|
|
148
|
+
}, null, 8, ["content"])
|
|
149
|
+
])
|
|
150
|
+
], 10, ["onClick"]);
|
|
151
|
+
}),
|
|
152
|
+
128
|
|
153
|
+
/* KEYED_FRAGMENT */
|
|
154
|
+
)),
|
|
155
|
+
vue.withDirectives(vue.createElementVNode(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
ref_key: "sliderRef",
|
|
159
|
+
ref: sliderRef,
|
|
160
|
+
class: vue.normalizeClass(["slider rounded-[2px] box-border absolute h-full top-0 left-0 z-0 duration-500 border border-theme", {
|
|
161
|
+
"opacity-0": !sliderReady.value,
|
|
162
|
+
"opacity-80": __props.disabled
|
|
163
|
+
}]),
|
|
164
|
+
style: { "background": "linear-gradient(180deg, #2a4968 0%, #0ea0bb 100%)" }
|
|
165
|
+
},
|
|
166
|
+
null,
|
|
167
|
+
2
|
|
168
|
+
/* CLASS */
|
|
169
|
+
), [
|
|
170
|
+
[vue.vShow, selectIndex.value >= 0]
|
|
171
|
+
])
|
|
172
|
+
],
|
|
173
|
+
2
|
|
174
|
+
/* CLASS */
|
|
175
|
+
)
|
|
130
176
|
],
|
|
131
177
|
2
|
|
132
178
|
/* CLASS */
|
|
@@ -348,6 +348,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
348
348
|
/* TEXT */
|
|
349
349
|
)
|
|
350
350
|
])) : vue.createCommentVNode("v-if", true),
|
|
351
|
+
vue.renderSlot(_ctx.$slots, "operator-right-box"),
|
|
351
352
|
vue.unref(searchPlaceholder) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
352
353
|
key: 2,
|
|
353
354
|
"is-always": "",
|
|
@@ -382,8 +383,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
382
383
|
]),
|
|
383
384
|
_: 1
|
|
384
385
|
/* STABLE */
|
|
385
|
-
}, 8, ["onClick"]))
|
|
386
|
-
vue.renderSlot(_ctx.$slots, "operator-right-box")
|
|
386
|
+
}, 8, ["onClick"]))
|
|
387
387
|
]),
|
|
388
388
|
_ctx.$slots["operator-left-box"] ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
389
389
|
key: 0,
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var videoPlayer_vue_vue_type_script_setup_true_lang = require('./videoPlayer2.vue.js');
|
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
|
7
7
|
|
|
8
|
-
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=
|
|
8
|
+
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";
|
|
9
9
|
|
|
10
|
-
var componnet = /* @__PURE__ */ _pluginVue_exportHelper.default(videoPlayer_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-
|
|
10
|
+
var componnet = /* @__PURE__ */ _pluginVue_exportHelper.default(videoPlayer_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-96c2e90a"]]);
|
|
11
11
|
|
|
12
12
|
exports.default = componnet;
|