@polyv/vue-components 1.0.1 → 1.1.0

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 (145) hide show
  1. package/index.es.js +4453 -2279
  2. package/package.json +5 -4
  3. package/src/components/basic-countdown/use-basic-countdown.d.ts +27 -7
  4. package/src/components/{normal-button/normal-button.vue.d.ts → button/button.vue.d.ts} +6 -14
  5. package/src/components/button/index.d.ts +3 -0
  6. package/src/components/button/type.d.ts +50 -0
  7. package/src/components/{normal-button/use-normal-button.d.ts → button/use-button.d.ts} +33 -11
  8. package/src/components/carousel/index.d.ts +3 -0
  9. package/src/components/category-select/category-select-item.vue.d.ts +22 -0
  10. package/src/components/category-select/category-select.vue.d.ts +21 -0
  11. package/src/components/category-select/index.d.ts +3 -0
  12. package/src/components/category-select/use-category-select.d.ts +25 -0
  13. package/src/components/dropdown/dropdown-item.vue.d.ts +31 -0
  14. package/src/components/dropdown/dropdown-menu.vue.d.ts +17 -0
  15. package/src/components/dropdown/dropdown.vue.d.ts +61 -0
  16. package/src/components/dropdown/index.d.ts +4 -0
  17. package/src/components/dropdown/use-dropdown.d.ts +70 -0
  18. package/src/components/empty/empty.vue.d.ts +14 -0
  19. package/src/components/empty/index.d.ts +2 -0
  20. package/src/components/empty/use-empty.d.ts +14 -0
  21. package/src/components/exports.d.ts +8 -1
  22. package/src/components/form/{form-area-picker/form-area-picker.vue.d.ts → area-picker/area-picker.vue.d.ts} +7 -7
  23. package/src/components/form/area-picker/index.d.ts +2 -0
  24. package/src/components/form/{form-area-picker/use-form-area-picker.d.ts → area-picker/use-area-picker.d.ts} +26 -13
  25. package/src/components/form/checkbox/index.d.ts +4 -0
  26. package/src/components/form/{form-checkbox/use-form-checkbox.d.ts → checkbox/use-checkbox.d.ts} +47 -12
  27. package/src/components/form/form-item/use-form-item.d.ts +30 -9
  28. package/src/components/form/form-submit-button/form-submit-button.vue.d.ts +13 -13
  29. package/src/components/form/form-submit-button/use-form-submit-button.d.ts +12 -5
  30. package/src/components/form/form-wrap/form-wrap.vue.d.ts +2 -0
  31. package/src/components/form/form-wrap/use-form-wrap.d.ts +48 -9
  32. package/src/components/form/hooks/use-form-common.d.ts +13 -2
  33. package/src/components/form/index.d.ts +5 -5
  34. package/src/components/form/input/index.d.ts +2 -0
  35. package/src/components/form/{form-input/form-input.vue.d.ts → input/input.vue.d.ts} +19 -22
  36. package/src/components/form/{form-input/use-form-input.d.ts → input/use-input.d.ts} +89 -21
  37. package/src/components/form/protocol/index.d.ts +2 -0
  38. package/src/components/form/{form-protocol/use-form-protocol.d.ts → protocol/use-protocol.d.ts} +9 -5
  39. package/src/components/form/radio/index.d.ts +4 -0
  40. package/src/components/form/{form-radio/form-radio.vue.d.ts → radio/radio.vue.d.ts} +0 -6
  41. package/src/components/form/radio/use-radio.d.ts +41 -0
  42. package/src/components/form/types/index.d.ts +12 -3
  43. package/src/components/icons/icons/{info-round-filled → check-round-fill}/index.d.ts +1 -1
  44. package/src/components/icons/icons/close-round/index.d.ts +6 -0
  45. package/src/components/icons/icons/copy/index.d.ts +6 -0
  46. package/src/components/icons/icons/down-file/index.d.ts +6 -0
  47. package/src/components/icons/icons/down-load/index.d.ts +6 -0
  48. package/src/components/icons/icons/info-round-fill/index.d.ts +6 -0
  49. package/src/components/icons/icons/loading/index.d.ts +6 -0
  50. package/src/components/icons/icons/search/index.d.ts +6 -0
  51. package/src/components/icons/icons/triangle-down/index.d.ts +6 -0
  52. package/src/components/icons/icons/triangle-up/index.d.ts +6 -0
  53. package/src/components/icons/icons/warning-round-fill/index.d.ts +6 -0
  54. package/src/components/icons/icons/zoom-in/index.d.ts +6 -0
  55. package/src/components/icons/icons/zoom-out/index.d.ts +6 -0
  56. package/src/components/icons/map.d.ts +13 -1
  57. package/src/components/loading/directive.d.ts +16 -0
  58. package/src/components/loading/hook.d.ts +9 -0
  59. package/src/components/loading/index.d.ts +6 -0
  60. package/src/components/loading/loading-circle.vue.d.ts +2 -0
  61. package/src/components/loading/loading.vue.d.ts +30 -0
  62. package/src/components/loading/service.d.ts +11 -0
  63. package/src/components/loading/types.d.ts +24 -0
  64. package/src/components/loading/use-loading-component.d.ts +29 -0
  65. package/src/components/normal-pendant/index.d.ts +1 -0
  66. package/src/components/normal-pendant/normal-pendant.vue.d.ts +1 -8
  67. package/src/components/normal-pendant/use-normal-pendant.d.ts +36 -0
  68. package/src/components/popup/hooks/popup-props.d.ts +129 -37
  69. package/src/components/popup/hooks/use-popup-back.d.ts +1 -1
  70. package/src/components/popup/hooks/use-popup-config.d.ts +3 -0
  71. package/src/components/popup/hooks/use-popup-height.d.ts +1 -1
  72. package/src/components/popup/hooks/use-popup-scroll.d.ts +1 -0
  73. package/src/components/popup/hooks/use-popup-visible.d.ts +1 -0
  74. package/src/components/popup/popup.vue.d.ts +20 -15
  75. package/src/components/resize-box/index.d.ts +3 -0
  76. package/src/components/resize-box/resize-box.vue.d.ts +97 -0
  77. package/src/components/resize-box/type.d.ts +34 -0
  78. package/src/components/resize-box/use-resize-box.d.ts +105 -0
  79. package/src/components/reward-receive/entrance/reward-receive.vue.d.ts +4 -7
  80. package/src/components/reward-receive/hooks/use-reward-receive.d.ts +8 -3
  81. package/src/components/reward-receive/index.d.ts +1 -0
  82. package/src/components/switch/index.d.ts +2 -0
  83. package/src/components/switch/switch.vue.d.ts +51 -0
  84. package/src/components/switch/use-switch.d.ts +66 -0
  85. package/src/hooks/business/use-config-provider/index.d.ts +18 -5
  86. package/src/hooks/business/use-request/index.d.ts +56 -0
  87. package/src/hooks/business/use-resize-oss-image/index.d.ts +5 -0
  88. package/src/hooks/business/use-skin-color/index.d.ts +44 -0
  89. package/src/hooks/components/use-action-sheet/types.d.ts +27 -5
  90. package/src/hooks/components/use-image-preview/index.d.ts +12 -0
  91. package/src/hooks/components/use-message-box/_component/message-box-element.vue.d.ts +46 -11
  92. package/src/hooks/components/use-message-box/_component/use-message-box-element.d.ts +135 -3
  93. package/src/hooks/components/use-message-box/index.d.ts +3 -0
  94. package/src/hooks/components/use-message-box/types.d.ts +50 -8
  95. package/src/hooks/components/use-popper/_popper-type.d.ts +8 -4
  96. package/src/hooks/components/use-popper/index.d.ts +2 -2
  97. package/src/hooks/components/use-toast/_component/toast-element.vue.d.ts +32 -5
  98. package/src/hooks/components/use-toast/_component/use-toast-element.d.ts +37 -6
  99. package/src/hooks/components/use-toast/hook.d.ts +11 -0
  100. package/src/hooks/components/use-toast/index.d.ts +3 -10
  101. package/src/hooks/components/use-toast/types.d.ts +8 -2
  102. package/src/hooks/exports.d.ts +10 -1
  103. package/src/hooks/interactive/use-hover/index.d.ts +8 -0
  104. package/src/hooks/interactive/use-outside/index.d.ts +24 -0
  105. package/src/hooks/interactive/use-screen-orientation/index.d.ts +2 -2
  106. package/src/hooks/pagination/use-scroll-pagintaion/index.d.ts +1 -0
  107. package/src/hooks/platform/weixin/load-wx-sdk.d.ts +9 -0
  108. package/src/hooks/platform/weixin/use-weixin-mini-program.d.ts +6 -0
  109. package/src/hooks/platform/weixin/use-weixin-sdk.d.ts +14 -0
  110. package/src/hooks/plugin/use-resize-observer/index.d.ts +1 -1
  111. package/src/hooks/tools/use-browser/index.d.ts +8 -0
  112. package/src/hooks/tools/use-download/index.d.ts +6 -0
  113. package/src/hooks/tools/use-event-listener/index.d.ts +1 -1
  114. package/src/hooks/tools/use-set-interval/index.d.ts +1 -0
  115. package/src/hooks/tools/use-set-timeout/index.d.ts +1 -0
  116. package/src/hooks/tools/use-simple-visible/index.d.ts +28 -7
  117. package/src/hooks/vue/use-storage-ref/index.d.ts +3 -0
  118. package/src/hooks/vue/use-vue/index.d.ts +15 -0
  119. package/src/lang/common/en.json.d.ts +5 -1
  120. package/src/lang/common/ja.json.d.ts +5 -1
  121. package/src/lang/common/ko.json.d.ts +5 -1
  122. package/src/lang/common/ru.json.d.ts +5 -1
  123. package/src/lang/common/zh-CN.json.d.ts +5 -1
  124. package/src/lang/common/zh-TW.json.d.ts +5 -1
  125. package/src/lang/internal/index.d.ts +4 -0
  126. package/src/plugins/polyv-ui/mobile-import.d.ts +1 -0
  127. package/src/vue-utils/emit-utils.d.ts +3 -1
  128. package/src/vue-utils/props-utils.d.ts +1 -3
  129. package/styles/animation.scss +0 -9
  130. package/styles/mixins.scss +8 -6
  131. package/styles/skin-color.scss +64 -0
  132. package/src/components/form/form-area-picker/index.d.ts +0 -2
  133. package/src/components/form/form-checkbox/index.d.ts +0 -4
  134. package/src/components/form/form-input/index.d.ts +0 -2
  135. package/src/components/form/form-protocol/index.d.ts +0 -2
  136. package/src/components/form/form-radio/index.d.ts +0 -3
  137. package/src/components/normal-button/index.d.ts +0 -3
  138. package/src/components/normal-button/type.d.ts +0 -28
  139. package/src/hooks/interactive/use-click-outside/index.d.ts +0 -14
  140. package/src/components/form/{form-checkbox/form-checkbox-group.vue.d.ts → checkbox/checkbox-group.vue.d.ts} +0 -0
  141. package/src/components/form/{form-checkbox/form-checkbox.vue.d.ts → checkbox/checkbox.vue.d.ts} +4 -4
  142. /package/src/components/form/{form-checkbox → checkbox}/type.d.ts +0 -0
  143. /package/src/components/form/{form-protocol/form-protocol.vue.d.ts → protocol/protocol.vue.d.ts} +0 -0
  144. /package/src/components/form/{form-radio/form-radio-group.vue.d.ts → radio/radio-group.vue.d.ts} +0 -0
  145. /package/src/components/form/{form-radio → radio}/type.d.ts +0 -0
