Skip to content

设计模式

  • 一种书写代码的方式
  • 为了解决特定问题给出的简洁而优化的解决方案

创建型

工厂模式(工厂方法模式,抽象工厂模式,建造者模式) 单例模式原型模式

结构型

适配器模式装饰器模式代理模式外观模式 桥接模式 组合模式 享元模式

行为型

策略模式 模板方法模式 观察者模式迭代器模式 职责连模式 命令模式 备忘录模式 状态模式 访问者模式 中介者模式 解释器模式

Layout Switch

Adjust the layout style of VitePress to adapt to different reading needs and screens.

Expand all
The sidebar and content area occupy the entire width of the screen.
Expand sidebar with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Expand all with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Original width
The original layout width of VitePress

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.

Spotlight

Highlight the line where the mouse is currently hovering in the content to optimize for users who may have reading and focusing difficulties.

ONOn
Turn on Spotlight.
OFFOff
Turn off Spotlight.