RTL
此插件在配置的语言上设置文本方向为 RTL。
使用方法
npm i -D @vuepress/plugin-rtl@nextimport { rtlPlugin } from '@vuepress/plugin-rtl'
export default {
plugins: [
rtlPlugin({
// 配置项
locales: ['/ar/'],
}),
],
}示例
选项
locales
string[]默认值
['/']启用 RTL 布局的语言路径。
selector
SelectorOptions默认值
{ 'html': { dir: 'rtl' } }启用 RTL 布局的选择器配置。默认设置意味着在 RTL 语言中,html 元素的 dir 属性将被设置为 rtl。
其类型为:
interface SelectorOptions {
[cssSelector: string]: {
[attr: string]: string
}
}