@@ -1,5 +1,6 @@
1
- import { ButtonType } from '../../../../components/normal-button';
1
+ import { ButtonType } from '../../../../components/button';
2
2
  import { FormatEmit, FormatProps, VueEmit, VueProps } from '../../../../vue-utils';
3
+ import { ValidatorRules } from '../../../../plugins/async-validator';
3
4
  export declare const messageBoxElementProps: () => {
4
5
  message: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
5
6
  default: string;
@@ -25,9 +26,24 @@ export declare const messageBoxElementProps: () => {
25
26
  confirmButtonType: import('vue-types').VueTypeValidableDef<ButtonType, import('vue-types/dist/types').ValidatorFunction<ButtonType>> & {
26
27
  default: ButtonType;
27
28
  };
29
+ showInput: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
30
+ default: boolean;
31
+ };
32
+ defaultValue: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
33
+ default: string;
34
+ };
35
+ placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
36
+ default: string;
37
+ };
38
+ type: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
39
+ default: string;
40
+ };
41
+ requireMessage: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
42
+ default: string;
43
+ };
28
44
  };
29
45
  export declare const messageBoxElementEmits: () => {
30
- confirm: import('../../../../vue-utils').EmitFuncType<void>;
46
+ confirm: import('../../../../vue-utils').EmitFuncType<string | void>;
31
47
  cancel: import('../../../../vue-utils').EmitFuncType<void>;
32
48
  };
33
49
  export type MessageBoxPropsType = FormatProps<typeof messageBoxElementProps>;
@@ -40,7 +56,123 @@ export declare const useMessageBoxElement: (options: {
40
56
  emit: VueEmit<typeof messageBoxElementEmits>;
41
57
  }) => {
42
58
  visible: import('vue').Ref<boolean>;
59
+ formData: import('vue').Ref<{
60
+ input: string;
61
+ }>;
62
+ formRules: import('vue').ComputedRef<ValidatorRules>;
63
+ formRef: import('vue').Ref<(import('vue/types/v3-component-public-instance').Vue3Instance<{}, Readonly<import('vue').ExtractPropTypes<{
64
+ formData: import('vue-types').VueTypeValidableDef<{
65
+ [key: string]: any;
66
+ }, import('vue-types/dist/types').ValidatorFunction<{
67
+ [key: string]: any;
68
+ }>> & {
69
+ default: () => {
70
+ [key: string]: any;
71
+ };
72
+ };
73
+ formRules: import('vue-types').VueTypeValidableDef<ValidatorRules, import('vue-types/dist/types').ValidatorFunction<ValidatorRules>> & {
74
+ default: () => ValidatorRules;
75
+ };
76
+ labelWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
77
+ labelHeight: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
78
+ contentWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
79
+ submitAction: import('vue-types').VueTypeValidableDef<(...args: any[]) => any, import('vue-types/dist/types').ValidatorFunction<(...args: any[]) => any>>;
80
+ labelModel: import('vue-types').VueTypeDef<"header" | "inline"> & {
81
+ default: "header" | "inline";
82
+ };
83
+ debug: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
84
+ default: boolean;
85
+ };
86
+ size: import('vue-types').VueTypeValidableDef<import('../../../../components/form').FormSize, import('vue-types/dist/types').ValidatorFunction<import('../../../../components/form').FormSize>>;
87
+ }>>, Readonly<import('vue').ExtractPropTypes<{
88
+ formData: import('vue-types').VueTypeValidableDef<{
89
+ [key: string]: any;
90
+ }, import('vue-types/dist/types').ValidatorFunction<{
91
+ [key: string]: any;
92
+ }>> & {
93
+ default: () => {
94
+ [key: string]: any;
95
+ };
96
+ };
97
+ formRules: import('vue-types').VueTypeValidableDef<ValidatorRules, import('vue-types/dist/types').ValidatorFunction<ValidatorRules>> & {
98
+ default: () => ValidatorRules;
99
+ };
100
+ labelWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
101
+ labelHeight: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
102
+ contentWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
103
+ submitAction: import('vue-types').VueTypeValidableDef<(...args: any[]) => any, import('vue-types/dist/types').ValidatorFunction<(...args: any[]) => any>>;
104
+ labelModel: import('vue-types').VueTypeDef<"header" | "inline"> & {
105
+ default: "header" | "inline";
106
+ };
107
+ debug: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
108
+ default: boolean;
109
+ };
110
+ size: import('vue-types').VueTypeValidableDef<import('../../../../components/form').FormSize, import('vue-types/dist/types').ValidatorFunction<import('../../../../components/form').FormSize>>;
111
+ }>>, {
112
+ "submit-form": (arg: import('../../../..').UniversalParams) => void;
113
+ }, {
114
+ formData: {
115
+ [key: string]: any;
116
+ };
117
+ formRules: ValidatorRules;
118
+ labelModel: "header" | "inline";
119
+ debug: boolean;
120
+ }, true, import('vue').ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import('vue').ExtractPropTypes<{
121
+ formData: import('vue-types').VueTypeValidableDef<{
122
+ [key: string]: any;
123
+ }, import('vue-types/dist/types').ValidatorFunction<{
124
+ [key: string]: any;
125
+ }>> & {
126
+ default: () => {
127
+ [key: string]: any;
128
+ };
129
+ };
130
+ formRules: import('vue-types').VueTypeValidableDef<ValidatorRules, import('vue-types/dist/types').ValidatorFunction<ValidatorRules>> & {
131
+ default: () => ValidatorRules;
132
+ };
133
+ labelWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
134
+ labelHeight: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
135
+ contentWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
136
+ submitAction: import('vue-types').VueTypeValidableDef<(...args: any[]) => any, import('vue-types/dist/types').ValidatorFunction<(...args: any[]) => any>>;
137
+ labelModel: import('vue-types').VueTypeDef<"header" | "inline"> & {
138
+ default: "header" | "inline";
139
+ };
140
+ debug: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
141
+ default: boolean;
142
+ };
143
+ size: import('vue-types').VueTypeValidableDef<import('../../../../components/form').FormSize, import('vue-types/dist/types').ValidatorFunction<import('../../../../components/form').FormSize>>;
144
+ }>>> & import('vue').ShallowUnwrapRef<{
145
+ validateCurrentForm: (validateOptions?: import('../../../../components/form').FormValidateOptions) => Promise<void>;
146
+ }> & import('vue/types/v3-component-options').ExtractComputedReturns<{}> & import('vue').ComponentCustomProperties & Readonly<import('vue').ExtractPropTypes<{
147
+ formData: import('vue-types').VueTypeValidableDef<{
148
+ [key: string]: any;
149
+ }, import('vue-types/dist/types').ValidatorFunction<{
150
+ [key: string]: any;
151
+ }>> & {
152
+ default: () => {
153
+ [key: string]: any;
154
+ };
155
+ };
156
+ formRules: import('vue-types').VueTypeValidableDef<ValidatorRules, import('vue-types/dist/types').ValidatorFunction<ValidatorRules>> & {
157
+ default: () => ValidatorRules;
158
+ };
159
+ labelWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
160
+ labelHeight: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
161
+ contentWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
162
+ submitAction: import('vue-types').VueTypeValidableDef<(...args: any[]) => any, import('vue-types/dist/types').ValidatorFunction<(...args: any[]) => any>>;
163
+ labelModel: import('vue-types').VueTypeDef<"header" | "inline"> & {
164
+ default: "header" | "inline";
165
+ };
166
+ debug: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
167
+ default: boolean;
168
+ };
169
+ size: import('vue-types').VueTypeValidableDef<import('../../../../components/form').FormSize, import('vue-types/dist/types').ValidatorFunction<import('../../../../components/form').FormSize>>;
170
+ }>> & {
171
+ $scopedSlots: {
172
+ default?(_: {}): any;
173
+ };
174
+ }) | undefined>;
43
175
  onAfterLeave: () => void;
44
- onClickConfirm: () => void;
176
+ onClickConfirm: () => Promise<void>;
45
177
  onClickCancel: () => void;
46
178
  };
@@ -4,6 +4,9 @@ export declare const useMessageBox: () => {
4
4
  messageBox: (options: MessageBoxOptions) => {
5
5
  /** 显示确认框 */
6
6
  $confirm: () => Promise<void>;
7
+ /** 显示提示框 */
7
8
  $alert: () => Promise<void>;
9
+ /** 显示输入框 */
10
+ $prompt: () => Promise<string>;
8
11
  };
9
12
  };
@@ -1,18 +1,60 @@
1
+ import { ButtonType } from '../../../components/button';
2
+ /**
3
+ * 消息弹窗选项
4
+ */
1
5
  export interface MessageBoxOptions {
2
- /** 消息 */
6
+ /**
7
+ * 消息
8
+ */
3
9
  message?: string;
4
- /** 描述 */
10
+ /**
11
+ * 描述
12
+ */
5
13
  description?: string;
6
- /** 是否显示取消按钮 */
14
+ /**
15
+ * 是否显示取消按钮
16
+ */
7
17
  showCancelButton?: boolean;
8
- /** 是否显示确认按钮 */
9
- showConfirmButton?: boolean;
10
- /** 取消按钮文本 */
18
+ /**
19
+ * 取消按钮文本
20
+ */
11
21
  cancelButtonText?: string;
12
- /** 确认按钮文本 */
22
+ /**
23
+ * 取消按钮类型
24
+ */
25
+ cancelButtonType?: ButtonType;
26
+ /**
27
+ * 是否显示确认按钮
28
+ */
29
+ showConfirmButton?: boolean;
30
+ /**
31
+ * 确认按钮文本
32
+ */
13
33
  confirmButtonText?: string;
14
- /** 二次确认类型,仅 $confirm 有效 */
34
+ /**
35
+ * 确认按钮类型
36
+ */
37
+ confirmButtonType?: ButtonType;
38
+ /**
39
+ * 二次确认类型,仅 $confirm 有效
40
+ */
15
41
  confirmType?: ConfirmType;
42
+ /**
43
+ * 输入框默认值,仅 $prompt 有效
44
+ */
45
+ defaultValue?: string;
46
+ /**
47
+ * 输入框占位文字,仅 $prompt 有效
48
+ */
49
+ placeholder?: string;
50
+ /**
51
+ * 输入框类型,仅 $prompt 有效
52
+ */
53
+ type?: string;
54
+ /**
55
+ * 输入框必填提示,仅 $prompt 有效
56
+ */
57
+ requireMessage?: string;
16
58
  }
