@tplc/wot 0.0.1 → 0.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 (224) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/components/composables/useParent.ts +1 -1
  3. package/components/wd-table/types.ts +1 -1
  4. package/components/wd-table-col/wd-table-col.vue +1 -1
  5. package/global.d.ts +91 -102
  6. package/package.json +10 -1
  7. package/tsconfig.dts.json +9 -0
  8. package/types/components/common/AbortablePromise.d.ts +8 -0
  9. package/types/components/common/base64.d.ts +1 -0
  10. package/types/components/common/canvasHelper.d.ts +6 -0
  11. package/types/components/common/clickoutside.d.ts +4 -0
  12. package/types/components/common/dayjs.d.ts +26 -0
  13. package/types/components/common/props.d.ts +47 -0
  14. package/types/components/common/util.d.ts +263 -0
  15. package/types/components/composables/useCell.d.ts +3 -0
  16. package/types/components/composables/useChildren.d.ts +9 -0
  17. package/types/components/composables/useCountDown.d.ts +20 -0
  18. package/types/components/composables/useLockScroll.d.ts +5 -0
  19. package/types/components/composables/useParent.d.ts +15 -0
  20. package/types/components/composables/usePopover.d.ts +9 -0
  21. package/types/components/composables/useQueue.d.ts +13 -0
  22. package/types/components/composables/useRaf.d.ts +6 -0
  23. package/types/components/composables/useTouch.d.ts +11 -0
  24. package/types/components/composables/useTranslate.d.ts +3 -0
  25. package/types/components/wd-action-sheet/types.d.ts +145 -0
  26. package/types/components/wd-action-sheet/wd-action-sheet.vue.d.ts +145 -0
  27. package/types/components/wd-backtop/types.d.ts +66 -0
  28. package/types/components/wd-backtop/wd-backtop.vue.d.ts +101 -0
  29. package/types/components/wd-badge/types.d.ts +53 -0
  30. package/types/components/wd-badge/wd-badge.vue.d.ts +71 -0
  31. package/types/components/wd-button/types.d.ts +125 -0
  32. package/types/components/wd-button/wd-button.vue.d.ts +157 -0
  33. package/types/components/wd-calendar/types.d.ts +283 -0
  34. package/types/components/wd-calendar/wd-calendar.vue.d.ts +324 -0
  35. package/types/components/wd-calendar-view/month/month.vue.d.ts +79 -0
  36. package/types/components/wd-calendar-view/month/types.d.ts +38 -0
  37. package/types/components/wd-calendar-view/monthPanel/month-panel.vue.d.ts +113 -0
  38. package/types/components/wd-calendar-view/monthPanel/types.d.ts +70 -0
  39. package/types/components/wd-calendar-view/types.d.ts +131 -0
  40. package/types/components/wd-calendar-view/utils.d.ts +121 -0
  41. package/types/components/wd-calendar-view/wd-calendar-view.vue.d.ts +141 -0
  42. package/types/components/wd-calendar-view/year/types.d.ts +34 -0
  43. package/types/components/wd-calendar-view/year/year.vue.d.ts +71 -0
  44. package/types/components/wd-calendar-view/yearPanel/types.d.ts +53 -0
  45. package/types/components/wd-calendar-view/yearPanel/year-panel.vue.d.ts +81 -0
  46. package/types/components/wd-card/types.d.ts +42 -0
  47. package/types/components/wd-card/wd-card.vue.d.ts +63 -0
  48. package/types/components/wd-cell/types.d.ts +129 -0
  49. package/types/components/wd-cell/wd-cell.vue.d.ts +163 -0
  50. package/types/components/wd-cell-group/types.d.ts +40 -0
  51. package/types/components/wd-cell-group/wd-cell-group.vue.d.ts +54 -0
  52. package/types/components/wd-checkbox/types.d.ts +75 -0
  53. package/types/components/wd-checkbox/wd-checkbox.vue.d.ts +106 -0
  54. package/types/components/wd-checkbox-group/types.d.ts +78 -0
  55. package/types/components/wd-checkbox-group/wd-checkbox-group.vue.d.ts +103 -0
  56. package/types/components/wd-circle/types.d.ts +77 -0
  57. package/types/components/wd-circle/wd-circle.vue.d.ts +106 -0
  58. package/types/components/wd-col/types.d.ts +26 -0
  59. package/types/components/wd-col/wd-col.vue.d.ts +48 -0
  60. package/types/components/wd-col-picker/types.d.ts +226 -0
  61. package/types/components/wd-col-picker/wd-col-picker.vue.d.ts +269 -0
  62. package/types/components/wd-collapse/types.d.ts +70 -0
  63. package/types/components/wd-collapse/wd-collapse.vue.d.ts +92 -0
  64. package/types/components/wd-collapse-item/types.d.ts +46 -0
  65. package/types/components/wd-collapse-item/wd-collapse-item.vue.d.ts +65 -0
  66. package/types/components/wd-config-provider/types.d.ts +874 -0
  67. package/types/components/wd-config-provider/wd-config-provider.vue.d.ts +48 -0
  68. package/types/components/wd-count-down/types.d.ts +55 -0
  69. package/types/components/wd-count-down/utils.d.ts +8 -0
  70. package/types/components/wd-count-down/wd-count-down.vue.d.ts +77 -0
  71. package/types/components/wd-count-to/types.d.ts +125 -0
  72. package/types/components/wd-count-to/wd-count-to.vue.d.ts +154 -0
  73. package/types/components/wd-curtain/types.d.ts +53 -0
  74. package/types/components/wd-curtain/wd-curtain.vue.d.ts +91 -0
  75. package/types/components/wd-datetime-picker/types.d.ts +297 -0
  76. package/types/components/wd-datetime-picker/wd-datetime-picker.vue.d.ts +354 -0
  77. package/types/components/wd-datetime-picker-view/types.d.ts +148 -0
  78. package/types/components/wd-datetime-picker-view/wd-datetime-picker-view.vue.d.ts +184 -0
  79. package/types/components/wd-divider/types.d.ts +19 -0
  80. package/types/components/wd-divider/wd-divider.vue.d.ts +39 -0
  81. package/types/components/wd-drop-menu/types.d.ts +54 -0
  82. package/types/components/wd-drop-menu/wd-drop-menu.vue.d.ts +75 -0
  83. package/types/components/wd-drop-menu-item/types.d.ts +106 -0
  84. package/types/components/wd-drop-menu-item/wd-drop-menu-item.vue.d.ts +145 -0
  85. package/types/components/wd-fab/types.d.ts +88 -0
  86. package/types/components/wd-fab/wd-fab.vue.d.ts +127 -0
  87. package/types/components/wd-form/types.d.ts +79 -0
  88. package/types/components/wd-form/wd-form.vue.d.ts +72 -0
  89. package/types/components/wd-form-item/types.d.ts +32 -0
  90. package/types/components/wd-form-item/wd-form-item.vue.d.ts +73 -0
  91. package/types/components/wd-gap/types.d.ts +31 -0
  92. package/types/components/wd-gap/wd-gap.vue.d.ts +50 -0
  93. package/types/components/wd-grid/types.d.ts +59 -0
  94. package/types/components/wd-grid/wd-grid.vue.d.ts +70 -0
  95. package/types/components/wd-grid-item/types.d.ts +101 -0
  96. package/types/components/wd-grid-item/wd-grid-item.vue.d.ts +134 -0
  97. package/types/components/wd-icon/types.d.ts +32 -0
  98. package/types/components/wd-icon/wd-icon.vue.d.ts +50 -0
  99. package/types/components/wd-img/types.d.ts +59 -0
  100. package/types/components/wd-img/wd-img.vue.d.ts +92 -0
  101. package/types/components/wd-img-cropper/types.d.ts +101 -0
  102. package/types/components/wd-img-cropper/wd-img-cropper.vue.d.ts +124 -0
  103. package/types/components/wd-index-anchor/type.d.ts +16 -0
  104. package/types/components/wd-index-anchor/wd-index-anchor.vue.d.ts +40 -0
  105. package/types/components/wd-index-bar/type.d.ts +26 -0
  106. package/types/components/wd-index-bar/wd-index-bar.vue.d.ts +23 -0
  107. package/types/components/wd-input/types.d.ts +271 -0
  108. package/types/components/wd-input/wd-input.vue.d.ts +369 -0
  109. package/types/components/wd-input-number/types.d.ts +108 -0
  110. package/types/components/wd-input-number/wd-input-number.vue.d.ts +158 -0
  111. package/types/components/wd-loading/types.d.ts +34 -0
  112. package/types/components/wd-loading/wd-loading.vue.d.ts +50 -0
  113. package/types/components/wd-loadmore/types.d.ts +31 -0
  114. package/types/components/wd-loadmore/wd-loadmore.vue.d.ts +43 -0
  115. package/types/components/wd-message-box/index.d.ts +9 -0
  116. package/types/components/wd-message-box/types.d.ts +99 -0
  117. package/types/components/wd-message-box/wd-message-box.vue.d.ts +32 -0
  118. package/types/components/wd-navbar/types.d.ts +80 -0
  119. package/types/components/wd-navbar/wd-navbar.vue.d.ts +117 -0
  120. package/types/components/wd-navbar-capsule/wd-navbar-capsule.vue.d.ts +8 -0
  121. package/types/components/wd-notice-bar/types.d.ts +81 -0
  122. package/types/components/wd-notice-bar/wd-notice-bar.vue.d.ts +118 -0
  123. package/types/components/wd-notify/index.d.ts +8 -0
  124. package/types/components/wd-notify/types.d.ts +87 -0
  125. package/types/components/wd-notify/wd-notify.vue.d.ts +105 -0
  126. package/types/components/wd-number-keyboard/key/index.vue.d.ts +54 -0
  127. package/types/components/wd-number-keyboard/key/types.d.ts +23 -0
  128. package/types/components/wd-number-keyboard/types.d.ts +118 -0
  129. package/types/components/wd-number-keyboard/wd-number-keyboard.vue.d.ts +158 -0
  130. package/types/components/wd-overlay/types.d.ts +39 -0
  131. package/types/components/wd-overlay/wd-overlay.vue.d.ts +70 -0
  132. package/types/components/wd-pagination/types.d.ts +67 -0
  133. package/types/components/wd-pagination/wd-pagination.vue.d.ts +95 -0
  134. package/types/components/wd-password-input/types.d.ts +59 -0
  135. package/types/components/wd-password-input/wd-password-input.vue.d.ts +90 -0
  136. package/types/components/wd-picker/types.d.ts +234 -0
  137. package/types/components/wd-picker/wd-picker.vue.d.ts +276 -0
  138. package/types/components/wd-picker-view/types.d.ts +100 -0
  139. package/types/components/wd-picker-view/wd-picker-view.vue.d.ts +119 -0
  140. package/types/components/wd-popover/types.d.ts +86 -0
  141. package/types/components/wd-popover/wd-popover.vue.d.ts +138 -0
  142. package/types/components/wd-popup/types.d.ts +96 -0
  143. package/types/components/wd-popup/wd-popup.vue.d.ts +160 -0
  144. package/types/components/wd-progress/types.d.ts +44 -0
  145. package/types/components/wd-progress/wd-progress.vue.d.ts +61 -0
  146. package/types/components/wd-radio/types.d.ts +40 -0
  147. package/types/components/wd-radio/wd-radio.vue.d.ts +73 -0
  148. package/types/components/wd-radio-group/types.d.ts +54 -0
  149. package/types/components/wd-radio-group/wd-radio-group.vue.d.ts +85 -0
  150. package/types/components/wd-rate/types.d.ts +110 -0
  151. package/types/components/wd-rate/wd-rate.vue.d.ts +128 -0
  152. package/types/components/wd-resize/types.d.ts +14 -0
  153. package/types/components/wd-resize/wd-resize.vue.d.ts +43 -0
  154. package/types/components/wd-row/types.d.ts +24 -0
  155. package/types/components/wd-row/wd-row.vue.d.ts +39 -0
  156. package/types/components/wd-search/types.d.ts +104 -0
  157. package/types/components/wd-search/wd-search.vue.d.ts +132 -0
  158. package/types/components/wd-segmented/types.d.ts +69 -0
  159. package/types/components/wd-segmented/wd-segmented.vue.d.ts +87 -0
  160. package/types/components/wd-select-picker/types.d.ts +180 -0
  161. package/types/components/wd-select-picker/wd-select-picker.vue.d.ts +316 -0
  162. package/types/components/wd-sidebar/types.d.ts +24 -0
  163. package/types/components/wd-sidebar/wd-sidebar.vue.d.ts +45 -0
  164. package/types/components/wd-sidebar-item/types.d.ts +44 -0
  165. package/types/components/wd-sidebar-item/wd-sidebar-item.vue.d.ts +80 -0
  166. package/types/components/wd-skeleton/types.d.ts +72 -0
  167. package/types/components/wd-skeleton/wd-skeleton.vue.d.ts +68 -0
  168. package/types/components/wd-slider/types.d.ts +117 -0
  169. package/types/components/wd-slider/wd-slider.vue.d.ts +134 -0
  170. package/types/components/wd-sort-button/types.d.ts +58 -0
  171. package/types/components/wd-sort-button/wd-sort-button.vue.d.ts +74 -0
  172. package/types/components/wd-status-tip/types.d.ts +60 -0
  173. package/types/components/wd-status-tip/wd-status-tip.vue.d.ts +59 -0
  174. package/types/components/wd-step/types.d.ts +33 -0
  175. package/types/components/wd-step/wd-step.vue.d.ts +40 -0
  176. package/types/components/wd-steps/types.d.ts +59 -0
  177. package/types/components/wd-steps/wd-steps.vue.d.ts +68 -0
  178. package/types/components/wd-sticky/types.d.ts +24 -0
  179. package/types/components/wd-sticky/wd-sticky.vue.d.ts +59 -0
  180. package/types/components/wd-sticky-box/types.d.ts +9 -0
  181. package/types/components/wd-sticky-box/wd-sticky-box.vue.d.ts +30 -0
  182. package/types/components/wd-swipe-action/types.d.ts +42 -0
  183. package/types/components/wd-swipe-action/wd-swipe-action.vue.d.ts +61 -0
  184. package/types/components/wd-swiper/types.d.ts +213 -0
  185. package/types/components/wd-swiper/wd-swiper.vue.d.ts +236 -0
  186. package/types/components/wd-swiper-nav/types.d.ts +66 -0
  187. package/types/components/wd-swiper-nav/wd-swiper-nav.vue.d.ts +90 -0
  188. package/types/components/wd-switch/types.d.ts +65 -0
  189. package/types/components/wd-switch/wd-switch.vue.d.ts +82 -0
  190. package/types/components/wd-tab/types.d.ts +27 -0
  191. package/types/components/wd-tab/wd-tab.vue.d.ts +46 -0
  192. package/types/components/wd-tabbar/types.d.ts +87 -0
  193. package/types/components/wd-tabbar/wd-tabbar.vue.d.ts +103 -0
  194. package/types/components/wd-tabbar-item/types.d.ts +53 -0
  195. package/types/components/wd-tabbar-item/wd-tabbar-item.vue.d.ts +61 -0
  196. package/types/components/wd-table/types.d.ts +95 -0
  197. package/types/components/wd-table/wd-table.vue.d.ts +138 -0
  198. package/types/components/wd-table-col/types.d.ts +58 -0
  199. package/types/components/wd-table-col/wd-table-col.vue.d.ts +70 -0
  200. package/types/components/wd-tabs/types.d.ts +96 -0
  201. package/types/components/wd-tabs/wd-tabs.vue.d.ts +139 -0
  202. package/types/components/wd-tag/types.d.ts +104 -0
  203. package/types/components/wd-tag/wd-tag.vue.d.ts +130 -0
  204. package/types/components/wd-text/types.d.ts +128 -0
  205. package/types/components/wd-text/wd-text.vue.d.ts +131 -0
  206. package/types/components/wd-textarea/types.d.ts +363 -0
  207. package/types/components/wd-textarea/wd-textarea.vue.d.ts +390 -0
  208. package/types/components/wd-toast/index.d.ts +15 -0
  209. package/types/components/wd-toast/types.d.ts +62 -0
  210. package/types/components/wd-toast/wd-toast.vue.d.ts +32 -0
  211. package/types/components/wd-tooltip/types.d.ts +106 -0
  212. package/types/components/wd-tooltip/wd-tooltip.vue.d.ts +133 -0
  213. package/types/components/wd-transition/types.d.ts +98 -0
  214. package/types/components/wd-transition/wd-transition.vue.d.ts +136 -0
  215. package/types/components/wd-upload/types.d.ts +396 -0
  216. package/types/components/wd-upload/utils.d.ts +2 -0
  217. package/types/components/wd-upload/wd-upload.vue.d.ts +283 -0
  218. package/types/components/wd-video-preview/types.d.ts +22 -0
  219. package/types/components/wd-video-preview/wd-video-preview.vue.d.ts +27 -0
  220. package/types/components/wd-watermark/types.d.ts +131 -0
  221. package/types/components/wd-watermark/wd-watermark.vue.d.ts +176 -0
  222. package/types/locale/index.d.ts +9 -0
  223. package/types/locale/lang/zh-CN.d.ts +128 -0
  224. package/components/wot-design-uni/wot-design-uni.vue +0 -14
