mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
update types for uni-app (#36749)
* fix: getStoragetSync return value is incorrect. * fix: The type of return value type of Storage is incorrect * added parameter for GetStorageOptions.success * added value parameter for setStorageSync * fix setStorageSync with value: any * update types for uni-app * add class EditorContext for uni-app types * fix lint for uni-app * remove *.vue module for uni-app * update types for uni-app * update types for uni-app * update types for uni-app * update types for uni-app * update types for uni-app * update types for uni-app
This commit is contained in:
parent
1501160d93
commit
814ca317ae
6
types/uni-app/lib/uni.d.ts
vendored
6
types/uni-app/lib/uni.d.ts
vendored
@ -81,7 +81,7 @@ declare class Uni {
|
||||
*
|
||||
* 参考: [http://uniapp.dcloud.io/frame?id=upx2px](http://uniapp.dcloud.io/frame?id=upx2px)
|
||||
*/
|
||||
upx2px(upx: number): number;
|
||||
upx2px(upx?: number): number;
|
||||
/**
|
||||
* 创建一个 WebSocket 连接
|
||||
*
|
||||
@ -5285,11 +5285,11 @@ interface CanvasToTempFilePathOptions {
|
||||
/**
|
||||
* 输出图片宽度(默认为 width * 屏幕像素密度)
|
||||
*/
|
||||
destWidth?: boolean;
|
||||
destWidth?: number;
|
||||
/**
|
||||
* 输出图片高度(默认为 height * 屏幕像素密度)
|
||||
*/
|
||||
destHeight?: () => void;
|
||||
destHeight?: number;
|
||||
/**
|
||||
* 画布标识,传入 <canvas/> 的 canvas-id
|
||||
*/
|
||||
|
||||
@ -28,3 +28,20 @@ uni.createSelectorQuery().select('.test').context(res => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const px: number = uni.upx2px(750);
|
||||
|
||||
uni.canvasToTempFilePath({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 100,
|
||||
height: 100,
|
||||
destWidth: 100,
|
||||
destHeight: 100,
|
||||
canvasId: 'test',
|
||||
fileType: 'png',
|
||||
quality: 1,
|
||||
success() {
|
||||
console.log('canvasToTempFilePath success');
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user