Browse Source

无JIRA toast 支持直接传level

es6
zsmj 3 years ago
parent
commit
635ac250f4
  1. 1
      src/base/foundation/message.js
  2. 2
      typescript/base/foundation/message.ts

1
src/base/foundation/message.js

@ -22,6 +22,7 @@ BI.Msg = function () {
// BI.Msg.prompt(title, message, value, callback, min_width);
},
toast: function (message, options, context) {
BI.isString(options) && (options = { level: options })
options = options || {};
context = context || BI.Widget._renderEngine.createElement("body");
var level = options.level || "common";

2
typescript/base/foundation/message.ts

@ -2,5 +2,5 @@ export type _msg = {
alert: (title: string, message?: string | {[key: string]: any}, callback?: (result?: boolean)=>void) => void
confirm: (title: string, message?: string | {[key: string]: any}, 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
toast: (message: string, options?: object | string, context?: HTMLElement) => void
}

Loading…
Cancel
Save