声卡修复合成音频打断等级
This commit is contained in:
parent
1df3f221e1
commit
09bf74a7d4
74
node_modules/.vue-global-types/vue_99_0_0_0.d.ts
generated
vendored
74
node_modules/.vue-global-types/vue_99_0_0_0.d.ts
generated
vendored
@ -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<T, K> = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}>
|
||||
? K extends { __ctx?: infer Ctx } ? NonNullable<Ctx> : never : any
|
||||
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
||||
>;
|
||||
type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}>
|
||||
? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
||||
: T extends (props: infer P, ...args: any) => any ? P
|
||||
: {};
|
||||
type __VLS_FunctionalComponent<T> = (props: (T extends { $props: infer Props } ? Props : {}) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
||||
__ctx?: {
|
||||
attrs?: any,
|
||||
slots?: T extends { $slots: infer Slots } ? Slots : Record<string, any>,
|
||||
emit?: T extends { $emit: infer Emit } ? Emit : {},
|
||||
props?: (T extends { $props: infer Props } ? Props : {}) & Record<string, unknown>,
|
||||
expose?: (exposed: T) => void,
|
||||
}
|
||||
};
|
||||
type __VLS_NormalizeSlotReturns<S, R = NonNullable<S> 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<R>>
|
||||
: V extends (...args: any) => infer R ? R
|
||||
: any
|
||||
: never
|
||||
} : R;
|
||||
type __VLS_FunctionalComponentProps<T, K> =
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
||||
: T extends (props: infer P, ...args: any) => any ? P :
|
||||
{};
|
||||
type __VLS_IsFunction<T, K> = K extends keyof T
|
||||
? __VLS_IsAny<T[K]> extends false
|
||||
? unknown extends T[K]
|
||||
@ -55,13 +35,13 @@ export {};
|
||||
: true
|
||||
: false
|
||||
: false;
|
||||
type __VLS_NormalizeComponentEvent<Props, Emits, onEvent extends keyof Props, Event extends keyof Emits, CamelizedEvent extends keyof Emits> = (
|
||||
type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
|
||||
__VLS_IsFunction<Props, onEvent> extends true
|
||||
? Props
|
||||
: __VLS_IsFunction<Emits, Event> extends true
|
||||
? { [K in onEvent]?: Emits[Event] }
|
||||
: __VLS_IsFunction<Emits, CamelizedEvent> extends true
|
||||
? { [K in onEvent]?: Emits[CamelizedEvent] }
|
||||
: __VLS_IsFunction<Events, Event> extends true
|
||||
? { [K in onEvent]?: Events[Event] }
|
||||
: __VLS_IsFunction<Events, CamelizedEvent> extends true
|
||||
? { [K in onEvent]?: Events[CamelizedEvent] }
|
||||
: Props
|
||||
) & Record<string, unknown>;
|
||||
// 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<T> : {},
|
||||
NormalizedEmits = __VLS_NormalizeEmits<Emits> extends infer E ? string extends keyof E ? {} : E : never,
|
||||
> = __VLS_SpreadMerge<NormalizedEmits, TypeEmits>;
|
||||
type __VLS_ResolveDirectives<T> = {
|
||||
[K in Exclude<keyof T, keyof __VLS_GlobalDirectives> & string as `v${Capitalize<K>}`]: T[K];
|
||||
};
|
||||
type __VLS_PrettifyGlobal<T> = { [K in keyof T as K]: T[K]; } & {};
|
||||
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
|
||||
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
|
||||
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
||||
>>;
|
||||
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
||||
|
||||
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
|
||||
@ -112,8 +87,10 @@ export {};
|
||||
key: keyof T,
|
||||
index: number,
|
||||
][];
|
||||
function __VLS_getSlotParameters<S, D extends S>(slot: S, decl?: D):
|
||||
__VLS_PickNotAny<NonNullable<D>, (...args: any) => any> extends (...args: infer P) => any ? P : any[];
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
||||
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
|
||||
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
||||
: T extends (...args: any) => any
|
||||
@ -121,10 +98,19 @@ export {};
|
||||
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
||||
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
||||
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
||||
T extends new (...args: any) => any ? __VLS_FunctionalComponent<K>
|
||||
T extends new (...args: any) => any
|
||||
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, 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<string, unknown>;
|
||||
}
|
||||
}
|
||||
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
||||
: T extends (...args: any) => any ? T
|
||||
: __VLS_FunctionalComponent<{}>;
|
||||
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
||||
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
||||
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
|
||||
function __VLS_asFunctionalSlot<S>(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable<S>;
|
||||
|
@ -46,12 +46,8 @@
|
||||
<!-- 音频开关 -->
|
||||
<view class="audio-switch">
|
||||
<text>音频开关</text>
|
||||
<switch
|
||||
:checked="audioEnabled"
|
||||
@change="handleAudioSwitchChange($event)"
|
||||
:disabled="device.status !== 3"
|
||||
color="#2979ff"
|
||||
/>
|
||||
<switch :checked="audioEnabled" @change="handleAudioSwitchChange($event)"
|
||||
:disabled="device.status !== 3" color="#2979ff" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -107,15 +103,13 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="audio-actions">
|
||||
<switch
|
||||
:checked="item.status === '启用'"
|
||||
@change="handleNativeSwitchChange($event, index)"
|
||||
:disabled="device.status !== 3"
|
||||
color="#2979ff"
|
||||
/>
|
||||
<u-icon name="edit-pen" size="18" color="#2979ff" v-if="device.status === 3" @click="editDefault(index)"></u-icon>
|
||||
<switch :checked="item.status === '启用'" @change="handleNativeSwitchChange($event, index)"
|
||||
:disabled="device.status !== 3" color="#2979ff" />
|
||||
<u-icon name="edit-pen" size="18" color="#2979ff" v-if="device.status === 3"
|
||||
@click="editDefault(index)"></u-icon>
|
||||
<u-icon name="edit-pen" size="18" color="#ccc" v-else></u-icon>
|
||||
<u-icon name="trash" size="18" color="#ff4d4f" v-if="device.status === 3" @click="deleteDefault(index)"></u-icon>
|
||||
<u-icon name="trash" size="18" color="#ff4d4f" v-if="device.status === 3"
|
||||
@click="deleteDefault(index)"></u-icon>
|
||||
<u-icon name="trash" size="18" color="#ccc" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
@ -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'
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user