feat: update documentation and component demos for backend layered architecture

- Add new LanguageScopeDemo component for backend languages overview
- Refactor and simplify existing demo components (ControllerLayerDemo, DtoFlowDemo, DependencyDirectionDemo)
- Update .gitignore to exclude .claude/skills directory
- Modify backend-related sections in documentation from "后端与全栈" to "后端开发"
- Add new backend layered architecture demo components (CleanArchitectureDemo, DependencyDirectionDemo)
- Improve documentation structure and content for stage-3 core skills
- Fix component initialization timing in CompileVsInterpretDemo and RateLimiterDemo
- Add design style prompt reference in frontend documentation
This commit is contained in:
sanbuphy
2026-03-01 12:28:47 +08:00
parent d8eb93663d
commit dc8b5773f1
22 changed files with 2660 additions and 5288 deletions
@@ -65,7 +65,7 @@
</template>
<script setup>
import { ref, computed } from 'vue'
import { ref, computed, onMounted, onUnmounted } from 'vue'
const algo = ref('token')
const totalSent = ref(0)
@@ -105,9 +105,19 @@ function reset() {
recentRequests.value = []
windowRequests.value = []
if (tokenInterval) clearInterval(tokenInterval)
startTokenRefill()
// 只在令牌桶模式下启动补充
if (algo.value === 'token') startTokenRefill()
}
onMounted(() => {
// 组件挂载后启动令牌补充,避免模块加载时启动定时器导致 build 卡住
startTokenRefill()
})
onUnmounted(() => {
if (tokenInterval) clearInterval(tokenInterval)
})
function checkLimit() {
if (algo.value === 'token') {
if (tokens.value > 0) { tokens.value--; return true }
@@ -156,8 +166,6 @@ async function sendBurst() {
await new Promise(r => setTimeout(r, 100))
}
}
startTokenRefill()
</script>
<style scoped>