- name: u-select
  icon: select
  title: 选择器
  labels:
    - Selector
  description: 下拉选择器，支持单选、多选、搜索等功能
  attrs:
    - name: data-source
      title: 数据源
      type: Array<Item> | Function | object | DataSource
      description: 展示数据的输入源，可设置为集合类型变量（List<T>）或输出参数为集合类型的逻辑。
      group: 数据属性
      brifeDoc: ""
      docDescription: 支持动态绑定集合类型变量（List<T>）或输出参数为集合类型的逻辑
      tooltipLink: ""
    - name: data-schema
      title: 数据类型
      type: schema
      description: 数据源返回的数据结构的类型，自动识别类型进行展示说明
      compType: dataTypeSelect
      group: 数据属性
      brifeDoc: ""
      docDescription: 该属性为只读状态，当数据源动态绑定集合List<T>后，会自动识别T的类型并进行展示。
      tooltipLink: ""
    - name: value
      title: 选中值
      type: any
      sync: true
      model: true
      description: 当前选中的值
      group: 数据属性
      brifeDoc: ""
      docDescription: 当前选择的值
      tooltipLink: ""
    - name: text-field
      title: 文本字段
      type: string
      default: text
      description: 集合的元素类型中，用于显示文本的属性名称
      display: property-select
      group: 数据属性
      brifeDoc: ""
      docDescription: 集合的元素类型中，用于显示文本的属性名称，支持自定义变更。
      tooltipLink: ""
    - name: value-field
      title: 值字段
      type: string
      default: value
      description: 集合的元素类型中，用于标识选中值的属性
      display: property-select
      group: 数据属性
      brifeDoc: ""
      docDescription: 集合的元素类型中，用于标识选中值的属性，支持自定义变更
      tooltipLink: ""
    - name: pageable
      title: 分页加载更多
      type: boolean
      default: false
      description: 设置是否分页加载更多
      hidden: true
      group: 数据属性
      brifeDoc: ""
      docDescription: 是否使用分页功能加载更多
      tooltipLink: ""
    - name: remote-paging
      title: 后端分页
      type: boolean
      default: false
      description: 是否使用后端分页
      hidden: true
      group: 数据属性
      brifeDoc: ""
      docDescription: 控制是否使用后端分页，不支持自定义分页条数，默认为50条
      tooltipLink: ""
    - name: pagination
      title: 分页
      type: boolean
      description: 设置是否分页展示数据
      group: 数据属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: page-size
      title: 默认每页条数
      type: number
      display: number
      default: 50
      min: 1
      description: ""
      dependency:
        - pagination: true
      group: 数据属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: sorting
      title: 初始化排序规则
      type: "{ field: string, order: string, compare: Function }"
      default: "{ field: undefined, order: 'desc' }"
      description: 设置数据初始化时的排序字段和顺序规则
      group: 数据属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: description
      title: 选项辅助文本
      type: boolean
      default: false
      description: 选项的辅助说明信息，展示在选项文本下方
      group: 数据属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: description-field
      title: 辅助文本字段
      type: string
      description: 集合的元素类型中，用于显示文本下方辅助描述的字段
      dependency:
        - description: true
      display: property-select
      group: 数据属性
      brifeDoc: ""
      docDescription: 集合的元素类型中，用于显示文本下方辅助描述的属性名称
      tooltipLink: ""
    - name: icon-field
      title: 图标展示字段
      type: string
      description: 集合的元素类型中，用于显示文本前面图标的属性名称。与文本字段、值字段类似的写法
      display: property-select
      group: 数据属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: selected-values-data
      title: 选中值完整数据
      type: Array
      description: 当下拉列表是分页或加载更多时，需要使用该字段回显选择框内数据。格式为[{text:'text',value:'value'}]
      group: 数据属性
      advanced: true
      brifeDoc: ""
      docDescription: 当下拉列表是分页或加载更多时，需要使用该字段回显选择框内数据。格式为[{text:'text',value:'value'}]
      tooltipLink: ""
    - name: filterable
      title: 筛选
      type: boolean
      default: false
      description: 设置是否可以筛选，开启将会支持搜索。
      group: 数据属性
      brifeDoc: ""
      docDescription: 开启后选择框可输入文本进行筛选
      tooltipLink: ""
    - name: remote-filtering
      title: 后端筛选
      type: boolean
      default: false
      description: 设置是否使用后端筛选
      hidden: true
      group: 数据属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: match-method
      title: 匹配方法
      type: string
      options:
        - value: includes
          title: 包括
        - value: startsWith
          title: 匹配开头
        - value: endsWith
          title: 匹配结尾
      default: includes
      description: 过滤时的匹配方法
      group: 数据属性
      brifeDoc: ""
      docDescription: 支持配置过滤时的匹配模式，共有包括、匹配开头或匹配结尾3种模式
      tooltipLink: ""
    - name: show-render-footer
      title: 可扩展下拉项
      type: boolean
      default: false
      description: 设置是否可扩展下拉项,开启后可自定义下拉框选项
      group: 主要属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: hasAllCheckItem
      title: 全选控制
      type: boolean
      default: false
      description: 是否存在可以控制选项的全选/反选
      group: 主要属性
      docDescription: 是否存在可以控制选项的全选/反选
      tooltipLink: ""
    - name: allCheckItemText
      title: 全选展示内容
      type: string
      default: 全选
      description: 是否存在可以控制选项的全选/反选
      group: 主要属性
      docDescription: 是否存在可以控制选项的全选/反选
      tooltipLink: ""
      dependency:
        - hasAllCheckItem: true
    - name: converter
      title: 转换器
      type: string
      options:
        - value: join
          title: 以','连接
        - value: join:|
          title: 以'|'连接
        - value: join:;
          title: 以';'连接
        - value: json
          title: json
      description: 将选中的值以选择的符号作为连接符，转为字符串格式；选择“json”则转为JSON字符串格式。
      bindHide: true
      clearable: true
      group: 主要属性
      brifeDoc: ""
      docDescription: 将选中的值以选择的符号作为连接符，转为字符串格式；选择“json”则转为JSON字符串格式
      tooltipLink: ""
    - name: placeholder
      title: 占位符
      type: string
      default: 请选择
      description: 为空时显示的占位符文本
      group: 主要属性
      brifeDoc: ""
      docDescription: 选择框无内容时的提示信息，支持自定义编辑，默认为请选择
      tooltipLink: ""
    - name: autofocus
      title: 自动获取焦点
      type: boolean
      default: false
      description: 设置是否自动获取焦点
      designer-value: false
      group: 主要属性
      brifeDoc: ""
      docDescription: 控制是否在进入页面时聚焦到该组件
      tooltipLink: ""
    - name: prefix
      title: 前缀图标
      type: string
      options:
        - value: search
          title: 搜索
      description: ""
      clearable: true
      group: 主要属性
      brifeDoc: ""
      docDescription: 支持添加前缀图标，如搜索图标
      tooltipLink: ""
    - name: suffix
      title: 后缀图标
      type: string
      options:
        - value: search
          title: 搜索
      description: ""
      clearable: true
      group: 主要属性
      brifeDoc: ""
      docDescription: 支持添加后缀图标，如搜索图标
      tooltipLink: ""
    - name: append-to
      title: 弹出层位置依据
      type: string
      default: reference
      description: 设置弹出层依据哪个元素定位位置，可选值：`'body'`表示添加到 document.body，`'reference'`表示添加到参考元素中。
      options:
        - value: reference
          title: 引用元素下
        - value: body
          title: 全局body
      group: 主要属性
      brifeDoc: ""
      docDescription: 设置添加到哪个元素
      tooltipLink: ""
    - name: clearable
      title: 可清除
      type: boolean
      default: false
      description: 可点击清除按钮一键清除所选内容
      group: 交互属性
      brifeDoc: ""
      docDescription: 控制是否显示清除按钮，支持一键清除所选内容
      tooltipLink: ""
    - name: tags-overflow
      title: 多选项展示形式
      type: string
      default: collapse
      options:
        - value: hidden
          title: 过多时省略
        - value: collapse
          title: 过多时收缩
        - value: visible
          title: 过多时显示
      description: 多选项过多时的展示形式
      clearable: true
      group: 交互属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: cancelable
      title: 可取消
      type: boolean
      default: false
      description: 设置是否可以取消选择
      hidden: true
      group: 交互属性
      brifeDoc: ""
      docDescription: ""
      tooltipLink: ""
    - name: multiple
      title: 可多选
      type: boolean
      default: false
      description: 设置是否可以多选行
      group: 交互属性
      brifeDoc: ""
      docDescription: 是否可以多选
      tooltipLink: ""
    - name: initial-load
      title: 初始即加载
      type: boolean
      default: true
      description: 设置初始时是否立即加载
      group: 状态属性
      brifeDoc: ""
      docDescription: 是否在初始时立即加载
      tooltipLink: ""
    - name: loading-text
      title: 加载中文字
      type: string
      default: 加载中...
      description: 正在加载中的文字，使用分页加载时才会出现
      advanced: true
      group: 状态属性
    - name: show-empty-text
      title: 展示暂无数据文案
      type: boolean
      default: true
      description: 是否在数据为空时展示暂无数据的文字提示
      group: 状态属性
      brifeDoc: ""
      docDescription: 是否在数据为空时展示暂无数据的文字提示
      tooltipLink: ""
    - name: empty-text
      title: 暂无数据文案
      type: string
      default: 暂无数据
      description: 暂无数据状态显示的提示文案
      group: 状态属性
      brifeDoc: ""
      docDescription: 暂无数据时的文字
      tooltipLink: ""
    - name: empty-disabled
      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: opened
      title: 弹出状态
      type: boolean
      sync: true
      default: false
      description: 弹出状态分为“True(弹出)/False(关闭)”，默认为“弹出”
      group: 状态属性
      brifeDoc: ""
      docDescription: 开启时加载下拉框时，下拉框自动弹出，默认关闭
      tooltipLink: ""
    - name: width
      title: 宽度
      type: string
      options:
        - value: full
          title: 占满
        - value: huge
          title: 巨大
        - value: large
          title: 大
        - value: medium
          title: 中型
        - value: normal
          title: 正常
        - value: small
          title: 小
        - value: mini
          title: 迷你
      default: normal
      description: 设置选择框宽度大小
      group: 样式属性
      brifeDoc: ""
      docDescription: 设置选择框宽度大小，支持占满、巨大、大、中型、正常、小共6种模式
      tooltipLink: ""
    - name: popperWidth
      title: 下拉列表宽度
      type: string
      description: 设置下拉列表宽度
      group: 样式属性
      brifeDoc: ""
      docDescription: 设置下拉列表宽度
      tooltipLink: ""
    - name: isItemDisplay
      title: 回显选项
      type: boolean
      default: true
      description: 设置回显选项
      group: 样式属性
      brifeDoc: ""
      docDescription: 设置回显选项
      tooltipLink: ""
    - name: height
      title: 高度
      type: string
      options:
        - value: full
          title: 占满
        - value: huge
          title: 巨大
        - value: large
          title: 大
        - value: medium
          title: 中型
        - value: normal
          title: 正常
        - value: small
          title: 小
        - value: mini
          title: 迷你
      default: normal
      description: 设置选择框高度大小
      group: 样式属性
      brifeDoc: ""
      docDescription: 设置选择框高度大小，支持占满、巨大、大、中型、正常、小共6种模式
      tooltipLink: ""
    - name: case-sensitive
      title: 大小写敏感
      type: string | Function
      default: includes
      description: 过滤时大小写是否敏感
      advanced: true
      group: 选择属性
    - name: auto-complete
      title: 自动补全
      type: boolean
      default: false
      description: 是否开启自动补充模式，用于增加列表中没有的项
      advanced: true
      group: 选择属性
  slots:
    - concept: Slot
      name: default
      description: 插入`<u-select-item>`、`<u-select-divider>`或`<u-select-group>`子组件。
      support:
        - name: u-select-item
          title: 选项
          snippet: <u-select-item><u-text text="选项"></u-text></u-select-item>
        - name: u-select-group
          title: 分组
          snippet: '<u-select-group><template #title><u-text
            text="分组"></u-text></template><u-select-item><u-text
            text="选项"></u-text></u-select-item></u-select-group>'
        - name: u-select-divider
          title: 分隔线
          snippet: <u-select-divider></u-select-divider>
  events:
    - 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.item
          type: object
          description: 选择项相关对象
        - name: $event.itemVM
          type: SelectItem
          description: 选择项子组件
        - name: $event.preventDefault
          type: Function
          description: 阻止选择流程
        - name: senderVM
          type: USelect
          description: 发送事件实例
    - name: input
      description: 选择某一项时触发
      title: 选择时
      params:
        - name: $event
          type: any
          description: 选择项的值
          title: 选择项的值
          schema:
            $ref: "#/basicTypes/String"
        - name: senderVM
          type: USelect
          title: 发送事件实例
          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.item
          type: object
          description: 选择项相关对象
        - name: $event.oldItem
          type: object
          description: 旧的选择项相关对象
        - name: $event.itemVM
          type: USelectItem
          description: 选择项子组件
        - name: $event.oldVM
          type: USelectItem
          description: 旧的选择项子组件
        - name: senderVM
          type: USelect
          description: 发送事件实例
    - name: change
      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.item
          type: object
          description: 选择项相关对象
        - name: $event.oldItem
          type: object
          description: 旧的选择项相关对象
        - name: $event.itemVM
          type: USelectItem
          description: 选择项子组件
        - name: $event.oldVM
          type: USelectItem
          description: 旧的选择项子组件
        - name: senderVM
          type: USelect
          description: 发送事件实例
    - name: before-open
      title: 弹出前
      description: 弹出前触发。
      advanced: true
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/EventTarget"
        - name: $event.preventDefault
          type: Function
          description: 阻止弹出流程
        - name: senderVM
          type: USelect
          description: 发送事件实例
    - name: open
      title: 弹出后
      description: 弹出后触发。
      params:
        - name: $event
          type: ""
          description: 空
        - name: senderVM
          type: USelect
          description: 发送事件实例
    - name: before-close
      advanced: true
      title: 关闭前
      description: 关闭前触发。
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/EventTarget"
        - name: $event.preventDefault
          type: Function
          description: 阻止关闭流程
        - name: senderVM
          type: USelect
          description: 发送事件实例
    - name: close
      title: 关闭后
      description: 关闭时触发。
      params:
        - name: $event
          type: ""
          description: 空
        - name: senderVM
          type: USelect
          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: USelect
          description: 发送事件实例
    - name: load
      title: 加载后
      description: 加载后触发
      params:
        - name: $event
          type: ""
          description: 空
        - name: senderVM
          type: USelect
          description: 发送事件实例
    - name: click-prefix
      title: 点击前缀图标
      description: 点击前缀图标后触发
      params:
        - name: $event
          type: object
          description: 鼠标事件对象
          schema:
            $ref: "#/systemTypes/MouseEvent"
    - name: click-suffix
      title: 点击后缀图标
      description: 点击后缀图标后触发
      params:
        - name: $event
          type: object
          description: 鼠标事件对象
          schema:
            $ref: "#/systemTypes/MouseEvent"
    - name: blur
      title: 失去焦点
      description: 失去焦点时触发。
      params:
        - name: $event
          type: FocusEvent
          description: 原生事件对象
        - name: senderVM
          description: 发送事件实例
    - name: before-filter
      title: 搜索前
      description: 可搜索输入框，在输入搜索文字时
      params:
        - name: $event
          type: object
          description: 自定义事件对象
          schema:
            $ref: "#/systemTypes/DataSourceParams"
        - name: $event.filterText
          type: string
          description: 搜索值
  methods:
    - name: open
      description: 弹出选择框。
      params: []
    - name: close
      description: 关闭选择框。
      params: []
    - name: toggle
      description: 切换弹出/关闭状态。
      params:
        - name: opened?
          type: boolean
          description: 可选。弹出/关闭状态
    - name: reload
      description: 清除缓存，重新加载
      params: []
    - name: addItem
      description: 添加项
      params:
        - name: item
          type: object
          description: 当前添加的项
        - name: inFirst
          type: boolean
          description: 是否添加到列表的第一项
          required: false
          default: false
          designerDefault:
            label: 原子项
            level: expressionNode
            type: BooleanLiteral
            value: false
            valueType: boolean
