mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2024-10-07 08:32:13 +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()
|
@Cordova()
|
||||||
isAvailable(): Promise<boolean> { return; }
|
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.
|
* 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 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
|
* @param options {PrintOptions} optional. The options to pass to the printer
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
|
successIndex: 2,
|
||||||
|
errorIndex: 4
|
||||||
|
})
|
||||||
print(content: string | HTMLElement, options?: PrintOptions): Promise<any> { return; }
|
print(content: string | HTMLElement, options?: PrintOptions): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user