Files
sanbuphy 0eba9e87e9 fix(eslint): reduce warnings in GitHub Actions deployment
- Disable formatting rules (handled by Prettier)
- Relaxed strict Vue/JS rules for demo code compatibility
- Fix syntax errors in ApiPlayground and VoiceCloningDemo
- Fix duplicate else-if condition in ApiPlayground
- Fix Promise executor async pattern in AutoregressiveAudioDemo
- Add TypeScript file support to ESLint config

Warnings reduced from 295 to 251 problems.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-18 17:38:10 +08:00

126 lines
2.4 KiB
Vue
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
DeploymentServerDemo.vue
服务器选择精简版
-->
<template>
<div class="deployment-server">
<div class="header">
<span class="icon">🖥</span>
<span class="title">服务器选择</span>
<span class="subtitle">根据客流量选择合适的店面</span>
</div>
<div class="scenarios">
<div
class="scenario"
:class="{ active: scenario === 'personal' }"
@click="scenario = 'personal'"
>
<span class="name">个人博客</span>
<span class="spec">1 1G</span>
<span class="cost">¥50/</span>
</div>
<div
class="scenario"
:class="{ active: scenario === 'small' }"
@click="scenario = 'small'"
>
<span class="name">小型电商</span>
<span class="spec">2 4G</span>
<span class="cost">¥300/</span>
</div>
<div
class="scenario"
:class="{ active: scenario === 'medium' }"
@click="scenario = 'medium'"
>
<span class="name">中型应用</span>
<span class="spec">4 8G</span>
<span class="cost">¥1000/</span>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
const scenario = ref('small')
</script>
<style scoped>
.deployment-server {
border: 1px solid var(--vp-c-divider);
border-radius: 6px;
background: var(--vp-c-bg-soft);
padding: 0.75rem;
margin: 0.5rem 0;
}
.header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.75rem;
}
.header .icon {
font-size: 1.25rem;
}
.header .title {
font-weight: 700;
font-size: 1rem;
color: var(--vp-c-text-1);
}
.header .subtitle {
color: var(--vp-c-text-2);
font-size: 0.85rem;
}
.scenarios {
display: flex;
gap: 0.5rem;
}
.scenario {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
padding: 0.75rem;
background: var(--vp-c-bg);
border: 2px solid var(--vp-c-divider);
border-radius: 6px;
cursor: pointer;
transition: all 0.3s ease;
}
.scenario:hover {
border-color: var(--vp-c-brand-soft);
}
.scenario.active {
border-color: var(--vp-c-brand);
background: var(--vp-c-brand-dimm);
}
.scenario .name {
font-weight: 600;
font-size: 0.85rem;
color: var(--vp-c-text-1);
}
.scenario .spec {
font-size: 0.8rem;
color: var(--vp-c-text-2);
}
.scenario .cost {
font-weight: 700;
color: var(--vp-c-brand);
}
</style>