VuePress 生态系统VuePress 生态系统
  • 主题指南
  • 默认主题
  • Hope 主题
  • Plume 主题
  • Reco 主题
  • 功能插件
  • Markdown 插件
  • 搜索插件
  • 博客插件
  • 渐进式应用插件
  • 统计分析插件
  • 搜索引擎优化插件
  • 开发插件
  • 工具插件
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • 主题指南
  • 默认主题
  • Hope 主题
  • Plume 主题
  • Reco 主题
  • 功能插件
  • Markdown 插件
  • 搜索插件
  • 博客插件
  • 渐进式应用插件
  • 统计分析插件
  • 搜索引擎优化插件
  • 开发插件
  • 工具插件
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • active-header-links
  • git
  • palette
  • reading-time
  • rtl
  • Sass Palette
    • 指南
    • 配置
  • theme-data
  • toc

rtl

@vuepress/plugin-rtl

此插件会在配置的语言上设置 rtl 方向。

使用方法

npm i -D @vuepress/plugin-rtl@next
.vuepress/config.ts
import { rtlPlugin } from '@vuepress/plugin-rtl'

export default {
  plugins: [
    rtlPlugin({
      // 配置项
      locales: ['/ar/'],
    }),
  ],
}

示例

选项

locales

  • 类型:string[]
  • 默认值:['/']
  • 详情:
    开启 RTL 布局的多语言路径。

selector

  • 类型:SelectorOptions

    interface SelectorOptions {
      [cssSelector: string]: {
        [attr: string]: string
      }
    }
  • 默认值:{ 'html': { dir: 'rtl' } }

  • 详情:

    开启 RTL 的选择器。

    默认设置意味着在 RTL 多语言中,html 元素的 dir 属性将被设置为 rtl。

在 GitHub 上编辑此页
上次更新: 2025/4/12 19:03
贡献者: Mister-Hope, meteorlxy, pengzhanbo
Prev
reading-time
Next
Sass Palette