12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import { ConfigProcess } from "../types";
- import { ApiFunction } from "./ajax";
- export declare type ServerInvokeUrlTransformFunction = (jsUrl: string, option?: any) => string | undefined;
- export declare type SqlUrlTransformFunction = (jsUrl: string, option?: any) => string | undefined;
- export interface ApiConvert {
- /**
- * 从表格 dataSource 属性,转换为 ExtJS.storeOption 属性
- */
- gridInvokeBuild: (scope: any, grid: any, config: any, dataSource: any, params: any, reloadParams: any) => object;
- }
- /**
- * YvanUI 全局扩展配置
- */
- export interface ConfigOption {
- /**
- * 是否在设计器模式
- */
- designMode: boolean;
- /**
- * 扩展自定义的 ajax 方法
- */
- ajax: ApiFunction;
- /**
- * 扩展自定义的后端请求方法
- */
- apiConvert: ApiConvert;
- /**
- * serverJS Url转换为Ajax请求
- */
- serverInvokeUrlTransform: ServerInvokeUrlTransformFunction;
- /**
- * Sql Url转换为Ajax请求
- */
- sqlUrlTransform: SqlUrlTransformFunction;
- /**
- * 获取拼音首字母的函数
- */
- pinyinFunction: (py: string) => string;
- /**
- * Scope onload 时扩展方法
- */
- scopeOnLoad: (scope: any) => void;
- }
- /**
- * 全局 ajax 方法
- */
- export declare const ajax: {
- func?: ApiFunction;
- };
- export declare let scopeOnLoad: (scope: any) => void;
- export declare let apiConvert: ApiConvert;
- export declare const baseConfigProcessList: ConfigProcess[];
- /**
- * 在基类添加 Config 的处理方法
- */
- export declare function baseConfigProcess(option?: any): (target: any, propertyKey: any) => void;
- export declare function isDesignMode(): boolean;
- export declare function setDesignMode(v: boolean): void;
- /**
- * 将业务定义的 url 转换为调用服务端 groovy 的 url
- */
- export declare function serverInvokeUrlTransform(url: string, option?: any): string;
- /**
- * 将业务定义的 url 转换为调用服务端 sql 的 Url
- */
- export declare function sqlUrlTransform(url: string): string;
- /**
- * YvanUI 全局扩展配置
- */
- export declare function extend(option: Partial<ConfigOption>): void;
- export declare function getApiConvert(): ApiConvert;
- export declare function getPinyin(v: string): any;
- /**
- * 适用于 Select / Tree 等,作筛选的通用方法.
- * 1.首字母模糊匹配(不区分大小写)
- * 2.标识的模糊匹配(不区分大小写)
- * 3.名称的模糊匹配,且支持以逗号(全角或半角)隔开的字词匹配,并自动去空格,如“南京, 物流 ”可以匹配出“南京九州通物流技术开发有限公司”
- */
- export declare function keywordFilter(keyword: string, label: string, value?: string): boolean;
|