wui-components-v2 1.1.38 → 1.1.40

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.
@@ -1,4 +1,4 @@
1
- <script setup>
1
+ <script setup lang="ts">
2
2
  import { computed, defineEmits, defineExpose, defineOptions, defineProps, ref, watch } from 'vue'
3
3
  import { useManualTheme } from '../../composables/useManualTheme'
4
4
 
@@ -17,7 +17,7 @@ const props = defineProps({
17
17
  })
18
18
  const emit = defineEmits(['play', 'pause'])
19
19
  const { primary } = useManualTheme()
20
- const innerAudioContext = ref(null)
20
+ const innerAudioContext = ref<UniApp.InnerAudioContext | null>(null)
21
21
  const isPlaying = ref(false)
22
22
  const currentTime = ref(0)
23
23
  const duration = ref(0)
@@ -28,7 +28,7 @@ const progressPercent = computed(() => {
28
28
  })
29
29
 
30
30
  // 格式化时间显示
31
- function formatTime(seconds) {
31
+ function formatTime(seconds:any) {
32
32
  if (Number.isNaN(seconds))
33
33
  return '00:00'
34
34
  const mins = Math.floor(seconds / 60)
@@ -53,8 +53,8 @@ function initAudio() {
53
53
  })
54
54
 
55
55
  innerAudioContext.value.onTimeUpdate(() => {
56
- currentTime.value = innerAudioContext.value.currentTime
57
- duration.value = innerAudioContext.value.duration
56
+ currentTime.value = innerAudioContext.value?.currentTime||0
57
+ duration.value = innerAudioContext.value?.duration||0
58
58
  })
59
59
 
60
60
  innerAudioContext.value.onError((err) => {
@@ -73,7 +73,7 @@ function initAudio() {
73
73
  function play() {
74
74
  if (!innerAudioContext.value)
75
75
  initAudio()
76
- innerAudioContext.value.play()
76
+ innerAudioContext.value?.play()
77
77
  }
78
78
 
79
79
  function pause() {
@@ -4,7 +4,7 @@ import type { Columns, Entities } from '../../type'
4
4
  import { downloadFile, formatItemData } from '../../utils'
5
5
  import ControlTypeSupportor from '../../utils/control-type-supportor'
6
6
  import VideoPlay from '../video-play/video-play.vue'
7
- import AudioPlay from '../audio-play/audio-play.vue'
7
+ import audioPlay from '../audio-play/audio-play.vue'
8
8
  import { useManualTheme } from '../../composables/useManualTheme'
9
9
  import openValueMore from './open-value-more.vue'
10
10
 
@@ -74,7 +74,7 @@ function isControlType(item: Columns): string {
74
74
  v-else-if="['mp3', 'wma', 'wav', 'aac', 'ogg', 'flac', 'm4a', 'amr'].includes(uitem.type)"
75
75
  style="display: flex;align-items: center;justify-content: center;"
76
76
  >
77
- <AudioPlay :src="uitem.url" />
77
+ <audioPlay :src="uitem.url" />
78
78
  </view>
79
79
  <!-- 文件 -->
80
80
  <view v-else-if="['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt', 'zip', 'rar', '7z', 'gz', 'bz2', 'tar', 'iso', 'exe', 'dmg', 'apk', 'apk', 'apk', 'apk', 'apk', 'apk', 'apk', 'apk'].includes(uitem.type)">
@@ -4,7 +4,7 @@ import { useEnums } from '../../composables/useEnumes'
4
4
  import type { Config, Entities, Enums } from '../../type'
5
5
  import {pageConfig } from '../../api/page'
6
6
  defineOptions({
7
- name: 'EnumeSelectControl',
7
+ name: 'WuiEnumeSelectControl',
8
8
  })
9
9
 
10
10
  const props = defineProps<{
package/index.ts CHANGED
@@ -26,7 +26,7 @@ import WuiUser from './components/wui-user/wui-user.vue'
26
26
  import WuiAutoUpdateComponent from './components/wui-auto-update-component/wui-auto-update-component.vue'
27
27
  import iData from './utils/idata-scan'// PAD扫描
28
28
  import wuiSearchHistoryBabbar from './components/wui-search-history-babbar/wui-search-history-babbar.vue'
29
- import enumeSelectControl from './components/enume-select-control/enume-select-control.vue'
29
+ import wuienumeSelectControl from './components/wui-enume-select-control/wui-enume-select-control.vue'
30
30
  // 组件列表
31
31
  const coms: Array<{ name: string }> = [
32
32
  WuiSystemSettings,
@@ -45,6 +45,7 @@ const coms: Array<{ name: string }> = [
45
45
  Wuilogin1,
46
46
  WuiMenus1,
47
47
  wuiSearchHistoryBabbar,
48
+ wuienumeSelectControl
48
49
  ]
49
50
 
50
51
  /**
@@ -73,7 +74,7 @@ export {
73
74
  iData, // PAD扫描
74
75
  // nfc, // nfc读取
75
76
  useLanguageStore, // 语言
76
- enumeSelectControl,// 枚举选择
77
+
77
78
  }
78
79
 
79
80
  export default install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",