@@ -0,0 +1,69 @@
1
+ import type { PropType } from 'vue';
2
+ export type SegmentedType = 'large' | 'middle' | 'small';
3
+ export interface SegmentedOption {
4
+ value: string | number;
5
+ disabled?: boolean;
6
+ payload?: any;
7
+ }
8
+ export declare const segmentedProps: {
9
+ /**
10
+ * 当前选中的值
11
+ * 类型: string | number
12
+ * 最低版本: 0.1.23
13
+ */
14
+ value: {
15
+ type: (NumberConstructor | StringConstructor)[];
16
+ required: true;
17
+ };
18
+ /**
19
+ * 是否禁用分段器
20
+ * 类型: boolean
21
+ * 默认值: false
22
+ * 最低版本: 0.1.23
23
+ */
24
+ disabled: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ /**
29
+ * 控件尺寸
30
+ * 类型: string
31
+ * 可选值: 'large' | 'middle' | 'small'
32
+ * 默认值: 'middle'
33
+ * 最低版本: 0.1.23
34
+ */
35
+ size: {
36
+ type: PropType<SegmentedType>;
37
+ default: SegmentedType;
38
+ };
39
+ /**
40
+ * 数据集合
41
+ * 类型: string[] | number[] | SegmentedOption[]
42
+ * 必需: 是
43
+ * 默认值: []
44
+ * 最低版本: 0.1.23
45
+ */
46
+ options: {
47
+ type: PropType<string[] | number[] | SegmentedOption[]>;
48
+ required: boolean;
49
+ default: () => never[];
50
+ };
51
+ /**
52
+ * 切换选项时是否振动
53
+ * 类型: boolean
54
+ * 默认值: false
55
+ * 最低版本: 0.1.23
56
+ */
57
+ vibrateShort: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ customStyle: {
62
+ type: PropType<string>;
63
+ default: string;
64
+ };
65
+ customClass: {
66
+ type: PropType<string>;
67
+ default: string;
68
+ };
69
+ };
@@ -0,0 +1,87 @@
1
+ import { type SegmentedOption } from './types';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
+ value: {
4
+ type: (NumberConstructor | StringConstructor)[];
5
+ required: true;
6
+ };
7
+ disabled: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ size: {
12
+ type: import("vue").PropType<import("./types").SegmentedType>;
13
+ default: import("./types").SegmentedType;
14
+ };
15
+ options: {
16
+ type: import("vue").PropType<string[] | number[] | SegmentedOption[]>;
17
+ required: boolean;
18
+ default: () => never[];
19
+ };
20
+ vibrateShort: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ customStyle: {
25
+ type: import("vue").PropType<string>;
26
+ default: string;
27
+ };
28
+ customClass: {
29
+ type: import("vue").PropType<string>;
30
+ default: string;
31
+ };
32
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
+ click: (...args: any[]) => void;
34
+ change: (...args: any[]) => void;
35
+ "update:value": (...args: any[]) => void;
36
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
37
+ value: {
38
+ type: (NumberConstructor | StringConstructor)[];
39
+ required: true;
40
+ };
41
+ disabled: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ size: {
46
+ type: import("vue").PropType<import("./types").SegmentedType>;
47
+ default: import("./types").SegmentedType;
48
+ };
49
+ options: {
50
+ type: import("vue").PropType<string[] | number[] | SegmentedOption[]>;
51
+ required: boolean;
52
+ default: () => never[];
53
+ };
54
+ vibrateShort: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ customStyle: {
59
+ type: import("vue").PropType<string>;
60
+ default: string;
61
+ };
62
+ customClass: {
63
+ type: import("vue").PropType<string>;
64
+ default: string;
65
+ };
66
+ }>> & {
67
+ onChange?: ((...args: any[]) => any) | undefined;
68
+ onClick?: ((...args: any[]) => any) | undefined;
69
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
70
+ }, {
71
+ customStyle: string;
72
+ customClass: string;
73
+ options: string[] | number[] | SegmentedOption[];
74
+ disabled: boolean;
75
+ size: import("./types").SegmentedType;
76
+ vibrateShort: boolean;
77
+ }, {}>, {
78
+ label?(_: {
79
+ option: SegmentedOption;
80
+ }): any;
81
+ }>;
82
+ export default _default;
83
+ type __VLS_WithTemplateSlots<T, S> = T & {
84
+ new (): {
85
+ $slots: S;
86
+ };
87
+ };
@@ -0,0 +1,180 @@
1
+ import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue';
2
+ import type { FormItemRule } from '../wd-form/types';
3
+ export type SelectPickerType = 'checkbox' | 'radio';
4
+ export declare const selectPickerProps: {
5
+ /** 选择器左侧文案 */
6
+ label: StringConstructor;
7
+ /** 设置左侧标题宽度 */
8
+ labelWidth: {
9
+ type: PropType<string>;
10
+ default: string;
11
+ };
12
+ /** 禁用 */
13
+ disabled: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ /** 只读 */
18
+ readonly: BooleanConstructor;
19
+ /** 选择器占位符 */
20
+ placeholder: StringConstructor;
21
+ /** 弹出层标题 */
22
+ title: StringConstructor;
23
+ /** 选择器的值靠右展示 */
24
+ alignRight: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ /** 是否为错误状态,错误状态时右侧内容为红色 */
29
+ error: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ /** 必填样式 */
34
+ required: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ /** 使用 label 插槽时设置该选项 */
39
+ useLabelSlot: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ /** 使用默认插槽时设置该选项 */
44
+ useDefaultSlot: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ /** 设置选择器大小 */
49
+ size: StringConstructor;
50
+ /** 选中的颜色(单/复选框) */
51
+ checkedColor: StringConstructor;
52
+ /** 最小选中的数量(仅在复选框类型下生效,`type`类型为`checkbox`) */
53
+ min: {
54
+ type: NumberConstructor;
55
+ default: number;
56
+ };
57
+ /** 最大选中的数量,0 为无限数量,默认为 0(仅在复选框类型下生效,`type`类型为`checkbox`) */
58
+ max: {
59
+ type: NumberConstructor;
60
+ default: number;
61
+ };
62
+ /** 设置 picker 内部的选项组尺寸大小 (单/复选框) */
63
+ selectSize: StringConstructor;
64
+ /** 加载中 */
65
+ loading: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ /** 加载的颜色,只能使用十六进制的色值写法,且不能使用缩写 */
70
+ loadingColor: {
71
+ type: PropType<string>;
72
+ default: string;
73
+ };
74
+ /** 点击遮罩是否关闭 */
75
+ closeOnClickModal: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ /** 选中项,`type`类型为`checkbox`时,类型为 array;`type`为`radio` 时 ,类型为 number / boolean / string */
80
+ modelValue: {
81
+ type: PropType<string | number | boolean | (string | number | boolean)[]>;
82
+ required: true;
83
+ };
84
+ /** 选择器数据,一维数组 */
85
+ columns: {
86
+ type: PropType<Record<string, any>[]>;
87
+ default: () => never[];
88
+ };
89
+ /** 单复选选择器类型 */
90
+ type: {
91
+ type: PropType<SelectPickerType>;
92
+ default: SelectPickerType;
93
+ };
94
+ /** 选项对象中,value 对应的 key */
95
+ valueKey: {
96
+ type: PropType<string>;
97
+ default: string;
98
+ };
99
+ /** 选项对象中,展示的文本对应的 key */
100
+ labelKey: {
101
+ type: PropType<string>;
102
+ default: string;
103
+ };
104
+ /** 确认按钮文案 */
105
+ confirmButtonText: StringConstructor;
106
+ /** 自定义展示文案的格式化函数,返回一个字符串 */
107
+ displayFormat: PropType<SelectPickerDisplayFormat>;
108
+ /** 确定前校验函数,接收 (value, resolve) 参数,通过 resolve 继续执行 picker,resolve 接收 1 个 boolean 参数 */
109
+ beforeConfirm: PropType<SelectPickerBeforeConfirm>;
110
+ /** 弹窗层级 */
111
+ zIndex: {
112
+ type: NumberConstructor;
113
+ default: number;
114
+ };
115
+ /** 弹出面板是否设置底部安全距离(iphone X 类型的机型) */
116
+ safeAreaInsetBottom: {
117
+ type: BooleanConstructor;
118
+ default: boolean;
119
+ };
120
+ /** 可搜索(目前只支持本地搜索) */
121
+ filterable: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ /** 搜索框占位符 */
126
+ filterPlaceholder: StringConstructor;
127
+ /** 是否超出隐藏 */
128
+ ellipsis: {
129
+ type: BooleanConstructor;
130
+ default: boolean;
131
+ };
132
+ /** 重新打开是否滚动到选中项 */
133
+ scrollIntoView: {
134
+ type: BooleanConstructor;
135
+ default: boolean;
136
+ };
137
+ /** 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 */
138
+ prop: StringConstructor;
139
+ /** 表单验证规则,结合`wd-form`组件使用 */
140
+ rules: {
141
+ type: PropType<FormItemRule[]>;
142
+ default: () => never[];
143
+ };
144
+ /** 自定义内容样式类 */
145
+ customContentClass: {
146
+ type: PropType<string>;
147
+ default: string;
148
+ };
149
+ /** 自定义标签样式类 */
150
+ customLabelClass: {
151
+ type: PropType<string>;
152
+ default: string;
153
+ };
154
+ /** 自定义值样式类 */
155
+ customValueClass: {
156
+ type: PropType<string>;
157
+ default: string;
158
+ };
159
+ /** 是否显示确认按钮(radio类型生效),默认值为:true */
160
+ showConfirm: {
161
+ type: BooleanConstructor;
162
+ default: boolean;
163
+ };
164
+ customStyle: {
165
+ type: PropType<string>;
166
+ default: string;
167
+ };
168
+ customClass: {
169
+ type: PropType<string>;
170
+ default: string;
171
+ };
172
+ };
173
+ export type SelectPickerProps = ExtractPropTypes<typeof selectPickerProps>;
174
+ export type SelectPickerDisplayFormat = (items: string | number | boolean | (string | number | boolean)[], columns: Record<string, any>[]) => string;
175
+ export type SelectPickerBeforeConfirm = (value: string | number | boolean | (string | number | boolean)[], resolve: (isPass: boolean) => void) => void;
176
+ export type SelectPickerExpose = {
177
+ open: () => void;
178
+ close: () => void;
179
+ };
180
+ export type SelectPickerInstance = ComponentPublicInstance<SelectPickerExpose, SelectPickerProps>;
@@ -0,0 +1,316 @@
1
+ import { type FormItemRule } from '../wd-form/types';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
+ label: StringConstructor;
4
+ labelWidth: {
5
+ type: import("vue").PropType<string>;
6
+ default: string;
7
+ };
8
+ disabled: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ readonly: BooleanConstructor;
13
+ placeholder: StringConstructor;
14
+ title: StringConstructor;
15
+ alignRight: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ error: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ required: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ useLabelSlot: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
31
+ useDefaultSlot: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ size: StringConstructor;
36
+ checkedColor: StringConstructor;
37
+ min: {
38
+ type: NumberConstructor;
39
+ default: number;
40
+ };
41
+ max: {
42
+ type: NumberConstructor;
43
+ default: number;
44
+ };
45
+ selectSize: StringConstructor;
46
+ loading: {
47
+ type: BooleanConstructor;
48
+ default: boolean;
49
+ };
50
+ loadingColor: {
51
+ type: import("vue").PropType<string>;
52
+ default: string;
53
+ };
54
+ closeOnClickModal: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ modelValue: {
59
+ type: import("vue").PropType<string | number | boolean | (string | number | boolean)[]>;
60
+ required: true;
61
+ };
62
+ columns: {
63
+ type: import("vue").PropType<Record<string, any>[]>;
64
+ default: () => never[];
65
+ };
66
+ type: {
67
+ type: import("vue").PropType<import("./types").SelectPickerType>;
68
+ default: import("./types").SelectPickerType;
69
+ };
70
+ valueKey: {
71
+ type: import("vue").PropType<string>;
72
+ default: string;
73
+ };
74
+ labelKey: {
75
+ type: import("vue").PropType<string>;
76
+ default: string;
77
+ };
78
+ confirmButtonText: StringConstructor;
79
+ displayFormat: import("vue").PropType<import("./types").SelectPickerDisplayFormat>;
80
+ beforeConfirm: import("vue").PropType<import("./types").SelectPickerBeforeConfirm>;
81
+ zIndex: {
82
+ type: NumberConstructor;
83
+ default: number;
84
+ };
85
+ safeAreaInsetBottom: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
88
+ };
89
+ filterable: {
90
+ type: BooleanConstructor;
91
+ default: boolean;
92
+ };
93
+ filterPlaceholder: StringConstructor;
94
+ ellipsis: {
95
+ type: BooleanConstructor;
96
+ default: boolean;
97
+ };
98
+ scrollIntoView: {
99
+ type: BooleanConstructor;
100
+ default: boolean;
101
+ };
102
+ prop: StringConstructor;
103
+ rules: {
104
+ type: import("vue").PropType<FormItemRule[]>;
105
+ default: () => never[];
106
+ };
107
+ customContentClass: {
108
+ type: import("vue").PropType<string>;
109
+ default: string;
110
+ };
111
+ customLabelClass: {
112
+ type: import("vue").PropType<string>;
113
+ default: string;
114
+ };
115
+ customValueClass: {
116
+ type: import("vue").PropType<string>;
117
+ default: string;
118
+ };
119
+ showConfirm: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
123
+ customStyle: {
124
+ type: import("vue").PropType<string>;
125
+ default: string;
126
+ };
127
+ customClass: {
128
+ type: import("vue").PropType<string>;
129
+ default: string;
130
+ };
131
+ }, {
132
+ open: () => void;
133
+ close: () => void;
134
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
135
+ cancel: (...args: any[]) => void;
136
+ close: (...args: any[]) => void;
137
+ open: (...args: any[]) => void;
138
+ "update:modelValue": (...args: any[]) => void;
139
+ change: (...args: any[]) => void;
140
+ confirm: (...args: any[]) => void;
141
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
142
+ label: StringConstructor;
143
+ labelWidth: {
144
+ type: import("vue").PropType<string>;
145
+ default: string;
146
+ };
147
+ disabled: {
148
+ type: BooleanConstructor;
149
+ default: boolean;
150
+ };
151
+ readonly: BooleanConstructor;
152
+ placeholder: StringConstructor;
153
+ title: StringConstructor;
154
+ alignRight: {
155
+ type: BooleanConstructor;
156
+ default: boolean;
157
+ };
158
+ error: {
159
+ type: BooleanConstructor;
160
+ default: boolean;
161
+ };
162
+ required: {
163
+ type: BooleanConstructor;
164
+ default: boolean;
165
+ };
166
+ useLabelSlot: {
167
+ type: BooleanConstructor;
168
+ default: boolean;
169
+ };
170
+ useDefaultSlot: {
171
+ type: BooleanConstructor;
172
+ default: boolean;
173
+ };
174
+ size: StringConstructor;
175
+ checkedColor: StringConstructor;
176
+ min: {
177
+ type: NumberConstructor;
178
+ default: number;
179
+ };
180
+ max: {
181
+ type: NumberConstructor;
182
+ default: number;
183
+ };
184
+ selectSize: StringConstructor;
185
+ loading: {
186
+ type: BooleanConstructor;
187
+ default: boolean;
188
+ };
189
+ loadingColor: {
190
+ type: import("vue").PropType<string>;
191
+ default: string;
192
+ };
193
+ closeOnClickModal: {
194
+ type: BooleanConstructor;
195
+ default: boolean;
196
+ };
197
+ modelValue: {
198
+ type: import("vue").PropType<string | number | boolean | (string | number | boolean)[]>;
199
+ required: true;
200
+ };
201
+ columns: {
202
+ type: import("vue").PropType<Record<string, any>[]>;
203
+ default: () => never[];
204
+ };
205
+ type: {
206
+ type: import("vue").PropType<import("./types").SelectPickerType>;
207
+ default: import("./types").SelectPickerType;
208
+ };
209
+ valueKey: {
210
+ type: import("vue").PropType<string>;
211
+ default: string;
212
+ };
213
+ labelKey: {
214
+ type: import("vue").PropType<string>;
215
+ default: string;
216
+ };
217
+ confirmButtonText: StringConstructor;
218
+ displayFormat: import("vue").PropType<import("./types").SelectPickerDisplayFormat>;
219
+ beforeConfirm: import("vue").PropType<import("./types").SelectPickerBeforeConfirm>;
220
+ zIndex: {
221
+ type: NumberConstructor;
222
+ default: number;
223
+ };
224
+ safeAreaInsetBottom: {
225
+ type: BooleanConstructor;
226
+ default: boolean;
227
+ };
228
+ filterable: {
229
+ type: BooleanConstructor;
230
+ default: boolean;
231
+ };
232
+ filterPlaceholder: StringConstructor;
233
+ ellipsis: {
234
+ type: BooleanConstructor;
235
+ default: boolean;
236
+ };
237
+ scrollIntoView: {
238
+ type: BooleanConstructor;
239
+ default: boolean;
240
+ };
241
+ prop: StringConstructor;
242
+ rules: {
243
+ type: import("vue").PropType<FormItemRule[]>;
244
+ default: () => never[];
245
+ };
246
+ customContentClass: {
247
+ type: import("vue").PropType<string>;
248
+ default: string;
249
+ };
250
+ customLabelClass: {
251
+ type: import("vue").PropType<string>;
252
+ default: string;
253
+ };
254
+ customValueClass: {
255
+ type: import("vue").PropType<string>;
256
+ default: string;
257
+ };
258
+ showConfirm: {
259
+ type: BooleanConstructor;
260
+ default: boolean;
261
+ };
262
+ customStyle: {
263
+ type: import("vue").PropType<string>;
264
+ default: string;
265
+ };
266
+ customClass: {
267
+ type: import("vue").PropType<string>;
268
+ default: string;
269
+ };
270
+ }>> & {
271
+ onCancel?: ((...args: any[]) => any) | undefined;
272
+ onClose?: ((...args: any[]) => any) | undefined;
273
+ onOpen?: ((...args: any[]) => any) | undefined;
274
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
275
+ onChange?: ((...args: any[]) => any) | undefined;
276
+ onConfirm?: ((...args: any[]) => any) | undefined;
277
+ }, {
278
+ closeOnClickModal: boolean;
279
+ zIndex: number;
280
+ safeAreaInsetBottom: boolean;
281
+ customStyle: string;
282
+ customClass: string;
283
+ readonly: boolean;
284
+ type: import("./types").SelectPickerType;
285
+ required: boolean;
286
+ max: number;
287
+ error: boolean;
288
+ disabled: boolean;
289
+ loading: boolean;
290
+ loadingColor: string;
291
+ scrollIntoView: boolean;
292
+ rules: FormItemRule[];
293
+ labelWidth: string;
294
+ useLabelSlot: boolean;
295
+ useDefaultSlot: boolean;
296
+ alignRight: boolean;
297
+ showConfirm: boolean;
298
+ ellipsis: boolean;
299
+ customLabelClass: string;
300
+ customValueClass: string;
301
+ columns: Record<string, any>[];
302
+ customContentClass: string;
303
+ min: number;
304
+ valueKey: string;
305
+ labelKey: string;
306
+ filterable: boolean;
307
+ }, {}>, {
308
+ default?(_: {}): any;
309
+ label?(_: {}): any;
310
+ }>;
311
+ export default _default;
312
+ type __VLS_WithTemplateSlots<T, S> = T & {
313
+ new (): {
314
+ $slots: S;
315
+ };
316
+ };
@@ -0,0 +1,24 @@
1
+ import { type ExtractPropTypes, type InjectionKey } from 'vue';
2
+ export type SidebarProvide = {
3
+ props: Partial<SidebarProps>;
4
+ setChange: (value: number | string, label: string) => void;
5
+ };
6
+ export declare const SIDEBAR_KEY: InjectionKey<SidebarProvide>;
7
+ export declare const sidebarProps: {
8
+ /**
9
+ * 当前导航项的索引
10
+ */
11
+ modelValue: {
12
+ type: (NumberConstructor | StringConstructor)[];
13
+ default: number;
14
+ };
15
+ customStyle: {
16
+ type: import("vue").PropType<string>;
17
+ default: string;
18
+ };
19
+ customClass: {
20
+ type: import("vue").PropType<string>;
21
+ default: string;
22
+ };
23
+ };
24
+ export type SidebarProps = ExtractPropTypes<typeof sidebarProps>;