Skip to content

Conversation

@discreted66
Copy link
Collaborator

@discreted66 discreted66 commented Sep 23, 2025

PR

feat:添加缺省页pc模板、文档示例以及暗色模式支持

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • New Features

    • Exception component adds PC variant, new PC demos (basic usage, component/page demos, sub-message, button examples, slots) and a menu entry.
  • Documentation

    • Added PC documentation and demo metadata for Exception.
  • Style

    • New Exception styles and theme variables integrated into global theme.
  • Localization

    • Updated “no data” message in EN, ES‑LA, PT‑BR, and ZH‑CN.
  • Bug Fixes

    • Fixed theme import typo so styles load correctly.

@coderabbitai
Copy link

coderabbitai bot commented Sep 23, 2025

Walkthrough

Added PC-mode Exception component and PC demos, updated API metadata and demos for both pc and mobile-first, introduced IType, added theme styles and vars, included exception styles in Vue build, adjusted i18n strings, added docs/menu entry, and fixed a dark-theme import typo.

Changes

Cohort / File(s) Summary
API metadata updates
examples/sites/demos/apis/exception.js
Expanded top-level mode to ['pc','mobile-first']; updated props/slots modes, demo ids (mfDemo/pcDemo), renamed default slot to icon, and added exported public type IType. Updated descriptions.
PC demos — basic usage & variants
examples/sites/demos/pc/app/exception/basic-usage.vue, .../basic-usage-composition-api.vue, .../button-text.vue, .../button-text-composition-api.vue, .../sub-message.vue, .../sub-message-composition-api.vue, .../page-empty.vue, .../page-empty-composition-api.vue, .../slot.vue, .../slot-composition-api.vue
Added multiple PC demo SFCs demonstrating TinyException usage: basic, sub-message, page-empty, custom button behavior, and named slots (icon/content).
PC demos — component/page integration
examples/sites/demos/pc/app/exception/component-page.vue, .../component-page-composition-api.vue
Added demos showing TinyException as TinyGrid empty-state and inside TinySplit panes (component-page scenarios).
PC docs and navigation
examples/sites/demos/pc/app/exception/webdoc/exception.js, .../webdoc/exception.cn.md, .../webdoc/exception.en.md, examples/sites/demos/pc/menus.js
Added PC webdoc config and markdown pages; inserted "Exception" into Feedback menu.
Mobile-first doc tweak
examples/sites/demos/mobile-first/app/exception/webdoc/exception.js
Renamed demo entry component-emptycomponent-page, updated codeFiles and localized descriptions.
Theme additions and fix
packages/theme/src/exception/index.less, packages/theme/src/exception/vars.less, packages/theme/src/index.less, packages/theme/src/dark-theme-index.less
Added Exception styles and vars; imported exception styles into theme index; fixed stray '-' in dark-theme import.
Locale string updates
packages/vue-locale/src/lang/en.ts, .../es-LA.ts, .../pt-BR.ts, .../zh-CN.ts
Updated exception.nodata localized strings in EN/ES-LA/PT-BR/ZH-CN.
Vue component and wiring
packages/vue/src/exception/src/pc.vue, packages/vue/src/exception/src/index.ts, packages/vue/src/exception/index.ts
Added PC pc.vue SFC implementation; changed virtual-template import to resolve `pc

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Demo as Demo App
  participant Exception as TinyException (pc.vue)
  participant Button as TinyButton
  participant Modal as TinyModal

  Demo->>Exception: render(props {type, subMessage, ...})
  Note right of Exception: select icon/text from constants\nrender icon/content/footer slots
  Demo->>Button: place primary action in slot
  Button->>Modal: onClick -> Modal.message(...)
  Modal-->>Demo: show notification
Loading
sequenceDiagram
  autonumber
  participant Consumer as Consumer Importer
  participant Entry as exception/src/index.ts
  participant VT as virtual-template
  participant PC as pc.vue
  participant MF as mobile-first template

  Consumer->>Entry: import Exception
  Entry->>VT: resolve "pc|mobile-first"
  alt PC template selected
    VT-->>PC: load pc.vue
  else mobile-first selected
    VT-->>MF: load mobile-first template
  end
  Note right of Entry: styles imported via @opentiny/vue-theme/exception/index.less
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

小兔跳入异常间,轻嗅空表单的闲。
新插槽、旧文案换,PC 与手机并肩看。
LESS 与 vars 并排栽,示例齐备歌一曲。 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat(exception): Add pc templates, document examples, and dark mode support" accurately summarizes the main changes in the PR—adding PC templates and demo/documentation examples for the Exception component and updating theme/dark-mode assets—and uses a conventional commit prefix to indicate intent. It is concise, specific to the changeset, and directly related to the added/modified files. The only minor issue is an extra space before "pc", but it does not obscure the meaning.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the enhancement New feature or request (功能增强) label Sep 23, 2025
@discreted66 discreted66 force-pushed the lk-09232 branch 2 times, most recently from 38cc04e to ac8e734 Compare September 23, 2025 12:41
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (15)
examples/sites/demos/pc/app/exception/button-text-composition-api.vue (1)

3-3: Prefer a descriptive handler name over test

Renaming clarifies intent and avoids potential confusion with testing globals.

Apply:

-    <tiny-button type="primary" @click="test">自定义按钮</tiny-button>
+    <tiny-button type="primary" @click="handleClick">自定义按钮</tiny-button>
@@
-const test = () => {
+const handleClick = () => {
   TinyModal.message({ status: 'info', message: '自定义按钮被点击' })
 }

Also applies to: 10-12

packages/theme/src/exception/vars.less (1)

8-9: Fix mislabeled comment (“一级标题” -> “二级标题”).

Comment does not match the variable it describes.

Apply:

-  // 一级标题字体大小
+  // 二级标题字体大小
examples/sites/demos/pc/app/exception/webdoc/exception.js (3)

60-70: Correct wrong English description for “button-text” demo and improve name.

Current en-US desc is a copy of “sub-message.” Suggest clearer text and name.

Apply:

-      name: {
-        'zh-CN': '自定义按钮文本',
-        'en-US': 'button-text'
-      },
+      name: {
+        'zh-CN': '自定义按钮文本',
+        'en-US': 'Custom Button Text'
+      },
       desc: {
-        'zh-CN': '<p>已去除`button-text`自定义按钮文本,直接可以通过插槽自定义</p>',
-        'en-US': '<p>Customizing Level-2 Titles Using `sub-message`</p>'
+        'zh-CN': '<p>已移除 `button-text` 属性,可通过插槽自定义按钮内容</p>',
+        'en-US': '<p>The `button-text` prop has been removed. Customize button content via slots.</p>'
       },

20-31: Polish English copy for page exception description (optional).

Minor clarity/tone improvements.

Apply:

-        'en-US':
-          '<p>The page exception is displayed by adding the `page-empty` attribute. The type types include `pagenoperm`, `pageweaknet`, `pagenothing`, and `pageservererror`.<br>Scenario:<br>`pagenoperm`: no access permission<br>`pageweaknet`: network exception<br>`pagenothing`: The page you access does not exist<br>`pageservererror`: The server is abnormal</p>'
+        'en-US':
+          '<p>Display a page-level exception via the `page-empty` attribute. Supported types: `pagenoperm` (no access), `pageweaknet` (network error), `pagenothing` (page not found), `pageservererror` (server error).</p>'

34-46: Polish English copy for component exception description (optional).

Improve phrasing; keep meanings intact.

Apply:

-        'en-US':
-          '<p>Add the `component-empty` attribute to display the component exception. The type type can be `noperm`, `nodata`, `weaknet`, `noresult`, or `nonews`<br>The corresponding scenario is as follows: <br>`noperm`: No access<br>`nodata`: no data<br>`weaknet`: network is not powerful<br>`noresult`: no related search results<br>`nonews`: no latest news<br></p>'
+        'en-US':
+          '<p>Display a component-level exception via the `component-empty` attribute. Types: `noperm` (no access), `nodata` (no data), `weaknet` (poor network), `noresult` (no search results), `nonews` (no latest news).</p>'
packages/theme/src/exception/index.less (3)

61-68: BEM naming: verify element vs modifier for “component-page”.

Class is __component-page (element). If this is a state modifier, consider --component-page for consistency, or ensure the template adds tiny-exception__component-page.

Optionally align selector to prefix vars for consistency:

-  &__component-page {
-    .tiny-exception__image svg {
+  &__component-page {
+    .@{exception-prefix-cls}__image .@{svg-prefix-cls} {
       width: 96px;
       height: 96px;
     }
   }

29-33: Selector consistency (optional).

Inside &__image you target .tiny-svg, but in the component-page block you target raw svg. Prefer consistent targeting.


35-47: Tokenize line-height (optional).

Consider using a var for the 30px line-height to match theming patterns.

packages/vue/src/exception/src/index.ts (1)

7-25: Docs/demos reference component-empty but the prop is componentPage (component-page) — align names or add an alias.

component-empty appears in webdoc/demo IDs and filenames (examples/sites/demos/.../webdoc/exception.js, component-empty.vue) while the component defines prop componentPage (packages/vue/src/exception/src/index.ts) and templates use component-page. Update docs/examples to use component-page/componentPage or add a backward-compatible alias prop (componentEmpty / component-empty) that maps to componentPage.

examples/sites/demos/pc/app/exception/component-empty.vue (1)

52-54: Remove unused CSS or apply it to panes.

.demo-split-pane isn’t used. Either remove the styles or wrap pane content to use them.

Example applying the class:

       <template #left>
-        <tiny-exception component-page type="nodata"></tiny-exception>
+        <div class="demo-split-pane">
+          <tiny-exception component-page type="nodata"></tiny-exception>
+        </div>
       </template>
       <template #right>
-        <tiny-exception component-page type="nodata"></tiny-exception>
+        <div class="demo-split-pane">
+          <tiny-exception component-page type="nodata"></tiny-exception>
+        </div>
       </template>
examples/sites/demos/pc/app/exception/webdoc/exception.cn.md (1)

5-5: Enrich doc with a brief intro and version note.

Add a short description and “since” info to align with menu metadata.

 # Exception 缺省页
+
+用于在页面或组件无数据、无权限或错误等状态下展示统一的缺省信息与引导操作。
+
+自 3.27.0 起提供。
examples/sites/demos/pc/app/exception/webdoc/exception.en.md (1)

5-5: Add a short description and “since” note.

Keep consistency with Chinese doc and menus metadata.

 # Exception
+
+Use standardized empty/exception pages to indicate no data, no permission, or server errors, with optional guidance actions.
+
+Available since 3.27.0.
examples/sites/demos/pc/app/exception/component-empty-composition-api.vue (1)

34-39: Use theme token instead of hard-coded border color (dark mode).

#d9d9d9 may not adapt to dark mode. Prefer a design token/var from the Tiny theme (e.g., a common border/divider color).

Example (adjust token to your theme variable naming):

 .demo-split {
   height: 200px;
-  border: 1px solid #d9d9d9;
+  border: 1px solid var(--ti-common-color-border, #d9d9d9);
   margin-bottom: 20px;
 }
packages/vue/src/exception/src/pc.vue (2)

6-6: Dynamic icon resolution via string names is brittle; prefer component refs.

Using strings from ICONCONFIG relies on name resolution. Mapping directly to imported component objects is safer.

-  ICONCONFIG: {
-    NODATA: 'icon-no-data',
-    NOPERM: 'icon-no-perm',
-    NONEWS: 'icon-no-news',
-    WEAKNET: 'icon-weaknet',
-    NORESULT: 'icon-no-result',
-    PAGENOPERM: 'icon-page-noperm',
-    PAGENOTHING: 'icon-page-nothing',
-    PAGESERVERERROR: 'icon-page-servererror',
-    PAGEWEAKNET: 'icon-page-weaknet'
-  }
+  ICONCONFIG: {
+    NODATA: iconNoData(),
+    NOPERM: iconNoPerm(),
+    NONEWS: iconNoNews(),
+    WEAKNET: iconWeaknet(),
+    NORESULT: iconNoResult(),
+    PAGENOPERM: iconPageNoperm(),
+    PAGENOTHING: iconPageNothing(),
+    PAGESERVERERROR: iconPageServererror(),
+    PAGEWEAKNET: iconPageWeaknet()
+  }

And in the template:

-          <component :is="_constants.ICONCONFIG[type.toUpperCase()]" v-if="state.urlType" />
+          <component :is="_constants.ICONCONFIG[type.toUpperCase()]" v-if="state.urlType" />

(No template change needed beyond the map; included for clarity.)


29-30: Remove unused TinyButton registration or wire up click emit.

TinyButton is imported/registered but unused. Either remove it or provide a default action that emits click.

-import Button from '@opentiny/vue-button'
+// import Button from '@opentiny/vue-button'
...
-    TinyButton: Button,
+    // TinyButton: Button,

Alternatively, forward root clicks:

-  emits: ['click'],
+  emits: ['click'],
...
-  <div class="tiny-exception" :class="exceptionClass">
+  <div class="tiny-exception" :class="exceptionClass" @click="$emit('click')">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e725414 and d1a5523.

⛔ Files ignored due to path filters (9)
  • packages/theme/src/svgs/no-data.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/no-news.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/no-perm.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/no-result.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-noperm.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-nothing.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-servererror.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-weaknet.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/weaknet.svg is excluded by !**/*.svg
📒 Files selected for processing (28)
  • examples/sites/demos/apis/exception.js (5 hunks)
  • examples/sites/demos/pc/app/exception/basic-usage-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/basic-usage.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/button-text-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/button-text.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/component-empty-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/component-empty.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/page-empty-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/page-empty.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/slot-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/slot.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/sub-message-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/sub-message.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/webdoc/exception.cn.md (1 hunks)
  • examples/sites/demos/pc/app/exception/webdoc/exception.en.md (1 hunks)
  • examples/sites/demos/pc/app/exception/webdoc/exception.js (1 hunks)
  • examples/sites/demos/pc/menus.js (1 hunks)
  • packages/theme/src/dark-theme-index.less (1 hunks)
  • packages/theme/src/exception/index.less (1 hunks)
  • packages/theme/src/exception/vars.less (1 hunks)
  • packages/theme/src/index.less (1 hunks)
  • packages/vue-locale/src/lang/en.ts (1 hunks)
  • packages/vue-locale/src/lang/es-LA.ts (1 hunks)
  • packages/vue-locale/src/lang/pt-BR.ts (1 hunks)
  • packages/vue-locale/src/lang/zh-CN.ts (1 hunks)
  • packages/vue/src/exception/index.ts (1 hunks)
  • packages/vue/src/exception/src/index.ts (1 hunks)
  • packages/vue/src/exception/src/pc.vue (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (24)
examples/sites/demos/pc/app/exception/button-text-composition-api.vue (2)

1-5: LGTM — clean, minimal demo

Composition API usage and auto-registered components look correct.


2-2: Confirmed: type="pagenoperm" is valid — PAGENOPERM is defined in packages/vue/src/exception/src/pc.vue and mobile-first.vue, locale keys exist (en/zh-CN/es-LA/pt-BR), page-noperm SVGs are present, and examples use it.

packages/vue-locale/src/lang/en.ts (1)

268-268: LGTM — “No data available.” aligns with other en no-data strings

Consistent with cascader/grid “No data available.”.

packages/vue-locale/src/lang/es-LA.ts (1)

268-268: LGTM — “No hay datos disponibles.”

Matches other es-LA no-data strings in this file.

packages/vue-locale/src/lang/pt-BR.ts (1)

268-268: LGTM — “Não há dados disponíveis.”

Consistent with pt-BR usage elsewhere.

packages/vue-locale/src/lang/zh-CN.ts (1)

268-268: LGTM — 文案“暂无数据”与本文件其它无数据提示保持一致
与 buttonGroup/grid 等处“暂无数据”一致,语义更明确。为避免旧文案残留,请在仓库中查找并替换旧的“休息一下”/“Get some rest”等多语言表述(示例:rg -n -S -i '休息一下|Get some rest|Descansa un poco|Descanse um pouco')。

packages/theme/src/dark-theme-index.less (1)

1-1: LGTM

Import fixed; no issues.

examples/sites/demos/pc/app/exception/page-empty-composition-api.vue (1)

1-7: LGTM

Demo wiring with <script setup> is correct; props map (page-empty/sub-message) align with component.

examples/sites/demos/pc/app/exception/page-empty.vue (1)

1-13: LGTM

Local registration matches template usage; content mirrors composition-API demo.

examples/sites/demos/pc/app/exception/webdoc/exception.js (1)

2-2: Verify type of column.

Config often uses a number (2) vs string ('2'). Confirm the expected type for the docs site.

packages/theme/src/exception/index.less (1)

8-18: LGTM on structure and var injection.

Layout, var usage, and spacing look solid.

packages/theme/src/index.less (1)

57-57: LGTM

Importing exception styles into the theme index is correct.

packages/vue/src/exception/src/index.ts (1)

2-2: virtual-template union supported; pc.vue present
The unplugin parses the query by '|' and emits imports for ./.vue (dev and build paths handle it); packages/vue/src/exception/src/pc.vue exists.

examples/sites/demos/pc/menus.js (1)

286-293: Version metadata added — verify final version before release.

The meta.stable: '3.27.0' addresses the earlier request to include version info. Please confirm it matches the actual release tag.

examples/sites/demos/pc/app/exception/sub-message.vue (1)

1-12: LGTM — clear demo of sub-message usage.

packages/vue/src/exception/index.ts (1)

14-14: LGTM — theme side‑effect import wired.

Style import aligns the component with the new theme entry.

examples/sites/demos/pc/app/exception/basic-usage.vue (1)

1-14: LGTM — concise basic usage demo.

examples/sites/demos/pc/app/exception/sub-message-composition-api.vue (1)

1-7: LGTM

Demo correctly showcases sub-message with a PC type.

examples/sites/demos/pc/app/exception/basic-usage-composition-api.vue (1)

1-15: LGTM

Clear basic PC demo; scoped padding is fine.

examples/sites/demos/pc/app/exception/button-text.vue (1)

1-21: LGTM

Good example of action slot; TinyModal usage is appropriate.

packages/vue/src/exception/src/pc.vue (3)

4-4: Remove Tailwind class from PC template.

Found bg-cover on Line 4. Tailwind shouldn’t appear in PC templates here.

-      <div class="tiny-exception__image bg-cover">
+      <div class="tiny-exception__image">

If needed, add equivalent CSS in theme styles.


81-102: Verify props that currently don’t affect template structure.

pageEmpty and componentPage aren’t used in the template for conditional classes/layout. Ensure renderless logic or styles still differentiate page vs component modes; otherwise add class bindings.

Example:

-  <div class="tiny-exception" :class="exceptionClass">
+  <div
+    class="tiny-exception"
+    :class="[
+      exceptionClass,
+      { 'is-page-empty': pageEmpty, 'is-component-page': componentPage }
+    ]"
+  >

6-6: Confirm state.urlType truthiness for all supported types.

If state.urlType is false, no icon renders. Ensure default behavior sets it so PC icons display.

examples/sites/demos/apis/exception.js (1)

86-96: Docs slot rename check.

Slot is now named “icon”. Ensure this matches component implementation (pc/mobile) and migration notes cover the rename from default→icon if previously documented differently.

@discreted66 discreted66 force-pushed the lk-09232 branch 4 times, most recently from a1bb91f to c964c5b Compare September 24, 2025 06:55
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
examples/sites/demos/apis/exception.js (2)

28-31: Polish English description for exception-class.

Use clearer wording.

Apply this diff:

-            'en-US': 'Setting Custom Classes'
+            'en-US': 'Set custom class name'

52-55: Improve English for sub-message.

More natural phrasing.

Apply this diff:

-            'en-US': 'Set Level-2 Title'
+            'en-US': 'Set subtitle'
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d1a5523 and c964c5b.

⛔ Files ignored due to path filters (9)
  • packages/theme/src/svgs/no-data.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/no-news.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/no-perm.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/no-result.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-noperm.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-nothing.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-servererror.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/page-weaknet.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/weaknet.svg is excluded by !**/*.svg
📒 Files selected for processing (29)
  • examples/sites/demos/apis/exception.js (5 hunks)
  • examples/sites/demos/mobile-first/app/exception/webdoc/exception.js (1 hunks)
  • examples/sites/demos/pc/app/exception/basic-usage-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/basic-usage.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/button-text-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/button-text.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/component-page-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/component-page.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/page-empty-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/page-empty.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/slot-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/slot.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/sub-message-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/sub-message.vue (1 hunks)
  • examples/sites/demos/pc/app/exception/webdoc/exception.cn.md (1 hunks)
  • examples/sites/demos/pc/app/exception/webdoc/exception.en.md (1 hunks)
  • examples/sites/demos/pc/app/exception/webdoc/exception.js (1 hunks)
  • examples/sites/demos/pc/menus.js (1 hunks)
  • packages/theme/src/dark-theme-index.less (1 hunks)
  • packages/theme/src/exception/index.less (1 hunks)
  • packages/theme/src/exception/vars.less (1 hunks)
  • packages/theme/src/index.less (1 hunks)
  • packages/vue-locale/src/lang/en.ts (1 hunks)
  • packages/vue-locale/src/lang/es-LA.ts (1 hunks)
  • packages/vue-locale/src/lang/pt-BR.ts (1 hunks)
  • packages/vue-locale/src/lang/zh-CN.ts (1 hunks)
  • packages/vue/src/exception/index.ts (1 hunks)
  • packages/vue/src/exception/src/index.ts (1 hunks)
  • packages/vue/src/exception/src/pc.vue (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/theme/src/dark-theme-index.less
🚧 Files skipped from review as they are similar to previous changes (26)
  • packages/theme/src/index.less
  • packages/vue/src/exception/src/index.ts
  • examples/sites/demos/pc/app/exception/webdoc/exception.cn.md
  • examples/sites/demos/pc/app/exception/sub-message.vue
  • packages/vue-locale/src/lang/pt-BR.ts
  • examples/sites/demos/pc/app/exception/button-text-composition-api.vue
  • examples/sites/demos/pc/app/exception/sub-message-composition-api.vue
  • packages/theme/src/exception/vars.less
  • packages/vue-locale/src/lang/zh-CN.ts
  • examples/sites/demos/pc/app/exception/page-empty.vue
  • examples/sites/demos/mobile-first/app/exception/webdoc/exception.js
  • examples/sites/demos/pc/app/exception/slot-composition-api.vue
  • packages/vue/src/exception/src/pc.vue
  • examples/sites/demos/pc/app/exception/component-page.vue
  • examples/sites/demos/pc/app/exception/webdoc/exception.en.md
  • examples/sites/demos/pc/app/exception/button-text.vue
  • packages/theme/src/exception/index.less
  • examples/sites/demos/pc/app/exception/webdoc/exception.js
  • examples/sites/demos/pc/app/exception/basic-usage-composition-api.vue
  • packages/vue/src/exception/index.ts
  • examples/sites/demos/pc/app/exception/basic-usage.vue
  • examples/sites/demos/pc/app/exception/component-page-composition-api.vue
  • examples/sites/demos/pc/app/exception/slot.vue
  • packages/vue-locale/src/lang/en.ts
  • examples/sites/demos/pc/app/exception/page-empty-composition-api.vue
  • packages/vue-locale/src/lang/es-LA.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (8)
examples/sites/demos/pc/menus.js (1)

286-293: Exception menu entry added with version tag — looks good.

Addresses the earlier request to include the provided version. Placement and meta format are consistent with existing items.

examples/sites/demos/apis/exception.js (7)

2-2: PC docs mode enabled — LGTM.

Mode now covers both pc and mobile-first.


13-19: Component-level exception prop — LGTM.

Descriptions and per-mode demos are aligned.


37-43: Page-level exception prop — LGTM.

Docs and demo mapping look consistent.


79-84: Content slot description fixed — LGTM.

Matches earlier suggestion; demos mapped for both modes.


58-68: Fix English description and punctuation for default type.

“Nodata” text should be quoted and punctuation adjusted.

Apply this diff:

-            'en-US': '<p>Set exception type, The default value is nodata</p>'
+            'en-US': '<p>Set exception type. The default value is "nodata".</p>'

100-107: IType parity confirmed — LGTM. All union literals (noperm, nodata, weaknet, noresult, nonews, pagenoperm, pageweaknet, pagenothing, pageservererror) appear in the exception component, locale entries and theme/icon svgs.


86-96: OK to rename — component and demos use a named icon slot.

packages/vue/src/exception/src/{pc.vue,mobile-first.vue} declare ; demos use <template #icon> (examples/sites/demos/pc/app/exception/slot.vue, slot-composition-api.vue); API docs updated (examples/sites/demos/apis/exception.js).

@zzcr zzcr merged commit f69f32a into opentiny:dev Sep 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request (功能增强)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants