cloud-ui.vusion
Version:
Vusion Cloud UI
351 lines (350 loc) • 10.3 kB
YAML
- name: u-cascader
title: 级联选择
icon: cascade-select
labels:
- Selector
description: 一次选择多个相关联的项
attrs:
- name: data-source
title: 数据源
type: Array<{ text, value }>
description: 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑
group: 数据属性
brifeDoc: ""
docDescription: 数据列表,支持直接放置多层的数据源也支持通过单层的数据和`父节点字段名`或`子节点字段名`构建树形
tooltipLink: ""
- name: data-schema
title: 数据类型
type: schema
description: 数据源返回的数据结构的类型,自动识别类型进行展示说明
compType: dataTypeSelect
group: 数据属性
brifeDoc: ""
docDescription: 集合类型每一元素的数据类型
tooltipLink: ""
- name: 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: children-field
title: 子级值字段
type: string
default: children
description: 树形数据子节点字段名,默认为children
display: property-select
dependency:
- +parent-field:
- null
- ""
dependencyDisplay: disabled
group: 数据属性
brifeDoc: ""
docDescription: 树形数据子节点字段名,默认为children
tooltipLink: ""
- name: parent-field
title: 父级值字段
type: string
description: 当数据源为平铺数据时自动生成级联数据的节点字段名,重要:值字段名需要一起配置
display: property-select
dependency:
- +children-field:
- null
- ""
dependencyDisplay: disabled
group: 数据属性
brifeDoc: ""
docDescription: 当数据源为平铺数据时自动生成级联数据的节点字段名,重要:值字段名需要一起配置
tooltipLink: ""
- name: value
title: 值
type: any
sync: true
model: true
description: ""
group: 数据属性
brifeDoc: ""
docDescription: 选择器的值
tooltipLink: ""
- name: useArrayLikeValue
title: 绑定值使用值字段
default: false
model: false
bindHide: true
sync: false
type: boolean
description: ""
group: 数据属性
brifeDoc: ""
docDescription: 是否使用数组类型的value
tooltipLink: ""
- name: filterable
title: 筛选
type: boolean
default: false
description: 设置是否可以筛选,开启将会显示搜索框。
group: 数据属性
brifeDoc: ""
docDescription: 是否可以过滤(搜索),开启将会显示搜索框
tooltipLink: ""
- name: placeholder
title: 占位符
type: string
default: 请选择
description: 为空时显示的占位符文本
group: 主要属性
brifeDoc: ""
docDescription: 搜索框为空时提示文本
tooltipLink: ""
- name: showFinalValue
title: 只显示最后一项
type: boolean
default: false
description: 定义是否显示完整的路径,ture时只显示最后一项
group: 主要属性
brifeDoc: ""
docDescription: 定义是否显示完整的路径,ture时只显示最后一项
tooltipLink: ""
- name: autofocus
title: 自动获取焦点
type: boolean
default: false
description: 设置是否自动获取焦点
designer-value: false
group: 主要属性
brifeDoc: ""
docDescription: 是否自动获取焦点
tooltipLink: ""
- name: trigger
title: 触发方式
type: string
options:
- value: click
title: 点击
- value: hover
title: 悬浮
default: click
description: ""
group: 交互属性
brifeDoc: ""
docDescription: 触发方式
tooltipLink: ""
- name: clearable
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
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: 设置级联框宽度大小
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: 设置级联框高度大小
tooltipLink: ""
- name: join
title: 连接符
type: string
options:
- value: ","
title: 以','连接
- value: "|"
title: 以'|'连接
- value: " / "
title: 以' / '连接
default: " / "
description: 将选中的值以选择的符号作为连接符,转为字符串格式,不可为空值
advanced: true
group: 选择属性
events:
- name: input
title: 输入时
description: 选择某一项时触发
params:
- name: $event
type: any
description: 选择项的值
schema:
$ref: "#/basicTypes/String"
- name: senderVM
type: UCascader
description: 发送事件实例
- name: select
title: 选择后
description: 选择某一项时触发
params:
- name: $event
type: object
description: 自定义事件对象
schema:
$ref: "#/systemTypes/CascadeCapsulesEvent"
- name: $event.level
type: number
description: 选择的层级
- name: $event.value
type: any
description: 改变后的值
- name: $event.values
type: Array
description: 改变后每项值的数组
- name: senderVM
type: UCascader
description: 发送事件实例
- name: focus
title: 获得焦点
description: 获得焦点时触发。
params:
- name: $event
type: FocusEvent
description: 原生事件对象
schema:
$ref: "#/systemTypes/FocusEvent"
- name: senderVM
type: UInput
description: 发送事件实例
- name: blur
title: 失去焦点
description: 失去焦点时触发。
params:
- name: $event
type: FocusEvent
description: 原生事件对象
schema:
$ref: "#/systemTypes/FocusEvent"
- name: senderVM
type: UInput
description: 发送事件实例
- name: clear
title: 清空后
description: 清空后触发。
params:
- name: $event
type: object
description: 自定义事件对象
schema:
$ref: "#/systemTypes/ChangeEvent"
- name: $event.value
type: string
description: 清空后的值
- name: $event.oldValue
type: string
description: 旧的值
- name: senderVM
type: UInput
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: 发送事件实例
methods:
- name: open
description: 弹出实例。
params: []
- name: close
description: 关闭实例。
params: []
- name: clear
description: 清空输入框。
params: []
- name: reload
description: 重新加载数据
params: []