mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 01:42:47 +01:00
minor fix on button event
This commit is contained in:
parent
47a22559d8
commit
56ae39d020
@ -275,7 +275,7 @@ namespace OS {
|
|||||||
export namespace dialogs {
|
export namespace dialogs {
|
||||||
/**
|
/**
|
||||||
* Simple prompt dialog to get user input text.
|
* Simple prompt dialog to get user input text.
|
||||||
* The input date of the dialog:
|
* The input data of the dialog:
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* {
|
* {
|
||||||
|
@ -134,15 +134,15 @@ namespace OS {
|
|||||||
*/
|
*/
|
||||||
protected mount() {
|
protected mount() {
|
||||||
$(this.refs.button).click((e) => {
|
$(this.refs.button).click((e) => {
|
||||||
|
if (this.toggle) {
|
||||||
|
this.selected = !this.selected;
|
||||||
|
}
|
||||||
const evt: TagEventType<JQuery.MouseEventBase> = {
|
const evt: TagEventType<JQuery.MouseEventBase> = {
|
||||||
id: this.aid,
|
id: this.aid,
|
||||||
data: e,
|
data: e,
|
||||||
};
|
};
|
||||||
this._onbtclick(evt);
|
this._onbtclick(evt);
|
||||||
this.observable.trigger("btclick", evt);
|
this.observable.trigger("btclick", evt);
|
||||||
if (this.toggle) {
|
|
||||||
return (this.selected = !this.selected);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user