unigui Ext.toast

  js: = 'Ext.toast (' 'content', 'title' ');';
  UniSession.AddJS (JS);

 

 

procedure toast(content: string; title: string = '');
var
  js: string;
begin
  js := 'Ext.toast(' + QuotedStr(content) + ',' + QuotedStr(title) + ');';
  UniSession.AddJS(js);
end;

Automatically disappear after one second display

 

 

ALERTMSG Procedure (title, Content, TY: String);
var
  JS: String;
the begin
  //https://blog.csdn.net/ranzhifa_2008/article/details/8543429
 // icon: the icon pop-up display is provided,
 // the options are:
 //Ext.Msg.INFO (the icon with an exclamation mark),
 //Ext.Msg.ERROR (icon with a red X number),
 //Ext.Msg.WARNING (yellow icon with an exclamation mark),
 // Ext.Msg.QUESTION (with? icon numbers)

  js := 'Ext.Msg.show({' //
    + 'title:' + QuotedStr(title) + ','//
    + 'msg:' + QuotedStr(content) + ','//
    + 'buttons:' + 'Ext.Msg.OK' + ','//
    + 'icon:' + 'Ext.Msg.' + UpperCase(ty) + ','//
    + '}); ';

  UniSession.AddJS(js);

end;

 

https://www.cnblogs.com/zeng-qh/p/9692345.html

procedure alert(title, content: string);
var
  js: string;
begin
  js := 'Ext.Msg.alert(' + QuotedStr(title) + ',' + QuotedStr(content) + ');';
  UniSession.AddJS(js);

end;

procedure AlertINFO(content: string);
begin
  Alertmsg('提示', content, 'INFO');
end;
procedure AlertERROR(content: string);
begin
  Alertmsg('错误', content, 'ERROR');
end;

procedure AlertWARNING(content: string);
begin
  Alertmsg('警告', content, 'WARNING');
end;
procedure AlertQUESTION(content: string);
begin
  Alertmsg('提示', content, 'QUESTION');
end;
 

Published 444 original articles · won praise 25 · views 180 000 +

Guess you like

Origin blog.csdn.net/ozhy111/article/details/103489115