mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
add alert
This commit is contained in:
@@ -4,7 +4,7 @@ import { FunctionTypes, ScheduleWeekInfo, SongFrom, SongLanguage, SongRequestOpt
|
|||||||
import DynamicForm from '@/components/DynamicForm.vue'
|
import DynamicForm from '@/components/DynamicForm.vue'
|
||||||
import { TemplateConfig } from '@/data/VTsuruTypes'
|
import { TemplateConfig } from '@/data/VTsuruTypes'
|
||||||
import { FETCH_API, IndexTemplateMap, ScheduleTemplateMap, SongListTemplateMap } from '@/data/constants'
|
import { FETCH_API, IndexTemplateMap, ScheduleTemplateMap, SongListTemplateMap } from '@/data/constants'
|
||||||
import { NButton, NCard, NCheckbox, NCheckboxGroup, NDivider, NEmpty, NList, NListItem, NModal, NSelect, NSpace, NSpin, NTabPane, NTabs, NText, SelectOption, useMessage } from 'naive-ui'
|
import { NAlert, NButton, NCard, NCheckbox, NCheckboxGroup, NDivider, NEmpty, NList, NListItem, NModal, NSelect, NSpace, NSpin, NTabPane, NTabs, NText, SelectOption, useMessage } from 'naive-ui'
|
||||||
import { computed, h, nextTick, onActivated, onMounted, ref } from 'vue'
|
import { computed, h, nextTick, onActivated, onMounted, ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
@@ -373,6 +373,10 @@ onMounted(async () => {
|
|||||||
<NEmpty v-else />
|
<NEmpty v-else />
|
||||||
</NTabPane>
|
</NTabPane>
|
||||||
<NTabPane tab="模板" name="template">
|
<NTabPane tab="模板" name="template">
|
||||||
|
<NAlert type="success">
|
||||||
|
如果有合适的设计稿或者想法可以给我说然后做成模板捏
|
||||||
|
</NAlert>
|
||||||
|
<br/>
|
||||||
<NSpace vertical>
|
<NSpace vertical>
|
||||||
<NSpace align="center"> 页面 <NSelect :options="templateOptions" v-model:value="selectedOption" style="width: 150px" /> </NSpace>
|
<NSpace align="center"> 页面 <NSelect :options="templateOptions" v-model:value="selectedOption" style="width: 150px" /> </NSpace>
|
||||||
<NDivider style="margin: 5px 0 5px 0" title-placement="left"> 模板 </NDivider>
|
<NDivider style="margin: 5px 0 5px 0" title-placement="left"> 模板 </NDivider>
|
||||||
|
|||||||
@@ -276,6 +276,9 @@ function speakFromAPI(text: string) {
|
|||||||
.replace(/^(?:https?:\/\/)/, '')
|
.replace(/^(?:https?:\/\/)/, '')
|
||||||
.replace(/\{\{\s*text\s*\}\}/, encodeURIComponent(text))}`
|
.replace(/\{\{\s*text\s*\}\}/, encodeURIComponent(text))}`
|
||||||
const tempURL = new URL(url)
|
const tempURL = new URL(url)
|
||||||
|
if (isVtsuruVoiceAPI.value) {
|
||||||
|
tempURL.searchParams.set('vtsuruId', accountInfo.value?.id.toString() ?? '-1')
|
||||||
|
}
|
||||||
if (isVtsuruVoiceAPI.value && splitter.countGraphemes(tempURL.searchParams.get('text') ?? '') > 50) {
|
if (isVtsuruVoiceAPI.value && splitter.countGraphemes(tempURL.searchParams.get('text') ?? '') > 50) {
|
||||||
message.error('本站提供的测试接口字数不允许超过 100 字. 内容: [' + tempURL.searchParams.get('text') + ']')
|
message.error('本站提供的测试接口字数不允许超过 100 字. 内容: [' + tempURL.searchParams.get('text') + ']')
|
||||||
cancelSpeech()
|
cancelSpeech()
|
||||||
|
|||||||
Reference in New Issue
Block a user