Skip to content

fix(demos): resolve vue-tsc template scope errors - #8243

Open
zha-ji-tui wants to merge 1 commit into
tusen-ai:mainfrom
zha-ji-tui:fix/demo-typecheck
Open

zha-ji-tui wants to merge 1 commit into
tusen-ai:mainfrom
zha-ji-tui:fix/demo-typecheck

Conversation

@zha-ji-tui

Copy link
Copy Markdown
Contributor

Summary

  • Hoist inline template expressions in src/image/demos/*/component-preview-group.demo.vue and src/avatar/demos/*/lazy.demo.vue into <script setup> constants.
  • Fixes the lint (24) job on main, which fails with TS1005: ":" expected and TS2304: Cannot find name in these demos with the current TypeScript 6 + vue-tsc toolchain.

The same lint failure exists on main (8b24921), so it is unrelated to any feature PR.

Test Plan

  • pnpm run lint passes locally (including lint:code, lint:src-type and lint:demo-type).
  • No user-facing behavior change; demos render the same.

No changelog entry since there is no user-facing change.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.53%. Comparing base (8b24921) to head (ff53176).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8243      +/-   ##
==========================================
- Coverage   63.55%   63.53%   -0.03%     
==========================================
  Files         878      878              
  Lines       27487    27487              
  Branches     8750     8750              
==========================================
- Hits        17469    17463       -6     
- Misses       9803     9809       +6     
  Partials      215      215              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sepush added a commit to Sepush/naive-ui that referenced this pull request Oct 25, 2026
Same change as tusen-ai#8243, so the docs lint job passes.
Sepush added a commit that referenced this pull request Oct 25, 2026
* docs: keep the theme out of the site URL

The theme is the reader's preference, not part of the page, so the site
no longer puts it in the path (/zh-CN/os-theme/...).

- Store the choice in localStorage; by default follow the OS
- Pick light, dark or follow-system from a menu in the header
- Apply the theme before the first paint so a reload doesn't flash
- Sync the theme across open tabs
- Redirect old /:lang/(light|dark|os-theme)/... links to /:lang/...

* docs: set only color-scheme before the first paint

Write the inline script in current syntax and drop the hard-coded dark
background: color-scheme alone gives the page a dark canvas until the
styles load.

* docs: move the site theme into a useColorMode composable

Shaped after VueUse's useColorMode: mode is light, dark or auto (follow
the OS), state is the theme in effect. It stores only an explicit pick,
syncs across tabs, keeps color-scheme on <html> in step, and turns
transitions off while the colors change so the page switches in one step.

* fix(demos): resolve vue-tsc template scope errors

Same change as #8243, so the docs lint job passes.

This branch was previously deployed

1 inactive deployment
test — ff53176e Deployed Oct 22, 2026 by zha-ji-tui via test (24) #11261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants