@hlw-uni-mp/use 1.0.3 → 1.0.5
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/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { App, Ref, ComputedRef } from 'vue';
|
|
|
4
4
|
/**
|
|
5
5
|
* 具有消息提示属性的响应体对象
|
|
6
6
|
*/
|
|
7
|
-
interface
|
|
7
|
+
interface ToastRes {
|
|
8
8
|
/** 提示文案 */
|
|
9
9
|
msg?: string;
|
|
10
10
|
/** 是否为模态弹窗 */
|
|
@@ -23,7 +23,7 @@ type ToastCallback = (confirm: boolean) => void;
|
|
|
23
23
|
*/
|
|
24
24
|
interface HlwMsg {
|
|
25
25
|
/** 显示轻提示或模态确认框 (支持回调与 Promise) */
|
|
26
|
-
toast(opts: UniApp.ShowToastOptions |
|
|
26
|
+
toast(opts: UniApp.ShowToastOptions | ToastRes | string, callback?: ToastCallback): Promise<boolean>;
|
|
27
27
|
/** 成功提示框 */
|
|
28
28
|
success(msg: string): void;
|
|
29
29
|
/** 失败提示框 */
|
|
@@ -249,4 +249,4 @@ interface UseRefsReturn<T = unknown> {
|
|
|
249
249
|
*/
|
|
250
250
|
declare function useRefs<T = unknown>(): UseRefsReturn<T>;
|
|
251
251
|
|
|
252
|
-
export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, type ShareHandlers, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type
|
|
252
|
+
export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, type ShareHandlers, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type ToastRes, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, hlw, initTheme, showShareMenu, useMsg, useRefs, useShare, useTheme, useThemeStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { App, Ref, ComputedRef } from 'vue';
|
|
|
4
4
|
/**
|
|
5
5
|
* 具有消息提示属性的响应体对象
|
|
6
6
|
*/
|
|
7
|
-
interface
|
|
7
|
+
interface ToastRes {
|
|
8
8
|
/** 提示文案 */
|
|
9
9
|
msg?: string;
|
|
10
10
|
/** 是否为模态弹窗 */
|
|
@@ -23,7 +23,7 @@ type ToastCallback = (confirm: boolean) => void;
|
|
|
23
23
|
*/
|
|
24
24
|
interface HlwMsg {
|
|
25
25
|
/** 显示轻提示或模态确认框 (支持回调与 Promise) */
|
|
26
|
-
toast(opts: UniApp.ShowToastOptions |
|
|
26
|
+
toast(opts: UniApp.ShowToastOptions | ToastRes | string, callback?: ToastCallback): Promise<boolean>;
|
|
27
27
|
/** 成功提示框 */
|
|
28
28
|
success(msg: string): void;
|
|
29
29
|
/** 失败提示框 */
|
|
@@ -249,4 +249,4 @@ interface UseRefsReturn<T = unknown> {
|
|
|
249
249
|
*/
|
|
250
250
|
declare function useRefs<T = unknown>(): UseRefsReturn<T>;
|
|
251
251
|
|
|
252
|
-
export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, type ShareHandlers, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type
|
|
252
|
+
export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, type ShareHandlers, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type ToastRes, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, hlw, initTheme, showShareMenu, useMsg, useRefs, useShare, useTheme, useThemeStore };
|