mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
feat(file-picker): add missing options
feat(file-picker): add missing options
This commit is contained in:
parent
a3c46216f6
commit
1d9c449b24
@ -1,6 +1,13 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface IOSFilePickerPosition {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name iOS File Picker
|
* @name iOS File Picker
|
||||||
* @description
|
* @description
|
||||||
@ -20,6 +27,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|||||||
* .catch(err => console.log('Error', err));
|
* .catch(err => console.log('Error', err));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
|
* @interfaces
|
||||||
|
* IOSFilePickerPosition
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'iOS File Picker',
|
pluginName: 'iOS File Picker',
|
||||||
@ -32,10 +41,17 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|||||||
export class IOSFilePicker extends IonicNativePlugin {
|
export class IOSFilePicker extends IonicNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Open a file
|
* Open a file
|
||||||
|
* @params {string | string[]} [utis]
|
||||||
|
* @params {IOSFilePickerPosition} [position] Set the position of the rectangle where the file picker should show up.
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
pickFile(): Promise<string> {
|
callbackOrder: 'reverse'
|
||||||
|
})
|
||||||
|
pickFile(
|
||||||
|
utis?: string | string[],
|
||||||
|
position?: IOSFilePickerPosition
|
||||||
|
): Promise<string> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user