communications app, popup lib
This commit is contained in:
@ -85,7 +85,7 @@
|
||||
sortFilter?: (a: GridItem | any, b: GridItem | any) => -1 | 0 | 1;
|
||||
bgFilter?: (item: GridItem | any) => string;
|
||||
dropOptions?: DropdownOptions;
|
||||
source?: Array<any> | ((item: GridItem | any) => Array<any>);
|
||||
source?: Array<any> | ((item: GridItem | any) => Array<any> | Promise<Array<GridSourceItem>>);
|
||||
iconType?: string;
|
||||
text?: string;
|
||||
tooltip?: string;
|
||||
@ -136,8 +136,8 @@
|
||||
<samp>val: any</samp>
|
||||
<p>单元格的值</p>
|
||||
<samp>item: GridItem | any</samp>
|
||||
<p>单元格所在行的数据项/p>
|
||||
<samp>col: GridColumnDefinition</samp>
|
||||
<p>单元格所在行的数据项</p>
|
||||
<samp>col: GridColumnDefinition</samp>
|
||||
<p>单元格所在列的定义对象</p>
|
||||
<hr />
|
||||
<h2>示例</h2>
|
||||
@ -198,12 +198,22 @@
|
||||
key: 'c2a',
|
||||
caption: '下拉',
|
||||
type: Grid.ColumnTypes.Dropdown,
|
||||
source: [
|
||||
{ value: 'off', text: 'Off' },
|
||||
{ value: 'pending', text: 'Pending' },
|
||||
{ value: 'broken', text: 'Broken' },
|
||||
{ value: 'running', text: 'Running' }
|
||||
],
|
||||
source: item => {
|
||||
if (item.source == null) {
|
||||
return new Promise((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
item.source = [
|
||||
{ value: 'off', text: 'Off' },
|
||||
{ value: 'pending', text: 'Pending' },
|
||||
{ value: 'broken', text: 'Broken' },
|
||||
{ value: 'running', text: 'Running' }
|
||||
];
|
||||
resolve(item.source);
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
return item.source;
|
||||
},
|
||||
enabled: 'enabled',
|
||||
onchanged: (item, value) => console.log('dropdown changed', item, value)
|
||||
},
|
||||
|
Reference in New Issue
Block a user