- name: u-button
  title: 按钮
  icon: button
  labels:
    - Display
  description: 用于触发一个即时操作。
  attrs:
    - name: to
      title: 路由链接
      type: string, Location
      description: 需要 vue-router，与`<router-link>`的`to`属性相同。可以是一个字符串或者是描述目标位置的对象。
      advanced: true
    - name: replace
      title: 替换
      type: boolean
      default: false
      description: 需要
        vue-router，与`<router-link>`的`replace`属性相同。如果为`true`，当点击时，会调用`router.replace()`而不是`router.push()`，于是导航后不会留下`history
        `记录。
      advanced: true
    - name: append
      title: 追加路径
      type: boolean
      default: false
      description: 需要 vue-router，与`<router-link>`的`append`属性相同。如果为`true`，则在当前路径后追加`to`的路径。
      advanced: true
    - name: text
      title: 文本
      type: string
      description: 显示文本内容
      group: 主要属性
      brifeDoc: ""
      docDescription: 显示的文本内容
      tooltipLink: ""
    - name: color
      title: 样式类型
      type: string
      options:
        - value: primary
          title: 主要按钮
        - value: primary_secondary
          title: 次要按钮
        - value: default
          title: 普通按钮
        - value: danger
          title: 危险操作按钮
        - value: danger_secondary
          title: 次要危险操作按钮
      default: default
      description: 设置主题颜色和按钮样式类型
      group: 主要属性
      brifeDoc: ""
      docDescription: "- 支持定义按钮样式，包括主要按钮、次要按钮、普通按钮、危险操作按钮和次要危险操作按钮。"
      tooltipLink: ""
    - name: display
      title: 展示方式
      type: string
      options:
        - value: inline
          title: 行内展示
        - value: block
          title: 块级展示，宽度会充满父元素
      default: inline
      description: 行内展示，或块级换行展示
      group: 主要属性
      brifeDoc: ""
      docDescription: 控制展示方式，支持行内展示、块级展示（宽度会充满父元素）两种方式。
      tooltipLink: ""
    - name: icon
      title: 图标
      type: icon
      default: ""
      description: ""
      group: 主要属性
      brifeDoc: ""
      docDescription: 支持从图标库选择图标或上传自定义图标。
      tooltipLink: ""
    - name: icon-position
      title: 图标位置
      type: string
      options:
        - value: left
          title: 左
        - value: right
          title: 右
      default: left
      description: 设置图标居左或居右显示
    - name: linkType
      title: 链接类型
      type: string
      options:
        - value: destination
          title: 页面跳转
        - value: download
          title: 下载链接
      default: destination
      description: ""
      compType: linkTypeSelect
      bindHide: true
      group: 交互属性
      brifeDoc: ""
      docDescription: 支持页面跳转、普通链接、下载链接。
      tooltipLink: ""
    - name: hrefAndTo
      title: 链接地址
      type: string
      description: ""
      compType: linkHrefInput
      group: 交互属性
      brifeDoc: ""
      docDescription: 链接的详细地址。
      tooltipLink: ""
    - name: target
      title: 链接打开方式
      type: string
      options:
        - value: _blank
          title: 新窗口
        - value: _self
          title: 当前窗口
        - value: _parent
          title: 父级窗口
          advanced: true
        - value: _top
          title: 顶级窗口
          advanced: true
      default: _self
      description: 链接跳转的打开方式，父级窗口和顶级窗口仅适用于iframe组件嵌套的情况，若不存在嵌套，则其打开方式同当前窗口。
      group: 交互属性
      brifeDoc: ""
      docDescription: 可选新窗口、父级窗口、当前窗口和顶级窗口，其中父级窗口和顶级窗口仅适用于iframe组件嵌套的情况，若不存在嵌套，则打开方式同当前窗口。
      tooltipLink: ""
    - name: disabled
      title: 禁用
      type: boolean
      default: false
      description: 置灰显示，且禁止任何交互（焦点、点击、选择、输入等）
      group: 状态属性
      brifeDoc: ""
      docDescription: 置灰显示，且禁止任何交互（焦点、点击、选择、输入等）。
      tooltipLink: ""
    - name: loading
      title: 加载中触发条件
      type: boolean
      default: false
      description: 设置加载中状态的触发条件
      advanced: true
      group: 状态属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: dashed
      title: 显示虚线边框
      type: boolean
      default: false
      description: 设置是否显示虚线边框
      group: 样式属性
      brifeDoc: ""
      docDescription: 启用后，按钮边框变为虚线，默认关闭。
      tooltipLink: ""
    - name: size
      title: 尺寸
      type: string
      options:
        - value: huge
          title: 巨大
        - value: large
          title: 大
        - value: medium
          title: 中型
        - value: normal
          title: 正常
        - value: small
          title: 小
        - value: mini
          title: 迷你
      default: normal
      description: 设置按钮大小
      group: 样式属性
      brifeDoc: ""
      docDescription: 按钮尺寸，支持设置巨大、大、中型、正常、小、迷你。
      tooltipLink: ""
    - name: shape
      title: 形状
      type: string
      options:
        - value: default
          title: 默认
        - value: square
          title: 方形
        - value: round
          title: 圆角
        - value: circle
          title: 圆形
      default: default
      description: 设置按钮形状
      group: 样式属性
      brifeDoc: ""
      docDescription: 支持定义按钮形状，包括默认、方形、圆角、圆形四种。
      tooltipLink: ""
  events:
    - name: $listeners
      kind: trigger
      description: 监听所有`<a>`元素的事件。
      params: []
    - name: before-navigate
      title: 切换路由前
      advanced: true
      description: 使用 router 相关属性切换路由前触发
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/NavigateEvent"
        - name: $event.to
          type: string, Location
          description: "`to`属性的值"
        - name: $event.replace
          type: boolean
          description: "`replace`属性的值"
        - name: $event.append
          type: boolean
          description: "`append`属性的值"
        - name: $event.preventDefault
          type: Function
          description: 阻止切换流程
        - name: senderVM
          type: UButton
          description: 发送事件实例
    - name: navigate
      title: 切换路由后
      advanced: true
      description: 使用 router 相关属性切换路由后触发
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/NavigateEvent"
        - name: $event.to
          type: string, Location
          description: "`to`属性的值"
        - name: $event.replace
          type: boolean
          description: "`replace`属性的值"
        - name: $event.append
          type: boolean
          description: "`append`属性的值"
        - name: senderVM
          type: UButton
          description: 发送事件实例
