lxui-uni 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/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { App } from 'vue'
1
+ // import type { App } from 'vue'
2
2
  import {
3
3
  goToPage,
4
4
  formatTime,
@@ -42,8 +42,8 @@ const $util = {
42
42
  uni.goToPage = goToPage
43
43
  uni.$util = $util
44
44
 
45
- const install = (app: App) => {
46
- app.config.globalProperties.$util = $util
47
- app.config.globalProperties.goToPage = goToPage
45
+ const install = (Vue: any) => {
46
+ Vue.config.globalProperties.$util = $util
47
+ Vue.config.globalProperties.goToPage = goToPage
48
48
  }
49
49
  export default { install }
@@ -4,7 +4,10 @@ const version = '3'
4
4
  if (process.env.NODE_ENV === 'development') {
5
5
  console.log(`\n %c lxui-uni V${version} %c https://blog.csdn.net/qq_51091386/article/details/138125947 \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;');
6
6
  }
7
-
7
+ const setConfig = (config: any) => {
8
+ console.log(config)
9
+ }
8
10
  export default {
9
- version
11
+ version,
12
+ setConfig
10
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lxui-uni",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "快速构建页面",
5
5
  "author": "2399270194@qq.com",
6
6
  "license": "MIT",
@@ -0,0 +1,25 @@
1
+ declare module 'lxui-uni' {
2
+ export function install(): void //必要
3
+ type pageMode = 'navigateTo' | 'redirectTo' | 'reLaunch' | 'switchTab'
4
+ interface goToPageInt {
5
+ url: string
6
+ mode?: pageMode
7
+ params?: {
8
+ [key: string]: string | number | boolean
9
+ }
10
+ }
11
+
12
+ global {
13
+ interface Uni {
14
+ goToPage({ url, mode, params }: goToPageInt): void;
15
+ $util: {
16
+ formatTime: any,
17
+ debounce: any,
18
+ throttle: any,
19
+ saveImgData: any,
20
+ setClipboardData: any,
21
+ config: any
22
+ }
23
+ }
24
+ }
25
+ }
package/types/env.d.ts DELETED
@@ -1,28 +0,0 @@
1
- import type {
2
- goToPage,
3
- formatTime,
4
- debounce,
5
- throttle,
6
- saveImgData,
7
- setClipboardData
8
- } from '../libs/util'
9
- type pageMode = 'navigateTo' | 'redirectTo' | 'reLaunch' | 'switchTab'
10
- interface goToPageInt {
11
- url: string
12
- mode?: pageMode
13
- params?: {
14
- [key: string]: string | number | boolean
15
- }
16
- }
17
- interface Uni {
18
- goToPage({ url, mode, params = {} }: goToPageInt): void;
19
- $util: {
20
- goToPage,
21
- formatTime,
22
- debounce,
23
- throttle,
24
- saveImgData,
25
- setClipboardData
26
- }
27
- }
28
- declare const onReachBottom