@solar-taro/ui-vant 0.0.0 → 1.0.1

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.
Files changed (57) hide show
  1. package/cascader-picker/index.vue.d.ts +73 -0
  2. package/date-range-picker/index.vue.d.ts +75 -0
  3. package/directives/bind-function.d.ts +5 -0
  4. package/directives/datetime-picker.d.ts +5 -0
  5. package/directives/readonly.d.ts +3 -0
  6. package/index.js +1764 -0
  7. package/item/index.vue.d.ts +44 -0
  8. package/list/index.vue.d.ts +105 -0
  9. package/modal/index.vue.d.ts +56 -0
  10. package/opper-controller/index.vue.d.ts +45 -0
  11. package/overlay/overlay.d.ts +37 -0
  12. package/package.json +1 -1
  13. package/plugin.d.ts +9 -0
  14. package/select-picker/index.vue.d.ts +66 -0
  15. package/selector/index.vue.d.ts +126 -0
  16. package/tabbar/index.vue.d.ts +58 -0
  17. package/vant.interface.d.ts +91 -0
  18. package/CHANGELOG.md +0 -3
  19. package/eslint.config.cjs +0 -22
  20. package/project.json +0 -29
  21. package/src/cascader-picker/index.vue +0 -210
  22. package/src/date-range-picker/index.vue +0 -201
  23. package/src/directives/bind-function.ts +0 -22
  24. package/src/directives/datetime-picker.ts +0 -33
  25. package/src/directives/readonly.ts +0 -5
  26. package/src/item/index.vue +0 -34
  27. package/src/list/index.vue +0 -86
  28. package/src/modal/index.vue +0 -55
  29. package/src/opper-controller/index.vue +0 -365
  30. package/src/overlay/overlay.ts +0 -76
  31. package/src/plugin.ts +0 -14
  32. package/src/select-picker/index.vue +0 -80
  33. package/src/selector/index.vue +0 -252
  34. package/src/tabbar/index.vue +0 -56
  35. package/src/vant.interface.ts +0 -96
  36. package/tsconfig.json +0 -21
  37. package/tsconfig.lib.json +0 -24
  38. package/tsconfig.spec.json +0 -28
  39. package/vite.config.ts +0 -130
  40. /package/{src/cascader-picker/index.ts → cascader-picker/index.d.ts} +0 -0
  41. /package/{src/date-range-picker/index.ts → date-range-picker/index.d.ts} +0 -0
  42. /package/{src/date-range-picker → date-range-picker}/index.scss +0 -0
  43. /package/{src/directives/index.ts → directives/index.d.ts} +0 -0
  44. /package/{src/index.ts → index.d.ts} +0 -0
  45. /package/{src/index.scss → index.scss} +0 -0
  46. /package/{src/item/index.ts → item/index.d.ts} +0 -0
  47. /package/{src/item → item}/index.scss +0 -0
  48. /package/{src/list/index.ts → list/index.d.ts} +0 -0
  49. /package/{src/modal/index.ts → modal/index.d.ts} +0 -0
  50. /package/{src/opper-controller/index.ts → opper-controller/index.d.ts} +0 -0
  51. /package/{src/opper-controller → opper-controller}/index.scss +0 -0
  52. /package/{src/overlay/index.ts → overlay/index.d.ts} +0 -0
  53. /package/{src/select-picker/index.ts → select-picker/index.d.ts} +0 -0
  54. /package/{src/selector/index.ts → selector/index.d.ts} +0 -0
  55. /package/{src/selector → selector}/index.scss +0 -0
  56. /package/{src/tabbar/index.ts → tabbar/index.d.ts} +0 -0
  57. /package/{src/tabbar → tabbar}/index.scss +0 -0
