1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { ExpControlBase } from './ExpControlBase';
/**
* 数据卡片导航视图
*
* @export
* @class DataViewExpBarControlBase
* @extends {ExpControlBase}
*/
export class DataViewExpBarControlBase extends ExpControlBase {
/**
* 数据视图是否单选
*
* @type {boolean}
* @memberof DataViewExpBarControlBase
*/
public isDataViewSingleSelect: boolean = true;
/**
* 部件创建完毕
*
* @memberof GridExpBarControlBase
*/
public ctrlCreated(): void {
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.viewState.next({ tag: 'dataviewexpbar_dataview', action: action, data: data });
});
}
}
/**
* 执行搜索
*
* @memberof DataViewExpBarControlBase
*/
public onSearch(): void {
this.viewState.next({ tag: 'dataviewexpbar_dataview', action: 'filter', data: { query: this.searchText } });
}
/**
* 卡片视图加载完成
*
* @param {any[]} args
* @param {string} [tag]
* @param {*} [$event2]
* @returns {void}
* @memberof DataViewExpBarControlBase
*/
public dataviewexpbar_load(args: any[], tag?: string, $event2?: any): void {
this.$emit('load', args);
}
}