diff --git a/typescript/base/foundation/message.ts b/typescript/base/foundation/message.ts new file mode 100644 index 000000000..40c79cc0e --- /dev/null +++ b/typescript/base/foundation/message.ts @@ -0,0 +1,6 @@ +export type _msg = { + alert: (title: string, message?: string, callback?: (result?: boolean)=>void) => void + confirm: (title: string, message?: string, callback?: (result: boolean)=>void) => void + prompt: (title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number) => void + toast: (message: string, options?: object, context?: HTMLElement ) => void +} \ No newline at end of file diff --git a/typescript/core/platform/web/function.ts b/typescript/core/platform/web/function.ts new file mode 100644 index 000000000..95b2d29ef --- /dev/null +++ b/typescript/core/platform/web/function.ts @@ -0,0 +1,12 @@ +export type _function = { + isIE: () => boolean; + getIEVersion: () => number; + isEdge: () => boolean; + isChrome: () => boolean; + isFireFox: () => boolean; + isOpera: () => boolean; + isSafari: () => boolean; + isMac: () => boolean; + isWindows: () => boolean; + isSupportCss3: (style: any) => boolean; +} \ No newline at end of file diff --git a/typescript/core/platform/web/index.ts b/typescript/core/platform/web/index.ts new file mode 100644 index 000000000..469e247a1 --- /dev/null +++ b/typescript/core/platform/web/index.ts @@ -0,0 +1,6 @@ +import { _function } from "./function"; + + +export interface _web extends _function { + +} \ No newline at end of file diff --git a/typescript/index.ts b/typescript/index.ts index 5000546a8..14e2d4896 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -141,9 +141,11 @@ import { EditorIconCheckCombo } from "./case/combo/editoriconcheckcombo/combo.ed import { IconTextValueCombo } from './case/combo/icontextvaluecombo/combo.icontextvalue'; import { ListView } from './base/list/listview'; import { FloatCenterLayout } from './core/wrapper/layout/middle/middle.float.center'; +import { _msg } from './base/foundation/message'; +import { _web } from './core/platform/web'; import { DynamicYearMonthPopup } from './widget/yearmonth/popup.yearmonth'; -export interface BI extends _func, _i18n, _base, _inject, _var { +export interface BI extends _func, _i18n, _base, _inject, _var, _web { OB: typeof OB; Plugin: _Plugin; Widget: typeof Widget; @@ -290,6 +292,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var { IconTextValueCombo: typeof IconTextValueCombo; ListView: typeof ListView; FloatCenterLayout: typeof FloatCenterLayout; + Msg: _msg; DynamicYearMonthPopup: typeof DynamicYearMonthPopup; }