@94ai/nf-audio 3.3.53 → 3.3.59

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.
@@ -0,0 +1,6 @@
1
+ //将单位为秒的的时间转换成mm:ss的形式
2
+ export function timeFormat( value: number ) {
3
+ const minute = parseInt(String(value / 60));
4
+ const second = parseInt(String(value % 60));
5
+ return (minute >= 10 ? minute : "0" + minute) + ":" + (second >= 10 ? second : "0" + second);
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-audio",
3
- "version": "3.3.53",
3
+ "version": "3.3.59",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "liuxiangxiang <liuxiangxiang@94ai.com>",
@@ -14,7 +14,7 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-theme-chalk": "^3.3.53",
17
+ "@94ai/nf-theme-chalk": "^3.3.59",
18
18
  "vue-demi": "^0.14.5"
19
19
  },
20
20
  "peerDependenciesMeta": {
@@ -30,5 +30,5 @@
30
30
  "types": "lib/index.d.ts",
31
31
  "main": "lib/nf-audio.cjs.js",
32
32
  "module": "lib/nf-audio.esm-bundler.js",
33
- "gitHead": "8e20e21ea67d158ed0a8246e18320f2432268704"
33
+ "gitHead": "9cd2d16299eb3af079f18087e46bccea92df39f6"
34
34
  }
@@ -1,17 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- disabled: {
3
- type: BooleanConstructor;
4
- default: boolean;
5
- };
6
- }, {}, {
7
- multipleArray: string[];
8
- speed: string;
9
- }, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
10
- disabled: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
- }>>, {
15
- disabled: boolean;
16
- }>;
17
- export default _default;
@@ -1,17 +0,0 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineComponent<{}, {
2
- showPopper: typeof showPopper;
3
- $emit: (event: "update:visible", ...args: any[]) => void;
4
- disabled?: boolean | undefined;
5
- visible?: string | boolean | undefined;
6
- $props: {
7
- readonly disabled?: boolean | undefined;
8
- readonly visible?: string | boolean | undefined;
9
- };
10
- }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}>, {
11
- reference?(_: {}): any;
12
- default?(_: {}): any;
13
- }>;
14
- export default _default;
15
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
16
- $scopedSlots: S;
17
- });
@@ -1,49 +0,0 @@
1
- <template>
2
- <div class="more-btn-box">
3
- <el-popover placement="right" popper-class="audio-popover" :disabled="disabled">
4
- <div class="audio-btn-list">
5
- <el-popover placement="right" popper-class="audio-popover">
6
- <div class="audio-btn-list">
7
- <div v-for="(item,index) in multipleArray" :key="index" class="btn-item" :class="speed===item?'active':''" @click="handleSpeed(item)">x {{ item }}</div>
8
- </div>
9
- <div slot="reference" class="btn-item">倍速</div>
10
- </el-popover>
11
- <div class="btn-item" @click="handleDown">下载</div>
12
- </div>
13
- <div slot="reference" class="more-icon">
14
- <i class="iconfont icon-gengduo1 more-btn"/>
15
- </div>
16
- </el-popover>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- export default {
22
- name: 'more-btn',
23
- components: {},
24
- props: {
25
- disabled: {
26
- type: Boolean,
27
- default: false
28
- },
29
- },
30
- data() {
31
- return {
32
- multipleArray: ['1.0', '1.25', '1.5', '1.75', '2.0'],
33
- speed: ''
34
- }
35
- },
36
- mounted() {
37
- },
38
- methods: {
39
- handleDown() {
40
- this.$emit('down')
41
- },
42
- handleSpeed(speed) {
43
- this.speed = speed
44
- this.$emit('speed', speed)
45
- }
46
- }
47
- }
48
-
49
- </script>
@@ -1,54 +0,0 @@
1
- <template>
2
- <div class="nf-volume-tool" :class=" visible ? 'nf-tool-show':'nf-tool-hide'" @click="showPopper" >
3
- <div ref="reference">
4
- <slot name="reference"/>
5
- </div>
6
- <transition name="slide-fade">
7
- <div ref="popperRef" class="nf-popper" v-show="visible" >
8
- <slot/>
9
- </div>
10
- </transition>
11
- </div>
12
- </template>
13
-
14
- <script setup>
15
- import { watch, ref ,onUnmounted} from 'vue-demi'
16
-
17
- const emits = defineEmits(['update:visible'])
18
- const props = defineProps({
19
- visible: [Boolean, String],
20
- disabled: [Boolean],
21
- })
22
- const reference = ref()
23
- const popperRef = ref()
24
-
25
- watch(() => props.visible, ( newValue ) => {
26
- if (newValue) {
27
- window.addEventListener('mousedown',docClick)
28
- }else {
29
- window.removeEventListener('mousedown',docClick)
30
- }
31
- })
32
-
33
- function docClick(e){
34
- //如果点击的是音量 或者 是音量面板 则 不隐藏音量面板
35
- if (popperRef.value.contains(e.target) || reference.value.contains(e.target)){
36
- return
37
- }
38
- emits('update:visible', false)
39
- }
40
-
41
- function showPopper() {
42
- if (!props.disabled) {
43
- emits('update:visible', true)
44
- }
45
- }
46
-
47
- onUnmounted(()=>{
48
- emits('update:visible', false)
49
- })
50
- defineExpose({
51
- showPopper
52
- })
53
- </script>
54
-