Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/layout/defaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ export type RenderSetting = {
export type PureSettings = {
/**
* @name layout 的布局方式
* @type 'side' | 'top'
* @type 'side' | 'top' | 'mix'
*
* @example 顶部菜单 layout="top"
* @example 侧边菜单 layout="side"
* @example 顶栏一级菜单 + 侧栏子菜单:layout="side" 且 `splitMenus`,或用 `headerMenuRender` 自定义顶栏菜单
* @deprecated `layout="mix"` 仍会被接受,运行时按 `side` 处理,见 ProLayout 内注释
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using the @deprecated tag on the layout property will cause IDEs to mark the entire property as deprecated (e.g., with a strikethrough), even when using valid values like 'side' or 'top'. Since only the 'mix' value is deprecated, it is better to include this information in the description text instead of using the @deprecated tag on the property itself.

Suggested change
* @deprecated `layout="mix"` 仍会被接受,运行时按 `side` 处理,见 ProLayout 内注释
* `layout="mix"` 仍会被接受(已弃用),运行时按 `side` 处理,见 ProLayout 内注释

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

The @deprecated JSDoc here is attached to the layout property, so TypeScript will treat any use of layout as deprecated (including 'side'/'top'). If the intent is only to deprecate the 'mix' value, consider removing the @deprecated tag and describing the deprecation in plain text, or model 'mix' as a separately documented deprecated type member so only that value is flagged.

Suggested change
* @deprecated `layout="mix"` 仍会被接受,运行时按 `side` 处理,见 ProLayout 内注释
* 注意:`layout="mix"` 已废弃,但仍会被接受,运行时按 `side` 处理,见 ProLayout 内注释

Copilot uses AI. Check for mistakes.
*/
layout?: 'side' | 'top';
layout?: 'side' | 'top' | 'mix';
/** @name layout of content: `Fluid` or `Fixed`, only works when layout is top */
contentWidth?: ContentWidth;
/** @name sticky header */
Expand Down
Loading