sard-uniapp 1.6.1 → 1.7.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 (254) hide show
  1. package/changelog.md +9 -0
  2. package/components/action-sheet/action-sheet.d.ts +2 -2
  3. package/components/action-sheet/action-sheet.vue +2 -2
  4. package/components/action-sheet/common.d.ts +1 -1
  5. package/components/action-sheet/common.js +1 -1
  6. package/components/alert/alert.d.ts +2 -2
  7. package/components/alert/alert.vue +2 -2
  8. package/components/alert/common.d.ts +2 -2
  9. package/components/alert/common.js +1 -1
  10. package/components/avatar/avatar.d.ts +2 -2
  11. package/components/avatar/avatar.vue +2 -2
  12. package/components/avatar/common.d.ts +2 -2
  13. package/components/avatar/common.js +1 -1
  14. package/components/back-top/back-top.vue +2 -2
  15. package/components/back-top/common.d.ts +1 -1
  16. package/components/back-top/common.js +1 -1
  17. package/components/badge/badge.vue +2 -2
  18. package/components/badge/common.d.ts +1 -1
  19. package/components/badge/common.js +1 -1
  20. package/components/button/button.d.ts +7 -7
  21. package/components/button/button.vue +2 -2
  22. package/components/button/common.d.ts +4 -4
  23. package/components/button/common.js +1 -1
  24. package/components/calendar/calendar.d.ts +2 -2
  25. package/components/calendar/calendar.vue +2 -2
  26. package/components/calendar/common.d.ts +2 -2
  27. package/components/calendar/common.js +1 -1
  28. package/components/calendar-input/calendar-input.d.ts +3 -3
  29. package/components/calendar-input/calendar-input.vue +2 -2
  30. package/components/calendar-input/common.d.ts +2 -2
  31. package/components/calendar-input/common.js +1 -1
  32. package/components/cascader/cascader.vue +2 -2
  33. package/components/cascader/common.d.ts +1 -1
  34. package/components/cascader/common.js +1 -1
  35. package/components/cascader-input/cascader-input.d.ts +1 -1
  36. package/components/cascader-input/cascader-input.vue +2 -2
  37. package/components/cascader-input/common.d.ts +1 -1
  38. package/components/cascader-input/common.js +1 -1
  39. package/components/checkbox/checkbox.vue +2 -2
  40. package/components/checkbox/common.d.ts +3 -3
  41. package/components/checkbox/common.js +2 -2
  42. package/components/checkbox-group/checkbox-group.d.ts +3 -3
  43. package/components/checkbox-group/checkbox-group.vue +2 -2
  44. package/components/checkbox-input/checkbox-input.vue +2 -2
  45. package/components/checkbox-input/common.d.ts +1 -1
  46. package/components/checkbox-input/common.js +1 -1
  47. package/components/config/index.d.ts +54 -382
  48. package/components/config/index.js +6 -13
  49. package/components/count-down/common.d.ts +1 -1
  50. package/components/count-down/common.js +1 -1
  51. package/components/count-down/count-down.vue +2 -2
  52. package/components/count-to/common.d.ts +1 -1
  53. package/components/count-to/common.js +1 -1
  54. package/components/count-to/count-to.vue +2 -2
  55. package/components/datetime-picker/common.d.ts +1 -1
  56. package/components/datetime-picker/common.js +1 -1
  57. package/components/datetime-picker/datetime-picker.vue +2 -2
  58. package/components/datetime-picker-input/common.d.ts +1 -1
  59. package/components/datetime-picker-input/common.js +1 -1
  60. package/components/datetime-picker-input/datetime-picker-input.vue +2 -2
  61. package/components/dialog/common.d.ts +2 -2
  62. package/components/dialog/common.js +1 -1
  63. package/components/dialog/dialog.d.ts +5 -5
  64. package/components/dialog/dialog.vue +2 -2
  65. package/components/dialog-agent/common.d.ts +2 -2
  66. package/components/dialog-agent/common.js +3 -3
  67. package/components/dialog-agent/dialog-agent.d.ts +4 -4
  68. package/components/dialog-agent/dialog-agent.vue +2 -2
  69. package/components/dropdown/common.d.ts +3 -3
  70. package/components/dropdown/common.js +2 -2
  71. package/components/dropdown/dropdown.d.ts +4 -4
  72. package/components/dropdown/dropdown.vue +2 -2
  73. package/components/dropdown-item/dropdown-item.vue +2 -2
  74. package/components/empty/common.d.ts +1 -1
  75. package/components/empty/common.js +1 -1
  76. package/components/empty/empty.vue +2 -2
  77. package/components/fab/common.d.ts +1 -1
  78. package/components/fab/common.js +1 -1
  79. package/components/fab/fab.d.ts +1 -1
  80. package/components/fab/fab.vue +2 -2
  81. package/components/floating-bubble/common.d.ts +2 -2
  82. package/components/floating-bubble/common.js +1 -1
  83. package/components/floating-bubble/floating-bubble.d.ts +3 -3
  84. package/components/floating-bubble/floating-bubble.vue +2 -2
  85. package/components/form/common.d.ts +8 -8
  86. package/components/form/common.js +2 -2
  87. package/components/form/form.d.ts +15 -16
  88. package/components/form/form.vue +2 -2
  89. package/components/form-item/form-item.d.ts +1 -1
  90. package/components/form-item/form-item.vue +2 -2
  91. package/components/grid/common.d.ts +2 -2
  92. package/components/grid/common.js +1 -1
  93. package/components/grid/grid.d.ts +2 -2
  94. package/components/grid/grid.vue +2 -2
  95. package/components/icon/common.d.ts +1 -1
  96. package/components/icon/common.js +1 -1
  97. package/components/icon/icon.vue +2 -2
  98. package/components/input/common.d.ts +1 -1
  99. package/components/input/common.js +1 -1
  100. package/components/input/input.vue +2 -2
  101. package/components/keyboard/common.d.ts +2 -2
  102. package/components/keyboard/common.js +1 -1
  103. package/components/keyboard/keyboard.d.ts +3 -3
  104. package/components/keyboard/keyboard.vue +2 -2
  105. package/components/list/common.d.ts +2 -2
  106. package/components/list/common.js +1 -1
  107. package/components/list-item/list-item.d.ts +3 -3
  108. package/components/list-item/list-item.vue +2 -2
  109. package/components/load-more/common.d.ts +1 -1
  110. package/components/load-more/common.js +1 -1
  111. package/components/load-more/load-more.vue +2 -2
  112. package/components/loading/common.d.ts +2 -2
  113. package/components/loading/common.js +1 -1
  114. package/components/loading/loading.d.ts +2 -2
  115. package/components/loading/loading.vue +2 -2
  116. package/components/marquee/common.d.ts +2 -2
  117. package/components/marquee/common.js +1 -1
  118. package/components/marquee/marquee.d.ts +2 -2
  119. package/components/marquee/marquee.vue +2 -2
  120. package/components/menu/common.d.ts +1 -1
  121. package/components/menu/common.js +1 -1
  122. package/components/menu/menu.vue +2 -2
  123. package/components/notice-bar/common.d.ts +2 -2
  124. package/components/notice-bar/common.js +1 -1
  125. package/components/notice-bar/notice-bar.d.ts +3 -3
  126. package/components/notice-bar/notice-bar.vue +2 -2
  127. package/components/notify/common.d.ts +3 -3
  128. package/components/notify/common.js +1 -1
  129. package/components/notify/notify.d.ts +6 -6
  130. package/components/notify/notify.vue +2 -2
  131. package/components/notify-agent/common.d.ts +3 -3
  132. package/components/notify-agent/common.js +3 -3
  133. package/components/notify-agent/notify-agent.d.ts +6 -6
  134. package/components/notify-agent/notify-agent.vue +2 -2
  135. package/components/overlay/common.d.ts +1 -1
  136. package/components/overlay/common.js +1 -1
  137. package/components/overlay/overlay.vue +2 -2
  138. package/components/pagination/common.d.ts +2 -2
  139. package/components/pagination/common.js +1 -1
  140. package/components/pagination/pagination.d.ts +2 -2
  141. package/components/pagination/pagination.vue +2 -2
  142. package/components/password-input/common.d.ts +2 -2
  143. package/components/password-input/common.js +1 -1
  144. package/components/password-input/password-input.d.ts +2 -2
  145. package/components/password-input/password-input.vue +2 -2
  146. package/components/picker/common.d.ts +1 -1
  147. package/components/picker/common.js +1 -1
  148. package/components/picker/picker.vue +2 -2
  149. package/components/picker-input/common.d.ts +1 -1
  150. package/components/picker-input/common.js +3 -3
  151. package/components/picker-input/picker-input.d.ts +1 -1
  152. package/components/picker-input/picker-input.vue +2 -2
  153. package/components/popout/common.d.ts +2 -2
  154. package/components/popout/common.js +1 -1
  155. package/components/popout/popout.d.ts +4 -4
  156. package/components/popout/popout.vue +2 -2
  157. package/components/popover/common.d.ts +4 -4
  158. package/components/popover/common.js +1 -1
  159. package/components/popover/index.d.ts +1 -0
  160. package/components/popover/popover.d.ts +7 -7
  161. package/components/popover/popover.vue +2 -2
  162. package/components/popup/common.d.ts +2 -2
  163. package/components/popup/common.js +1 -1
  164. package/components/popup/popup.d.ts +4 -4
  165. package/components/popup/popup.vue +2 -2
  166. package/components/progress-bar/common.d.ts +1 -1
  167. package/components/progress-bar/common.js +1 -1
  168. package/components/progress-bar/progress-bar.vue +2 -2
  169. package/components/progress-circle/common.d.ts +1 -1
  170. package/components/progress-circle/common.js +1 -1
  171. package/components/progress-circle/progress-circle.vue +2 -2
  172. package/components/pull-down-refresh/common.d.ts +1 -1
  173. package/components/pull-down-refresh/common.js +1 -1
  174. package/components/pull-down-refresh/pull-down-refresh.d.ts +1 -1
  175. package/components/pull-down-refresh/pull-down-refresh.vue +2 -2
  176. package/components/qrcode/common.d.ts +3 -3
  177. package/components/qrcode/common.js +1 -1
  178. package/components/qrcode/qrcode.d.ts +4 -4
  179. package/components/qrcode/qrcode.vue +2 -2
  180. package/components/radio/common.d.ts +2 -2
  181. package/components/radio/common.js +1 -1
  182. package/components/radio-group/radio-group.d.ts +3 -3
  183. package/components/radio-group/radio-group.vue +2 -2
  184. package/components/radio-input/common.d.ts +2 -2
  185. package/components/radio-input/common.js +1 -1
  186. package/components/radio-input/radio-input.d.ts +2 -2
  187. package/components/radio-input/radio-input.vue +2 -2
  188. package/components/rate/common.d.ts +1 -1
  189. package/components/rate/common.js +1 -1
  190. package/components/rate/rate.d.ts +1 -1
  191. package/components/rate/rate.vue +2 -2
  192. package/components/result/common.d.ts +2 -2
  193. package/components/result/common.js +1 -1
  194. package/components/result/result.d.ts +3 -3
  195. package/components/result/result.vue +2 -2
  196. package/components/search/common.d.ts +2 -2
  197. package/components/search/common.js +1 -1
  198. package/components/search/search.d.ts +3 -3
  199. package/components/search/search.vue +2 -2
  200. package/components/share-sheet/common.d.ts +1 -1
  201. package/components/share-sheet/common.js +1 -1
  202. package/components/share-sheet/share-sheet.d.ts +2 -2
  203. package/components/share-sheet/share-sheet.vue +2 -2
  204. package/components/skeleton/common.d.ts +1 -1
  205. package/components/skeleton/common.js +1 -1
  206. package/components/skeleton/skeleton.vue +2 -2
  207. package/components/slider/common.d.ts +1 -1
  208. package/components/slider/common.js +1 -1
  209. package/components/slider/slider.vue +2 -2
  210. package/components/stepper/common.d.ts +3 -3
  211. package/components/stepper/common.js +1 -1
  212. package/components/stepper/stepper.d.ts +5 -5
  213. package/components/stepper/stepper.vue +2 -2
  214. package/components/steps/common.d.ts +2 -2
  215. package/components/steps/common.js +1 -1
  216. package/components/steps/steps.d.ts +2 -2
  217. package/components/steps/steps.vue +2 -2
  218. package/components/swiper-dot/common.d.ts +2 -2
  219. package/components/swiper-dot/common.js +1 -1
  220. package/components/swiper-dot/swiper-dot.d.ts +3 -3
  221. package/components/swiper-dot/swiper-dot.vue +2 -2
  222. package/components/switch/common.d.ts +1 -1
  223. package/components/switch/common.js +1 -1
  224. package/components/switch/switch.vue +2 -2
  225. package/components/tabbar/common.d.ts +1 -1
  226. package/components/tabbar/common.js +1 -1
  227. package/components/tabbar/tabbar.vue +2 -2
  228. package/components/tabs/common.d.ts +2 -2
  229. package/components/tabs/common.js +1 -1
  230. package/components/tabs/tabs.d.ts +3 -3
  231. package/components/tabs/tabs.vue +2 -2
  232. package/components/tag/common.d.ts +3 -3
  233. package/components/tag/common.js +1 -1
  234. package/components/tag/tag.d.ts +5 -5
  235. package/components/tag/tag.vue +2 -2
  236. package/components/toast/common.d.ts +3 -3
  237. package/components/toast/common.js +1 -1
  238. package/components/toast/toast.d.ts +6 -6
  239. package/components/toast/toast.vue +2 -2
  240. package/components/toast-agent/common.d.ts +3 -3
  241. package/components/toast-agent/common.js +3 -3
  242. package/components/toast-agent/toast-agent.d.ts +6 -6
  243. package/components/toast-agent/toast-agent.vue +2 -2
  244. package/components/tree/common.d.ts +2 -2
  245. package/components/tree/common.js +1 -1
  246. package/components/tree/tree.d.ts +3 -3
  247. package/components/tree/tree.vue +2 -2
  248. package/components/upload/common.d.ts +7 -7
  249. package/components/upload/common.js +2 -2
  250. package/components/upload/upload.d.ts +11 -13
  251. package/components/upload/upload.vue +2 -2
  252. package/components/upload-preview/upload-preview.d.ts +2 -2
  253. package/components/upload-preview/upload-preview.vue +2 -2
  254. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  import { type SwiperDotProps } from './common';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<SwiperDotProps>, {
3
- type: "dot";
3
+ type: "title" | "dot" | "dot-bar" | "index" | "fraction" | undefined;
4
4
  current: number;
5
5
  total: number;
6
6
  field: string;
7
7
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SwiperDotProps>, {
8
- type: "dot";
8
+ type: "title" | "dot" | "dot-bar" | "index" | "fraction" | undefined;
9
9
  current: number;
10
10
  total: number;
11
11
  field: string;
12
12
  }>>>, {
13
- type: "title" | "dot" | "index" | "dot-bar" | "fraction";
13
+ type: "title" | "dot" | "dot-bar" | "index" | "fraction";
14
14
  total: number;
15
15
  current: number;
16
16
  field: string;
@@ -27,7 +27,7 @@
27
27
  import { mergeDefaults as _mergeDefaults, defineComponent as _defineComponent } from "vue";
28
28
  import { computed } from "vue";
29
29
  import { classNames, stringifyStyle, createBem } from "../../utils";
30
- import { swiperDotPropsDefaults } from "./common";
30
+ import { defaultSwiperDotProps } from "./common";
31
31
  export default _defineComponent({
32
32
  ...{
33
33
  options: {
@@ -44,7 +44,7 @@ export default _defineComponent({
44
44
  total: { type: Number, required: false },
45
45
  list: { type: Array, required: false },
46
46
  field: { type: String, required: false }
47
- }, swiperDotPropsDefaults),
47
+ }, defaultSwiperDotProps),
48
48
  setup(__props, { expose: __expose }) {
49
49
  __expose();
50
50
  const props = __props;
@@ -14,7 +14,7 @@ export interface SwitchProps {
14
14
  beforeUpdate?: (value: any) => Promise<any>;
15
15
  validateEvent?: boolean;
16
16
  }
17
- export declare const switchPropsDefaults: {
17
+ export declare const defaultSwitchProps: {
18
18
  checkedValue: boolean;
19
19
  uncheckedValue: boolean;
20
20
  validateEvent: boolean;
@@ -1,2 +1,2 @@
1
1
  import { defaultConfig } from '../config';
2
- export const switchPropsDefaults = defaultConfig.switch;
2
+ export const defaultSwitchProps = defaultConfig.switch;
@@ -13,7 +13,7 @@ import { classNames, stringifyStyle, createBem } from "../../utils";
13
13
  import SarLoading from "../loading/loading.vue";
14
14
  import { useFormContext, useFormItemContext } from "../form/common";
15
15
  import {
16
- switchPropsDefaults
16
+ defaultSwitchProps
17
17
  } from "./common";
18
18
  export default _defineComponent({
19
19
  ...{
@@ -37,7 +37,7 @@ export default _defineComponent({
37
37
  uncheckedValue: { type: null, required: false },
38
38
  beforeUpdate: { type: Function, required: false },
39
39
  validateEvent: { type: Boolean, required: false }
40
- }, switchPropsDefaults),
40
+ }, defaultSwitchProps),
41
41
  emits: ["click", "update:model-value", "update:loading"],
42
42
  setup(__props, { expose: __expose, emit: __emit }) {
43
43
  __expose();
@@ -7,7 +7,7 @@ export interface TabbarProps {
7
7
  activeColor?: string;
8
8
  bordered?: boolean;
9
9
  }
10
- export declare const tabbarPropsDefaults: {
10
+ export declare const defaultTabbarProps: {
11
11
  bordered: boolean;
12
12
  };
13
13
  export interface TabbarSlots {
@@ -1,3 +1,3 @@
1
1
  import { defaultConfig } from '../config';
2
- export const tabbarPropsDefaults = defaultConfig.tabbar;
2
+ export const defaultTabbarProps = defaultConfig.tabbar;
3
3
  export const tabbarContextSymbol = Symbol('tabbar-context');
@@ -10,7 +10,7 @@ import { computed, provide, ref, watch, toRef, reactive } from "vue";
10
10
  import { classNames, stringifyStyle, createBem } from "../../utils";
11
11
  import {
12
12
  tabbarContextSymbol,
13
- tabbarPropsDefaults
13
+ defaultTabbarProps
14
14
  } from "./common";
15
15
  export default _defineComponent({
16
16
  ...{
@@ -27,7 +27,7 @@ export default _defineComponent({
27
27
  color: { type: String, required: false },
28
28
  activeColor: { type: String, required: false },
29
29
  bordered: { type: Boolean, required: false }
30
- }, tabbarPropsDefaults),
30
+ }, defaultTabbarProps),
31
31
  emits: ["update:current"],
32
32
  setup(__props, { expose: __expose, emit: __emit }) {
33
33
  __expose();
@@ -15,8 +15,8 @@ export interface TabsProps {
15
15
  type?: 'line' | 'pill' | 'card';
16
16
  scrollable?: boolean;
17
17
  }
18
- export declare const tabsPropsDefaults: {
19
- type: "line";
18
+ export declare const defaultTabsProps: {
19
+ type: "line" | "pill" | "card" | undefined;
20
20
  };
21
21
  export interface TabsSlots {
22
22
  default?(props: Record<string, never>): any;
@@ -1,3 +1,3 @@
1
1
  import { defaultConfig } from '../config';
2
- export const tabsPropsDefaults = defaultConfig.tabs;
2
+ export const defaultTabsProps = defaultConfig.tabs;
3
3
  export const tabContextSymbol = Symbol('tab-context');
@@ -1,14 +1,14 @@
1
1
  import { type TabsProps, type TabsSlots } from './common';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<TabsProps>, {
3
- type: "line";
3
+ type: "line" | "pill" | "card" | undefined;
4
4
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
5
  "update:current": (name: string | number) => void;
6
6
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<TabsProps>, {
7
- type: "line";
7
+ type: "line" | "pill" | "card" | undefined;
8
8
  }>>> & {
9
9
  "onUpdate:current"?: ((name: string | number) => any) | undefined;
10
10
  }, {
11
- type: "line" | "card" | "pill";
11
+ type: "line" | "pill" | "card";
12
12
  }, {}>, Readonly<TabsSlots> & TabsSlots>;
13
13
  export default _default;
14
14
  type __VLS_WithDefaults<P, D> = {
@@ -50,7 +50,7 @@ import {
50
50
  } from "../../utils";
51
51
  import {
52
52
  tabContextSymbol,
53
- tabsPropsDefaults
53
+ defaultTabsProps
54
54
  } from "./common";
55
55
  import SarTab from "../tab/tab.vue";
56
56
  import { usePopupEnter } from "../popup/common";
@@ -69,7 +69,7 @@ export default _defineComponent({
69
69
  list: { type: Array, required: false },
70
70
  type: { type: String, required: false },
71
71
  scrollable: { type: Boolean, required: false }
72
- }, tabsPropsDefaults),
72
+ }, defaultTabsProps),
73
73
  emits: ["update:current"],
74
74
  setup(__props, { expose: __expose, emit: __emit }) {
75
75
  __expose();
@@ -11,9 +11,9 @@ export interface TagProps {
11
11
  textColor?: string;
12
12
  closable?: boolean;
13
13
  }
14
- export declare const tagPropsDefaults: {
15
- theme: "default";
16
- size: "medium";
14
+ export declare const defaultTagProps: {
15
+ theme: "success" | "default" | "primary" | "warning" | "danger" | "secondary" | "info" | undefined;
16
+ size: "small" | "medium" | "large" | undefined;
17
17
  };
18
18
  export interface TagSlots {
19
19
  default?(props: Record<string, never>): any;
@@ -1,2 +1,2 @@
1
1
  import { defaultConfig } from '../config';
2
- export const tagPropsDefaults = defaultConfig.tag;
2
+ export const defaultTagProps = defaultConfig.tag;
@@ -1,19 +1,19 @@
1
1
  import { type TagProps, type TagSlots } from './common';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<TagProps>, {
3
- theme: "default";
4
- size: "medium";
3
+ theme: "success" | "default" | "primary" | "warning" | "danger" | "secondary" | "info" | undefined;
4
+ size: "small" | "medium" | "large" | undefined;
5
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  click: (event: any) => void;
7
7
  close: (event: any) => void;
8
8
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<TagProps>, {
9
- theme: "default";
10
- size: "medium";
9
+ theme: "success" | "default" | "primary" | "warning" | "danger" | "secondary" | "info" | undefined;
10
+ size: "small" | "medium" | "large" | undefined;
11
11
  }>>> & {
12
12
  onClick?: ((event: any) => any) | undefined;
13
13
  onClose?: ((event: any) => any) | undefined;
14
14
  }, {
15
15
  size: "small" | "medium" | "large";
16
- theme: "success" | "default" | "primary" | "info" | "warning" | "danger" | "secondary";
16
+ theme: "success" | "default" | "primary" | "warning" | "danger" | "secondary" | "info";
17
17
  }, {}>, Readonly<TagSlots> & TagSlots>;
18
18
  export default _default;
19
19
  type __VLS_WithDefaults<P, D> = {
@@ -13,7 +13,7 @@ import { computed } from "vue";
13
13
  import { classNames, stringifyStyle, createBem } from "../../utils";
14
14
  import SarIcon from "../icon/icon.vue";
15
15
  import {
16
- tagPropsDefaults
16
+ defaultTagProps
17
17
  } from "./common";
18
18
  export default _defineComponent({
19
19
  ...{
@@ -34,7 +34,7 @@ export default _defineComponent({
34
34
  color: { type: String, required: false },
35
35
  textColor: { type: String, required: false },
36
36
  closable: { type: Boolean, required: false }
37
- }, tagPropsDefaults),
37
+ }, defaultTagProps),
38
38
  emits: ["click", "close"],
39
39
  setup(__props, { expose: __expose }) {
40
40
  __expose();
@@ -11,9 +11,9 @@ export interface ToastProps {
11
11
  timeout?: number;
12
12
  duration?: number;
13
13
  }
14
- export declare const toastPropsDefaults: {
15
- type: "text";
16
- position: "center";
14
+ export declare const defaultToastProps: {
15
+ type: "success" | "text" | "loading" | "fail" | undefined;
16
+ position: "center" | "top" | "bottom" | undefined;
17
17
  overlay: boolean;
18
18
  timeout: number;
19
19
  duration: number;
@@ -1,2 +1,2 @@
1
1
  import { defaultConfig } from '../config';
2
- export const toastPropsDefaults = defaultConfig.toast;
2
+ export const defaultToastProps = defaultConfig.toast;
@@ -1,7 +1,7 @@
1
1
  import { type ToastProps } from './common';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ToastProps>, {
3
- type: "text";
4
- position: "center";
3
+ type: "success" | "text" | "loading" | "fail" | undefined;
4
+ position: "center" | "top" | "bottom" | undefined;
5
5
  overlay: boolean;
6
6
  timeout: number;
7
7
  duration: number;
@@ -11,8 +11,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
11
11
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  "update:visible": (visible: boolean) => void;
13
13
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ToastProps>, {
14
- type: "text";
15
- position: "center";
14
+ type: "success" | "text" | "loading" | "fail" | undefined;
15
+ position: "center" | "top" | "bottom" | undefined;
16
16
  overlay: boolean;
17
17
  timeout: number;
18
18
  duration: number;
@@ -20,9 +20,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
20
20
  "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
21
21
  }, {
22
22
  type: "success" | "text" | "loading" | "fail";
23
- overlay: boolean;
24
- duration: number;
25
23
  position: "center" | "top" | "bottom";
24
+ duration: number;
25
+ overlay: boolean;
26
26
  timeout: number;
27
27
  }, {}>;
28
28
  export default _default;
@@ -26,7 +26,7 @@ import SarLoading from "../loading/loading.vue";
26
26
  import SarIcon from "../icon/icon.vue";
27
27
  import { useSetTimeout } from "../../use";
28
28
  import {
29
- toastPropsDefaults
29
+ defaultToastProps
30
30
  } from "./common";
31
31
  const __default__ = {
32
32
  options: {
@@ -49,7 +49,7 @@ export default _defineComponent({
49
49
  transparent: { type: Boolean, required: false },
50
50
  timeout: { type: Number, required: false },
51
51
  duration: { type: Number, required: false }
52
- }, toastPropsDefaults),
52
+ }, defaultToastProps),
53
53
  emits: ["update:visible"],
54
54
  setup(__props, { expose: __expose, emit: __emit }) {
55
55
  const props = __props;
@@ -2,10 +2,10 @@ import { type ToastProps } from '../toast/common';
2
2
  export interface ToastAgentProps extends ToastProps {
3
3
  id?: string;
4
4
  }
5
- export declare const toastAgentPropsDefaults: {
5
+ export declare const defaultToastAgentProps: {
6
6
  id: string;
7
- type: "text";
8
- position: "center";
7
+ type: "success" | "text" | "loading" | "fail" | undefined;
8
+ position: "center" | "top" | "bottom" | undefined;
9
9
  overlay: boolean;
10
10
  timeout: number;
11
11
  duration: number;
@@ -1,8 +1,8 @@
1
1
  import { getAllImperatives, getAvailableImperative, getImperatives, } from '../../use/useImperative';
2
2
  import { defaultConfig } from '../config';
3
- import { toastPropsDefaults } from '../toast/common';
4
- export const toastAgentPropsDefaults = {
5
- ...toastPropsDefaults,
3
+ import { defaultToastProps } from '../toast/common';
4
+ export const defaultToastAgentProps = {
5
+ ...defaultToastProps,
6
6
  ...defaultConfig.toastAgent,
7
7
  };
8
8
  export const imperativeName = 'toast';
@@ -1,24 +1,24 @@
1
1
  import { type ToastAgentProps } from './common';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ToastAgentProps>, {
3
3
  id: string;
4
- type: "text";
5
- position: "center";
4
+ type: "success" | "text" | "loading" | "fail" | undefined;
5
+ position: "center" | "top" | "bottom" | undefined;
6
6
  overlay: boolean;
7
7
  timeout: number;
8
8
  duration: number;
9
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ToastAgentProps>, {
10
10
  id: string;
11
- type: "text";
12
- position: "center";
11
+ type: "success" | "text" | "loading" | "fail" | undefined;
12
+ position: "center" | "top" | "bottom" | undefined;
13
13
  overlay: boolean;
14
14
  timeout: number;
15
15
  duration: number;
16
16
  }>>>, {
17
17
  type: "success" | "text" | "loading" | "fail";
18
18
  id: string;
19
- overlay: boolean;
20
- duration: number;
21
19
  position: "center" | "top" | "bottom";
20
+ duration: number;
21
+ overlay: boolean;
22
22
  timeout: number;
23
23
  }, {}>;
24
24
  export default _default;
@@ -18,7 +18,7 @@ import { computed, ref } from "vue";
18
18
  import SarToast from "../toast/toast.vue";
19
19
  import {
20
20
  imperativeName,
21
- toastAgentPropsDefaults
21
+ defaultToastAgentProps
22
22
  } from "./common";
23
23
  import { useImperative } from "../../use/useImperative";
24
24
  export default _defineComponent({
@@ -41,7 +41,7 @@ export default _defineComponent({
41
41
  transparent: { type: Boolean, required: false },
42
42
  timeout: { type: Number, required: false },
43
43
  duration: { type: Number, required: false }
44
- }, toastAgentPropsDefaults),
44
+ }, defaultToastAgentProps),
45
45
  setup(__props, { expose: __expose }) {
46
46
  __expose();
47
47
  const props = __props;
@@ -51,10 +51,10 @@ export interface TreeProps {
51
51
  filterMode?: 'lenient' | 'strict';
52
52
  filterMethod?: (value: string, node: TreeStateNode) => boolean;
53
53
  }
54
- export declare const treePropsDefaults: {
54
+ export declare const defaultTreeProps: {
55
55
  data: () => never[];
56
56
  defaultExpandAll: boolean;
57
- filterMode: "lenient";
57
+ filterMode: "lenient" | "strict" | undefined;
58
58
  accordion: boolean;
59
59
  };
60
60
  export interface TreeExpose {
@@ -4,7 +4,7 @@ export const defaultNodeKeys = {
4
4
  key: 'key',
5
5
  children: 'children',
6
6
  };
7
- export const treePropsDefaults = {
7
+ export const defaultTreeProps = {
8
8
  ...defaultConfig.tree,
9
9
  data: () => [],
10
10
  };
@@ -2,7 +2,7 @@ import { type TreeProps, type TreeNode, type TreeCleanNode } from './common';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<TreeProps>, {
3
3
  data: () => never[];
4
4
  defaultExpandAll: boolean;
5
- filterMode: "lenient";
5
+ filterMode: "lenient" | "strict" | undefined;
6
6
  accordion: boolean;
7
7
  }>, {
8
8
  setExpanded: (key: string | number, expanded: boolean) => void;
@@ -19,13 +19,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
19
19
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<TreeProps>, {
20
20
  data: () => never[];
21
21
  defaultExpandAll: boolean;
22
- filterMode: "lenient";
22
+ filterMode: "lenient" | "strict" | undefined;
23
23
  accordion: boolean;
24
24
  }>>>, {
25
25
  accordion: boolean;
26
26
  data: TreeNode[];
27
- defaultExpandAll: boolean;
28
27
  filterMode: "lenient" | "strict";
28
+ defaultExpandAll: boolean;
29
29
  }, {}>;
30
30
  export default _default;
31
31
  type __VLS_WithDefaults<P, D> = {
@@ -43,7 +43,7 @@ import {
43
43
  import {
44
44
  defaultNodeKeys,
45
45
  treeContextSymbol,
46
- treePropsDefaults
46
+ defaultTreeProps
47
47
  } from "./common";
48
48
  import SarTreeBranch from "../tree-branch/tree-branch.vue";
49
49
  import SarPopover from "../popover/popover.vue";
@@ -76,7 +76,7 @@ export default _defineComponent({
76
76
  editable: { type: Boolean, required: false },
77
77
  filterMode: { type: String, required: false },
78
78
  filterMethod: { type: Function, required: false }
79
- }, treePropsDefaults),
79
+ }, defaultTreeProps),
80
80
  setup(__props, { expose: __expose }) {
81
81
  const props = __props;
82
82
  const bem = createBem("tree");
@@ -38,16 +38,16 @@ export interface UploadProps {
38
38
  beforeRemove?: (...args: unknown[]) => boolean | Promise<void>;
39
39
  validateEvent?: boolean;
40
40
  }
41
- export declare const uploadPropsDefaults: {
42
- accept: "image";
43
- sourceType: () => ("album" | "camera")[];
44
- sizeType: () => ("original" | "compressed")[];
41
+ export declare const defaultUploadProps: Omit<{
42
+ accept: "video" | "image" | undefined;
43
+ sourceType: () => ("album" | "camera")[] | undefined;
44
+ sizeType: () => ("original" | "compressed")[] | undefined;
45
45
  maxDuration: number;
46
46
  maxCount: number;
47
47
  maxSize: number;
48
48
  removable: boolean;
49
49
  validateEvent: boolean;
50
- };
50
+ }, "sourceType" | "sizeType">;
51
51
  export interface UploadSlots {
52
52
  select?(props: Record<string, never>): any;
53
53
  }
@@ -74,8 +74,8 @@ export interface UploadPreviewProps {
74
74
  disabled?: boolean;
75
75
  readonly?: boolean;
76
76
  }
77
- export declare const uploadPreviewPropsDefaults: {
78
- status: "pending";
77
+ export declare const defaultUploadPreviewProps: {
78
+ status: UploadStatus | undefined;
79
79
  };
80
80
  export interface UploadPreviewEmits {
81
81
  (e: 'image-click', index: number): void;
@@ -1,3 +1,3 @@
1
1
  import { defaultConfig } from '../config';
2
- export const uploadPropsDefaults = defaultConfig.upload;
3
- export const uploadPreviewPropsDefaults = defaultConfig.uploadPreview;
2
+ export const defaultUploadProps = defaultConfig.upload;
3
+ export const defaultUploadPreviewProps = defaultConfig.uploadPreview;
@@ -1,37 +1,35 @@
1
1
  import { type UploadProps, type UploadSlots, type UploadFile, type UploadFileItem } from './common';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<UploadProps>, {
3
- accept: "image";
4
- sourceType: () => ("album" | "camera")[];
5
- sizeType: () => ("original" | "compressed")[];
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<UploadProps>, Omit<{
3
+ accept: "video" | "image" | undefined;
4
+ sourceType: () => ("album" | "camera")[] | undefined;
5
+ sizeType: () => ("original" | "compressed")[] | undefined;
6
6
  maxDuration: number;
7
7
  maxCount: number;
8
8
  maxSize: number;
9
9
  removable: boolean;
10
10
  validateEvent: boolean;
11
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ }, "sourceType" | "sizeType">>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  "update:model-value": (value: UploadFileItem[]) => void;
13
13
  remove: (index: number, item: UploadFileItem) => void;
14
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<UploadProps>, {
15
- accept: "image";
16
- sourceType: () => ("album" | "camera")[];
17
- sizeType: () => ("original" | "compressed")[];
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<UploadProps>, Omit<{
15
+ accept: "video" | "image" | undefined;
16
+ sourceType: () => ("album" | "camera")[] | undefined;
17
+ sizeType: () => ("original" | "compressed")[] | undefined;
18
18
  maxDuration: number;
19
19
  maxCount: number;
20
20
  maxSize: number;
21
21
  removable: boolean;
22
22
  validateEvent: boolean;
23
- }>>> & {
23
+ }, "sourceType" | "sizeType">>>> & {
24
24
  "onUpdate:model-value"?: ((value: UploadFileItem[]) => any) | undefined;
25
25
  onRemove?: ((index: number, item: UploadFileItem) => any) | undefined;
26
26
  }, {
27
- validateEvent: boolean;
28
27
  accept: "video" | "image";
29
- sourceType: ("album" | "camera")[];
30
- sizeType: ("original" | "compressed")[];
31
28
  maxDuration: number;
32
29
  maxCount: number;
33
30
  maxSize: number | ((file: UploadFile) => boolean);
34
31
  removable: boolean;
32
+ validateEvent: boolean;
35
33
  }, {}>, Readonly<UploadSlots> & UploadSlots>;
36
34
  export default _default;
37
35
  type __VLS_WithDefaults<P, D> = {
@@ -50,7 +50,7 @@ import SarUploadPreview from "../upload-preview/upload-preview.vue";
50
50
  import SarIcon from "../icon/icon.vue";
51
51
  import { chooseMedia } from "./utils";
52
52
  import {
53
- uploadPropsDefaults
53
+ defaultUploadProps
54
54
  } from "./common";
55
55
  import { useFormContext, useFormItemContext } from "../form/common";
56
56
  export default _defineComponent({
@@ -81,7 +81,7 @@ export default _defineComponent({
81
81
  removable: { type: Boolean, required: false },
82
82
  beforeRemove: { type: Function, required: false },
83
83
  validateEvent: { type: Boolean, required: false }
84
- }, uploadPropsDefaults),
84
+ }, defaultUploadProps),
85
85
  emits: ["update:model-value", "remove"],
86
86
  setup(__props, { expose: __expose, emit: __emit }) {
87
87
  __expose();
@@ -1,11 +1,11 @@
1
1
  import { type UploadPreviewProps } from '../upload/common';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<UploadPreviewProps>, {
3
- status: "pending";
3
+ status: import("../upload/common").UploadStatus | undefined;
4
4
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
5
  "image-click": (index: number) => void;
6
6
  remove: (index: number) => void;
7
7
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<UploadPreviewProps>, {
8
- status: "pending";
8
+ status: import("../upload/common").UploadStatus | undefined;
9
9
  }>>> & {
10
10
  onRemove?: ((index: number) => any) | undefined;
11
11
  "onImage-click"?: ((index: number) => any) | undefined;
@@ -66,7 +66,7 @@ import {
66
66
  import SarIcon from "../icon/icon.vue";
67
67
  import SarLoading from "../loading/loading.vue";
68
68
  import {
69
- uploadPreviewPropsDefaults
69
+ defaultUploadPreviewProps
70
70
  } from "../upload/common";
71
71
  export default _defineComponent({
72
72
  ...{
@@ -91,7 +91,7 @@ export default _defineComponent({
91
91
  index: { type: Number, required: true },
92
92
  disabled: { type: Boolean, required: false },
93
93
  readonly: { type: Boolean, required: false }
94
- }, uploadPreviewPropsDefaults),
94
+ }, defaultUploadPreviewProps),
95
95
  emits: ["image-click", "remove"],
96
96
  setup(__props, { expose: __expose, emit: __emit }) {
97
97
  __expose();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "sard-uniapp",
3
3
  "name": "sard-uniapp",
4
4
  "displayName": "sard-uniapp",
5
- "version": "1.6.1",
5
+ "version": "1.7.0",
6
6
  "type": "module",
7
7
  "description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
8
8
  "keywords": [