17
59
  export declare enum ConfirmType {
18
60
  /** 普通确认 */
@@ -1,8 +1,12 @@
1
+ import { ResponsiveRef } from '../../../vue-utils';
1
2
  import { Ref } from 'vue';
2
- import { Placement } from '@popperjs/core';
3
3
  export type PopperOffset = [number, number];
4
+ /** 弹层位置 */
5
+ export declare const popperPlacements: readonly ["top", "bottom", "left", "right", "top-start", "top-end", "bottom-start", "bottom-end", "left-start", "left-end", "right-start", "right-end"];
6
+ export type PopperPlacement = (typeof popperPlacements)[number];
4
7
  /** 弹层触发方式 */
5
- export type PopperTrigger = 'click' | 'hover' | 'focus' | 'long-press' | 'custom';
8
+ export declare const popperTriggers: readonly ["click", "hover", "focus", "long-press", "custom"];
9
+ export type PopperTrigger = (typeof popperTriggers)[number];
6
10
  export interface PopperArrowOptions {
7
11
  /** 颜色,默认:#fff */
8
12
  color?: string;
@@ -18,7 +22,7 @@ export interface UsePopperOptions {
18
22
  /** 输入框节点 ref,用于聚焦显示的交互 */
19
23
  inputRef?: HTMLInputElement | Ref<HTMLInputElement | undefined>;
20
24
  /** 弹层是否禁用 */
21
- popperDisabled?: boolean | Ref<boolean>;
25
+ popperDisabled?: boolean | ResponsiveRef<boolean>;
22
26
  /** 触发方式 */
23
27
  trigger?: PopperTrigger | Ref<PopperTrigger>;
24
28
  /** 鼠标移入延迟显示时间 */
@@ -26,7 +30,7 @@ export interface UsePopperOptions {
26
30
  /** 鼠标移出延迟隐藏时间 */
27
31
  mouseLeaveDelay?: number | Ref<number>;
28
32
  /** 弹层位置 */
29
- placement?: Placement | Ref<Placement>;
33
+ placement?: PopperPlacement | Ref<PopperPlacement>;
30
34
  /** 弹层偏移量 */
31
35
  popperOffset?: PopperOffset | Ref<PopperOffset>;
32
36
  /** 是否显示箭头,默认:false */
@@ -10,11 +10,11 @@ export declare const usePopper: (options?: UsePopperOptions) => {
10
10
  referenceRef: HTMLElement | import('vue').Ref<HTMLElement | undefined>;
11
11
  popperRef: HTMLElement | import('vue').Ref<HTMLElement | undefined>;
12
12
  inputRef: HTMLInputElement | import('vue').Ref<HTMLInputElement | undefined>;
13
- popperDisabled: boolean | import('vue').Ref<boolean>;
13
+ popperDisabled: boolean | import('../../../vue-utils').ResponsiveRef<boolean>;
14
14
  trigger: import('./_popper-type').PopperTrigger | import('vue').Ref<import('./_popper-type').PopperTrigger>;
15
15
  mouseEnterDelay: number | import('vue').Ref<number>;
16
16
  mouseLeaveDelay: number | import('vue').Ref<number>;
17
- placement: import('@popperjs/core').Placement | import('vue').Ref<import('@popperjs/core').Placement>;
17
+ placement: import('./_popper-type').PopperPlacement | import('vue').Ref<import('./_popper-type').PopperPlacement>;
18
18
  popperOffset: PopperOffset | import('vue').Ref<PopperOffset>;
19
19
  arrow: boolean | import('./_popper-type').PopperArrowOptions | import('vue').Ref<boolean | import('./_popper-type').PopperArrowOptions>;
20
20
  forceOutSideClickHide: boolean | import('vue').Ref<boolean>;
@@ -1,6 +1,18 @@
1
1
  import { ToastType } from '../types';
2
- declare const _default: import('vue').DefineComponent<{
3
- msg: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: Element;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<{
12
+ value: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
13
+ default: boolean;
14
+ };
15
+ message: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
4
16
  default: string;
5
17
  };
6
18
  type: import('vue-types').VueTypeValidableDef<ToastType, import('vue-types/dist/types').ValidatorFunction<ToastType>> & {
@@ -12,8 +24,16 @@ declare const _default: import('vue').DefineComponent<{
12
24
  showIcon: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
13
25
  default: boolean;
14
26
  };
15
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{
16
- msg: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
27
+ }, {
28
+ openToast: () => void;
29
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
+ "after-leave": (arg?: void | undefined) => void;
31
+ "after-enter": (arg?: void | undefined) => void;
32
+ }, string, Readonly<import('vue').ExtractPropTypes<{
33
+ value: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
34
+ default: boolean;
35
+ };
36
+ message: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
17
37
  default: string;
18
38
  };
19
39
  type: import('vue-types').VueTypeValidableDef<ToastType, import('vue-types/dist/types').ValidatorFunction<ToastType>> & {
@@ -26,9 +46,16 @@ declare const _default: import('vue').DefineComponent<{
26
46
  default: boolean;
27
47
  };
28
48
  }>>, {
49
+ value: boolean;
29
50
  type: ToastType;
51
+ message: string;
30
52
  duration: number;
31
- msg: string;
32
53
  showIcon: boolean;
33
54
  }>;
55
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
56
  export default _default;
57
+ type __VLS_WithTemplateSlots<T, S> = T & {
58
+ new (): {
59
+ $scopedSlots: S;
60
+ };
61
+ };
@@ -1,32 +1,63 @@
1
- import { FormatProps, VueProps } from '../../../../vue-utils';
1
+ import { FormatEmit, FormatProps, VueEmit, VueProps } from '../../../../vue-utils';
2
2
  import { ToastType } from '../types';
3
3
  export declare const toastProps: () => {
4
- /** 提示内容 */
5
- msg: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
4
+ /**
5
+ * 是否显示绑定值
6
+ */
7
+ value: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
8
+ default: boolean;
9
+ };
10
+ /**
11
+ * 提示内容
12
+ * @default '提示'
13
+ */
14
+ message: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
6
15
  default: string;
7
16
  };
8
- /** 提示类型,默认:info */
17
+ /**
18
+ * 提示类型
19
+ * @default ToastType.Info
20
+ */
9
21
  type: import('vue-types').VueTypeValidableDef<ToastType, import('vue-types/dist/types').ValidatorFunction<ToastType>> & {
10
22
  default: ToastType;
11
23
  };
12
- /** 关闭时间,默认:3000 */
24
+ /**
25
+ * 关闭时间
26
+ * @default 3000
27
+ */
13
28
  duration: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
14
29
  default: number;
15
30
  };
16
- /** 显示图标 */
31
+ /**
32
+ * 显示图标
33
+ * @default false
34
+ */
17
35
  showIcon: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
18
36
  default: boolean;
19
37
  };
20
38
  };
39
+ export declare const toastEmits: () => {
40
+ /**
41
+ * 提示动画进入之后
42
+ */
43
+ 'after-enter': import('../../../../vue-utils').EmitFuncType<void>;
44
+ /**
45
+ * 提示动画离开之后
46
+ */
47
+ 'after-leave': import('../../../../vue-utils').EmitFuncType<void>;
48
+ };
21
49
  export type ToastPropsType = FormatProps<typeof toastProps>;
50
+ export type ToastEmitsType = FormatEmit<typeof toastEmits>;
22
51
  /**
23
52
  * Toast 组件 hook
24
53
  */
25
54
  export declare const useToastElement: (options: {
26
55
  props: VueProps<typeof toastProps>;
56
+ emit: VueEmit<typeof toastEmits>;
27
57
  }) => {
28
58
  toastVisible: import('vue').Ref<boolean>;
29
59
  openToast: () => void;
30
60
  closeToast: () => void;
31
61
  onAfterLeave: () => void;
62
+ onAfterEnter: () => void;
32
63
  };
@@ -0,0 +1,11 @@
1
+ import { ToastOptions } from './types';
2
+ export * from './types';
3
+ export declare const useToast: (options?: ToastOptions) => {
4
+ toast: {
5
+ info: (message: string, opts?: ToastOptions) => void;
6
+ success: (message: string, opts?: ToastOptions) => void;
7
+ warning: (message: string, opts?: ToastOptions) => void;
8
+ error: (message: string, opts?: ToastOptions) => void;
9
+ loading: (message: string, opts?: ToastOptions) => void;
10
+ };
11
+ };
@@ -1,11 +1,4 @@
1
- import { ToastOptions } from './types';
1
+ export * from './hook';
2
2
  export * from './types';
3
- export declare const useToast: (options?: ToastOptions) => {
4
- toast: {
5
- info: (msg: string, opts?: ToastOptions) => void;
6
- success: (msg: string, opts?: ToastOptions) => void;
7
- warning: (msg: string, opts?: ToastOptions) => void;
8
- error: (msg: string, opts?: ToastOptions) => void;
9
- loading: (msg: string, opts?: ToastOptions) => void;
10
- };
11
- };
3
+ export { default as PwcToast } from './_component/toast-element.vue';
4
+ export { toastProps, toastEmits } from './_component/use-toast-element';
@@ -14,8 +14,14 @@ export declare enum ToastType {
14
14
  Loading = "loading"
15
15
  }
16
16
  export interface ToastOptions {
17
- /** 关闭时间 */
17
+ /**
18
+ * 关闭时间
19
+ * @default 3000
20
+ */
18
21
  duration?: number;
19
- /** 显示图标 */
22
+ /**
23
+ * 显示图标
24
+ * @default false
25
+ */
20
26
  showIcon?: boolean;
21
27
  }
@@ -1,19 +1,26 @@
1
1
  export * from './business/use-app-element';
2
2
  export * from './business/use-config-provider';
3
+ export * from './business/use-request';
4
+ export * from './business/use-resize-oss-image';
5
+ export * from './business/use-skin-color';
3
6
  export * from './business/use-track-event';
4
7
  export * from './components/use-action-sheet';
5
8
  export * from './components/use-auto-topmost';
9
+ export * from './components/use-image-preview';
6
10
  export * from './components/use-message-box';
7
11
  export * from './components/use-popper';
8
12
  export * from './components/use-toast';
9
- export * from './interactive/use-click-outside';
10
13
  export * from './interactive/use-fullscreen';
14
+ export * from './interactive/use-hover';
15
+ export * from './interactive/use-outside';
11
16
  export * from './interactive/use-screen-orientation';
12
17
  export * from './interactive/use-scroll';
13
18
  export * from './interactive/use-sound-effect';
14
19
  export * from './pagination/types';
15
20
  export * from './pagination/use-scroll-pagintaion';
16
21
  export * from './pagination/use-static-pagination';
22
+ export * from './platform/weixin/use-weixin-mini-program';
23
+ export * from './platform/weixin/use-weixin-sdk';
17
24
  export * from './plugin/use-resize-observer';
18
25
  export * from './plugin/use-svga-animation';
19
26
  export * from './plugin/use-svga-player';
@@ -22,6 +29,7 @@ export * from './tools/use-body-locked';
22
29
  export * from './tools/use-browser';
23
30
  export * from './tools/use-copy-text';
24
31
  export * from './tools/use-count-down';
32
+ export * from './tools/use-download';
25
33
  export * from './tools/use-event-bus';
26
34
  export * from './tools/use-event-listener';
27
35
  export * from './tools/use-link-open';
@@ -31,4 +39,5 @@ export * from './tools/use-simple-visible';
31
39
  export * from './tools/use-target-event-emitter';
32
40
  export * from './tools/use-window-resize-listener';
33
41
  export * from './vue/use-model-value';
42
+ export * from './vue/use-storage-ref';
34
43
  export * from './vue/use-vue';
@@ -0,0 +1,8 @@
1
+ import { ResponsiveRef } from '../../../vue-utils';
2
+ /**
3
+ * 悬浮事件 hook
4
+ * @param target 响应式节点
5
+ */
6
+ export declare const useHover: (target: ResponsiveRef<HTMLElement | undefined>) => {
7
+ isHover: import('vue').Ref<boolean>;
8
+ };
@@ -0,0 +1,24 @@
1
+ import { Ref } from 'vue';
2
+ export type OutsideTargetType = Ref | HTMLElement | string;
3
+ export type OutsideTargets = OutsideTargetType | OutsideTargetType[];
4
+ export type OutsideTargetsFunction = () => OutsideTargets;
5
+ export type OutsideCallback = (options: {
6
+ listenOutSideEvent: () => void;
7
+ removeOutSideEvent: () => void;
8
+ }) => unknown;
9
+ /**
10
+ * 点击节点外部事件 hook
11
+ * @param targets 响应式节点数组或获取方法
12
+ * @param callback 回调方法
13
+ * @param autoListen 自动监听,默认:true
14
+ */
15
+ export declare const useClickOutside: (targets: OutsideTargets | OutsideTargetsFunction, callback: OutsideCallback, autoListen?: boolean) => {
16
+ listenOutSideEvent: () => void;
17
+ removeOutSideEvent: () => void;
18
+ listenClickOutSide: () => void;
19
+ removeListenClickOutSide: () => void;
20
+ };
21
+ export declare const useMouseMoveOutside: (targets: OutsideTargets | OutsideTargetsFunction, callback: OutsideCallback, autoListen?: boolean) => {
22
+ listenOutSideEvent: () => void;
23
+ removeOutSideEvent: () => void;
24
+ };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 屏幕旋转模式
3
- * @desc 不使用 portrait 和 landscape 是不想和业务名称重合
4
- * */
3
+ * @description 不使用 portrait 和 landscape 是不想和业务名称重合
4
+ */
5
5
  export declare enum ScreenOrientationMode {
6
6
  /** 屏幕纵向 */
7
7
  Vertical = "Vertical",
@@ -9,6 +9,7 @@ export interface ScrollPaginationHookOptions<I = unknown> extends PaginationHook
9
9
  export interface ScrollPaginationHookReturn<I = unknown> extends PageinationHookReturn<I> {
10
10
  scrollRef: Ref<HTMLDivElement | undefined>;
11
11
  isFirstFinish: Ref<boolean>;
12
+ refreshList: () => Promise<void>;
12
13
  }
13
14
  /**
14
15
  * 滚动分页器 hook
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 加载微信 js-sdk
3
+ */
4
+ export declare const loadWxSdk: () => Promise<WechatJsSdk.Wx>;
5
+ /**
6
+ * 加载企业微信的 js-sdk
7
+ * https://developer.work.weixin.qq.com/document/path/90514
8
+ */
9
+ export declare const loadWorkWxSdk: () => Promise<WechatJsSdk.Wx>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 微信小程序相关 hook
3
+ */
4
+ export declare const useWeixinMiniProgram: () => {
5
+ isMiniProgram: () => Promise<boolean>;
6
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 检查 js api 选项
3
+ */
4
+ export interface WeixinCheckJsApiOptions {
5
+ /** 不支持的提示文案 */
6
+ notSupportMessage?: string;
7
+ }
8
+ /**
9
+ * 微信 sdk 相关 hook
10
+ */
11
+ export declare const useWeixinSdk: () => {
12
+ getWeixinSdk: () => Promise<WechatJsSdk.Wx | undefined>;
13
+ checkJsApi: (apiName: WechatJsSdk.JsApiNames, options?: WeixinCheckJsApiOptions) => Promise<void>;
14
+ };
@@ -7,7 +7,7 @@ import { ResizeObserver } from '@juggle/resize-observer';
7
7
  * @param options 选项
8
8
  */
9
9
  export declare const useResizeObserver: (refObj: Ref<Element | undefined>, callback: () => unknown, options?: {
10
- autoLifeCycle: boolean;
10
+ autoLifeCycle?: boolean;
11
11
  }) => {
12
12
  observer: ResizeObserver;
13
13
  };
@@ -7,6 +7,14 @@ export interface UseBrowserReturn {
7
7
  isWeixin: boolean;
8
8
  /** 是否企业微信 */
9
9
  isWorkWeixin: boolean;
10
+ /** 是否被 iframe */
11
+ isIframe: boolean;
12
+ /** 是否为桌面端 iPad */
13
+ isDesktopIPad: boolean;
14
+ /** 是否 IE */
15
+ isIE: boolean;
16
+ /** 是否为低版本 IE */
17
+ isLowerIE: boolean;
10
18
  }
11
19
  /**
12
20
  * 浏览器相关 hook
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 下载文件相关
3
+ */
4
+ export declare const useDownload: () => {
5
+ downloadFileUrl: (fileUrl: string, fileName: string) => Promise<void>;
6
+ };
@@ -1,2 +1,2 @@
1
1
  import { SimilarResponsive } from '../../../vue-utils';
2
- export declare const useEventListener: <E extends keyof HTMLElementEventMap>(target: SimilarResponsive<HTMLElement | undefined>, event: E, listener: (ev: HTMLElementEventMap[E]) => any, options?: AddEventListenerOptions) => void;
2
+ export declare const useEventListener: <E extends keyof HTMLElementEventMap>(target: SimilarResponsive<HTMLElement | undefined>, event: E, listener: (ev: HTMLElementEventMap[E]) => any, options?: boolean | AddEventListenerOptions) => void;
@@ -6,4 +6,5 @@
6
6
  export declare const useSetInterval: <A extends unknown[] = []>(callback: (...args: A) => unknown, time: number) => {
7
7
  startInterval: (...args: A) => void;
8
8
  closeInterval: () => void;
9
+ hasInterval: () => boolean;
9
10
  };
@@ -6,4 +6,5 @@
6
6
  export declare const useSetTimeout: <A extends unknown[] = []>(callback: (...args: A) => unknown, time: number) => {
7
7
  startTimeout: (...args: A) => void;
8
8
  closeTimeout: () => void;
9
+ hasTimeout: () => boolean;
9
10
  };