- name: u-select-item
  title: 选择项
  attrs:
    - name: text
      title: 选项文本
      type: string
      description: 此项的显示值
    - name: value
      title: 值
      type: any
      description: 此项的值。
      group: 数据属性
      brifeDoc: ""
      docDescription: 此项的值
      tooltipLink: ""
    - name: description
      title: 选项辅助文本
      type: string
      description: 选项的辅助说明信息，展示在选项文本下方
      group: 数据属性
      brifeDoc: ""
      docDescription: 选项文本的辅助描述，展示在选项文本下方
      tooltipLink: ""
    - name: item
      title: 相关对象
      type: object
      description: 相关对象。当选择此项时，抛出的事件会传递该对象，便于开发。
      group: 主要属性
      brifeDoc: ""
      docDescription: 相关对象。当选择此项时，抛出的事件会传递该对象，便于开发
      tooltipLink: ""
    - name: disabled
      title: 禁用
      type: boolean
      default: false
      description: 置灰显示，且禁止任何交互（焦点、点击、选择、输入等）
      group: 状态属性
      brifeDoc: ""
      docDescription: 该项不可选，默认关闭
      tooltipLink: ""
  slots:
    - concept: Slot
      name: default
      title: 默认
      description: 插入文本或 HTML。
      slotProps:
        concept: Param
        name: current
        typeAnnotation:
          concept: TypeAnnotation
          typeKind: generic
          typeNamespace: nasl.ui
          typeName: Current
          typeArguments:
            - concept: TypeAnnotation
              typeKind: typeParam
              typeName: T
  events:
    - 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.item
          type: object
          description: 此项的相关对象
        - name: $event.itemVM
          type: SelectItem
          description: 此组件
        - name: $event.preventDefault
          type: Function
          description: 阻止选择流程
        - name: senderVM
          type: USelectItem
          description: 发送事件实例
  description: 选择项
- name: u-select-group
  title: 选择分组
  attrs:
    - name: title
      title: 标题
      type: string
      default: null
      description: ""
      group: 主要属性
      brifeDoc: ""
      docDescription: 选择分组的标题，标题只有在没有文本插槽的时候生效
      tooltipLink: ""
  slots:
    - concept: Slot
      name: default
      title: 默认
      description: 插入`<u-select-item>`或`<u-select-divider>`子组件。
      support:
        - name: u-select-item
          title: 选项
          snippet: <u-select-item><u-text text="选项"></u-text></u-select-item>
    - concept: Slot
      name: title
      title: 标题
      description: 自定义标题文本。
      advanced: true
    - concept: Slot
      name: extra
      title: 附加内容
      description: 在右侧可以附加内容。
      advanced: true
  description: 选择分组
- name: u-select-divider
  title: 分隔线
  description: 分隔线
