mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(printer): fix implementation and add pick method
This commit is contained in:
parent
7d63e808ad
commit
55071c0d65
@ -84,13 +84,22 @@ export class Printer extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
isAvailable(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Displays a system interface allowing the user to select an available printer. To speak with a printer directly you need to know the network address by picking them before via `printer.pick`.
|
||||
*/
|
||||
@Cordova()
|
||||
pick(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Sends content to the printer.
|
||||
* @param content {string | HTMLElement} The content to print. Can be a URL or an HTML string. If a HTML DOM Object is provided, its innerHtml property value will be used.
|
||||
* @param options {PrintOptions} optional. The options to pass to the printer
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
successIndex: 2,
|
||||
errorIndex: 4
|
||||
})
|
||||
print(content: string | HTMLElement, options?: PrintOptions): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user