diff --git a/node_modules/.vue-global-types/vue_99_0_0_0.d.ts b/node_modules/.vue-global-types/vue_99_0_0_0.d.ts index be6912f..1c73e1f 100644 --- a/node_modules/.vue-global-types/vue_99_0_0_0.d.ts +++ b/node_modules/.vue-global-types/vue_99_0_0_0.d.ts @@ -2,6 +2,7 @@ export {}; ; declare global { + const __VLS_intrinsicElements: __VLS_IntrinsicElements; const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any }; const __VLS_unref: typeof import('vue').unref; const __VLS_placeholder: any; @@ -23,31 +24,10 @@ export {}; N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } : N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } : { [K in N0]: unknown }; - type __VLS_FunctionalComponentCtx = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny - ? K extends { __ctx?: infer Ctx } ? NonNullable : never : any - , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any - >; - type __VLS_FunctionalComponentProps = '__ctx' extends keyof __VLS_PickNotAny - ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never - : T extends (props: infer P, ...args: any) => any ? P - : {}; - type __VLS_FunctionalComponent = (props: (T extends { $props: infer Props } ? Props : {}) & Record, ctx?: any) => __VLS_Element & { - __ctx?: { - attrs?: any, - slots?: T extends { $slots: infer Slots } ? Slots : Record, - emit?: T extends { $emit: infer Emit } ? Emit : {}, - props?: (T extends { $props: infer Props } ? Props : {}) & Record, - expose?: (exposed: T) => void, - } - }; - type __VLS_NormalizeSlotReturns extends (...args: any) => infer K ? K : any> = R extends any[] ? { - [K in keyof R]: R[K] extends infer V - ? V extends Element ? V - : V extends new (...args: any) => infer R ? ReturnType<__VLS_FunctionalComponent> - : V extends (...args: any) => infer R ? R - : any - : never - } : R; + type __VLS_FunctionalComponentProps = + '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never + : T extends (props: infer P, ...args: any) => any ? P : + {}; type __VLS_IsFunction = K extends keyof T ? __VLS_IsAny extends false ? unknown extends T[K] @@ -55,13 +35,13 @@ export {}; : true : false : false; - type __VLS_NormalizeComponentEvent = ( + type __VLS_NormalizeComponentEvent = ( __VLS_IsFunction extends true ? Props - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Emits[Event] } - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Emits[CamelizedEvent] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Events[Event] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Events[CamelizedEvent] } : Props ) & Record; // fix https://github.com/vuejs/language-tools/issues/926 @@ -87,16 +67,11 @@ export {}; } > >; - type __VLS_ResolveEmits< - Comp, - Emits, - TypeEmits = Comp extends { __typeEmits?: infer T } ? unknown extends T ? {} : import('vue').ShortEmitsToObject : {}, - NormalizedEmits = __VLS_NormalizeEmits extends infer E ? string extends keyof E ? {} : E : never, - > = __VLS_SpreadMerge; - type __VLS_ResolveDirectives = { - [K in Exclude & string as `v${Capitalize}`]: T[K]; - }; - type __VLS_PrettifyGlobal = { [K in keyof T as K]: T[K]; } & {}; + type __VLS_PrettifyGlobal = { [K in keyof T]: T[K]; } & {}; + type __VLS_PickFunctionalComponentCtx = NonNullable<__VLS_PickNotAny< + '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: infer Ctx } ? Ctx : never : any + , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any + >>; type __VLS_UseTemplateRef = Readonly>; function __VLS_getVForSourceType>(source: T): [ @@ -112,8 +87,10 @@ export {}; key: keyof T, index: number, ][]; - function __VLS_getSlotParameters(slot: S, decl?: D): - __VLS_PickNotAny, (...args: any) => any> extends (...args: infer P) => any ? P : any[]; + // @ts-ignore + function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>; + // @ts-ignore + function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0]; function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective ? NonNullable : T extends (...args: any) => any @@ -121,10 +98,19 @@ export {}; : (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] }; function __VLS_asFunctionalComponent any ? InstanceType : unknown>(t: T, instance?: K): - T extends new (...args: any) => any ? __VLS_FunctionalComponent + T extends new (...args: any) => any + ? (props: (K extends { $props: infer Props } ? Props : any) & Record, ctx?: any) => __VLS_Element & { + __ctx?: { + attrs?: any; + slots?: K extends { $slots: infer Slots } ? Slots : any; + emit?: K extends { $emit: infer Emit } ? Emit : any; + expose?(exposed: K): void; + props?: (K extends { $props: infer Props } ? Props : any) & Record; + } + } : T extends () => any ? (props: {}, ctx?: any) => ReturnType : T extends (...args: any) => any ? T - : __VLS_FunctionalComponent<{}>; + : (_: {} & Record, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record } }; function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : []; function __VLS_asFunctionalElement(tag: T, endTag?: T): (attrs: T & Record) => void; function __VLS_asFunctionalSlot(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable; diff --git a/pagesA/home/device/status/voice.vue b/pagesA/home/device/status/voice.vue index 5346685..0a0611b 100644 --- a/pagesA/home/device/status/voice.vue +++ b/pagesA/home/device/status/voice.vue @@ -46,12 +46,8 @@ 音频开关 - + @@ -107,15 +103,13 @@ - - + + - + @@ -519,8 +513,8 @@ }); } }, - /* Mqtt回调处理 */ - mqttCallback() { + /* Mqtt回调处理 */ + mqttCallback() { this.$mqttTool.client.on('message', (topic, message, buffer) => { let topics = topic.split('/'); let productId = topics[1]; @@ -867,7 +861,8 @@ vol: parseInt(this.newAudio.vol), tex_utf8: this.newAudio.text, filename: `${newId}_${this.newAudio.name}` - } + }, + interrupt: 99 }; console.log("103#mp3List", JSON.stringify(ttsData)) @@ -993,7 +988,8 @@ weekdays: this.newDefault.repeatDays.map(i => this.weekDays[i]).join(', '), radarEnabled: this.newDefault.radarEnabled, status: '启用', - radarSpeed: this.newDefault.radarEnabled ? `${this.newDefault.minSpeed}-${this.newDefault.maxSpeed}km/h` : '' + radarSpeed: this.newDefault.radarEnabled ? + `${this.newDefault.minSpeed}-${this.newDefault.maxSpeed}km/h` : '' }); } else { data.play_list.push(newPlayItem); @@ -1005,7 +1001,8 @@ weekdays: this.newDefault.repeatDays.map(i => this.weekDays[i]).join(', '), radarEnabled: this.newDefault.radarEnabled, status: '启用', - radarSpeed: this.newDefault.radarEnabled ? `${this.newDefault.minSpeed}-${this.newDefault.maxSpeed}km/h` : '' + radarSpeed: this.newDefault.radarEnabled ? + `${this.newDefault.minSpeed}-${this.newDefault.maxSpeed}km/h` : '' }); } console.log(JSON.stringify(data)) @@ -1102,20 +1099,29 @@ confirmText: '确定', success: async (res) => { if (res.confirm) { - const playListModel = this.deviceInfo.thingsModels.find(model => model.id === '103#playList'); + const playListModel = this.deviceInfo.thingsModels.find(model => model.id === + '103#playList'); if (playListModel) { try { const jsonStr = playListModel.shadow.replace('JSON=', ''); const data = JSON.parse(jsonStr); if (data.play_list) { data.play_list.splice(index, 1); - data.play_list.forEach((item, idx) => { item.play.num = idx + 1; }); + data.play_list.forEach((item, idx) => { + item.play.num = idx + 1; + }); playListModel.shadow = 'JSON=' + JSON.stringify(data); await this.mqttPublish(this.device, playListModel); - uni.showToast({ title: '删除成功', icon: 'success' }); + uni.showToast({ + title: '删除成功', + icon: 'success' + }); } } catch (error) { - uni.showToast({ title: '删除失败', icon: 'none' }); + uni.showToast({ + title: '删除失败', + icon: 'none' + }); } } } @@ -1159,7 +1165,10 @@ } } catch (error) { this.audioEnabled = !this.audioEnabled; - uni.showToast({ title: '操作失败: ' + error.message, icon: 'none' }); + uni.showToast({ + title: '操作失败: ' + error.message, + icon: 'none' + }); } }, handleAudioSwitchChange(e) { @@ -1292,11 +1301,17 @@ data.play_list[index].play.en = value === '启用' ? 1 : 0; playListModel.shadow = 'JSON=' + JSON.stringify(data); await this.mqttPublish(this.device, playListModel); - uni.showToast({ title: '更新成功', icon: 'success' }); + uni.showToast({ + title: '更新成功', + icon: 'success' + }); } } catch (error) { this.defaultList[index].status = value === '启用' ? '禁用' : '启用'; - uni.showToast({ title: '更新失败', icon: 'none' }); + uni.showToast({ + title: '更新失败', + icon: 'none' + }); } } },