gis-common 3.1.5 → 3.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @description 声音播放类
3
+ * @export
4
+ * @class AudioPlayer
5
+ */
6
+ export default class AudioPlayer {
7
+ /**
8
+ * Creates an instance of AudioPlayer.
9
+ * @param {*} url
10
+ */
11
+ private audio;
12
+ constructor(url: string);
13
+ play(): void;
14
+ pause(): void;
15
+ get muted(): boolean;
16
+ /**
17
+ * @description 设置静音状态,如果静音,autoplay属性将失效
18
+ */
19
+ set muted(val: boolean);
20
+ }
@@ -0,0 +1,34 @@
1
+ interface StorageData {
2
+ key: string;
3
+ value: any;
4
+ expired?: number;
5
+ }
6
+ export default class WebStorage {
7
+ private cacheType;
8
+ private storage;
9
+ constructor(type?: number);
10
+ /**
11
+ * 设置带过期时间的LocalStorage
12
+ * @param key 缓存关键字
13
+ * @param value 缓存对象,可以是任意类型
14
+ * @param expired 以秒为单位,默认为1小时
15
+ * @returns {Object}
16
+ */
17
+ setItem(key: string, value: string, expired: number): StorageData;
18
+ /***
19
+ * 获取带过期时间的缓存
20
+ * @param key
21
+ * @returns {null|*}
22
+ */
23
+ getItem(key: string): string | null;
24
+ /**
25
+ * 移除指定缓存
26
+ * @param keys
27
+ */
28
+ remove(keys: string): void;
29
+ /**
30
+ * 移出全部缓存
31
+ */
32
+ clear(): void;
33
+ }
34
+ export {};
@@ -0,0 +1,7 @@
1
+ export { default as AudioPlayer } from './AudioPlayer';
2
+ export { default as CanvasDrawer } from './CanvasDrawer';
3
+ export { default as DevicePixelRatio } from './DevicePixelRatio';
4
+ export { default as EventDispatcher } from './EventDispatcher';
5
+ export { default as HashMap } from './HashMap';
6
+ export { default as WebSocketClient } from './WebSocketClient';
7
+ export { default as WebStorage } from './WebStorage';