Browse Source

Pull request #2499: 无JIRA update

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '9a78e2662cba326a4ba0831a1ef580ff1ddd4810':
  无JIRA 严格模式
  getSearchResult方法的deepClone
  无JIRA任务 sticky 声明
  无JIRA : 声明
es6
Dailer 3 years ago
parent
commit
f7cc510921
  1. 7
      src/base/single/input/file.js
  2. 7
      src/core/func/function.js
  3. 1
      typescript/base/combination/combo.ts
  4. 8
      typescript/core/utils/tree.ts
  5. 5
      typescript/core/wrapper/layout/sticky/sticky.horizontal.ts
  6. 5
      typescript/core/wrapper/layout/sticky/sticky.vertical.ts
  7. 6
      typescript/index.ts

7
src/base/single/input/file.js

@ -333,11 +333,10 @@
if (isFunction(handler.onloadstart)) { if (isFunction(handler.onloadstart)) {
handler.onloadstart(rpe, {}); handler.onloadstart(rpe, {});
} }
with (document.body || document.documentElement) { var d = document.body || document.documentElement;
appendChild(iframe); d.appendChild(iframe);
appendChild(form); d.appendChild(form);
form.submit(); form.submit();
}
return handler; return handler;
}; };

7
src/core/func/function.js

@ -40,16 +40,14 @@ _.extend(BI.Func, {
* @param items * @param items
* @param keyword * @param keyword
* @param param 搜索哪个属性 * @param param 搜索哪个属性
* @param clone 是否需要deepClone
*/ */
getSearchResult: function (items, keyword, param, clone) { getSearchResult: function (items, keyword, param) {
var isArray = BI.isArray(items); var isArray = BI.isArray(items);
items = isArray ? BI.flatten(items) : items; items = isArray ? BI.flatten(items) : items;
param || (param = "text"); param || (param = "text");
BI.isNull(clone) && (clone = true);
if (!BI.isKey(keyword)) { if (!BI.isKey(keyword)) {
return { return {
find: clone ? BI.deepClone(items) : items, find: items,
match: isArray ? [] : {} match: isArray ? [] : {}
}; };
} }
@ -61,7 +59,6 @@ _.extend(BI.Func, {
if (BI.isNull(item)) { if (BI.isNull(item)) {
return; return;
} }
clone && (item = BI.deepClone(item));
t = BI.stripEL(item); t = BI.stripEL(item);
text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) { text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {
return BI.isNotNull(val); return BI.isNotNull(val);

1
typescript/base/combination/combo.ts

@ -34,6 +34,7 @@ export declare class Combo extends Widget {
adjustYOffset?: number; adjustYOffset?: number;
hideChecker?: Function; hideChecker?: Function;
offsetStyle?: 'left' | 'right' | 'center'; offsetStyle?: 'left' | 'right' | 'center';
value?:any;
el?: any; el?: any;
popup?: any; popup?: any;
comboClass?: string; comboClass?: string;

8
typescript/core/utils/tree.ts

@ -43,8 +43,8 @@ export declare class Tree {
postOrderTraverse(callback: Function): void; postOrderTraverse(callback: Function): void;
nrPostOrderTraverse(callback: Function): void; nrPostOrderTraverse(callback: Function): void;
static transformToArrayFormat<T>(nodes: T | T[], pId: any, childKey?: string): T[]; static transformToArrayFormat<T>(nodes: T | T[], pId: any, childKey?: string): T[];
static arrayFormat(nodes: Node | Node[], pId: any): Node[]; static arrayFormat<T>(nodes: T | T[], pId: any): T[];
static transformToTreeFormat<T>(sNodes: T[]): Node[]; static transformToTreeFormat<T>(sNodes: T[]): T[];
static treeFormat(sNodes: Node | Node[]): Node[]; static treeFormat<T>(sNodes: T | T[]): T[];
static traversal(array: Node[], callback: Function, pNode: Node): void; static traversal<T>(array: T[], callback: (index:number,node:T,pNode?:T)=> boolean | void, pNode?: T): void;
} }

5
typescript/core/wrapper/layout/sticky/sticky.horizontal.ts

@ -0,0 +1,5 @@
import { Layout } from "../../layout";
export declare class HorizontalStickyLayout extends Layout {
static xtype: string;
}

5
typescript/core/wrapper/layout/sticky/sticky.vertical.ts

@ -0,0 +1,5 @@
import { Layout } from "../../layout";
export declare class VerticalStickyLayout extends Layout {
static xtype: string;
}

6
typescript/index.ts

@ -181,6 +181,8 @@ import { TdLayout } from './core/wrapper/layout/layout.td';
import { MultiLayerSelectLevelTree } from './widget/multilayerselecttree/multilayerselecttree.leveltree'; import { MultiLayerSelectLevelTree } from './widget/multilayerselecttree/multilayerselecttree.leveltree';
import { SelectTreeExpander } from './widget/selecttree/selecttree.expander'; import { SelectTreeExpander } from './widget/selecttree/selecttree.expander';
import { DownListGroupItem } from "./widget/downlist/item.downlistgroup"; import { DownListGroupItem } from "./widget/downlist/item.downlistgroup";
import { VerticalStickyLayout } from "./core/wrapper/layout/sticky/sticky.vertical";
import { HorizontalStickyLayout } from "./core/wrapper/layout/sticky/sticky.horizontal";
import './shims-tsx'; import './shims-tsx';
@ -370,6 +372,8 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
MultiLayerSelectLevelTree: typeof MultiLayerSelectLevelTree; MultiLayerSelectLevelTree: typeof MultiLayerSelectLevelTree;
SelectTreeExpander: typeof SelectTreeExpander; SelectTreeExpander: typeof SelectTreeExpander;
DownListGroupItem: typeof DownListGroupItem; DownListGroupItem: typeof DownListGroupItem;
VerticalStickyLayout: typeof VerticalStickyLayout;
HorizontalStickyLayout: typeof HorizontalStickyLayout;
} }
export default { export default {
@ -558,4 +562,6 @@ export {
SelectTreeExpander, SelectTreeExpander,
DirectionPager, DirectionPager,
DownListGroupItem, DownListGroupItem,
HorizontalStickyLayout,
VerticalStickyLayout,
}; };

Loading…
Cancel
Save