@smart100/spu-web-plugin 0.0.5 → 0.0.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart100/spu-web-plugin",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "rollup -c -w",
package/src/index.ts CHANGED
@@ -7,7 +7,7 @@ import { downloadService, uploadService } from './oss'
7
7
  import { getUniqueid } from './utils'
8
8
  import AMapLoader from './AMapLoader'
9
9
  import login from './login'
10
- import { v4 as uuid } from 'uuid'
10
+ import { v4 as getUuid } from 'uuid'
11
11
  // import { downloadService } from './oss'
12
12
 
13
13
  // class SPUWebPlugin {
@@ -41,7 +41,7 @@ export {
41
41
  downloadService,
42
42
  uploadService,
43
43
  getUniqueid,
44
- uuid,
44
+ getUuid,
45
45
  AMapLoader,
46
46
  getToken,
47
47
  getTokenExpires,
@@ -1,95 +0,0 @@
1
- import type { App } from 'vue'
2
- // import type { AxiosInstance } from 'axios'
3
-
4
- interface ISPUWebPluginOptions {
5
- modulekey: string
6
- modulename: string
7
- moduleversion: string
8
- router: any
9
- }
10
-
11
- interface IAMapLoader {
12
- load: (options?: {
13
- plugins?: Array<string>
14
- AMapUI?: {
15
- plugins?: Array<string>
16
- }
17
- }) => Promise<any>
18
- }
19
-
20
-
21
- type Cope = { width?: number, height?: number } | string | boolean
22
-
23
- interface IDownload {
24
- type?: 'att' | 'img',
25
- source: string,
26
- datetime: string | number,
27
- storagetype?: StorageType,
28
- cope?: Cope
29
- }
30
-
31
- interface IDownloadService {
32
- getUrl: ({
33
- type = 'img',
34
- source = '',
35
- datetime = '',
36
- storagetype = 'storage',
37
- cope = ''
38
- }: IDownload) => Promise<any>
39
- }
40
-
41
-
42
- interface IUpload {
43
- type?: 'att' | 'img',
44
- file: File,
45
- source?: string,
46
- datetime?: string | number,
47
- storagetype?: StorageType,
48
- onprogress?: (p: number, _checkpoint?: IAny) => void
49
- }
50
-
51
- interface IUploadService {
52
- upload: ({
53
- type = 'img',
54
- file,
55
- source = '',
56
- datetime = '',
57
- storagetype = 'storage',
58
- onprogress,
59
- }: IUpload) => Promise<any>
60
- }
61
-
62
-
63
- type Location = {
64
- longitude: string
65
- latitude: string
66
- address: string
67
- [propName: string]: any
68
- } | null
69
-
70
-
71
- export const lsProxy: any
72
- export const ssProxy: any
73
- export const getLocation: () => Promise<Location>
74
- export const getDistance: (p1: [number, number], p2: [number, number]) => Promise<any>
75
- export const spuAxios: any
76
- // export const spuAxios: AxiosInstance
77
- export const apaasAxios: any
78
- export const downloadService: IDownloadService
79
- export const uploadService: IUploadService
80
- export const getUniqueid: () => string
81
- export const uuid: () => string
82
- export const AMapLoader: IAMapLoader
83
- export const getToken: () => string
84
- export const getTokenExpires: () => string
85
- export const getRefreshToken: () => string
86
- export const getUser: (key?: string) => any
87
- export const checkLogin: () => boolean
88
-
89
- interface ISPUWebPlugin {
90
- install (app: App, option: ISPUWebPluginOptions): void
91
- // install: any
92
- version: string
93
- }
94
- declare const SPUWebPlugin: ISPUWebPlugin
95
- export default SPUWebPlugin