Remark 标记

用于展示提示文本,和表单项中的 remark 属性类型。

基本用法

  1. {
  2. "type": "page",
  3. "body": {
  4. "type": "remark",
  5. "content": "这是一段提醒"
  6. }
  7. }

图标形状

  1. {
  2. "type": "page",
  3. "body": {
  4. "type": "remark",
  5. "content": "这是一段提醒",
  6. "shape": "circle"
  7. }
  8. }

可配置标题

  1. {
  2. "type": "page",
  3. "body": {
  4. "type": "remark",
  5. "content": {
  6. "title": "标题",
  7. "body": "这是一段提醒"
  8. }
  9. }
  10. }

支持变量

  1. {
  2. "type": "page",
  3. "data": {
  4. "github": "https://github.com/"
  5. },
  6. "body": [
  7. {
  8. "type": "remark",
  9. "content": "${github}"
  10. },
  11. {
  12. "type": "remark",
  13. "content": {
  14. "title": "${github|raw}",
  15. "body": "${github}"
  16. }
  17. }
  18. ]
  19. }

弹出位置

schema: scope="body" [ { "type": "remark", "content": "向上", "placement": "top" }, { "type": "remark", "content": "向下", "placement": "bottom" }, { "type": "remark", "content": "向左", "placement": "left" }, { "type": "remark", "content": "向右", "placement": "right" } ]

属性表

属性名 类型 默认值 说明
type string remark
className string 外层 CSS 类名
content string 提示文本
placement string 弹出位置
trigger string ['hover', 'focus'] 触发条件
icon string fa fa-question-circle 图标
shape `’circle’ \ ‘square’` 图标形状