UNPKG

@lcap/nasl

Version:

NetEase Application Specific Language

2,208 lines 313 kB
/// <reference types="@nasl/types" /> /// <reference types="@nasl/types" /> /// <reference types="@nasl/types" /> /// <reference types="@nasl/types" /> declare namespace nasl.ui { export class EWatermark extends ViewComponent { constructor(options?: Partial<EWatermarkOptions>); } 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<IIcoOptions>); } 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<ViewComponent>; } } declare namespace nasl.ui { export class UAbsoluteLayout extends ViewComponent { constructor(options?: Partial<UAbsoluteLayoutOptions>); } 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<ViewComponent>; } } declare namespace nasl.ui { export class UAlert extends ViewComponent { constructor(options?: Partial<UAlertOptions>); } 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<ViewComponent>; /** * 标题 */ slotTitle: () => Array<ViewComponent>; } } declare namespace nasl.ui { export class UAnchor extends ViewComponent { constructor(options?: Partial<UAnchorOptions>); } export class UAnchorOptions extends ViewComponentOptions { /** * 标识 * 锚点的唯一标识,用于跳转链接,如“/page#linkname” */ label: nasl.core.String; /** * 默认 * 内容 */ slotDefault: () => Array<ViewComponent>; } } declare namespace nasl.ui { export class UBadge extends ViewComponent { /** * 值 */ value: UBadgeOptions['value']; constructor(options?: Partial<UBadgeOptions>); } 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<ViewComponent>; } } declare namespace nasl.ui { export class UButton extends ViewComponent { /** * 禁用 */ disabled: nasl.core.Boolean; constructor(options?: Partial<UButtonOptions>); } 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<T, M extends nasl.core.Boolean> extends ViewComponent { /** * 数据源 */ data: nasl.collection.List<T>; /** * 日历选择值 */ value: UCalendarViewOptions<T, M>['value']; /** * 重新加载 */ reload(): void; constructor(options?: Partial<UCalendarViewOptions<T, M>>); } export class UCalendarViewOptions<T, M extends nasl.core.Boolean> extends ViewComponentOptions { /** * 数据源 * 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑 */ dataSource: nasl.collection.List<T> | { list: nasl.collection.List<T>; total: nasl.core.Integer; }; /** * 数据类型 * 数据源返回的数据结构的类型,自动识别类型进行展示说明 */ dataSchema: T; /** * 开始时间字段 * 数据内表示开始时间的字段 */ startKey: (item: T) => any; /** * 结束时间字段 * 数据内表示结束时间的字段 */ endKey: (item: T) => any; /** * 选中值 * 当前选中的日期 */ value: M extends true ? nasl.collection.List<nasl.core.Date> : 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<T>) => Array<ViewComponent>; } } 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<UCapsulesOptions>); } 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<nasl.core.String>; oldItems: nasl.collection.List<nasl.core.String>; }) => 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<nasl.core.String>; oldItems: nasl.collection.List<nasl.core.String>; }) => any; /** * 改变后 * 选择值改变时触发。单选模式中: */ onChange: (event: { item: nasl.core.String; oldItem: nasl.core.String; value: nasl.core.String; oldValue: nasl.core.String; items: nasl.collection.List<nasl.core.String>; oldItems: nasl.collection.List<nasl.core.String>; values: nasl.collection.List<nasl.core.String>; }) => any; /** * 插入`<u-capsule>`或`<u-capsules-group>`子组件。 */ slotDefault: () => Array<UCapsule>; } export class UCapsule extends ViewComponent { /** * 禁用 */ disabled: nasl.core.Boolean; constructor(options?: Partial<UCapsuleOptions>); } 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<nasl.core.String>; oldItems: nasl.collection.List<nasl.core.String>; }) => any; /** * 插入文本或 HTML。 */ slotDefault: () => Array<ViewComponent>; } export class UCapsulesGroup extends ViewComponent { constructor(options?: Partial<UCapsulesGroupOptions>); } export class UCapsulesGroupOptions extends ViewComponentOptions { /** * 插入`<u-capsule>`或`<u-capsules-group>`子组件。 */ slotDefault: () => Array<UCapsule>; } } declare namespace nasl.ui { export class UCard extends ViewComponent { constructor(options?: Partial<UCardOptions>); } 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<ViewComponent>; /** * 插入图片 */ slotCover: () => Array<ViewComponent>; /** * 标题 * 插入文本或 HTML。 */ slotTitle: () => Array<ViewComponent>; } } declare namespace nasl.ui { export class UCarousel<T> extends ViewComponent { /** * 数据 */ data: nasl.collection.List<T>; /** * 清除缓存,重新加载 */ reload(): void; constructor(options?: Partial<UCarouselOptions<T>>); } export class UCarouselOptions<T> extends ViewComponentOptions { private loop; private direction; private animation; /** * 数据源 * 展示数据的输入源,可设置为集合类型变量(List<T>)或输出参数为集合类型的逻辑。 */ dataSource: nasl.collection.List<T> | { list: nasl.collection.List<T>; 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; /** * 插入`<u-carousel-item>`子组件。 */ slotDefault: () => Array<UCarouselItem>; /** * 自定义选项的结构和样式 */ slotItem: (current: Current<T>) => Array<ViewComponent>; } export class UCarouselItem extends ViewComponent { constructor(options?: Partial<UCarouselItemOptions>); } export class UCarouselItemOptions extends ViewComponentOptions { private title; private value; /** * 插入文本或 HTML。 */ slotDefault: () => Array<ViewComponent>; /** * 自定义标题文本。 */ slotTitle: () => Array<ViewComponent>; } } declare namespace nasl.ui { export class UCascader<T, V> extends ViewComponent { /** * 数据 */ data: nasl.collection.List<T>; /** * 选中值 */ value: UCascaderOptions<T, V>['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<UCascaderOptions<T, V>>); } export class UCascaderOptions<T, V> extends ViewComponentOptions { /** * 数据源 * 展示数据的输入源,可设置为数据集对象或者返回数据集的逻辑 */ dataSource: nasl.collection.List<T> | { list: nasl.collection.List<T>; total: nasl.core.Integer; }; /** * 数据类型 * 数据源返回的数据结构的类型,自动识别类型进行展示说明 */ dataSchema: T; /** * 文本字段 * 集合的元素类型中,用于显示文本的属性名称 */ field: (item: T) => any; /** * 值字段 * 集合的元素类型中,用于标识选中值的属性 */ valueField: (item: T) => V; /** * 子级值字段 * 树形数据子节点字段名,默认为children */ childrenField: (item: T) => nasl.collection.List<any>; /** * 父级值字段 * 当数据源为平铺数据时自动生成级联数据的节点字段名,重要:值字段名需要一起配置 */ 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<V>; items: nasl.collection.List<T>; }) => 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<T, V, C> extends ViewComponent { /** * 数据 */ data: nasl.collection.List<T>; /** * 选中值 */ value: UCheckboxesOptions<T, V, C>['value']; /** * 禁用 */ disabled: nasl.core.Boolean; /** * 只读 */ readonly: nasl.core.Boolean; /** * 预览 */ preview: nasl.core.Boolean; /** * 清除缓存,重新加载 */ reload(): void; constructor(options?: Partial<UCheckboxesOptions<T, V, C>>); } export class UCheckboxesOptions<T, V, C> extends ViewComponentOptions { /** * 数据源 * 展示数据的输入源,可设置为集合类型变量(List<T>)或输出参数为集合类型的逻辑。 */ dataSource: nasl.collection.List<T> | { list: nasl.collection.List<T>; total: nasl.core.Integer; }; /** * 数据类型 * 数据源返回的数据结构的类型,自动识别类型进行展示说明 */ dataSchema: T; private textField; /** * 值字段 * 用于标识选中值的字段 */ valueField: (item: T) => V; /** * 选中值 * 当前选中的值 */ value: C extends '' ? nasl.collection.List<V> : 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<V>) => any; /** * 选中后 * 切换选项时触发 */ onCheck: (event: { value: nasl.collection.List<V> | nasl.core.String; oldValue: nasl.collection.List<V> | nasl.core.String; }) => any; /** * 改变后 * 选中状态改变时触发 */ onChange: (event: { value: nasl.collection.List<V> | nasl.core.String; oldValue: nasl.collection.List<V> | nasl.core.String; }) => any; /** * 加载前 * 加载前触发 */ onBeforeLoad: (event: any) => any; /** * 加载后 * 加载后触发 */ onLoad: (event: any) => any; /** * 插入`<checkbox>`子组件。 */ slotDefault: () => Array<UCheckbox<T, V>>; /** * 全选/反选 */ slotCheckAll: () => Array<UText>; /** * 自定义选项的结构和样式 */ slotItem: (current: Current<T>) => Array<ViewComponent>; } export class UCheckbox<T, V> extends ViewComponent { /** * 选中 */ value: UCheckboxOptions<T, V>['value']; /** * 禁用 */ disabled: nasl.core.Boolean; /** * 只读 */ readonly: nasl.core.Boolean; /** * 预览 */ preview: nasl.core.Boolean; constructor(options?: Partial<UCheckboxOptions<T, V>>); } export class UCheckboxOptions<T, V> 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<ViewComponent>; } } declare namespace nasl.ui { export class UCircularProgress extends ViewComponent { /** * 当前进度(%) */ percent: UCircularProgressOptions['percent']; constructor(options?: Partial<UCircularProgressOptions>); } export class UCircularProgressOptions extends ViewComponentOptions { /** * 当前进度(%) * 进度条显示的进度百分比,1-100之间的数字 */ percent: nasl.core.Decimal | nasl.core.Integer; /** * 尺寸 * 进度条大小 */ size: 'small' | 'normal' | 'large' | 'huge'; /** * 默认 * 插入文本或 HTML。 */ slotDefault: () => Array<ViewComponent>; /** * 分数展示 * 分数展示自定义 */ slotPercent: () => Array<ViewComponent>; } } declare namespace nasl.ui { export class UCollapse extends ViewComponent { /** * 禁用 */ disabled: nasl.core.Boolean; constructor(options?: Partial<UCollapseOptions>); } 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; /** * 插入`<u-collapse-item>`子组件。 */ slotDefault: () => Array<UCollapseItem>; } export class UCollapseItem extends ViewComponent { /** * 禁用 */ disabled: nasl.core.Boolean; /** * 是否展开 */ expanded: nasl.core.Boolean; constructor(options?: Partial<UCollapseItemOptions>); } 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<ViewComponent>; /** * 自定义标题文本。 */ slotTitle: () => Array<ViewComponent>; /** * 在右侧可以附加内容。 */ slotExtra: () => Array<ViewComponent>; } } 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<UComboSliderOptions>); } export class UComboSliderOptions extends ViewComponentOptions { private tip; /** * 滑块值 */ value: nasl.core.Decimal | nasl.core.Integer | nasl.collection.List<nasl.core.Integer> | nasl.collection.List<nasl.core.Decimal>; /** * 最小值 */ 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.core.Integer> | nasl.collection.List<nasl.core.Decimal>; 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<ViewComponent>; } } declare namespace nasl.ui { export class UCopy extends ViewComponent { /** * 复制的值 */ value: UCopyOptions['value']; /** * 禁用 */ disabled: nasl.core.Boolean; constructor(options?: Partial<UCopyOptions>); } 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<ViewComponent>; } } declare namespace nasl.ui { export class UCountDown extends ViewComponent { /** * 开始计时器 */ start(): void; /** * 暂停计时器 */ pause(): void; /** * 继续计时器 */ continue(): void; /** * 停止计时器 */ stop(): void; constructor(options?: Partial<UCountDownOptions>); } 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<UCrumbOptions>); } export class UCrumbOptions extends ViewComponentOptions { /** * 自动生成 * 是否自动根据子页面配置的面包屑属性自动生成 */ auto: nasl.core.Boolean; /** * 样式类型 * 设置面包屑分隔样式类型,基础样式为箭头,分隔符样式为斜杠 */ separator: 'arrow' | 'slash'; /** * 显示面包屑图标 */ icon: nasl.core.Boolean; /** * 插入`<u-crumb-item>`子组件。 */ slotDefault: () => Array<UCrumbItem>; } export class UCrumbItem extends ViewComponent { constructor(options?: Partial<UCrumbItemOptions>); } 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; screen