interface.uts 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12

export type OnMemoryWarning = (callback: UTSCallback) => void

export type OffMemoryWarning = (callback : UTSCallback | null) => void

export interface Uni {
	/**
	 * 开启监听内存警告
	 * 
	 * @param {UTSCallback} callback 
	 * @tutorial https://uniapp.dcloud.net.cn/api/system/memory.html#onmemorywarning
	 * @uniPlatform {
lizhongyi_'s avatar
lizhongyi_ 已提交
13
	 *    "app": {
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
	 *        "android": {
	 *            "osVer": "4.4.4",
	 *            "uniVer": "3.7.7",
	 *            "unixVer": "3.9.0"
	 *        },
	 *        "ios": {
	 *            "osVer": "9.0",
	 *            "uniVer": "3.7.7",
	 *            "unixVer": "3.9.0"
	 *   	  }
	 *    }
	 * }
	 * @uniVersion 3.7.7
	 * @uniVueVersion 2,3  //支持的vue版本
	 */
	onMemoryWarning : OnMemoryWarning,
	/**
	 * 取消监听内存不足告警事件
	 * 
	 * @param {UTSCallback} callback 
	 * @tutorial https://uniapp.dcloud.net.cn/api/system/memory.html#offmemorywarning
	 * @uniPlatform {
lizhongyi_'s avatar
lizhongyi_ 已提交
36
	 *    "app": {
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
	 *        "android": {
	 *            "osVer": "4.4.4",
	 *            "uniVer": "3.7.7",
	 *            "unixVer": "3.9.0"
	 *        },
	 *        "ios": {
	 *            "osVer": "9.0",
	 *            "uniVer": "3.7.7",
	 *            "unixVer": "3.9.0"
	 *   	  }
	 *    }
	 * }
	 * @uniVersion 3.7.7
	 * @uniVueVersion 2,3  //支持的vue版本
	 */
	offMemoryWarning : OffMemoryWarning
}