@ecolovo/uniapp-components 2.0.5 → 2.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.
@@ -284,7 +284,7 @@ const validateValue = (value: string, isStepButton = false) => {
284
284
  return nextValue;
285
285
  };
286
286
 
287
- const handleInput = (e: Event) => {
287
+ const handleInput = (e: InputEvent) => {
288
288
  let value = e.detail.value.trim();
289
289
 
290
290
  const match = inputTestReg.value.exec(value);
@@ -125,8 +125,8 @@ const debouncedInput = debounceFn((value: string) => {
125
125
  }, props.debounce);
126
126
 
127
127
  /** 输入响应 */
128
- const onInput = (event: Event) => {
129
- const value = (event as CustomEvent).detail.value;
128
+ const onInput = (event: InputEvent) => {
129
+ const value = event.detail.value;
130
130
  searchValue.value = value;
131
131
  debouncedInput(value);
132
132
  };
@@ -1,6 +1,6 @@
1
1
  import { type CommonProps } from './types';
2
2
  declare const useUpload: <Emit extends ((event: "update:modelValue", value: UniApp.UploadMediaFile[]) => void) & ((event: "change", value: UniApp.UploadMediaFile[]) => void)>(props: CommonProps, emit: Emit) => {
3
- currentValue: import("vue").WritableComputedRef<UniNamespace.UploadMediaFile[]>;
3
+ currentValue: import("vue").WritableComputedRef<UniNamespace.UploadMediaFile[], UniNamespace.UploadMediaFile[]>;
4
4
  isReadonly: import("vue").ComputedRef<boolean>;
5
5
  isUploading: import("vue").ComputedRef<boolean>;
6
6
  restCount: import("vue").ComputedRef<number>;
@@ -27,7 +27,7 @@ declare const useAwaitableDialog: (isShow: Ref<boolean | undefined>) => {
27
27
  */
28
28
  declare const useDialog: () => {
29
29
  /** 弹窗组件实例引用 */
30
- dialogRef: Ref<any>;
30
+ dialogRef: Ref<any, any>;
31
31
  /**
32
32
  * 显示弹出框
33
33
  */
@@ -34,7 +34,7 @@ type UseMessageBoxReturn = {
34
34
  showMessageBox: MessageBoxShowMessageBoxFunc;
35
35
  };
36
36
  declare const useMessageBoxComponent: (messageBoxRef?: Ref<InstanceType<typeof MessageBox> | undefined>) => {
37
- messageBoxRef: Ref<any>;
37
+ messageBoxRef: Ref<any, any>;
38
38
  show: MessageBoxShowCustomFunc;
39
39
  showConfirm: MessageBoxShowConfirmFunc;
40
40
  showMessageBox: MessageBoxShowMessageBoxFunc;
@@ -4,5 +4,5 @@ import type { Ref } from 'vue';
4
4
  *
5
5
  * @param modelValue 组件绑定值,默认值必须是 `undefined`
6
6
  */
7
- declare function useModelValue<T>(modelValue: undefined extends T ? Ref<T> : never): Ref<T>;
7
+ declare function useModelValue<T>(modelValue: undefined extends T ? Ref<T> : never): Ref<T, T>;
8
8
  export { useModelValue };
@@ -32,6 +32,37 @@ declare const useCurrentPageRoute: () => {
32
32
  route?: string | undefined;
33
33
  $getAppWebview?: (() => PlusWebviewWebviewObject) | undefined;
34
34
  $vm?: any;
35
+ }[], (Page.PageInstance<AnyObject, AnyObject> & AnyObject)[] | {
36
+ [x: string]: any;
37
+ onInit?: ((query?: AnyObject) => void) | undefined;
38
+ onLoad?: ((query?: AnyObject) => void) | undefined;
39
+ onShow?: (() => void) | undefined;
40
+ onPageShow?: (() => void) | undefined;
41
+ onReady?: (() => void) | undefined;
42
+ onHide?: (() => void) | undefined;
43
+ onPageHide?: (() => void) | undefined;
44
+ onUnload?: (() => void) | undefined;
45
+ onPullDownRefresh?: (() => void) | undefined;
46
+ onReachBottom?: (() => void) | undefined;
47
+ onTitleClick?: (() => void) | undefined;
48
+ onLiveMount?: ((options: Page.LiveMountOptions) => Page.LiveMountContent | Promise<Page.LiveMountContent>) | undefined;
49
+ onUploadDouyinVideo?: ((options: Page.UploadDouyinVideoOptions) => Page.UploadDouyinVideoContent | Promise<Page.UploadDouyinVideoContent>) | undefined;
50
+ onShareAppMessage?: ((options: Page.ShareAppMessageOption) => Page.CustomShareContent | Promise<Omit<Page.CustomShareContent, "promise">>) | undefined;
51
+ onShareTimeline?: ((options: Page.OnShareTimelineOptions) => Page.ShareTimelineContent) | undefined;
52
+ onAddToFavorites?: ((options: Page.AddToFavoritesOption) => Page.CustomFavoritesContent) | undefined;
53
+ onPageScroll?: ((options: Page.PageScrollOption) => void) | undefined;
54
+ onResize?: ((options: Page.ResizeOption) => void) | undefined;
55
+ onTabItemTap?: ((options: Page.TabItemTapOption) => void) | undefined;
56
+ onNavigationBarButtonTap?: ((options: Page.NavigationBarButtonTapOption) => void) | undefined;
57
+ onBackPress?: ((options: Page.BackPressOption) => any) | undefined;
58
+ onNavigationBarSearchInputChanged?: ((event: Page.NavigationBarSearchInputEvent) => void) | undefined;
59
+ onNavigationBarSearchInputConfirmed?: ((event: Page.NavigationBarSearchInputEvent) => void) | undefined;
60
+ onNavigationBarSearchInputClicked?: (() => void) | undefined;
61
+ onShareChat?: ((options: Page.OnShareChatOptions) => Page.ShareChatContent) | undefined;
62
+ onCopyUrl?: ((options: Page.OnCopyUrlOptions) => Page.CopyUrlContent) | undefined;
63
+ route?: string | undefined;
64
+ $getAppWebview?: (() => PlusWebviewWebviewObject) | undefined;
65
+ $vm?: any;
35
66
  }[]>;
36
67
  /** 当前页面路由 */
37
68
  currentPageRoute: import("vue").ComputedRef<string>;
package/globals.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export {};
2
2
  declare global {
3
3
  type PromiseResolvers<T> = Pick<PromiseWithResolvers<T>, 'resolve' | 'reject'>;
4
- interface Event {
4
+ interface InputEvent {
5
5
  detail: {
6
6
  value: string;
7
7
  };
package/globals.ts CHANGED
@@ -7,7 +7,7 @@ declare global {
7
7
  >;
8
8
 
9
9
  // 覆盖 input 元素的 onInput 事件信息
10
- interface Event {
10
+ interface InputEvent {
11
11
  detail: { value: string };
12
12
  }
13
13
  // 覆盖 input 元素的 obBlur 事件信息
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecolovo/uniapp-components",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Ecolovo UniApp Vue3 组件库",
5
5
  "keywords": [
6
6
  "components",
@@ -17,9 +17,8 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@ecolovo/utils": "^1.0.11",
20
- "case-anything": "3.1.2",
21
- "lodash-es": "4.17.21",
22
- "vue": "3.4.21"
20
+ "case-anything": "^3.1.2",
21
+ "lodash-es": "^4.17.21"
23
22
  },
24
23
  "devDependencies": {
25
24
  "@dcloudio/types": "^3.4.30",
@@ -41,7 +40,11 @@
41
40
  "typescript": "^5.9.3",
42
41
  "vite": "^8.1.3",
43
42
  "vite-plugin-dts": "^5.0.3",
43
+ "vue": "^3.5.22",
44
44
  "vue-eslint-parser": "^10.4.0",
45
45
  "vue-tsc": "^3.3.6"
46
+ },
47
+ "peerDependencies": {
48
+ "vue": "^3.5.22"
46
49
  }
47
50
  }