///
///
///
///
declare namespace nasl.ui {
export class EWatermark extends ViewComponent {
constructor(options?: Partial);
}
export class EWatermarkOptions extends ViewComponentOptions {
private image;
/**
* 文本
* 水印文本显示内容
*/
text: nasl.core.String;
/**
* 不透明度
* 0-1之间的小数,0代表完全透明,1代表完全不透明
*/
opacity: nasl.core.Decimal;
}
}
declare namespace nasl.ui {
export class IIco extends ViewComponent {
constructor(options?: Partial);
}
export class IIcoOptions extends ViewComponentOptions {
/**
* 图标
*/
name: nasl.core.String;
/**
* 图标布局
* 图标和文本的布局方式
*/
icotype: 'only' | 'top' | 'left';
/**
* 链接类型
*/
linkType: 'destination' | 'download';
/**
* 链接地址
*/
hrefAndTo: nasl.core.String;
/**
* 链接打开方式
* 链接跳转的打开方式,父级窗口和顶级窗口仅适用于iframe组件嵌套的情况,若不存在嵌套,则其打开方式同当前窗口。
*/
target: '_blank' | '_self' | '_parent' | '_top';
/**
* 点击后
* 点击此项时触发
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 双击此项时触发
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 右键点击此项时触发
*/
onRightclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入此项时触发
*/
onOver: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出此项时触发
*/
onOut: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 鼠标按下此项时触发
*/
onDown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 默认
* 插入文本或 HTML。
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UAbsoluteLayout extends ViewComponent {
constructor(options?: Partial);
}
export class UAbsoluteLayoutOptions extends ViewComponentOptions {
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 内容
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UAlert extends ViewComponent {
constructor(options?: Partial);
}
export class UAlertOptions extends ViewComponentOptions {
private title;
private desc;
/**
* 公告类型
*/
type: 'info' | 'success' | 'warning' | 'error';
/**
* 显示图标
*/
showIcon: nasl.core.Boolean;
/**
* 对其方式
* 选择对齐方式
*/
horizontal: 'left' | 'center';
/**
* 手动关闭
* 是否可手动关闭公告
*/
closeable: nasl.core.Boolean;
/**
* 显示边框
*/
bordered: nasl.core.Boolean;
/**
* 关闭时
* 关闭时触发
*/
onClose: (event: any) => any;
/**
* 默认
* 辅助文本
*/
slotDefault: () => Array;
/**
* 标题
*/
slotTitle: () => Array;
}
}
declare namespace nasl.ui {
export class UAnchor extends ViewComponent {
constructor(options?: Partial);
}
export class UAnchorOptions extends ViewComponentOptions {
/**
* 标识
* 锚点的唯一标识,用于跳转链接,如“/page#linkname”
*/
label: nasl.core.String;
/**
* 默认
* 内容
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UBadge extends ViewComponent {
/**
* 值
*/
value: UBadgeOptions['value'];
constructor(options?: Partial);
}
export class UBadgeOptions extends ViewComponentOptions {
private dot;
/**
* 值
* 用于标识的值
*/
value: nasl.core.Integer | nasl.core.String;
/**
* 最大值
* 最大值,超过最大值会显示为“最大值+”的形式,当最大值是数字类型时生效
*/
max: nasl.core.Decimal | nasl.core.Integer;
/**
* 角标在右上角
* 开启时提醒角标位置显示在右上角,关闭时提醒角标显示在组件右侧。
*/
corner: nasl.core.Boolean;
/**
* 插入需要附加徽章的元素。
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UButton extends ViewComponent {
/**
* 禁用
*/
disabled: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UButtonOptions extends ViewComponentOptions {
private to;
private replace;
private append;
/**
* 文本
* 显示文本内容
*/
text: nasl.core.String;
/**
* 样式类型
* 设置主题颜色和按钮样式类型
*/
color: 'primary' | 'primary_secondary' | 'default' | 'danger' | 'danger_secondary';
/**
* 展示方式
* 行内展示,或块级换行展示
*/
display: 'inline' | 'block';
/**
* 图标
*/
icon: nasl.core.String;
/**
* 图标位置
* 设置图标居左或居右显示
*/
iconPosition: 'left' | 'right';
/**
* 链接类型
*/
linkType: 'destination' | 'download';
/**
* 链接地址
*/
hrefAndTo: nasl.core.String;
/**
* 链接打开方式
* 链接跳转的打开方式,父级窗口和顶级窗口仅适用于iframe组件嵌套的情况,若不存在嵌套,则其打开方式同当前窗口。
*/
target: '_blank' | '_self' | '_parent' | '_top';
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
private loading;
/**
* 显示虚线边框
* 设置是否显示虚线边框
*/
dashed: nasl.core.Boolean;
/**
* 尺寸
* 设置按钮大小
*/
size: 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 形状
* 设置按钮形状
*/
shape: 'default' | 'square' | 'round' | 'circle';
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 获得焦点
* 获得焦点时触发。
*/
onFocus: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 失去焦点
* 失去焦点时触发。
*/
onBlur: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 切换路由前
* 使用 router 相关属性切换路由前触发
*/
onBeforeNavigate: (event: {
to: nasl.core.String;
replace: nasl.core.Boolean;
append: nasl.core.Boolean;
}) => any;
/**
* 切换路由后
* 使用 router 相关属性切换路由后触发
*/
onNavigate: (event: {
to: nasl.core.String;
replace: nasl.core.Boolean;
append: nasl.core.Boolean;
}) => any;
}
}
declare namespace nasl.ui {
export class UCalendarView extends ViewComponent {
/**
* 数据源
*/
data: nasl.collection.List;
/**
* 日历选择值
*/
value: UCalendarViewOptions['value'];
/**
* 重新加载
*/
reload(): void;
constructor(options?: Partial>);
}
export class UCalendarViewOptions extends ViewComponentOptions {
/**
* 数据源
* 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑
*/
dataSource: nasl.collection.List | {
list: nasl.collection.List;
total: nasl.core.Integer;
};
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
/**
* 开始时间字段
* 数据内表示开始时间的字段
*/
startKey: (item: T) => any;
/**
* 结束时间字段
* 数据内表示结束时间的字段
*/
endKey: (item: T) => any;
/**
* 选中值
* 当前选中的日期
*/
value: M extends true ? nasl.collection.List : nasl.core.Date;
/**
* 最小日期值
* 最小可选的日期值,默认为10年前,日期填写格式为“yyyy-mm-dd”
*/
minDate: nasl.core.Date | nasl.core.String;
/**
* 最大日期值
* 最大可选的日期值,默认为9年后,日期填写格式为“yyyy-mm-dd”
*/
maxDate: nasl.core.Date | nasl.core.String;
/**
* 展示周天
*/
showWeekDays: nasl.core.Boolean;
/**
* 展示周数
*/
showWeeks: nasl.core.Boolean;
/**
* 展示基础配置
* 是否展示顶部左侧的 "<" "今天" ">" 等基础配置功能
*/
showBasic: nasl.core.Boolean;
/**
* 展示高级配置
* 是否展示顶部右侧的年份、月份选项高级配置
*/
showAdvance: nasl.core.Boolean;
/**
* 首列星期
* 填写数字1~7,分别表示周一~周日
*/
firstDayOfWeek: nasl.core.Integer;
/**
* 可多选
* 开启可多选后,可通过ctrl/command+鼠标多选
*/
multiple: M;
/**
* 选择后
* 选择某一个日期时触发
*/
onSelect: (event: {
date: nasl.core.Integer;
timestamp: nasl.core.Integer;
value: nasl.core.String | nasl.core.Date;
oldValue: nasl.core.String | nasl.core.Date;
week: nasl.core.Integer;
}) => any;
/**
* 改变后
* 日期改变时触发
*/
onChange: (event: {
date: nasl.core.Integer;
timestamp: nasl.core.Integer;
week: nasl.core.Integer;
}) => any;
/**
* 加载前
* 加载前触发
*/
onBeforeLoad: (event: any) => any;
/**
* 加载后
* 加载后触发
*/
onLoad: (event: any) => any;
/**
* 年改变后
* 年份改变后触发
*/
onChangeYear: (event: nasl.core.String) => any;
/**
* 月改变后
* 月份改变后触发
*/
onChangeMonth: (event: nasl.core.String) => any;
/**
* 插入文本或 HTML 至日期组件底部
*/
slotDefault: (current: Current) => Array;
}
}
declare namespace nasl.ui {
export class UCapsules extends ViewComponent {
/**
* 值
*/
value: UCapsulesOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UCapsulesOptions extends ViewComponentOptions {
/**
* 选中值
* 当前选中的值
*/
value: any;
/**
* 自动选择
* 是否自动选择第一个非禁用的项
*/
autoSelect: nasl.core.Boolean;
/**
* 可取消
* 是否可以取消选择
*/
cancelable: nasl.core.Boolean;
/**
* 可多选
* 是否可以多选
*/
multiple: nasl.core.Boolean;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 选择前
* 选择某一项前触发
*/
onBeforeSelect: (event: {
selected: nasl.core.Boolean;
item: nasl.core.String;
oldItem: nasl.core.String;
value: nasl.core.String;
oldValue: nasl.core.String;
items: nasl.collection.List;
oldItems: nasl.collection.List;
}) => any;
/**
* 输入时
* 选择某一项时触发,仅在单选模式中生效
*/
onInput: (event: nasl.core.String) => any;
/**
* 选择后
* 选择某一项时触发。单选模式中:
*/
onSelect: (event: {
selected: nasl.core.Boolean;
item: nasl.core.String;
oldItem: nasl.core.String;
value: nasl.core.String;
oldValue: nasl.core.String;
items: nasl.collection.List;
oldItems: nasl.collection.List;
}) => any;
/**
* 改变后
* 选择值改变时触发。单选模式中:
*/
onChange: (event: {
item: nasl.core.String;
oldItem: nasl.core.String;
value: nasl.core.String;
oldValue: nasl.core.String;
items: nasl.collection.List;
oldItems: nasl.collection.List;
values: nasl.collection.List;
}) => any;
/**
* 插入``或``子组件。
*/
slotDefault: () => Array;
}
export class UCapsule extends ViewComponent {
/**
* 禁用
*/
disabled: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UCapsuleOptions extends ViewComponentOptions {
private item;
/**
* 值
* 此项的值
*/
value: any;
/**
* 标签
* 顶部自定义提示文本
*/
label: nasl.core.String;
/**
* flag标志
* 是否右上角有flag标志
*/
flag: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
private size;
/**
* 点击
* 点击此项时触发,与原生 click 事件不同的是,它只会在非只读和禁用的情况下触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 选择前
* 选择此项前触发
*/
onBeforeSelect: (event: {
selected: nasl.core.Boolean;
item: nasl.core.String;
oldItem: nasl.core.String;
value: nasl.core.String;
oldValue: nasl.core.String;
items: nasl.collection.List;
oldItems: nasl.collection.List;
}) => any;
/**
* 插入文本或 HTML。
*/
slotDefault: () => Array;
}
export class UCapsulesGroup extends ViewComponent {
constructor(options?: Partial);
}
export class UCapsulesGroupOptions extends ViewComponentOptions {
/**
* 插入``或``子组件。
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UCard extends ViewComponent {
constructor(options?: Partial);
}
export class UCardOptions extends ViewComponentOptions {
private title;
/**
* 宽度
* 设置卡片宽度,可设置为像素或百分比
*/
width: nasl.core.String;
/**
* 阴影
* 卡片阴影显示时机
*/
shadow: 'always' | 'hover' | 'never';
/**
* 显示边框
*/
border: nasl.core.Boolean;
/**
* 分割线
*/
split: nasl.core.Boolean;
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 插入默认的元素
*/
slotDefault: () => Array;
/**
* 插入图片
*/
slotCover: () => Array;
/**
* 标题
* 插入文本或 HTML。
*/
slotTitle: () => Array;
}
}
declare namespace nasl.ui {
export class UCarousel extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
/**
* 清除缓存,重新加载
*/
reload(): void;
constructor(options?: Partial>);
}
export class UCarouselOptions extends ViewComponentOptions {
private loop;
private direction;
private animation;
/**
* 数据源
* 展示数据的输入源,可设置为集合类型变量(List)或输出参数为集合类型的逻辑。
*/
dataSource: nasl.collection.List | {
list: nasl.collection.List;
total: nasl.core.Integer;
};
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
private value;
/**
* 轮播
*/
autoplay: nasl.core.Boolean;
/**
* 切换间隔时间
* 单位:毫秒,幻灯片切换时间,如果设置值小于动画时长,会在动画完成后切换
*/
interval: nasl.core.Integer;
/**
* 选择前
* 选择某一页前触发
*/
onBeforeSelect: (event: {
selected: nasl.core.Boolean;
item: T;
oldItem: T;
value: nasl.core.String;
oldValue: nasl.core.String;
}) => any;
/**
* 选择后
* 选择某一页时触发
*/
onSelect: (event: {
selected: nasl.core.Boolean;
item: T;
oldItem: T;
value: nasl.core.String;
oldValue: nasl.core.String;
}) => any;
/**
* 加载前
* 加载前触发
*/
onBeforeLoad: (event: any) => any;
/**
* 加载后
* 加载后触发
*/
onLoad: (event: any) => any;
/**
* 插入``子组件。
*/
slotDefault: () => Array;
/**
* 自定义选项的结构和样式
*/
slotItem: (current: Current) => Array;
}
export class UCarouselItem extends ViewComponent {
constructor(options?: Partial);
}
export class UCarouselItemOptions extends ViewComponentOptions {
private title;
private value;
/**
* 插入文本或 HTML。
*/
slotDefault: () => Array;
/**
* 自定义标题文本。
*/
slotTitle: () => Array;
}
}
declare namespace nasl.ui {
export class UCascader extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
/**
* 选中值
*/
value: UCascaderOptions['value'];
/**
* 过滤文本
*/
filterText: nasl.core.String;
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
/**
* 打开
*/
opened: nasl.core.Boolean;
/**
* 弹出实例。
*/
open(): void;
/**
* 关闭实例。
*/
close(): void;
/**
* 清空输入框。
*/
clear(): void;
/**
* 重新加载数据
*/
reload(): void;
constructor(options?: Partial>);
}
export class UCascaderOptions extends ViewComponentOptions {
/**
* 数据源
* 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑
*/
dataSource: nasl.collection.List | {
list: nasl.collection.List;
total: nasl.core.Integer;
};
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
/**
* 文本字段
* 集合的元素类型中,用于显示文本的属性名称
*/
field: (item: T) => any;
/**
* 值字段
* 集合的元素类型中,用于标识选中值的属性
*/
valueField: (item: T) => V;
/**
* 子级值字段
* 树形数据子节点字段名,默认为children
*/
childrenField: (item: T) => nasl.collection.List;
/**
* 父级值字段
* 当数据源为平铺数据时自动生成级联数据的节点字段名,重要:值字段名需要一起配置
*/
parentField: (item: T) => any;
/**
* 值
*/
value: any;
/**
* 绑定值使用值字段
*/
useArrayLikeValue: nasl.core.Boolean;
/**
* 筛选
* 设置是否可以筛选,开启将会显示搜索框。
*/
filterable: nasl.core.Boolean;
/**
* 筛选文字高亮颜色
* 设置筛选文字高亮颜色
*/
filterHightlighterColor: nasl.core.String;
/**
* 占位符
* 为空时显示的占位符文本
*/
placeholder: nasl.core.String;
/**
* 只显示最后一项
* 定义是否显示完整的路径,ture时只显示最后一项
*/
showFinalValue: nasl.core.Boolean;
/**
* 自动获取焦点
* 设置是否自动获取焦点
*/
autofocus: nasl.core.Boolean;
/**
* 触发方式
*/
trigger: 'click' | 'hover';
/**
* 可清空
* 设置是否可以清空搜索框,开启后将在有内容时显示清除按钮。
*/
clearable: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 弹出状态
* 弹出状态分为“True(弹出)/False(关闭)”,默认为“弹出”
*/
opened: nasl.core.Boolean;
/**
* 宽度
* 设置级联框宽度大小
*/
width: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 高度
* 设置级联框高度大小
*/
height: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
private join;
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
/**
* 输入时
* 选择某一项时触发
*/
onInput: (event: V) => any;
/**
* 选择后
* 选择某一项时触发
*/
onSelect: (event: {
value: V;
values: nasl.collection.List;
items: nasl.collection.List;
}) => any;
/**
* 获得焦点
* 获得焦点时触发。
*/
onFocus: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 失去焦点
* 失去焦点时触发。
*/
onBlur: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 清空后
* 清空后触发。
*/
onClear: (event: any) => any;
/**
* 加载前
* 加载前触发
*/
onBeforeLoad: (event: any) => any;
/**
* 加载后
* 加载后触发
*/
onLoad: (event: any) => any;
}
}
declare namespace nasl.ui {
export class UCheckboxes extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
/**
* 选中值
*/
value: UCheckboxesOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
/**
* 清除缓存,重新加载
*/
reload(): void;
constructor(options?: Partial>);
}
export class UCheckboxesOptions extends ViewComponentOptions {
/**
* 数据源
* 展示数据的输入源,可设置为集合类型变量(List)或输出参数为集合类型的逻辑。
*/
dataSource: nasl.collection.List | {
list: nasl.collection.List;
total: nasl.core.Integer;
};
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
private textField;
/**
* 值字段
* 用于标识选中值的字段
*/
valueField: (item: T) => V;
/**
* 选中值
* 当前选中的值
*/
value: C extends '' ? nasl.collection.List : nasl.core.String;
/**
* 全选控制
* 是否进行全选
*/
checkAll: nasl.core.Boolean;
/**
* 全选展示内容
* 全选功能展示的文案内容
*/
checkAllText: nasl.core.String;
/**
* 展示方式
* 选择展开方式
*/
checkAllDisplay: 'inline' | 'block';
/**
* 最小选中数
* 可以勾选多选框的最小数量
*/
min: nasl.core.Integer;
/**
* 最大选中数
* 可以勾选多选框的最大数量
*/
max: nasl.core.Integer;
/**
* 转换器
* 将选中的值以选择的符号作为连接符,转为字符串格式;选择“json”则转为JSON字符串格式
*/
converter: '' | 'join' | 'join:|' | 'join:;' | 'json';
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 输入时
* 切换选项时触发
*/
onInput: (event: nasl.collection.List) => any;
/**
* 选中后
* 切换选项时触发
*/
onCheck: (event: {
value: nasl.collection.List | nasl.core.String;
oldValue: nasl.collection.List | nasl.core.String;
}) => any;
/**
* 改变后
* 选中状态改变时触发
*/
onChange: (event: {
value: nasl.collection.List | nasl.core.String;
oldValue: nasl.collection.List | nasl.core.String;
}) => any;
/**
* 加载前
* 加载前触发
*/
onBeforeLoad: (event: any) => any;
/**
* 加载后
* 加载后触发
*/
onLoad: (event: any) => any;
/**
* 插入``子组件。
*/
slotDefault: () => Array>;
/**
* 全选/反选
*/
slotCheckAll: () => Array;
/**
* 自定义选项的结构和样式
*/
slotItem: (current: Current) => Array;
}
export class UCheckbox extends ViewComponent {
/**
* 选中
*/
value: UCheckboxOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
constructor(options?: Partial>);
}
export class UCheckboxOptions extends ViewComponentOptions {
private text;
private value;
/**
* 选项值
* 用于标识选项的值
*/
label: V;
/**
* 自动获取焦点
*/
autofocus: nasl.core.Boolean;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 选中前
* 切换选中状态前触发
*/
onBeforeCheck: (event: {
value: nasl.core.Boolean;
oldValue: nasl.core.Boolean;
}) => any;
/**
* 输入时
* 切换选中状态时触发
*/
onInput: (event: V) => any;
/**
* 选中后
* 切换选中状态时触发
*/
onCheck: (event: {
value: V;
}) => any;
/**
* 改变后
* 选中状态改变时触发
*/
onChange: (event: {
value: V;
oldValue: V;
}) => any;
/**
* 项
* 插入文本或 HTML。
*/
slotItem: () => Array;
}
}
declare namespace nasl.ui {
export class UCircularProgress extends ViewComponent {
/**
* 当前进度(%)
*/
percent: UCircularProgressOptions['percent'];
constructor(options?: Partial);
}
export class UCircularProgressOptions extends ViewComponentOptions {
/**
* 当前进度(%)
* 进度条显示的进度百分比,1-100之间的数字
*/
percent: nasl.core.Decimal | nasl.core.Integer;
/**
* 尺寸
* 进度条大小
*/
size: 'small' | 'normal' | 'large' | 'huge';
/**
* 默认
* 插入文本或 HTML。
*/
slotDefault: () => Array;
/**
* 分数展示
* 分数展示自定义
*/
slotPercent: () => Array;
}
}
declare namespace nasl.ui {
export class UCollapse extends ViewComponent {
/**
* 禁用
*/
disabled: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UCollapseOptions extends ViewComponentOptions {
/**
* 显示效果
*/
appear: 'default' | 'simple';
/**
* 填充位置
*/
fill: 'head' | 'content' | 'none';
/**
* 手风琴模式
* 设置是否每次只展开一个
*/
accordion: nasl.core.Boolean;
/**
* 展开触发方式
* 展开/折叠操作的触发方式
*/
expandTrigger: 'click' | 'click-expander';
/**
* 禁用展开/折叠
* 置灰显示,且禁止展开/折叠操作
*/
disabled: nasl.core.Boolean;
/**
* 展开时
* 展开此面板时触发
*/
onExpand: (event: any) => any;
/**
* 折叠时
* 折叠某面板时触发
*/
onCollapse: (event: any) => any;
/**
* 插入``子组件。
*/
slotDefault: () => Array;
}
export class UCollapseItem extends ViewComponent {
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 是否展开
*/
expanded: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UCollapseItemOptions extends ViewComponentOptions {
private title;
/**
* 展开状态
* 展开状态分为“True(展开)/False(折叠)”,默认为“展开”
*/
expanded: nasl.core.Boolean;
/**
* 禁用展开/折叠
* 置灰显示,且禁止展开/折叠操作
*/
disabled: nasl.core.Boolean;
/**
* 展开时
* 展开此面板时触发
*/
onExpand: (event: any) => any;
/**
* 折叠时
* 折叠某面板时触发
*/
onCollapse: (event: any) => any;
/**
* 插入文本或 HTML。
*/
slotDefault: () => Array;
/**
* 自定义标题文本。
*/
slotTitle: () => Array;
/**
* 在右侧可以附加内容。
*/
slotExtra: () => Array;
}
}
declare namespace nasl.ui {
export class UComboSlider extends ViewComponent {
/**
* 滑块值
*/
value: UComboSliderOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UComboSliderOptions extends ViewComponentOptions {
private tip;
/**
* 滑块值
*/
value: nasl.core.Decimal | nasl.core.Integer | nasl.collection.List | nasl.collection.List;
/**
* 最小值
*/
min: nasl.core.Decimal | nasl.core.Integer;
/**
* 最大值
*/
max: nasl.core.Decimal | nasl.core.Integer;
/**
* 间隔
* 间隔,`0`表示连续
*/
step: nasl.core.Decimal | nasl.core.Integer;
/**
* 精度
* 精度,表示数字要保留的最小单位,整数、小数均可
*/
precision: nasl.core.Decimal | nasl.core.Integer;
/**
* 范围
* 进一步对`value`限制,通常传入一个数组,第一个值表示范围开始值,第二个值表示范围的结束值
*/
range: nasl.collection.List | nasl.collection.List;
private formatter;
/**
* 双滑块
* 设置是否展示双滑块
*/
multiple: nasl.core.Boolean;
/**
* 单位
*/
unit: nasl.core.String;
/**
* 同步时机
*/
syncOn: 'input' | 'blur';
/**
* 隐藏按钮
*/
hideButtons: nasl.core.Boolean;
/**
* 展示提示信息
* 鼠标悬浮时展示Tooltip提示信息
*/
showTooltip: nasl.core.Boolean;
/**
* 提示信息
* Tooltip提示信息设置。在展示提示信息开关打开的情况下才会生效
*/
tooltip: nasl.core.String;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
/**
* 值改变时
* 滑块的值改变时触发
*/
onInput: (event: nasl.core.Decimal | nasl.core.Integer) => any;
/**
* 拖动滑块时
* 拖动滑块时触发
*/
onSlide: (event: {
value: nasl.core.Decimal | nasl.core.Integer;
oldValue: nasl.core.Decimal | nasl.core.Integer;
percent: nasl.core.Decimal | nasl.core.Integer;
index: nasl.core.Decimal | nasl.core.Integer;
}) => any;
/**
* 值改变后
* 滑块的值改变后触发
*/
onChange: (event: {
value: nasl.core.Decimal | nasl.core.Integer;
oldValue: nasl.core.Decimal | nasl.core.Integer;
}) => any;
/**
* 改变数字输入框的值后
* 改变数字输入框的值后触发
*/
onNumberInput: (event: nasl.core.Decimal | nasl.core.Integer) => any;
/**
* 拖动滑块结束后
* 拖动滑块结束后触发
*/
onSlideEnd: (event: nasl.core.Decimal | nasl.core.Integer) => any;
/**
* 提示
* 插入文本或 HTML。
*/
slotTip: () => Array;
}
}
declare namespace nasl.ui {
export class UCopy extends ViewComponent {
/**
* 复制的值
*/
value: UCopyOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UCopyOptions extends ViewComponentOptions {
private text;
private successText;
private feedback;
private placement;
private hideDelay;
/**
* 复制的值
* 需要复制的值
*/
value: nasl.core.String;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 复制成功后
* 内容复制成功后触发
*/
onCopy: (event: {
value: nasl.core.String;
}) => any;
/**
* 修改默认触发元素
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UCountDown extends ViewComponent {
/**
* 开始计时器
*/
start(): void;
/**
* 暂停计时器
*/
pause(): void;
/**
* 继续计时器
*/
continue(): void;
/**
* 停止计时器
*/
stop(): void;
constructor(options?: Partial);
}
export class UCountDownOptions extends ViewComponentOptions {
/**
* 定时时长(秒)
* 设置定时时间
*/
timer: nasl.core.Decimal | nasl.core.Integer;
/**
* 计时方式
* 设置计时器计时方式
*/
reverse: 'positive' | 'negative';
/**
* 自动计时
* 设置是否自动开始计时
*/
autostart: nasl.core.Boolean;
/**
* 计时器开始
* 计时器开始时触发
*/
onStart: (event: any) => any;
/**
* 计时器暂停
* 计时器暂停时触发
*/
onPause: (event: any) => any;
/**
* 计时器继续
* 计时器继续时触发
*/
onContinue: (event: any) => any;
/**
* 计时器结束
* 计时器结束时触发
*/
onStop: (event: any) => any;
}
}
declare namespace nasl.ui {
export class UCrumb extends ViewComponent {
constructor(options?: Partial);
}
export class UCrumbOptions extends ViewComponentOptions {
/**
* 自动生成
* 是否自动根据子页面配置的面包屑属性自动生成
*/
auto: nasl.core.Boolean;
/**
* 样式类型
* 设置面包屑分隔样式类型,基础样式为箭头,分隔符样式为斜杠
*/
separator: 'arrow' | 'slash';
/**
* 显示面包屑图标
*/
icon: nasl.core.Boolean;
/**
* 插入``子组件。
*/
slotDefault: () => Array;
}
export class UCrumbItem extends ViewComponent {
constructor(options?: Partial);
}
export class UCrumbItemOptions extends ViewComponentOptions {
private text;
private replace;
private append;
/**
* 图标
*/
icon: nasl.core.String;
private type;
/**
* 链接类型
*/
linkType: 'destination' | 'download';
/**
* 链接地址
*/
hrefAndTo: nasl.core.String;
/**
* 链接打开方式
* 链接打开后的展示方式,父级窗口和顶级窗口仅适用于iframe组件嵌套的情况,若不存在嵌套,则其打开方式同当前窗口。
*/
target: '_blank' | '_self' | '_parent' | '_top';
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 获得焦点
* 获得焦点时触发。
*/
onFocus: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 失去焦点
* 失去焦点时触发。
*/
onBlur: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 导航前
* 使用 router 相关属性切换路由前触发
*/
onBeforeNavigate: (event: {
to: nasl.core.String;
replace: nasl.core.Boolean;
append: nasl.core.Boolean;
}) => any;
/**
* 导航
* 使用router相关属性切换路由时触发
*/
onNavigate: (event: {
to: nasl.core.String;
replace: nasl.core.Boolean;
append: nasl.core.Boolean;
}) => any;
/**
* 默认
* 插入文本或 HTML。
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UDatePicker extends ViewComponent {
/**
* 值
*/
value: UDatePickerOptions['value'];
/**
* 起始值
*/
startDate: UDatePickerOptions['startDate'];
/**
* 结束值
*/
endDate: UDatePickerOptions['endDate'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
/**
* 打开
*/
opened: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UDatePickerOptions extends ViewComponentOptions {
/**
* 日期类型
* 日期格式设置
*/
picker: 'date' | 'week' | 'month' | 'quarter' | 'year';
/**
* 区间选择
* 是否支持进行日期区间选择,关闭则为日期点选择
*/
range: nasl.core.Boolean;
/**
* 值
* 默认显示的日期值,格式如2018-08-08
*/
value: nasl.core.String | nasl.core.Integer | nasl.core.Date | nasl.core.DateTime;
/**
* 起始值
* 默认显示的起始日期值,格式如2018-08-08
*/
startDate: nasl.core.String | nasl.core.Integer | nasl.core.Date | nasl.core.DateTime;
/**
* 结束值
* 默认显示的结束日期值,格式如2018-08-08
*/
endDate: nasl.core.String | nasl.core.Integer | nasl.core.Date | nasl.core.DateTime;
/**
* 最小日期值
* 最小可选的日期值,默认为10年前,日期填写格式为“yyyy-mm-dd”
*/
minDate: nasl.core.String | nasl.core.Integer | nasl.core.Date | nasl.core.DateTime;
/**
* 最大日期值
* 最大可选的日期值,默认为9年后,日期填写格式为“yyyy-mm-dd”
*/
maxDate: nasl.core.String | nasl.core.Integer | nasl.core.Date | nasl.core.DateTime;
private time;
/**
* 最小年份差值
* 最小可选年份值与当前年份值的差值
*/
yearDiff: nasl.core.Decimal | nasl.core.Integer;
/**
* 最大年份差值
* 最大可选年份值与当前年份值的差值
*/
yearAdd: nasl.core.Decimal | nasl.core.Integer;
/**
* 高级格式化
*/
advancedFormatEnable: nasl.core.Boolean;
/**
* 高级格式化内容
* 用来控制日期的展示格式
*/
advancedFormatValue: nasl.core.String;
/**
* 日期展示格式
*/
showFormatter: 'YYYY年M月D日' | 'YYYY-MM-DD' | 'M/D/YYYY' | 'D/M/YYYY' | 'GGGG-W周' | 'GGGG年第W周' | 'GGGG-WWWW' | 'YYYY年M月' | 'YYYY-MM' | 'M/YYYY' | 'YYYY年第Q季度' | 'YYYY年QQ' | 'YYYY-QQ' | 'YYYY年' | 'YYYY';
/**
* 自动获取焦点
* 设置是否自动获取焦点
*/
autofocus: nasl.core.Boolean;
/**
* 占位符
* 为空时显示的占位符文本
*/
placeholder: nasl.core.String;
/**
* 右侧占位符
* 为空时显示的占位符文本(右侧)
*/
placeholderRight: nasl.core.String;
/**
* 日历弹窗对齐方式
* 日历弹窗对齐方式
*/
alignment: 'left' | 'right';
/**
* 转换器
* 转换器,用于转换时间结果
*/
converter: 'json' | 'timestamp' | 'date' | 'format';
/**
* 前缀图标
*/
preIcon: 'calendar' | '';
/**
* 后缀图标
*/
suffixIcon: 'calendar' | '';
/**
* 弹出层位置依据
* 设置弹出层依据哪个元素定位位置,可选值:'body'表示添加到 document.body,'reference'表示添加到参考元素中。
*/
appendTo: 'reference' | 'body';
/**
* 可清除
* 可点击清除按钮一键清除内容
*/
clearable: nasl.core.Boolean;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
/**
* 弹出状态
* 弹出状态分为“True(弹出)/False(关闭)”,默认为“关闭”
*/
opened: nasl.core.Boolean;
/**
* 宽度
* 设置日期选择输入框宽度大小
*/
width: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 高度
* 设置日期选择输入框高度大小
*/
height: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 值输入后
* 值变化时触发 (表单验证可以检测到其值得变化)
*/
onInput: (event: nasl.core.Date) => any;
/**
* 值变化时
* 值变化时触发
*/
onChange: (event: {
date: nasl.core.String;
time: nasl.core.String;
}) => any;
/**
* 选择时
* 选择日期时触发
*/
onSelect: (event: {
date: nasl.core.String;
time: nasl.core.String;
}) => any;
/**
* 弹出/隐藏时
* 弹出/隐藏时触发
*/
onToggle: (event: {
opened: nasl.core.Boolean;
}) => any;
/**
* 失去焦点
* 失去焦点时触发。
*/
onBlur: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
}
}
declare namespace nasl.ui {
export class UDateTimePicker extends ViewComponent {
/**
* 值
*/
value: UDatePickerOptions['value'];
/**
* 起始值
*/
startDate: UDatePickerOptions['startDate'];
/**
* 结束值
*/
endDate: UDatePickerOptions['endDate'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
/**
* 打开
*/
opened: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UDateTimePickerOptions extends ViewComponentOptions {
/**
* 最小单位
* 最小时间单位
*/
minUnit: 'second' | 'minute';
/**
* 区间选择
* 是否支持进行日期时间区间选择,关闭则为日期时间点选择
*/
range: nasl.core.Boolean;
/**
* 值
* 默认显示的日期时间值,格式如2018-08-08 08:08:08
*/
value: nasl.core.String | nasl.core.Decimal | nasl.core.Date | nasl.core.DateTime | nasl.core.Integer;
/**
* 起始值
* 默认显示的起始日期时间值,格式如2018-08-08 08:08:08
*/
startDate: nasl.core.String | nasl.core.Decimal | nasl.core.Date | nasl.core.DateTime;
/**
* 结束值
* 默认显示的结束日期时间值,格式如2018-08-08 08:08:08
*/
endDate: nasl.core.String | nasl.core.Decimal | nasl.core.Date | nasl.core.DateTime;
/**
* 最小日期时间值
* 最小可选的日期时间值,填写null则不限制,日期填写格式为“yyyy-mm-dd 00:00:00”
*/
minDate: nasl.core.String | nasl.core.Decimal | nasl.core.Date | nasl.core.DateTime;
/**
* 最大日期时间值
* 最大可选的日期时间值,填写null则不限制,日期填写格式为“yyyy-mm-dd 00:00:00”
*/
maxDate: nasl.core.String | nasl.core.Decimal | nasl.core.Date | nasl.core.DateTime;
/**
* 最小年份差值
* 最小可选年份值与当前年份值的差值
*/
yearDiff: nasl.core.Decimal;
/**
* 最大年份差值
* 最大可选年份值与当前年份值的差值
*/
yearAdd: nasl.core.Decimal;
/**
* 日期展示格式
*/
showDateFormatter: 'YYYY年M月D日' | 'YYYY-MM-DD' | 'M/D/YYYY' | 'D/M/YYYY';
/**
* 时间展示格式
*/
showTimeFormatter: 'HH:mm:ss' | 'HH时mm分ss秒' | 'HH:mm' | 'HH时mm分';
/**
* 高级格式化
*/
advancedFormatEnable: nasl.core.Boolean;
/**
* 高级格式化内容
* 用来控制日期时间的展示格式
*/
advancedFormatValue: nasl.core.String;
/**
* 占位符
* 为空时显示的占位符文本
*/
placeholder: nasl.core.String;
/**
* 右侧占位符
* 为空时显示的占位符文本(右侧)
*/
placeholderRight: nasl.core.String;
/**
* 自动获取焦点
* 设置是否自动获取焦点
*/
autofocus: nasl.core.Boolean;
/**
* 此刻按钮
* 点击可快捷选择当前时间
*/
showRightNowButton: nasl.core.Boolean;
/**
* 此刻按钮名称
*/
rightNowTitle: nasl.core.String;
/**
* 取消/确定按钮
* 控制弹出层的关闭和设置的生效与否
*/
showFooterButton: nasl.core.Boolean;
/**
* 取消按钮名称
* 取消按钮的显示名称,如果为空则不显示
*/
cancelTitle: nasl.core.String;
/**
* 确定按钮名称
* 确定按钮的显示名称,如果为空则不显示
*/
okTitle: nasl.core.String;
/**
* 转换器
*/
converter: 'json' | 'timestamp' | 'date' | 'format';
/**
* 前缀图标
*/
preIcon: 'calendar' | '';
/**
* 后缀图标
*/
suffixIcon: 'calendar' | '';
/**
* 弹出层位置依据
* 设置弹出层依据哪个元素定位位置,可选值:'body'表示添加到 document.body,'reference'表示添加到参考元素中。
*/
appendTo: 'reference' | 'body';
/**
* 可清除
* 可点击清除按钮一键清除内容
*/
clearable: nasl.core.Boolean;
/**
* 弹出状态
* 弹出状态分为“True(弹出)/False(关闭)”,默认为“关闭”
*/
opened: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
/**
* 宽度
* 设置日期时间选择输入框宽度大小
*/
width: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 高度
* 设置日期时间选择输入框高度大小
*/
height: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 值选择时
* 日期值发生变化触发
*/
onSelect: (event: {
date: nasl.core.String;
time: nasl.core.String;
}) => any;
/**
* 值变化时
* 选择新时间触发
*/
onChange: (event: {
date: nasl.core.String;
time: nasl.core.String;
}) => any;
/**
* 失去焦点
* 失去焦点时触发。
*/
onBlur: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
}
}
declare namespace nasl.ui {
export class UDivider extends ViewComponent {
constructor(options?: Partial);
}
export class UDividerOptions extends ViewComponentOptions {
private title;
/**
* 线条类型
*/
dashed: 'b' | 'a';
/**
* 内容位置
*/
contentPosition: 'center' | 'left' | 'right';
/**
* 方向
*/
direction: 'horizontal' | 'column';
/**
* 默认
* 显示的文本
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UDrawer extends ViewComponent {
/**
* 显示状态
*/
visible: nasl.core.Boolean;
/**
* 打开抽屉
*/
open(): void;
/**
* 关闭抽屉
*/
close(): void;
constructor(options?: Partial);
}
export class UDrawerOptions extends ViewComponentOptions {
/**
* 抽屉位置
* 抽屉弹出的位置
*/
placement: 'left' | 'right' | 'top' | 'bottom';
/**
* 显示顶部栏
*/
showHead: nasl.core.Boolean;
/**
* 显示底部栏
*/
showFoot: nasl.core.Boolean;
/**
* 点击遮罩关闭
* 点击遮罩关闭抽屉
*/
maskClosable: nasl.core.Boolean;
/**
* 显示状态
* 显示状态分为“True(打开)/False(关闭)”,默认为“打开”
*/
visible: nasl.core.Boolean;
/**
* 尺寸
* 抽屉的尺寸
*/
size: 'small' | 'normal' | 'large';
/**
* 打开时
* 打开抽屉时触发
*/
onOpen: (event: any) => any;
/**
* 打开后
* 打开抽屉后触发,动画执行完成后
*/
onOpened: (event: any) => any;
/**
* 关闭前
* 关闭抽屉前触发
*/
onBeforeClose: (event: {
ok: nasl.core.Boolean;
}) => any;
/**
* 关闭时
* 关闭抽屉时触发
*/
onClose: (event: {
ok: nasl.core.Boolean;
}) => any;
/**
* 头部
* 插入文本或 HTML。
*/
slotTitle: () => Array;
/**
* 内容区
* 插入文本或 HTML。
*/
slotBody: () => Array;
/**
* 底部
* 插入文本或 HTML。
*/
slotFoot: () => Array;
}
}
declare namespace nasl.ui {
export class UDropdown extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
/**
* 选中值
*/
value: UDropdownOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 已打开
*/
opened: nasl.core.Boolean;
constructor(options?: Partial>);
}
export class UDropdownOptions extends ViewComponentOptions {
/**
* 数据源配置
*/
hasDataSource: nasl.core.Boolean;
/**
* 数据源
* 展示数据的输入源,可设置为集合类型变量(List)或输出参数为集合类型的逻辑。
*/
dataSource: nasl.collection.List | {
list: nasl.collection.List;
total: nasl.core.Integer;
};
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
/**
* 文本字段
* 集合的元素类型中,用于显示文本的属性名称
*/
textField: (item: T) => any;
/**
* 值字段
* 集合的元素类型中,用于标识选中值的属性
*/
valueField: (item: T) => V;
/**
* 图标属性字段
* 集合的元素类型中,用于图标的属性名称
*/
iconField: (item: T) => any;
/**
* 跳转链接字段
* 集合的元素类型中,用于跳转链接的属性名称
*/
toField: (item: T) => any;
/**
* 父级值字段
* 集合的元素类型中,用于标识父节点的属性
*/
parentField: (item: T) => any;
/**
* 触发方式
* 触发方式
*/
trigger: 'click' | 'hover' | 'right-click' | 'double-click' | 'manual';
/**
* 样式类型
*/
type: 'text' | 'primary' | 'primary_secondary' | 'normal' | 'more';
/**
* 弹出方向
* 弹出层的弹出方向
*/
placement: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
/**
* 弹出层位置依据
* 设置弹出层依据哪个元素定位位置,可选值:'body'表示添加到 document.body,'reference'表示添加到参考元素中。
*/
appendTo: 'reference' | 'body';
/**
* 使用路由
* 是否使用 vue-router
*/
router: nasl.core.Boolean;
/**
* 选中值
* 当前选中的值
*/
value: V;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 显示状态
*/
opened: nasl.core.Boolean;
/**
* 插入``子组件。
*/
slotDefault: () => Array;
/**
* 标题
* 内容自定义
*/
slotTitle: () => Array;
}
export class UDropdownItem extends ViewComponent {
constructor(options?: Partial);
}
export class UDropdownItemOptions extends ViewComponentOptions {
private text;
private to;
/**
* 图标
*/
icon: nasl.core.String;
/**
* 链接类型
*/
linkType: 'destination' | 'download';
/**
* 链接地址
*/
hrefAndTo: nasl.core.String;
/**
* 链接打开方式
* 链接跳转的打开方式,父级窗口和顶级窗口仅适用于iframe组件嵌套的情况,若不存在嵌套,则其打开方式同当前窗口。
*/
target: '_blank' | '_self' | '_parent' | '_top';
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 点击
* 点击此项时触发,与原生 click 事件不同的是,它只会在非只读和禁用的情况下触发。
*/
onClick: (event: any) => any;
/**
* 默认
* 插入文本或 HTML。
*/
slotDefault: () => Array;
}
export class UDropdownGroup extends ViewComponent {
constructor(options?: Partial);
}
export class UDropdownGroupOptions extends ViewComponentOptions {
private title;
/**
* 可折叠
* 设置是否可以展开/折叠
*/
collapsible: nasl.core.Boolean;
/**
* 触发方式
* 触发方式
*/
trigger: 'click' | 'hover' | 'right-click' | 'double-click' | 'none';
/**
* 展开状态
* 展开状态分为“True(展开)/False(折叠)”,默认为“展开”
*/
expanded: nasl.core.Boolean;
/**
* 禁用展开/折叠
* 置灰显示,且禁止展开/折叠操作
*/
disabled: nasl.core.Boolean;
/**
* 插入``子组件。
*/
slotDefault: () => Array;
/**
* 标题
* 内容自定义
*/
slotTitle: () => Array;
}
}
declare namespace nasl.ui {
export class UForm extends ViewComponent {
/**
* 预览
*/
preview: nasl.core.Boolean;
/**
* 手动验证。
* @param trigger - '触发方式,可选值:`submit`、`blur`和`input`之一,或者它们的任意组合。'
* @param muted - '是否验证后无提示'
*/
validate(trigger?: nasl.core.String, muted?: nasl.core.Boolean): ValidateResult;
/**
* 验证表单中的某一项,已废弃。表单中的项是嵌套的,用 name 层级较深,而且可能有重名。
* @param name - '表单项的 name'
* @param trigger - '触发方式,可选值:`submit`、`blur`和`input`之一,或者它们的任意组合。'
* @param muted - '是否验证后无提示'
*/
validateItem(name: nasl.core.String, trigger?: nasl.core.String, muted?: nasl.core.Boolean): ValidateResult;
constructor(options?: Partial);
}
export class UFormOptions extends ViewComponentOptions {
private model;
private size;
private rules;
/**
* 表单布局
*/
layout: 'inline' | 'block' | 'inline-flex';
/**
* 列数
* 整个表单的划分列数
*/
repeat: nasl.core.Decimal | nasl.core.Integer;
/**
* 标签布局
*/
labelLayout: 'inline' | 'block';
/**
* 标签过长省略
* 文字过长是否省略显示。默认文字超出时会换行。
*/
labelEllipsis: nasl.core.Boolean;
/**
* 可折叠
* 设置是否可以展开/折叠
*/
collapsible: nasl.core.Boolean;
/**
* 手风琴模式
* 设置是否每次只展开一个
*/
accordion: nasl.core.Boolean;
/**
* 展开触发方式
* 展开/折叠操作的触发方式
*/
expandTrigger: 'click' | 'click-expander';
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
/**
* 列间隔
* 设置表单列间隔大小
*/
gapWidth: 'none' | 'small' | 'normal' | 'large';
/**
* 行间隔
* 设置表单行间隔大小
*/
gapHeight: 'none' | 'small' | 'normal' | 'large';
/**
* 标签宽度
*/
labelSize: 'mini' | 'small' | 'normal' | 'large';
/**
* 冒号
* 设置是否显示标签后的冒号
*/
colon: nasl.core.Boolean;
/**
* 验证后
* 验证时触发
*/
onValidate: (event: {
rawValue: nasl.core.String;
value: nasl.core.String;
trigger: nasl.core.String;
muted: nasl.core.String;
valid: nasl.core.Boolean;
touched: nasl.core.Boolean;
dirty: nasl.core.Boolean;
firstError: nasl.core.String;
triggerValid: nasl.core.Boolean;
}) => any;
/**
* 插入``子组件。
*/
slotDefault: () => Array;
}
export class UFormItem extends ViewComponent {
/**
* 验证此表单项。
* @param trigger - '触发方式,可选值:`submit`、`blur`和`input`之一,或者它们的任意组合。'
* @param muted - '是否验证后无提示'
*/
validate(trigger?: nasl.core.String, muted?: nasl.core.Boolean): any;
constructor(options?: Partial);
}
export class UFormItemOptions extends ViewComponentOptions {
private name;
private label;
private muted;
private placement;
private ignoreRules;
private validatingOptions;
private validatingValue;
private validatingProcess;
/**
* 占据数
* 列跨越的格数
*/
span: nasl.core.Decimal | nasl.core.Integer;
/**
* 标签布局
*/
labelLayout: 'inline' | 'block';
/**
* 标签过长省略
* 文字过长是否省略显示。默认文字超出时会换行。
*/
labelEllipsis: nasl.core.Boolean;
/**
* 必填标记
* 是否必填。仅显示样式,如果要验证必填项,需要在`rules`中添加必填规则。
*/
required: nasl.core.Boolean;
/**
* 必填标记位置
*/
requiredPosition: 'left' | 'right';
/**
* 释义提示
* 鼠标悬浮标签后的图标显示释义提示信息
*/
message: nasl.core.String;
/**
* 辅助文本
* 辅助说明的文本信息
*/
description: nasl.core.String;
/**
* 标签纵轴对齐
* 标签与表单元素的纵轴对齐方式,默认为顶对齐
*/
layout: 'block' | 'center' | 'end';
/**
* 验证规则
* 验证规则。简写格式为字符串类型,完整格式或混合格式为数组类型
*/
rules: nasl.core.String;
/**
* 忽略验证
*/
ignoreValidation: nasl.core.Boolean;
/**
* 字段大小
* 单独设置表单项的内容大小
*/
fieldSize: 'mini' | 'small' | 'normal' | 'large';
/**
* 表单项标题宽度
*/
labelSize: 'mini' | 'small' | 'normal' | 'large';
/**
* 验证后
* 对于第一个 Field 或者所有子 UValidator:
*/
onValidate: (event: {
rawValue: nasl.core.String;
value: nasl.core.String;
trigger: nasl.core.String;
muted: nasl.core.String;
valid: nasl.core.Boolean;
touched: nasl.core.Boolean;
dirty: nasl.core.Boolean;
firstError: nasl.core.String;
triggerValid: nasl.core.Boolean;
}) => any;
/**
* 默认
* 插入文本或 HTML。
*/
slotDefault: () => Array;
/**
* 标签自定义
* 插入自定义标签,代替`label`属性。
*/
slotLabel: () => Array;
/**
* 描述自定义
* 插入自定义描述内容,代替`description`属性。
*/
slotDescription: () => Array;
/**
* 附加内容
* 自定义标签右侧额外内容。
*/
slotExtra: () => Array;
}
export class UFormGroup extends ViewComponent {
constructor(options?: Partial);
}
export class UFormGroupOptions extends ViewComponentOptions {
/**
* 标题
*/
title: nasl.core.String;
/**
* 列数
* 整个表单的划分列数
*/
repeat: nasl.core.Decimal | nasl.core.Integer;
/**
* 标签布局
*/
labelLayout: 'inline' | 'block';
/**
* 标签过长省略
* 文字过长是否省略显示。默认文字超出时会换行。
*/
labelEllipsis: nasl.core.Boolean;
/**
* 可折叠
* 设置是否可以展开/折叠
*/
collapsible: nasl.core.Boolean;
/**
* 展开状态
* 展开状态分为“True(展开)/False(折叠)”,默认为“展开”
*/
expanded: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止展开/折叠操作
*/
disabled: nasl.core.Boolean;
/**
* 展开折叠前
* 展开/折叠此分组前触发
*/
onBeforeToggle: (event: {
expanded: nasl.core.Boolean;
}) => any;
/**
* 展开折叠后
* 展开/折叠某分组时触发
*/
onToggle: (event: {
expanded: nasl.core.Boolean;
}) => any;
/**
* 插入``或``子组件。
*/
slotDefault: () => Array;
/**
* 自定义标题文本。
*/
slotTitle: () => Array;
/**
* 在右侧可以附加内容。
*/
slotExtra: () => Array;
}
}
declare namespace nasl.ui {
export class UGallery extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
/**
* 重新加载数据
*/
reload(): void;
constructor(options?: Partial>);
}
export class UGalleryOptions extends ViewComponentOptions {
/**
* 数据源
* 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑
*/
dataSource: nasl.collection.List | {
list: nasl.collection.List;
total: nasl.core.Integer;
};
/**
* 数据类型
* 集合类型每一元素的数据类型
*/
dataSchema: T;
/**
* 画廊模式
* 图片的显示模式,支持大图模式和缩略图模式。
*/
pattern: 'small' | 'big';
/**
* 显示图片数
*/
num: nasl.core.Decimal | nasl.core.Integer;
/**
* 显示左右箭头
*/
arrow: nasl.core.Boolean;
/**
* 加载前
* 加载前触发
*/
onBeforeLoad: (event: any) => any;
/**
* 加载后
* 加载后触发
*/
onLoad: (event: any) => any;
}
}
declare namespace nasl.ui {
export class UGridLayout extends ViewComponent {
constructor(options?: Partial);
}
export class UGridLayoutOptions extends ViewComponentOptions {
/**
* 行间隔
* 栅格行之间的间隔
*/
gap: 'compact' | 'none' | 'small' | 'normal' | 'large';
/**
* 滚动时
* 滚动时触发
*/
onScroll: (event: {
scrollTop: nasl.core.Integer;
scrollLeft: nasl.core.Integer;
scrollWidth: nasl.core.Integer;
scrollHeight: nasl.core.Integer;
clientWidth: nasl.core.Integer;
clientHeight: nasl.core.Integer;
}) => any;
/**
* 插入``或``子组件。
*/
slotDefault: () => Array;
}
export class UGridLayoutRow extends ViewComponent {
constructor(options?: Partial);
}
export class UGridLayoutRowOptions extends ViewComponentOptions {
/**
* 横轴对齐
*/
justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
/**
* 纵轴对齐
*/
alignment: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
/**
* 栅格数
* 默认24,可设置栅格行大小
*/
repeat: nasl.core.Decimal | nasl.core.Integer;
/**
* 列间隔
* 栅格列之间的间隔
*/
gap: 'none' | 'mini' | 'small' | 'normal' | 'large' | 'huge';
/**
* 插入``子组件。
*/
slotDefault: () => Array;
}
export class UGridLayoutColumn extends ViewComponent {
constructor(options?: Partial);
}
export class UGridLayoutColumnOptions extends ViewComponentOptions {
private mediaHuge;
private mediaLarge;
private mediaMedium;
private mediaSmall;
private mediaMini;
/**
* 布局模式
*/
mode: 'inline' | 'flex';
/**
* 主轴方向
*/
direction: 'horizontal' | 'vertical';
_justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
/**
* 纵轴对齐
*/
alignment: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
_alignment: 'start' | 'center' | 'end' | 'stretch';
/**
* 横轴对齐
*/
justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
/**
* 占据栅格数
* 列占据栅格行的栅格数
*/
span: nasl.core.Decimal | nasl.core.Integer;
/**
* 偏移栅格数
* 列偏移的栅格数
*/
offset: nasl.core.Decimal | nasl.core.Integer;
/**
* 左移动栅格数
* 列向左移动的栅格数
*/
pull: nasl.core.Decimal | nasl.core.Integer;
/**
* 右移动栅格数
* 列向右移动的栅格数
*/
push: nasl.core.Decimal | nasl.core.Integer;
/**
* 换行
* 设置弹性布局下子元素总宽度超出父级时子元素是否换行展示
*/
wrap: nasl.core.Boolean;
/**
* 内容间隙
* 内容块间隙大小
*/
gap: 'shrink' | 'none' | 'small' | 'normal' | 'large';
/**
* 响应窗口变化时
* 响应式布局引发栅格变化时触发
*/
onResponsive: (event: any) => any;
/**
* 插入需要布局的元素。
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UGridView extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
/**
* 数据量
*/
total: nasl.core.Integer;
/**
* 分页大小
*/
size: UGridViewOptions['pageSize'];
/**
* 当前页数
*/
page: UGridViewOptions['pageNumber'];
/**
* 排序属性
*/
sort: nasl.core.String;
/**
* 排序方式
*/
order: nasl.core.String;
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 清除缓存,重新加载
*/
reload(): void;
constructor(options?: Partial>);
}
export class UGridViewOptions extends ViewComponentOptions {
private value;
private field;
private cancelable;
private multiple;
private clearable;
/**
* 数据源
* 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑
*/
dataSource: {
list: nasl.collection.List;
total: nasl.core.Integer;
} | nasl.collection.List;
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
/**
* 文本字段名
* 选项文本的字段名
*/
textField: (item: T) => any;
/**
* 值字段名
* 选项值的字段名
*/
valueField: (item: T) => V;
/**
* 分页
* 设置是否分页展示数据
*/
pageable: nasl.core.Boolean;
/**
* 默认每页条数
*/
pageSize: nasl.core.Integer;
/**
* 当前页数
* 当前默认展示在第几页
*/
pageNumber: nasl.core.Integer;
/**
* 每页条数选项
* 每页条数切换器的选项
*/
pageSizeOptions: nasl.collection.List;
/**
* 显示总条数
*/
showTotal: nasl.core.Boolean;
/**
* 显示每页条数
* 显示每页条数切换器
*/
showSizer: nasl.core.Boolean;
/**
* 显示跳转输入
* 显示页面跳转输入框
*/
showJumper: nasl.core.Boolean;
/**
* 后端分页
*/
remotePaging: nasl.core.Boolean;
private remoteFiltering;
private matchMethod;
private caseSensitive;
private placeholder;
/**
* 网格数
* 每行排列几项
*/
repeat: nasl.core.Decimal | nasl.core.Integer;
/**
* 显示头部
*/
showHead: nasl.core.Boolean;
/**
* 头部标题
*/
title: nasl.core.String;
/**
* 显示底部
*/
showFoot: nasl.core.Boolean;
/**
* 初始即加载
* 设置初始时是否立即加载
*/
initialLoad: nasl.core.Boolean;
/**
* 状态设置
* 设置不同状态的展示内容
*/
designerMode: 'success' | 'empty' | 'loading' | 'error';
/**
* 加载中文案
* 加载中状态显示的提示文案
*/
loadingText: nasl.core.String;
/**
* 自定义加载中触发条件
* 支持自定义状态的触发条件,未设置则默认为系统定义条件
*/
loading: nasl.core.Boolean;
/**
* 加载失败文案
* 加载失败状态显示的提示文案
*/
errorText: nasl.core.String;
/**
* 加载失败触发条件
* 加载失败状态的触发条件,未设置则默认为系统定义条件
*/
error: nasl.core.Boolean;
/**
* 暂无数据文案
* 暂无数据状态显示的提示文案
*/
emptyText: nasl.core.String;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
private width;
private height;
/**
* 选择前
* 选择某一项前触发
*/
onBeforeSelect: (event: {
selected: nasl.core.Boolean;
item: T;
oldItem: T;
value: V;
oldValue: V;
items: nasl.collection.List;
oldItems: nasl.collection.List;
}) => any;
/**
* 选择时
* 选择某一项时触发
*/
onInput: (event: V) => any;
/**
* 选择后
* 选择某一项时触发。单选模式中:
*/
onSelect: (event: {
selected: nasl.core.Boolean;
item: T;
oldItem: T;
value: V;
oldValue: V;
items: nasl.collection.List;
oldItems: nasl.collection.List;
}) => any;
/**
* 改变后
* 选择值改变时触发。单选模式中:
*/
onChange: (event: {
item: T;
oldItem: T;
value: V;
oldValue: V;
items: nasl.collection.List;
oldItems: nasl.collection.List;
values: nasl.collection.List;
}) => any;
/**
* 加载前
* 加载前触发
*/
onBeforeLoad: (event: any) => any;
/**
* 加载后
* 加载时触发
*/
onLoad: (event: any) => any;
/**
* 插入文本或 HTML
*/
slotDefault: () => Array;
/**
* 自定义选项的结构和样式
*/
slotItem: (current: Current) => Array;
}
}
declare namespace nasl.ui {
export class UIframe extends ViewComponent {
/**
* 网页地址
*/
src: UIframeOptions['src'];
/**
* 加载完成
*/
loaded: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UIframeOptions extends ViewComponentOptions {
/**
* 网页地址
* 需要嵌入的网页地址
*/
src: nasl.core.String;
/**
* 加载完成
* 网页加载完成时触发。
*/
onLoad: (event: any) => any;
}
}
declare namespace nasl.ui {
export class UImage extends ViewComponent {
/**
* 地址
*/
src: UImageOptions['src'];
/**
* 默认图地址
*/
placeholderSrc: UImageOptions['placeholderSrc'];
/**
* 预览状态
*/
preview: nasl.core.Boolean;
constructor(options?: Partial);
}
export class UImageOptions extends ViewComponentOptions {
private convertSrcFn;
/**
* 地址
*/
src: nasl.core.String;
/**
* 填充方式
*/
fit: 'contain' | 'scale-down' | 'none' | 'fill' | 'cover';
/**
* 圆形遮罩
*/
circle: nasl.core.Boolean;
/**
* 水平对齐方式
*/
horizontalCenter: 'left' | 'center' | 'right';
/**
* 垂直对齐方式
*/
verticalCenter: 'top' | 'center' | 'bottom';
/**
* 点击放大
* 是否支持点击放大全屏展示
*/
preview: nasl.core.Boolean;
/**
* 加载样式
*/
loadingType: 'loading' | 'none' | 'placeholder';
/**
* 默认图地址
*/
placeholderSrc: nasl.core.String;
/**
* 加载完成
* 网页加载完成时触发
*/
onLoad: (event: any) => any;
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
}
}
declare namespace nasl.ui {
export class UInfoList extends ViewComponent {
constructor(options?: Partial);
}
export class UInfoListOptions extends ViewComponentOptions {
/**
* 列数
* 整个详情列表的划分列数
*/
repeat: nasl.core.Decimal | nasl.core.Integer;
/**
* 显示表格头部
* 是否显示表格头部
*/
showHead: nasl.core.Boolean;
/**
* 列表项标题宽度
* 设置详情列表所有列表项的标题宽度。
*/
labelSize: 'auto' | 'small' | 'normal' | 'large';
/**
* 默认
* 插入``或``子组件。
*/
slotDefault: () => Array;
}
export class UInfoListItem extends ViewComponent {
constructor(options?: Partial);
}
export class UInfoListItemOptions extends ViewComponentOptions {
private label;
/**
* 占据数
* 列跨越的格数
*/
span: nasl.core.Decimal | nasl.core.Integer;
/**
* 文本过长省略
* 文字过长是否省略显示。默认文字超出时会换行。
*/
ellipsis: nasl.core.Boolean;
/**
* 列表项标题宽度
*/
labelSize: 'auto' | 'small' | 'normal' | 'large';
/**
* 默认
* 插入文本或HTML。
*/
slotDefault: () => Array;
/**
* 自定义标签内容
* 用于自定义 label 内容。
*/
slotLabel: () => Array;
}
export class UInfoListGroup extends ViewComponent {
constructor(options?: Partial);
}
export class UInfoListGroupOptions extends ViewComponentOptions {
private title;
/**
* 列数
* 当前组范围内的划分列数
*/
repeat: nasl.core.Decimal | nasl.core.Integer;
/**
* 列表项标题宽度
* 设置详情列表组所有列表项的标题宽度。
*/
labelSize: 'auto' | 'small' | 'normal' | 'large';
/**
* 默认
* 插入``子组件
*/
slotDefault: () => Array;
/**
* 自定义标题
* 自定义标题。
*/
slotTitle: () => Array;
/**
* 自定义额外操作项
* 自定义额外操作项。
*/
slotExtra: () => Array;
}
}
declare namespace nasl.ui {
export class UInput extends ViewComponent {
/**
* 输入值
*/
value: UInputOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 预览
*/
preview: nasl.core.Boolean;
/**
* 让输入框获取焦点。
*/
focus(): void;
/**
* 让输入框失去焦点。
*/
blur(): void;
/**
* 清空输入框。
*/
clear(): void;
constructor(options?: Partial);
}
export class UInputOptions extends ViewComponentOptions {
private minlength;
private spellcheck;
private maxlengthMessage;
/**
* 类型
* 文本框或者密码框
*/
type: 'text' | 'password';
/**
* 值
* 输入的值
*/
value: nasl.core.String;
/**
* 空值为null
* 清空值时是否设置为null
*/
emptyValueIsNull: nasl.core.Boolean;
/**
* 占位符
* 为空时显示的占位符文本
*/
placeholder: nasl.core.String;
/**
* 最大字符数
*/
maxlength: nasl.core.Integer;
/**
* 自动获取焦点
* 设置是否自动获取焦点
*/
autofocus: nasl.core.Boolean;
/**
* 前缀图标
*/
prefix: nasl.core.String;
/**
* 后缀图标
*/
suffix: nasl.core.String;
/**
* 可清除
* 可点击清除按钮一键清除内容
*/
clearable: nasl.core.Boolean;
/**
* 显示状态
* 显示状态分为“True(显示)/False(隐藏)”,默认为“隐藏”
*/
password: nasl.core.Boolean;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 预览
* 显示预览态
*/
preview: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 宽度
* 设置单行输入框宽度大小
*/
width: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 高度
* 设置单行输入框高度大小
*/
height: 'full' | 'huge' | 'large' | 'medium' | 'normal' | 'small' | 'mini';
/**
* 输入前
* 输入前触发。可以在这个阶段阻止输入,或者修改输入的值 $event.value
*/
onBeforeInput: (event: {
value: nasl.core.String;
oldValue: nasl.core.String;
}) => any;
/**
* 输入时
* 输入时触发。
*/
onInput: (event: nasl.core.String) => any;
/**
* 改变后
* 值变化时触发。(注意:与原生事件不同)
*/
onChange: (event: {
value: nasl.core.String;
oldValue: nasl.core.String;
}) => any;
/**
* 获得焦点
* 获得焦点时触发。
*/
onFocus: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 失去焦点
* 失去焦点时触发。
*/
onBlur: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 清空前
* 清空前触发。
*/
onBeforeClear: (event: {
value: nasl.core.String;
oldValue: nasl.core.String;
}) => any;
/**
* 清空后
* 清空后触发。
*/
onClear: (event: {
value: nasl.core.String;
oldValue: nasl.core.String;
}) => any;
/**
* 点击前缀图标
* 点击前缀图标后触发
*/
onClickPrefix: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 点击后缀图标
* 点击后缀图标后触发
*/
onClickSuffix: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 键盘按下
* 键盘按键按下时触发
*/
onKeydown: (event: KeyboardEvent) => any;
/**
* 键盘松开
* 键盘按键松开时触发
*/
onKeyup: (event: KeyboardEvent) => any;
/**
* 前缀图标
* 前缀图标自定义
*/
slotPrefix: () => Array;
/**
* 后缀图标
* 后缀图标自定义
*/
slotSuffix: () => Array;
}
}
declare namespace nasl.ui {
export class ULabel extends ViewComponent {
constructor(options?: Partial);
}
export class ULabelOptions extends ViewComponentOptions {
/**
* 文本
*/
text: nasl.core.String;
/**
* 样式类型
* 设置标签样式,主要标签有背景,次要标签没有背景
*/
type: 'filled' | 'line';
/**
* 主题颜色
* 设置主题颜色样式
*/
color: 'default' | 'primary' | 'success' | 'warning' | 'error';
/**
* 展示方式
* 行内展示,或块级换行展示
*/
display: 'inline' | 'block';
/**
* 可关闭
* 设置标签是否可点击删除图标进行关闭
*/
removable: nasl.core.Boolean;
/**
* 尺寸
* 设置标签大小
*/
size: 'small' | 'normal' | 'large' | 'huge';
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 删除前触发
* 删除前触发
*/
onBeforeRemove: (event: any) => any;
/**
* 删除时触发
* 删除时触发
*/
onRemove: (event: any) => any;
/**
* 默认
* 插入文本或 HTML
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class ULinearLayout extends ViewComponent {
/**
* 打开加载中
* 打开加载中
*/
openLoading(): void;
/**
* 关闭加载中
* 关闭加载中
*/
closeLoading(): void;
constructor(options?: Partial);
}
export class ULinearLayoutOptions extends ViewComponentOptions {
private display;
private type;
/**
* 布局模式
*/
mode: 'inline' | 'block' | 'flex';
/**
* 主轴方向
*/
direction: 'horizontal' | 'vertical';
/**
* 横轴对齐
*/
justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
/**
* 纵轴对齐
*/
alignment: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
_alignment: 'start' | 'center' | 'end' | 'stretch';
_justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
/**
* 子元素展示方式
* 子元素行内展示或块级换行展示
*/
layout: 'none' | 'inline' | 'block';
/**
* 换行
* 设置弹性布局下子元素总宽度超出父级时子元素是否换行展示
*/
wrap: nasl.core.Boolean;
/**
* 加载中图标
* 加载中状态显示的图标
*/
loadingIcon: nasl.core.String;
/**
* 加载中图标旋转
* 设置加载中图标是否旋转,默认开启。
*/
loadingIconRotate: nasl.core.Boolean;
/**
* 加载中文案
* 加载中状态显示的提示文案
*/
loadingText: nasl.core.String;
/**
* 内容间隙
* 内容块间隙大小
*/
gap: 'shrink' | 'none' | 'small' | 'normal' | 'large';
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 滚动时
* 滚动时触发
*/
onScroll: (event: {
scrollTop: nasl.core.Integer;
scrollLeft: nasl.core.Integer;
scrollWidth: nasl.core.Integer;
scrollHeight: nasl.core.Integer;
clientWidth: nasl.core.Integer;
clientHeight: nasl.core.Integer;
}) => any;
/**
* 默认
* 内容
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class ULinearProgress extends ViewComponent {
/**
* 当前进度(%)
*/
percent: UCircularProgressOptions['percent'];
constructor(options?: Partial);
}
export class ULinearProgressOptions extends ViewComponentOptions {
private range;
/**
* 当前进度(%)
* 进度条显示的进度百分比,1-100之间的数字
*/
percent: nasl.core.Decimal | nasl.core.Integer;
/**
* 进度条方向
*/
direction: 'horizontal' | 'vertical';
/**
* 尺寸
* 进度条高度大小
*/
size: 'small' | 'normal' | 'large' | 'huge';
/**
* 默认
* 插入文本或HTML。
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class ULink extends ViewComponent {
/**
* 禁用
*/
disabled: nasl.core.Boolean;
constructor(options?: Partial);
}
export class ULinkOptions extends ViewComponentOptions {
private to;
private replace;
private append;
private decoration;
/**
* 文本
* 显示文本内容
*/
text: nasl.core.String;
/**
* 主题颜色
* 设置主题颜色样式
*/
color: 'default' | 'light' | 'success' | 'warning' | 'danger';
/**
* 展示方式
*/
display: 'inline' | 'block';
/**
* 链接类型
*/
linkType: 'destination' | 'download';
/**
* 链接地址
*/
hrefAndTo: nasl.core.String;
/**
* 链接打开方式
* 链接跳转的打开方式,父级窗口和顶级窗口仅适用于iframe组件嵌套的情况,若不存在嵌套,则其打开方式同当前窗口。
*/
target: '_blank' | '_self' | '_parent' | '_top';
/**
* 鼠标悬停效果
* 鼠标悬停时的样式变化方式
*/
hoverType: 'underline' | 'color';
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 获得焦点
* 获得焦点时触发。
*/
onFocus: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 失去焦点
* 失去焦点时触发。
*/
onBlur: (event: {
cancelBubble: nasl.core.Boolean;
detail: nasl.core.String;
layerX: nasl.core.Integer;
layerY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 切换路由前
* 使用 router 相关属性切换路由前触发
*/
onBeforeNavigate: (event: {
to: nasl.core.String;
replace: nasl.core.Boolean;
append: nasl.core.Boolean;
}) => any;
/**
* 切换路由后
* 使用 router 相关属性切换路由后触发
*/
onNavigate: (event: {
to: nasl.core.String;
replace: nasl.core.Boolean;
append: nasl.core.Boolean;
}) => any;
}
}
declare namespace nasl.ui {
export class UListComponents extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
constructor(options?: Partial>);
}
export class UListComponentsOptions extends ViewComponentOptions {
/**
* 数据源
* 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑
*/
dataSource: nasl.collection.List | {
list: nasl.collection.List;
total: nasl.core.Integer;
};
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
/**
* 每行排列项数
* 为空时默认为5
*/
colnum: nasl.core.Decimal | nasl.core.Integer;
/**
* 均分宽度
* 设置是否均分宽度
*/
equalWidth: nasl.core.Boolean;
/**
* 默认
* 内容自定义
*/
slotDefault: (current: Current) => Array;
}
}
declare namespace nasl.ui {
export class UListView extends ViewComponent {
/**
* 数据
*/
data: nasl.collection.List;
/**
* 数据量
*/
total: nasl.core.Integer;
/**
* 分页大小
*/
size: UListViewOptions['pageSize'];
/**
* 当前页数
*/
page: UListViewOptions['pageNumber'];
/**
* 排序属性
*/
sort: nasl.core.String;
/**
* 排序方式
*/
order: nasl.core.String;
/**
* 过滤文本
*/
filterText: nasl.core.String;
/**
* 值
*/
value: UListViewOptions['value'];
/**
* 禁用
*/
disabled: nasl.core.Boolean;
/**
* 只读
*/
readonly: nasl.core.Boolean;
/**
* 清除缓存,重新加载
*/
reload(): void;
constructor(options?: Partial>);
}
export class UListViewOptions extends ViewComponentOptions {
/**
* 数据源
* 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑
*/
dataSource: {
list: nasl.collection.List;
total: nasl.core.Integer;
} | nasl.collection.List;
/**
* 数据类型
* 数据源返回的数据结构的类型,自动识别类型进行展示说明
*/
dataSchema: T;
/**
* 分页
* 设置是否分页展示数据
*/
pageable: nasl.core.Boolean;
/**
* 默认每页条数
*/
pageSize: nasl.core.Integer;
/**
* 当前页数
* 当前默认展示在第几页
*/
pageNumber: nasl.core.Integer;
/**
* 每页条数选项
* 每页条数切换器的选项
*/
pageSizeOptions: nasl.collection.List;
/**
* 显示总条数
*/
showTotal: nasl.core.Boolean;
/**
* 显示每页条数
* 显示每页条数切换器
*/
showSizer: nasl.core.Boolean;
/**
* 显示跳转输入
* 显示页面跳转输入框
*/
showJumper: nasl.core.Boolean;
/**
* 筛选
* 设置是否可以筛选,开启将会显示搜索框。
*/
filterable: nasl.core.Boolean;
/**
* 后端分页
* 是否使用后端分页。
*/
remotePaging: nasl.core.Boolean;
private remoteFiltering;
/**
* 匹配方法
* 筛选时的匹配方法
*/
matchMethod: nasl.core.String;
/**
* 大小写敏感
* 设置是否区分大小写
*/
caseSensitive: nasl.core.Boolean;
/**
* 搜索框占位符
* 搜搜框为空时显示的占位符文本
*/
placeholder: nasl.core.String;
/**
* 选中值
* 显示的值
*/
value: M extends true ? (C extends '' ? nasl.collection.List : nasl.core.String) : V;
/**
* 文本字段
* 当开启可多选时,显示的选项文本字段名
*/
textField: (item: T) => any;
/**
* 值字段
* 当开启可多选时,选项值的字段
*/
valueField: (item: T) => V;
/**
* 可取消
* 与"可多选"属性对应,表示选中的行再点击时是否可以取消选中。默认关闭。
*/
cancelable: nasl.core.Boolean;
/**
* 可多选
* 设置是否可以多选行
*/
multiple: M;
/**
* 可清除筛选
* 可点击搜索框中的清除按钮一键清除内容
*/
clearable: nasl.core.Boolean;
/**
* 显示头部
*/
showHead: nasl.core.Boolean;
/**
* 列表标题
*/
title: nasl.core.String;
/**
* 显示底部
*/
showFoot: nasl.core.Boolean;
/**
* 初始即加载
* 设置初始时是否立即加载
*/
initialLoad: nasl.core.Boolean;
/**
* 加载状态设置
* 设置不同加载状态的展示内容
*/
designerMode: 'success' | 'empty' | 'loading' | 'error';
/**
* 加载中文案
* 加载中状态显示的文案
*/
loadingText: nasl.core.String;
/**
* 自定义加载中触发条件
* 支持自定义状态的触发条件,未设置则默认为系统定义条件
*/
loading: nasl.core.Boolean;
/**
* 加载失败文案
* 加载失败状态显示的提示文案
*/
errorText: nasl.core.String;
/**
* 加载失败触发条件
* 加载失败状态的触发条件,未设置则默认为系统定义条件
*/
error: nasl.core.Boolean;
/**
* 暂无数据文案
* 暂无数据状态显示的提示文案
*/
emptyText: nasl.core.String;
/**
* 只读
* 正常显示,但禁止选择/输入
*/
readonly: nasl.core.Boolean;
/**
* 禁用
* 置灰显示,且禁止任何交互(焦点、点击、选择、输入等)
*/
disabled: nasl.core.Boolean;
/**
* 显示边框
*/
border: nasl.core.Boolean;
/**
* 宽度
* 设置数据列表宽度大小
*/
width: 'full' | 'huge' | 'large' | 'normal' | 'auto';
/**
* 高度
* 设置数据列表高度大小
*/
height: 'full' | 'huge' | 'large' | 'normal' | 'auto';
/**
* 选择前
* 选择某一项前触发
*/
onBeforeSelect: (event: {
selected: nasl.core.Boolean;
item: T;
oldItem: T;
value: V;
oldValue: V;
items: nasl.collection.List;
oldItems: nasl.collection.List;
}) => any;
/**
* 选择时
* 选择某一项时触发
*/
onInput: (event: V) => any;
/**
* 选择后
* 选择某一项时触发。单选模式中:
*/
onSelect: (event: {
selected: nasl.core.Boolean;
item: T;
oldItem: T;
value: V;
oldValue: V;
items: nasl.collection.List;
oldItems: nasl.collection.List;
}) => any;
/**
* 改变后
* 选择值改变时触发。
*/
onChange: (event: {
item: T;
oldItem: T;
value: V;
oldValue: V;
items: nasl.collection.List;
oldItems: nasl.collection.List;
values: nasl.collection.List;
}) => any;
/**
* 加载前
* 加载前触发
*/
onBeforeLoad: (event: any) => any;
/**
* 加载后
* 加载时触发
*/
onLoad: (event: any) => any;
/**
* 默认
* 插入文本或 HTML
*/
slotDefault: () => Array;
/**
* 项
* 自定义选项的结构和样式
*/
slotItem: (current: Current) => Array;
}
}
declare namespace nasl.ui {
export class UModal extends ViewComponent {
/**
* 显示状态
*/
visible: nasl.core.Boolean;
/**
* 打开弹窗
*/
open(): void;
/**
* 关闭弹窗
*/
close(): void;
constructor(options?: Partial);
}
export class UModalOptions extends ViewComponentOptions {
private title;
private content;
private description;
private okButton;
private cancelButton;
private static;
/**
* 显示头部栏
*/
showHead: nasl.core.Boolean;
/**
* 显示底部栏
*/
showFoot: nasl.core.Boolean;
/**
* 提示图标
*/
icon: '' | 'success' | 'warning' | 'error';
/**
* 点击遮罩关闭
* 点击遮罩关闭弹窗
*/
maskClose: nasl.core.Boolean;
/**
* 显示状态
* 显示状态分为“True(打开)/False(关闭)”,默认为“打开”
*/
visible: nasl.core.Boolean;
/**
* 尺寸
* 弹窗的尺寸
*/
size: 'small' | 'normal' | 'large' | 'huge' | 'auto';
/**
* 打开前
* 打开弹窗前触发
*/
onBeforeOpen: (event: any) => any;
/**
* 打开后
* 打开弹窗后触发
*/
onOpen: (event: any) => any;
/**
* 关闭前
* 关闭弹窗前触发
*/
onBeforeClose: (event: any) => any;
/**
* 关闭后
* 关闭弹窗时触发
*/
onClose: (event: {
ok: nasl.core.Boolean;
}) => any;
/**
* 弹窗标题自定义
*/
slotTitle: () => Array;
/**
* 弹窗头部自定义
*/
slotHead: () => Array;
/**
* 弹窗中部自定义
*/
slotBody: () => Array;
/**
* 弹窗尾部自定义
*/
slotFoot: () => Array;
/**
* 弹框小标题自定义
*/
slotHeading: () => Array;
/**
* 默认
* 弹窗内容自定义
*/
slotDefault: () => Array;
}
}
declare namespace nasl.ui {
export class UMultiLayout extends ViewComponent {
constructor(options?: Partial);
}
export class UMultiLayoutOptions extends ViewComponentOptions {
/**
* 主轴方向
*/
direction: 'horizontal' | 'vertical';
/**
* 横轴对齐
*/
justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
/**
* 纵轴对齐
*/
alignment: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
_alignment: 'start' | 'center' | 'end' | 'stretch';
_justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
/**
* 内容间隙
* 布局中各分栏间的空隙大小
*/
gap: 'shrink' | 'none' | 'small' | 'normal' | 'large';
/**
* 滚动时
* 滚动时触发
*/
onScroll: (event: {
scrollTop: nasl.core.Integer;
scrollLeft: nasl.core.Integer;
scrollWidth: nasl.core.Integer;
scrollHeight: nasl.core.Integer;
clientWidth: nasl.core.Integer;
clientHeight: nasl.core.Integer;
}) => any;
/**
* 点击
* 在元素上按下并释放任意鼠标按钮时触发。
*/
onClick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 双击
* 在元素上双击鼠标按钮时触发。
*/
onDblclick: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 右键点击
* 在右键菜单显示前触发。
*/
onContextmenu: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标按下
* 在元素上按下任意鼠标按钮时触发。
*/
onMousedown: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标释放
* 在元素上释放任意鼠标按钮时触发。
*/
onMouseup: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移入
* 鼠标移入元素时触发。
*/
onMouseenter: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 鼠标移出
* 鼠标移出元素时触发。
*/
onMouseleave: (event: {
altKey: nasl.core.Boolean;
button: nasl.core.Integer;
clientX: nasl.core.Integer;
clientY: nasl.core.Integer;
ctrlKey: nasl.core.Boolean;
metaKey: nasl.core.Boolean;
movementX: nasl.core.Integer;
movementY: nasl.core.Integer;
offsetX: nasl.core.Integer;
offsetY: nasl.core.Integer;
pageX: nasl.core.Integer;
pageY: nasl.core.Integer;
screenX: nasl.core.Integer;
screenY: nasl.core.Integer;
which: nasl.core.Integer;
}) => any;
/**
* 插入``子组件。
*/
slotDefault: () => Array;
}
export class UMultiLayoutItem extends ViewComponent {
constructor(options?: Partial