- name: u-tabs
  icon: tabs
  title: 选项卡
  labels:
    - Selector
  description: 选项卡切换组件，常用于平级区域大块内容的收纳和展现。
  attrs:
    - name: show-scroll-buttons
      title: 显示滚动按钮
      type: string
      options:
        - value: auto
          title: 有滚动的情况下显示
        - value: always
          title: 始终显示
        - value: never
          title: 始终不显示
      default: auto
      description: 是否显示标签滚动左右箭头按钮
      advanced: true
    - name: data-source
      title: 数据源
      type: Array<Item> | Function | Object
      description: 展示数据的输入源，可设置为集合类型变量（List<T>）或输出参数为集合类型的逻辑。
      designer-value: "[{}, {}, {}]"
      group: 数据属性
      brifeDoc: ""
      docDescription: 集合类型变量或者输出参数为集合类型的逻辑
      tooltipLink: ""
    - name: data-schema
      title: 数据类型
      type: schema
      description: 数据源返回的数据结构的类型，自动识别类型进行展示说明
      group: 数据属性
      compType: dataTypeSelect
      brifeDoc: ""
      docDescription: 集合类型每一元素的数据类型
      tooltipLink: ""
    - name: title-field
      title: 标签项标题
      type: string
      default: title
      description: 数据源集合的元素，用于显示标签标题的属性
      group: 数据属性
      brifeDoc: ""
      docDescription: 数据源集合的元素，用于显示标签标题的属性
      tooltipLink: ""
    - name: value-field
      title: 标签项标题值字段
      type: string
      default: value
      description: 数据源集合的元素，用于标识标签值的属性
      group: 数据属性
      display: property-select
      brifeDoc: ""
      docDescription: 数据源集合的元素，用于标识标签值的属性
      tooltipLink: ""
    - name: url-field
      title: 标签项内容值字段
      type: string
      default: url
      description: 数据源集合的元素，用于标识当前打开的标签项
      group: 数据属性
      display: property-select
      tooltipLink: ""
      docDescription: 数据源集合的元素，用于标识当前打开的标签项
    - name: content-field
      title: 标签项内容值
      type: string
      default: ''
      description: 数据源集合的元素，用于标识当前打开的标签项
      group: 数据属性
      display: property-select
      tooltipLink: ""
      docDescription: 数据源集合的元素，用于标识当前打开的标签项
    - name: value
      title: 值
      type: any
      sync: true
      model: true
      description: 指当前打开标签的标签项
      group: 数据属性
      brifeDoc: ""
      docDescription: 指当前打开标签的标签项
      tooltipLink: ""
    - name: router
      title: 使用路由
      type: boolean
      default: false
      description: 开启后，选项卡可设置跳转页面
      group: 数据属性
      brifeDoc: ""
      docDescription: 开启后，选项卡可设置跳转页面
      tooltipLink: ""
    - name: closable-field
      title: 标签项可关闭
      type: string
      default: closable
      description: 设置标签项是否可关闭
      group: 交互属性
      display: property-select
      brifeDoc: ""
      docDescription: 数据源集合的元素，用于标识标签是否可关闭的属性
      tooltipLink: ""
    - name: closable
      title: 可关闭
      type: boolean
      default: false
      description: 设置标签是否可关闭
      group: 交互属性
      brifeDoc: ""
      docDescription: 是否可以关闭
      tooltipLink: ""
    - name: readonly
      title: 只读
      type: boolean
      default: false
      description: 正常显示，但禁止选择/输入
      group: 状态属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: disabled
      title: 禁用
      type: boolean
      default: false
      description: 置灰显示，且禁止任何交互（焦点、点击、选择、输入等）
      group: 状态属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: appear
      title: 展示外观
      type: string
      options:
        - value: square
          title: 方形卡片
        - value: round
          title: 圆角卡片
        - value: line
          title: 线条
        - value: text
          title: 文本
        - value: capsule
          title: 胶囊
        - value: split
          title: 竖线分隔
      default: square
      description: ""
      group: 样式属性
      brifeDoc: ""
      docDescription: 标签展示的外观
      tooltipLink: ""
    - name: size
      title: 标签尺寸
      type: string
      options:
        - value: normal
          title: 正常
        - value: small
          title: 小
        - value: mini
          title: 迷你
      default: normal
      description: ""
      group: 样式属性
      brifeDoc: ""
      docDescription: 标签展示的尺寸
      tooltipLink: ""
  slots:
    - concept: Slot
      name: default
      title: 默认
      description: 插入`<u-tab>`子组件。
      empty-background: add-sub
      support:
        - name: u-tab
          title: 子选项
          snippet: '<u-tab><template #title><u-text
            text="标签页"></u-text></template>内容</u-tab>'
    - concept: Slot
      name: extra
      title: 右侧附加
      description: 在标签右侧可以附加的组件。
      advanced: true
    - concept: Slot
      name: title
      title: 头部标题
      slotProps:
        concept: Param
        name: current
        typeAnnotation:
          concept: TypeAnnotation
          typeKind: generic
          typeNamespace: nasl.ui
          typeName: Current
          typeArguments:
            - concept: TypeAnnotation
              typeKind: typeParam
              typeName: T
    - concept: Slot
      name: content
      title: 内容区
      slotProps:
        concept: Param
        name: current
        typeAnnotation:
          concept: TypeAnnotation
          typeKind: generic
          typeNamespace: nasl.ui
          typeName: Current
          typeArguments:
            - concept: TypeAnnotation
              typeKind: typeParam
              typeName: T
  methods:
    - name: reload
      description: 重新加载数据
      params: []
  events:
    - name: click
      title: 点击后
      description: 点击某一项后触发
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/ChangeItemEvent"
        - name: $event.value
          type: any
          description: 选中标签页的值
        - name: $event.itemVM
          type: UTab
          description: 选中标签页实例
        - name: senderVM
          type: UTabs
          description: 发送事件实例
    - name: before-select
      title: 选择前
      description: 选择某一页前触发
      advanced: true
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/ChangeItemEvent"
        - name: $event.value
          type: any
          description: 选中标签页的值
        - name: $event.oldValue
          type: any
          description: 旧的值
        - name: $event.itemVM
          type: UTab
          description: 选中标签页实例
        - name: $event.oldVM
          type: UTab
          description: 旧的选中标签页实例
        - name: $event.preventDefault
          type: Function
          description: 阻止选择流程
        - name: senderVM
          type: UTabs
          description: 发送事件实例
    - name: select
      title: 选择后
      description: 选择某一项后触发
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/ChangeItemEvent"
        - name: $event.value
          type: any
          description: 选中标签页的值
        - name: $event.oldValue
          type: any
          description: 旧的值
        - name: $event.itemVM
          type: UTab
          description: 选中标签页实例
        - name: $event.oldVM
          type: UTab
          description: 旧的选中标签页实例
        - name: senderVM
          type: UTabs
          description: 发送事件实例
    - name: before-close
      title: 关闭前
      description: 关闭某一页前触发
      advanced: true
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/ChangeItemEvent"
        - name: $event.value
          type: any
          description: 待关闭标签页的值
        - name: $event.oldValue
          type: any
          description: 旧的值
        - name: $event.itemVM
          type: UTab
          description: 待关闭的标签页实例
        - name: $event.preventDefault
          type: Function
          description: 阻止关闭流程
        - name: senderVM
          type: UTabs
          description: 发送事件实例
    - name: close
      title: 关闭后
      description: 关闭某一页后触发
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/ChangeItemEvent"
        - name: $event.value
          type: any
          description: 关闭的标签页的值
        - name: $event.oldValue
          type: any
          description: 旧的值
        - name: $event.itemVM
          type: UTabs
          description: 关闭的标签页实例
        - name: $event.preventDefault
          type: Function
          description: 阻止关闭后自动选择页的流程
        - name: senderVM
          type: UTabs
          description: 发送事件实例
    - name: before-load
      title: 加载前
      description: 加载前触发
      advanced: true
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/EventTarget"
        - name: $event.preventDefault
          type: Function
          description: 阻止加载流程
        - name: senderVM
          type: UTableView
          description: 发送事件实例
    - name: load
      title: 加载后
      description: 加载后触发
      params:
        - name: $event
          type: "null"
          description: 无
        - name: senderVM
          type: UTableView
          description: 发送事件实例
