Skip to content

“隐秘”文本

184字小于1分钟

2024-08-18

概述

使用 <Plot> 组件显示 “隐秘”文本 ,能够更灵活的控制行为。

该组件默认不启用,你需要在 theme 配置中启用。

.vuepress/config.ts
export default defineUserConfig({
  theme: plumeTheme({
    plugins: {
      markdownPower: {
        plot: true,
      },
    }
  })
})

Props

名称类型默认值说明
trigger'hover' | 'click''hover'鼠标悬停触发,或者点击触发
maskstring | { light: string, dark: string }#000遮罩颜色
colorstring | { light: string, dark: string }#fff文本颜色

示例

输入:

- 鼠标悬停 - <Plot>悬停时可见</Plot>
- 点击 - <Plot trigger="click">点击时可见</Plot>

输出:

  • 鼠标悬停 - 悬停时可见
  • 点击 - 点击时可见