Commit b09bb66c19d055e78f51e210557be27c63015062

Authored by Aresn
Committed by GitHub
2 parents dcfa8aca a5722e45

Merge pull request #5147 from yangdan8/2.0_修正table中render函数返回类型

2.0 修正table中render函数返回类型
Showing 2 changed files with 3 additions and 25 deletions   Show diff stats
types/iview.components.d.ts
... ... @@ -52,7 +52,7 @@ export { Slider } from './slider';
52 52 export { Spin } from './spin';
53 53 export { Steps, StepsStep } from './steps';
54 54 export { Switch, Switch as ISwitch } from './switch';
55   -export { Table, TableColumn, TableRenderCreateElementData, TableColumnRenderParams, TableRenderCreateElementResult, TableColumnRenderHeadParams, TableExportCsvParams } from './table';
  55 +export { Table, TableColumn, TableRenderCreateElementData, TableColumnRenderParams, TableColumnRenderHeadParams, TableExportCsvParams } from './table';
56 56 export { Tabs, TabPane } from './tabs';
57 57 export { Tag } from './tag';
58 58 export { Time } from './time';
... ...
types/table.d.ts
... ... @@ -240,7 +240,7 @@ export declare interface TableColumn {
240 240 render?: (
241 241 h?: CreateElement,
242 242 params?: TableColumnRenderParams
243   - ) => TableRenderCreateElementResult;
  243 + ) => VNode;
244 244 /**
245 245 * 自定义列头显示内容,传入参数有两个,column 和 index,分别为当前列数据和当前列索引,不支持渲染自定义组件
246 246 * @param h Render函数
... ... @@ -249,7 +249,7 @@ export declare interface TableColumn {
249 249 renderHeader?: (
250 250 h?: CreateElement,
251 251 params?: TableColumnRenderHeadParams
252   - ) => TableRenderCreateElementResult;
  252 + ) => VNode;
253 253 /**
254 254 * 对应列是否可以排序,如果设置为 custom,则代表用户希望远程排序,
255 255 * 需要监听 Table 的 on- sort - change 事件,默认false
... ... @@ -357,28 +357,6 @@ export declare interface TableColumnRenderParams {
357 357 index?: number;
358 358 }
359 359  
360   -export declare interface TableRenderCreateElementResult {
361   - child?: object;
362   - children?: Array<any>;
363   - componentInstance?: object;
364   - componentOptions?: object;
365   - context?: object;
366   - data?: object;
367   - elm?: object;
368   - functionalContext?: object;
369   - isCloned?: boolean;
370   - isComment?: boolean;
371   - isOnce?: boolean;
372   - isRootInsert?: boolean;
373   - isStatic?: boolean;
374   - key?: object;
375   - ns?: object;
376   - parent?: object;
377   - raw?: boolean;
378   - tag?: string;
379   - text?: object;
380   -}
381   -
382 360 export declare interface TableColumnRenderHeadParams {
383 361 /**
384 362 * 当前列数据
... ...