- name: u-tab
  title: 标签页
  attrs:
    - name: title
      title: 标题
      type: string
      description: 标签页标题。
      advanced: true
    - name: href
      title: 链接
      type: string
      description: 链接地址
      advanced: true
    - 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: 打开方式
      advanced: true
    - name: to
      title: 路由链接
      type: string, Location
      description: 需要 router 为 true，与`<router-link>`的`to`属性相同。可以是一个字符串或者是描述目标位置的对象。
      advanced: true
    - name: replace
      title: 替换
      type: boolean
      default: false
      description: 需要 router 为
        true，与`<router-link>`的`replace`属性相同。如果为`true`，当点击时，会调用`router.replace()`而不是`router.push()`，于是导航后不会留下`history
        `记录。
      advanced: true
    - name: append
      title: 追加路径
      type: boolean
      default: false
      description: 需要 router 为
        true，与`<router-link>`的`append`属性相同。如果为`true`，则在当前路径后追加`to`的路径。
      advanced: true
    - name: exact
      title: 精确匹配
      type: boolean
      default: false
      description: 需要 router 为 true，与`<router-link>`的`exact`属性相同。是否与路由完全一致时才高亮显示。
      advanced: true
    - name: value
      title: 值
      type: any
      description: ""
      group: 数据属性
      brifeDoc: ""
      docDescription: 标签页的值。
      tooltipLink: ""
    - name: linkType
      title: 链接类型
      type: string
      options:
        - value: destination
          title: 页面跳转
      default: destination
      compType: linkTypeSelect
      bindHide: true
      group: 交互属性
      description: ""
      tooltipLink: ""
      docDescription: ""
    - name: hrefAndTo
      title: 链接地址
      type: string
      description: ""
      compType: linkHrefInput
      group: 交互属性
      tooltipLink: ""
      docDescription: ""
    - name: closable
      title: 可关闭
      type: boolean
      default: false
      description: 设置标签是否可关闭
      group: 交互属性
      brifeDoc: ""
      docDescription: 控制标签页是否可关闭，开启效果如下
      tooltipLink: ""
    - name: showTabItem
      title: 显示状态
      type: boolean
      default: true
      description: 显示状态分为“True(显示)/False(隐藏)”，默认为“显示”
      group: 状态属性
      brifeDoc: ""
      docDescription: 控制标签页是否默认显示
      tooltipLink: ""
    - name: disabled
      title: 禁用
      type: boolean
      default: false
      description: 置灰显示，且禁止任何交互（焦点、点击、选择、输入等）
      group: 状态属性
      brifeDoc: ""
      docDescription: 置灰显示，且禁止任何交互（焦点、点击、选择、输入等）
      tooltipLink: ""
  slots:
    - concept: Slot
      name: default
      title: 默认
      description: 该 tab 下的内容
    - concept: Slot
      name: title
      title: 标题
      description: 自定义标题
  description: 标签页