@@ -0,0 +1,44 @@
1
+ declare function __VLS_template(): {
2
+ start?(_: {}): any;
3
+ default?(_: {}): any;
4
+ end?(_: {}): any;
5
+ };
6
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
7
+ detail?: boolean;
8
+ lines?: boolean;
9
+ clickable?: boolean;
10
+ }>, {
11
+ lines: boolean;
12
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
13
+ detail?: boolean;
14
+ lines?: boolean;
15
+ clickable?: boolean;
16
+ }>, {
17
+ lines: boolean;
18
+ }>>> & Readonly<{}>, {
19
+ lines: boolean;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
22
+ export default _default;
23
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
+ type __VLS_TypePropsToRuntimeProps<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
27
+ } : {
28
+ type: import('vue').PropType<T[K]>;
29
+ required: true;
30
+ };
31
+ };
32
+ type __VLS_WithDefaults<P, D> = {
33
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
34
+ default: D[K];
35
+ }> : P[K];
36
+ };
37
+ type __VLS_Prettify<T> = {
38
+ [K in keyof T]: T[K];
39
+ } & {};
40
+ type __VLS_WithTemplateSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,105 @@
1
+ import { PropType } from 'vue';
2
+
3
+ declare function __VLS_template(): {
4
+ default?(_: {}): any;
5
+ empty?(_: {}): any;
6
+ "empty-content"?(_: {}): any;
7
+ };
8
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
9
+ refreshing: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ flex: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ loading: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ loadingText: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ data: {
26
+ type: ArrayConstructor;
27
+ default: never[];
28
+ };
29
+ refresher: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ refresherBg: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ emptyType: {
38
+ type: PropType<"error" | "network" | "search" | "default">;
39
+ default: string;
40
+ };
41
+ emptyText: {
42
+ type: StringConstructor;
43
+ default: string;
44
+ };
45
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
46
+ refresh: () => void;
47
+ lower: () => void;
48
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
49
+ refreshing: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ flex: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ loading: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ loadingText: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ data: {
66
+ type: ArrayConstructor;
67
+ default: never[];
68
+ };
69
+ refresher: {
70
+ type: BooleanConstructor;
71
+ default: boolean;
72
+ };
73
+ refresherBg: {
74
+ type: StringConstructor;
75
+ default: string;
76
+ };
77
+ emptyType: {
78
+ type: PropType<"error" | "network" | "search" | "default">;
79
+ default: string;
80
+ };
81
+ emptyText: {
82
+ type: StringConstructor;
83
+ default: string;
84
+ };
85
+ }>> & Readonly<{
86
+ onRefresh?: (() => any) | undefined;
87
+ onLower?: (() => any) | undefined;
88
+ }>, {
89
+ data: unknown[];
90
+ loading: boolean;
91
+ refreshing: boolean;
92
+ refresher: boolean;
93
+ refresherBg: string;
94
+ flex: boolean;
95
+ loadingText: string;
96
+ emptyType: "search" | "default" | "error" | "network";
97
+ emptyText: string;
98
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
99
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
100
+ export default _default;
101
+ type __VLS_WithTemplateSlots<T, S> = T & {
102
+ new (): {
103
+ $slots: S;
104
+ };
105
+ };
@@ -0,0 +1,56 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ buttons?(_: {}): any;
4
+ };
5
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
6
+ show: boolean;
7
+ title: string;
8
+ showButtons?: boolean;
9
+ confirmText?: string;
10
+ confirmDisabled?: boolean;
11
+ }>, {
12
+ confirmText: string;
13
+ showButtons: boolean;
14
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ confirm: () => void;
16
+ "update:show": (args_0: boolean) => void;
17
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
18
+ show: boolean;
19
+ title: string;
20
+ showButtons?: boolean;
21
+ confirmText?: string;
22
+ confirmDisabled?: boolean;
23
+ }>, {
24
+ confirmText: string;
25
+ showButtons: boolean;
26
+ }>>> & Readonly<{
27
+ onConfirm?: (() => any) | undefined;
28
+ "onUpdate:show"?: ((args_0: boolean) => any) | undefined;
29
+ }>, {
30
+ showButtons: boolean;
31
+ confirmText: string;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
34
+ export default _default;
35
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
46
+ default: D[K];
47
+ }> : P[K];
48
+ };
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
52
+ type __VLS_WithTemplateSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
@@ -0,0 +1,45 @@
1
+ import { Opper } from '@opper/core';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ show?: boolean;
5
+ /** 自动连接设备,MAC */
6
+ autoconnect?: string;
7
+ opper: Opper;
8
+ }>, {
9
+ show: boolean;
10
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ "update:show": (args_0: boolean) => void;
12
+ connect: (deviceId: string) => void;
13
+ disconnect: (deviceId: string) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
15
+ show?: boolean;
16
+ /** 自动连接设备,MAC */
17
+ autoconnect?: string;
18
+ opper: Opper;
19
+ }>, {
20
+ show: boolean;
21
+ }>>> & Readonly<{
22
+ "onUpdate:show"?: ((args_0: boolean) => any) | undefined;
23
+ onConnect?: ((deviceId: string) => any) | undefined;
24
+ onDisconnect?: ((deviceId: string) => any) | undefined;
25
+ }>, {
26
+ show: boolean;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
28
+ export default _default;
29
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
+ type __VLS_TypePropsToRuntimeProps<T> = {
31
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
32
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
33
+ } : {
34
+ type: import('vue').PropType<T[K]>;
35
+ required: true;
36
+ };
37
+ };
38
+ type __VLS_WithDefaults<P, D> = {
39
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
40
+ default: D[K];
41
+ }> : P[K];
42
+ };
43
+ type __VLS_Prettify<T> = {
44
+ [K in keyof T]: T[K];
45
+ } & {};
@@ -0,0 +1,37 @@
1
+ import { VanDialog, VanDialogOptions, VanNotify } from '../vant.interface';
2
+
3
+ export interface OverlayConfig {
4
+ dialog: VanDialog;
5
+ notify: VanNotify;
6
+ }
7
+ export declare function setupOverlay(cfg: OverlayConfig): void;
8
+ export declare class Notify {
9
+ private readonly duration;
10
+ primary(message: string, selector?: string): any;
11
+ success(message: string, selector?: string): any;
12
+ warning(message: string, selector?: string): any;
13
+ danger(message: string, selector?: string): any;
14
+ dismiss(): void;
15
+ }
16
+ export declare class Dialog {
17
+ /**
18
+ * 展示确认对话框
19
+ * @param title
20
+ * @param message
21
+ * @param options 其他 dialog 选项
22
+ */
23
+ confirm(title: string, message: string, options?: VanDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
24
+ /**
25
+ * 展示警告对话框
26
+ * @param title
27
+ * @param message
28
+ * @param options 其他 dialog 选项
29
+ */
30
+ alert(title: string, message: string, options?: VanDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
31
+ /**
32
+ * 关闭对话框
33
+ */
34
+ dismiss(): void;
35
+ }
36
+ export declare const dialog: Dialog;
37
+ export declare const notify: Notify;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solar-taro/ui-vant",
3
- "version": "0.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
package/plugin.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { Plugin } from 'vue';
2
+
3
+ /**
4
+ * sun-core vue plugin
5
+ *
6
+ * Directives:
7
+ * - `v-readonly`: https://github.com/NervJS/taro/issues/10337#issuecomment-989641124
8
+ */
9
+ export declare const SolarVant: Plugin;
@@ -0,0 +1,66 @@
1
+ interface Option {
2
+ [key: string]: any;
3
+ }
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
+ show: boolean;
6
+ labelKey?: string;
7
+ valueKey?: string;
8
+ searchable?: boolean;
9
+ title: string;
10
+ loading?: boolean;
11
+ options: Option[];
12
+ modelValue: string | number | undefined;
13
+ required?: boolean;
14
+ }>, {
15
+ labelKey: string;
16
+ valueKey: string;
17
+ searchable: boolean;
18
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ confirm: (options: any) => void;
20
+ cancel: (model: any) => void;
21
+ close: () => void;
22
+ "update:show": (args_0: boolean) => void;
23
+ "update:modelValue": (model: any) => void;
24
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
25
+ show: boolean;
26
+ labelKey?: string;
27
+ valueKey?: string;
28
+ searchable?: boolean;
29
+ title: string;
30
+ loading?: boolean;
31
+ options: Option[];
32
+ modelValue: string | number | undefined;
33
+ required?: boolean;
34
+ }>, {
35
+ labelKey: string;
36
+ valueKey: string;
37
+ searchable: boolean;
38
+ }>>> & Readonly<{
39
+ onConfirm?: ((options: any) => any) | undefined;
40
+ onCancel?: ((model: any) => any) | undefined;
41
+ onClose?: (() => any) | undefined;
42
+ "onUpdate:show"?: ((args_0: boolean) => any) | undefined;
43
+ "onUpdate:modelValue"?: ((model: any) => any) | undefined;
44
+ }>, {
45
+ labelKey: string;
46
+ valueKey: string;
47
+ searchable: boolean;
48
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
49
+ export default _default;
50
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
51
+ type __VLS_TypePropsToRuntimeProps<T> = {
52
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
53
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
54
+ } : {
55
+ type: import('vue').PropType<T[K]>;
56
+ required: true;
57
+ };
58
+ };
59
+ type __VLS_WithDefaults<P, D> = {
60
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
61
+ default: D[K];
62
+ }> : P[K];
63
+ };
64
+ type __VLS_Prettify<T> = {
65
+ [K in keyof T]: T[K];
66
+ } & {};
@@ -0,0 +1,126 @@
1
+ interface SelectorOption {
2
+ [key: string]: any;
3
+ }
4
+ declare function present(): void;
5
+ declare function __VLS_template(): {
6
+ default?(_: {
7
+ present: typeof present;
8
+ label: any;
9
+ }): any;
10
+ option?(_: {
11
+ option: SelectorOption;
12
+ index: number;
13
+ active: boolean;
14
+ select: () => void;
15
+ }): any;
16
+ };
17
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
18
+ type?: "field" | "search";
19
+ mode?: "single" | "multiple";
20
+ label?: string;
21
+ placeholder?: string;
22
+ modelValue: unknown;
23
+ options: SelectorOption[];
24
+ labelKey?: string;
25
+ valueKey?: string;
26
+ loading?: boolean;
27
+ height?: string;
28
+ required?: boolean;
29
+ disabled?: boolean;
30
+ /** 多选模式下,分割符 */
31
+ delimiter?: string;
32
+ searchable?: boolean;
33
+ virtual?: boolean | {
34
+ itemSize?: number;
35
+ };
36
+ refresher?: boolean;
37
+ refreshing?: boolean;
38
+ }>, {
39
+ type: string;
40
+ mode: string;
41
+ placeholder: string;
42
+ labelKey: string;
43
+ valueKey: string;
44
+ height: string;
45
+ delimiter: string;
46
+ searchable: boolean;
47
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
48
+ confirm: (args_0: SelectorOption[]) => void;
49
+ close: () => void;
50
+ "update:modelValue": (args_0: unknown) => void;
51
+ clear: (args_0: unknown) => void;
52
+ select: (args_0: SelectorOption) => void;
53
+ refresh: () => void;
54
+ unselect: (args_0: SelectorOption) => void;
55
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
56
+ type?: "field" | "search";
57
+ mode?: "single" | "multiple";
58
+ label?: string;
59
+ placeholder?: string;
60
+ modelValue: unknown;
61
+ options: SelectorOption[];
62
+ labelKey?: string;
63
+ valueKey?: string;
64
+ loading?: boolean;
65
+ height?: string;
66
+ required?: boolean;
67
+ disabled?: boolean;
68
+ /** 多选模式下,分割符 */
69
+ delimiter?: string;
70
+ searchable?: boolean;
71
+ virtual?: boolean | {
72
+ itemSize?: number;
73
+ };
74
+ refresher?: boolean;
75
+ refreshing?: boolean;
76
+ }>, {
77
+ type: string;
78
+ mode: string;
79
+ placeholder: string;
80
+ labelKey: string;
81
+ valueKey: string;
82
+ height: string;
83
+ delimiter: string;
84
+ searchable: boolean;
85
+ }>>> & Readonly<{
86
+ onConfirm?: ((args_0: SelectorOption[]) => any) | undefined;
87
+ onClose?: (() => any) | undefined;
88
+ "onUpdate:modelValue"?: ((args_0: unknown) => any) | undefined;
89
+ onClear?: ((args_0: unknown) => any) | undefined;
90
+ onSelect?: ((args_0: SelectorOption) => any) | undefined;
91
+ onRefresh?: (() => any) | undefined;
92
+ onUnselect?: ((args_0: SelectorOption) => any) | undefined;
93
+ }>, {
94
+ labelKey: string;
95
+ valueKey: string;
96
+ searchable: boolean;
97
+ type: "field" | "search";
98
+ mode: "single" | "multiple";
99
+ placeholder: string;
100
+ height: string;
101
+ delimiter: string;
102
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
103
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
104
+ export default _default;
105
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
106
+ type __VLS_TypePropsToRuntimeProps<T> = {
107
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
108
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
109
+ } : {
110
+ type: import('vue').PropType<T[K]>;
111
+ required: true;
112
+ };
113
+ };
114
+ type __VLS_WithDefaults<P, D> = {
115
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
116
+ default: D[K];
117
+ }> : P[K];
118
+ };
119
+ type __VLS_Prettify<T> = {
120
+ [K in keyof T]: T[K];
121
+ } & {};
122
+ type __VLS_WithTemplateSlots<T, S> = T & {
123
+ new (): {
124
+ $slots: S;
125
+ };
126
+ };
@@ -0,0 +1,58 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {
3
+ tab: {
4
+ icon?: [string, string?];
5
+ text?: string;
6
+ };
7
+ index: number;
8
+ }): any;
9
+ };
10
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
+ tabs: {
12
+ icon?: [string, string?];
13
+ text?: string;
14
+ }[];
15
+ active?: number;
16
+ }>, {
17
+ active: number;
18
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ "update:active": (v: number) => void;
20
+ toggle: (v: number) => void;
21
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
22
+ tabs: {
23
+ icon?: [string, string?];
24
+ text?: string;
25
+ }[];
26
+ active?: number;
27
+ }>, {
28
+ active: number;
29
+ }>>> & Readonly<{
30
+ onToggle?: ((v: number) => any) | undefined;
31
+ "onUpdate:active"?: ((v: number) => any) | undefined;
32
+ }>, {
33
+ active: number;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
35
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
36
+ export default _default;
37
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
38
+ type __VLS_TypePropsToRuntimeProps<T> = {
39
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
40
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
41
+ } : {
42
+ type: import('vue').PropType<T[K]>;
43
+ required: true;
44
+ };
45
+ };
46
+ type __VLS_WithDefaults<P, D> = {
47
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
48
+ default: D[K];
49
+ }> : P[K];
50
+ };
51
+ type __VLS_Prettify<T> = {
52
+ [K in keyof T]: T[K];
53
+ } & {};
54
+ type __VLS_WithTemplateSlots<T, S> = T & {
55
+ new (): {
56
+ $slots: S;
57
+ };
58
+ };
@@ -0,0 +1,91 @@
1
+ export interface VanNotifyOptions {
2
+ type?: 'primary' | 'success' | 'danger' | 'warning';
3
+ color?: string;
4
+ zIndex?: number;
5
+ top?: number;
6
+ message: string;
7
+ context?: any;
8
+ duration?: number;
9
+ selector?: string;
10
+ background?: string;
11
+ safeAreaInsetTop?: boolean;
12
+ onClick?: () => void;
13
+ onOpened?: () => void;
14
+ onClose?: () => void;
15
+ }
16
+ type Action = 'confirm' | 'cancel' | 'overlay';
17
+ type DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
18
+ export interface VanDialogOptions {
19
+ lang?: string;
20
+ show?: boolean;
21
+ title?: string;
22
+ width?: string | number | null;
23
+ zIndex?: number;
24
+ theme?: string;
25
+ context?: (() => DialogContext) | DialogContext;
26
+ message?: string;
27
+ overlay?: boolean;
28
+ selector?: string;
29
+ ariaLabel?: string;
30
+ /**
31
+ * @deprecated use custom-class instead
32
+ */
33
+ className?: string;
34
+ customStyle?: string;
35
+ transition?: string;
36
+ /**
37
+ * @deprecated use beforeClose instead
38
+ */
39
+ asyncClose?: boolean;
40
+ beforeClose?: null | ((action: Action) => Promise<void | boolean> | void);
41
+ businessId?: number;
42
+ sessionFrom?: string;
43
+ overlayStyle?: string;
44
+ appParameter?: string;
45
+ messageAlign?: string;
46
+ sendMessageImg?: string;
47
+ showMessageCard?: boolean;
48
+ sendMessagePath?: string;
49
+ sendMessageTitle?: string;
50
+ confirmButtonText?: string;
51
+ cancelButtonText?: string;
52
+ showConfirmButton?: boolean;
53
+ showCancelButton?: boolean;
54
+ closeOnClickOverlay?: boolean;
55
+ confirmButtonOpenType?: string;
56
+ }
57
+ export interface VanDialog {
58
+ (options: VanDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
59
+ alert(options: VanDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
60
+ confirm(options: VanDialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
61
+ close(): void;
62
+ stopLoading(): void;
63
+ currentOptions: VanDialogOptions;
64
+ defaultOptions: VanDialogOptions;
65
+ setDefaultOptions(options: VanDialogOptions): void;
66
+ resetDefaultOptions(): void;
67
+ }
68
+ export interface VanNotify {
69
+ (options: VanNotifyOptions | string): any;
70
+ clear: (options?: VanNotifyOptions | undefined) => void;
71
+ setDefaultOptions: (options: VanNotifyOptions) => void;
72
+ resetDefaultOptions: () => void;
73
+ }
74
+ /** van-uploader 组件的文件类型 */
75
+ export interface VanUploaderFile {
76
+ url: string;
77
+ thumb: string;
78
+ name?: string;
79
+ type?: 'image' | 'video' | 'file';
80
+ isImage?: boolean;
81
+ isVideo?: boolean;
82
+ status?: 'uploading' | 'failed' | 'done';
83
+ message?: string;
84
+ deletable?: boolean;
85
+ }
86
+ /** van-picker column */
87
+ export interface VanPickerColumn<T> {
88
+ values: T[];
89
+ defaultIndex?: number;
90
+ }
91
+ export {};
package/CHANGELOG.md DELETED
@@ -1,3 +0,0 @@
1
- ## 1.0.1 (2025-01-22)
2
-
3
- This was a version bump only for ui-vant to align it with other projects, there were no code changes.
package/eslint.config.cjs DELETED
@@ -1,22 +0,0 @@
1
- const baseConfig = require('../../eslint.config.cjs');
2
-
3
- module.exports = [
4
- ...baseConfig,
5
- {
6
- files: ['**/*.json'],
7
- rules: {
8
- '@nx/dependency-checks': [
9
- 'error',
10
- {
11
- ignoredFiles: [
12
- '{projectRoot}/eslint.config.{js,cjs,mjs}',
13
- '{projectRoot}/vite.config.{js,ts,mjs,mts}',
14
- ],
15
- },
16
- ],
17
- },
18
- languageOptions: {
19
- parser: require('jsonc-eslint-parser'),
20
- },
21
- },
22
- ];