1
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"x_toast_s": "./lib/x_toast_s.har"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { XTOAST_TYPE, XTIPS_TYPE_PRIVATE } from "../interface.uts"
|
||||
import { defaultConfig, configCover } from "../libs/config.uts"
|
||||
import { hexToRgb } from "../libs/color.uts"
|
||||
import { xshowtoasts,xhidetoasts } from "x_toast_s";
|
||||
|
||||
|
||||
|
||||
export const hideToast = () => {
|
||||
xhidetoasts(UTSHarmony.getCurrentWindow()!.getUIContext())
|
||||
}
|
||||
export function showToast(opts : XTOAST_TYPE|null) {
|
||||
let config = configCover(opts==null ? ({} as XTOAST_TYPE) : (opts!))
|
||||
xshowtoasts(UTSHarmony.getCurrentWindow()!.getUIContext(),config)
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user