mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 08:33:53 +08:00
update: mobile 编辑源和语速音调页面样式调整
This commit is contained in:
@@ -15,5 +15,7 @@ export default store
|
||||
|
||||
export * from './config'
|
||||
export * from './plugin'
|
||||
export * from './provider'
|
||||
export * from './speedPitch'
|
||||
// 模块统一导出
|
||||
export * from './user'
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import type { Providers } from '@/api/agent/types'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useProvider = defineStore('provider', () => {
|
||||
const providers = ref<Providers[]>([])
|
||||
|
||||
const updateProviders = (val: Providers[]) => {
|
||||
providers.value = val
|
||||
}
|
||||
|
||||
return {
|
||||
providers,
|
||||
updateProviders,
|
||||
}
|
||||
}, {
|
||||
persist: {
|
||||
key: 'providers',
|
||||
serializer: {
|
||||
serialize: state => JSON.stringify(state.providers),
|
||||
deserialize: value => ({ providers: JSON.parse(value) }),
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,26 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useSpeedPitch = defineStore('speedPitch', () => {
|
||||
const speedPitch = ref({
|
||||
ttsVolume: 0,
|
||||
ttsRate: 0,
|
||||
ttsPitch: 0,
|
||||
})
|
||||
|
||||
const updateSpeedPitch = (val: typeof speedPitch.value) => {
|
||||
speedPitch.value = val
|
||||
}
|
||||
|
||||
return {
|
||||
speedPitch,
|
||||
updateSpeedPitch,
|
||||
}
|
||||
}, {
|
||||
persist: {
|
||||
key: 'speedPitch',
|
||||
serializer: {
|
||||
serialize: state => JSON.stringify(state.speedPitch),
|
||||
deserialize: value => ({ speedPitch: JSON.parse(value) }),
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user