kb-ui-vue 0.2.0 → 0.4.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 (194) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/Affix/Affix.vue.d.ts +36 -0
  3. package/dist/components/Affix/index.d.ts +4 -0
  4. package/dist/components/Anchor/Anchor.vue.d.ts +25 -0
  5. package/dist/components/Anchor/index.d.ts +4 -0
  6. package/dist/components/AutoComplete/AutoComplete.vue.d.ts +52 -0
  7. package/dist/components/AutoComplete/index.d.ts +4 -0
  8. package/dist/components/BackTop/BackTop.vue.d.ts +35 -0
  9. package/dist/components/BackTop/index.d.ts +4 -0
  10. package/dist/components/Calendar/Calendar.vue.d.ts +17 -0
  11. package/dist/components/Calendar/index.d.ts +1 -1
  12. package/dist/components/Cascader/Cascader.vue.d.ts +22 -5
  13. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -0
  14. package/dist/components/ConfigProvider/ConfigProvider.vue.d.ts +30 -0
  15. package/dist/components/ConfigProvider/index.d.ts +4 -0
  16. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +42 -0
  17. package/dist/components/ContextMenu/index.d.ts +4 -0
  18. package/dist/components/DatePicker/DatePicker.vue.d.ts +18 -4
  19. package/dist/components/DatePicker/index.d.ts +1 -1
  20. package/dist/components/Empty/Empty.vue.d.ts +1 -1
  21. package/dist/components/FloatButton/FloatButton.vue.d.ts +48 -0
  22. package/dist/components/FloatButton/FloatButtonGroup.vue.d.ts +38 -0
  23. package/dist/components/FloatButton/index.d.ts +5 -0
  24. package/dist/components/Image/Image.vue.d.ts +37 -0
  25. package/dist/components/Image/index.d.ts +4 -0
  26. package/dist/components/ImagePreview/ImagePreview.vue.d.ts +28 -0
  27. package/dist/components/ImagePreview/index.d.ts +4 -0
  28. package/dist/components/Layout/Content.vue.d.ts +13 -0
  29. package/dist/components/Layout/Footer.vue.d.ts +13 -0
  30. package/dist/components/Layout/Header.vue.d.ts +13 -0
  31. package/dist/components/Layout/Layout.vue.d.ts +19 -0
  32. package/dist/components/Layout/Sider.vue.d.ts +37 -0
  33. package/dist/components/Layout/constants.d.ts +7 -0
  34. package/dist/components/Layout/index.d.ts +8 -0
  35. package/dist/components/List/List.vue.d.ts +1 -0
  36. package/dist/components/Mentions/Mentions.vue.d.ts +37 -0
  37. package/dist/components/Mentions/index.d.ts +5 -0
  38. package/dist/components/Mentions/types.d.ts +10 -0
  39. package/dist/components/Popconfirm/Popconfirm.vue.d.ts +2 -1
  40. package/dist/components/QRCode/QRCode.vue.d.ts +36 -0
  41. package/dist/components/QRCode/index.d.ts +4 -0
  42. package/dist/components/QRCode/qrcode.d.ts +34 -0
  43. package/dist/components/Search/Search.vue.d.ts +4 -0
  44. package/dist/components/Splitter/Splitter.vue.d.ts +34 -0
  45. package/dist/components/Splitter/index.d.ts +4 -0
  46. package/dist/components/Table/Table.vue.d.ts +41 -3
  47. package/dist/components/TimePicker/TimePicker.vue.d.ts +28 -0
  48. package/dist/components/TimePicker/index.d.ts +4 -0
  49. package/dist/components/Tour/Tour.vue.d.ts +37 -0
  50. package/dist/components/Tour/index.d.ts +4 -0
  51. package/dist/components/Transfer/Transfer.vue.d.ts +17 -1
  52. package/dist/components/Tree/Tree.vue.d.ts +25 -1
  53. package/dist/components/TreeSelect/TreeSelect.vue.d.ts +32 -0
  54. package/dist/components/TreeSelect/index.d.ts +4 -0
  55. package/dist/components/Upload/Upload.vue.d.ts +1 -1
  56. package/dist/components/VirtualList/VirtualList.vue.d.ts +29 -0
  57. package/dist/components/VirtualList/index.d.ts +4 -0
  58. package/dist/components/VirtualList/types.d.ts +12 -0
  59. package/dist/composables/useGlobalConfig.d.ts +45 -0
  60. package/dist/global.d.ts +90 -0
  61. package/dist/index.cjs +3 -1
  62. package/dist/index.d.ts +40 -0
  63. package/dist/index.js +4303 -921
  64. package/dist/locale/en-US.d.ts +2 -0
  65. package/dist/locale/index.d.ts +23 -0
  66. package/dist/locale/types.d.ts +227 -0
  67. package/dist/locale/zh-CN.d.ts +2 -0
  68. package/dist/resolver-map.d.ts +14 -0
  69. package/dist/resolver.cjs +1 -0
  70. package/dist/resolver.d.ts +36 -0
  71. package/dist/resolver.js +32 -0
  72. package/dist/styles/Affix.css +8 -0
  73. package/dist/styles/Alert.css +68 -68
  74. package/dist/styles/Anchor.css +56 -0
  75. package/dist/styles/AutoComplete.css +102 -0
  76. package/dist/styles/Avatar.css +31 -31
  77. package/dist/styles/BackTop.css +39 -0
  78. package/dist/styles/Badge.css +49 -49
  79. package/dist/styles/Breadcrumb.css +28 -28
  80. package/dist/styles/Button.css +108 -108
  81. package/dist/styles/Calendar.css +89 -79
  82. package/dist/styles/Card.css +40 -40
  83. package/dist/styles/Carousel.css +87 -87
  84. package/dist/styles/Cascader.css +121 -75
  85. package/dist/styles/Checkbox.css +77 -62
  86. package/dist/styles/Collapse.css +49 -49
  87. package/dist/styles/ColorPicker.css +36 -36
  88. package/dist/styles/ContextMenu.css +58 -0
  89. package/dist/styles/CountUp.css +4 -4
  90. package/dist/styles/DatePicker.css +63 -33
  91. package/dist/styles/Descriptions.css +44 -44
  92. package/dist/styles/Dialog.css +42 -42
  93. package/dist/styles/Divider.css +37 -37
  94. package/dist/styles/Drawer.css +81 -81
  95. package/dist/styles/Dropdown.css +40 -40
  96. package/dist/styles/Empty.css +24 -24
  97. package/dist/styles/FloatButton.css +214 -0
  98. package/dist/styles/Form.css +33 -33
  99. package/dist/styles/Grid.css +194 -194
  100. package/dist/styles/Icon.css +5 -5
  101. package/dist/styles/Image.css +48 -0
  102. package/dist/styles/ImagePreview.css +99 -0
  103. package/dist/styles/Input.css +79 -79
  104. package/dist/styles/InputNumber.css +40 -40
  105. package/dist/styles/InputPassword.css +42 -42
  106. package/dist/styles/Layout.css +83 -0
  107. package/dist/styles/List.css +29 -29
  108. package/dist/styles/Loading.css +27 -27
  109. package/dist/styles/Mentions.css +74 -0
  110. package/dist/styles/Message.css +32 -32
  111. package/dist/styles/Notification.css +50 -50
  112. package/dist/styles/Pagination.css +57 -57
  113. package/dist/styles/Popconfirm.css +53 -53
  114. package/dist/styles/Popover.css +54 -54
  115. package/dist/styles/Progress.css +38 -38
  116. package/dist/styles/QRCode.css +37 -0
  117. package/dist/styles/Radio.css +60 -60
  118. package/dist/styles/Rate.css +21 -21
  119. package/dist/styles/Result.css +41 -41
  120. package/dist/styles/Search.css +46 -46
  121. package/dist/styles/Segmented.css +32 -32
  122. package/dist/styles/Select.css +108 -108
  123. package/dist/styles/Skeleton.css +40 -40
  124. package/dist/styles/Slider.css +46 -46
  125. package/dist/styles/Space.css +27 -27
  126. package/dist/styles/Splitter.css +59 -0
  127. package/dist/styles/Statistic.css +31 -31
  128. package/dist/styles/Steps.css +83 -83
  129. package/dist/styles/Switch.css +39 -39
  130. package/dist/styles/Table.css +132 -43
  131. package/dist/styles/Tabs.css +41 -41
  132. package/dist/styles/Tag.css +71 -71
  133. package/dist/styles/Textarea.css +43 -43
  134. package/dist/styles/TimePicker.css +98 -0
  135. package/dist/styles/Timeline.css +70 -70
  136. package/dist/styles/Tooltip.css +42 -42
  137. package/dist/styles/Tour.css +102 -0
  138. package/dist/styles/Transfer.css +142 -64
  139. package/dist/styles/Tree.css +89 -50
  140. package/dist/styles/TreeSelect.css +121 -0
  141. package/dist/styles/Upload.css +66 -66
  142. package/dist/styles/VirtualList.css +42 -0
  143. package/dist/styles/Watermark.css +17 -17
  144. package/dist/styles/all.css +110 -103
  145. package/dist/styles/dark.css +10 -10
  146. package/dist/styles/index.css +4520 -2953
  147. package/dist/styles/themes/amber.css +14 -14
  148. package/dist/styles/themes/aurora.css +15 -15
  149. package/dist/styles/themes/autumn.css +18 -18
  150. package/dist/styles/themes/business.css +20 -20
  151. package/dist/styles/themes/candy.css +21 -21
  152. package/dist/styles/themes/cartoon.css +31 -31
  153. package/dist/styles/themes/coffee.css +18 -18
  154. package/dist/styles/themes/cyber.css +37 -37
  155. package/dist/styles/themes/cyberpunk.css +32 -32
  156. package/dist/styles/themes/danqing.css +27 -27
  157. package/dist/styles/themes/flat.css +18 -18
  158. package/dist/styles/themes/forest.css +20 -20
  159. package/dist/styles/themes/gameboy.css +33 -33
  160. package/dist/styles/themes/glass.css +39 -39
  161. package/dist/styles/themes/gold.css +26 -26
  162. package/dist/styles/themes/gothic.css +20 -20
  163. package/dist/styles/themes/gradient.css +18 -18
  164. package/dist/styles/themes/ink.css +16 -16
  165. package/dist/styles/themes/lava.css +15 -15
  166. package/dist/styles/themes/macaron.css +27 -27
  167. package/dist/styles/themes/matcha.css +18 -18
  168. package/dist/styles/themes/memphis.css +25 -25
  169. package/dist/styles/themes/midnight.css +27 -27
  170. package/dist/styles/themes/minimal.css +36 -36
  171. package/dist/styles/themes/mint.css +20 -20
  172. package/dist/styles/themes/mono.css +36 -36
  173. package/dist/styles/themes/morandi.css +18 -18
  174. package/dist/styles/themes/neon.css +16 -16
  175. package/dist/styles/themes/neonlight.css +20 -20
  176. package/dist/styles/themes/ocean.css +20 -20
  177. package/dist/styles/themes/pastel.css +21 -21
  178. package/dist/styles/themes/pop.css +33 -33
  179. package/dist/styles/themes/retro.css +35 -35
  180. package/dist/styles/themes/rose.css +14 -14
  181. package/dist/styles/themes/rounded.css +18 -18
  182. package/dist/styles/themes/sakura.css +20 -20
  183. package/dist/styles/themes/sky.css +20 -20
  184. package/dist/styles/themes/spring.css +18 -18
  185. package/dist/styles/themes/starry.css +15 -15
  186. package/dist/styles/themes/sunset.css +18 -18
  187. package/dist/styles/themes/teal.css +14 -14
  188. package/dist/styles/themes/terminal.css +44 -44
  189. package/dist/styles/themes/vaporwave.css +27 -27
  190. package/dist/styles/themes/violet.css +14 -14
  191. package/dist/styles/themes/wabi.css +27 -27
  192. package/dist/styles/themes/winter.css +20 -20
  193. package/dist/styles/tokens.css +59 -55
  194. package/package.json +78 -45
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 anyuer678
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,36 @@
1
+ export interface AffixProps {
2
+ /** 距视口顶部的固定偏移(px),与 offsetBottom 二选一,都传时以 offsetTop 为准 */
3
+ offsetTop?: number;
4
+ /** 距视口底部的固定偏移(px) */
5
+ offsetBottom?: number;
6
+ /**
7
+ * 滚动容器 / 固定范围的边界(CSS 选择器)。
8
+ * 传入后:以「容器顶部 + offsetTop」为固定线,并监听该容器的 scroll;
9
+ * 不传则以视口顶部为固定线。固定不会超出该容器。
10
+ */
11
+ target?: string;
12
+ /** 固定时是否保留占位元素,避免原位置塌陷导致布局跳动,默认 true */
13
+ placeholder?: boolean;
14
+ }
15
+ declare var __VLS_1: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => any;
18
+ };
19
+ declare const __VLS_base: import('vue').DefineComponent<AffixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ change: (fixed: boolean) => any;
21
+ }, string, import('vue').PublicProps, Readonly<AffixProps> & Readonly<{
22
+ onChange?: ((fixed: boolean) => any) | undefined;
23
+ }>, {
24
+ placeholder: boolean;
25
+ target: string;
26
+ offsetTop: number;
27
+ offsetBottom: number;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,4 @@
1
+ import { default as Affix } from './Affix.vue';
2
+ export { Affix };
3
+ export default Affix;
4
+ export type { AffixProps } from './Affix.vue';
@@ -0,0 +1,25 @@
1
+ export interface AnchorItem {
2
+ /** 锚点文案 */
3
+ title: string;
4
+ /** 目标锚点,形如 '#section-1' */
5
+ href: string;
6
+ children?: AnchorItem[];
7
+ }
8
+ export interface AnchorProps {
9
+ items?: AnchorItem[];
10
+ /** 高亮判定偏移(px):目标顶部进入该偏移以内即视为激活 */
11
+ offsetTop?: number;
12
+ /** 点击后是否平滑滚动,默认 true */
13
+ smooth?: boolean;
14
+ }
15
+ declare const __VLS_export: import('vue').DefineComponent<AnchorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ change: (href: string) => any;
17
+ }, string, import('vue').PublicProps, Readonly<AnchorProps> & Readonly<{
18
+ onChange?: ((href: string) => any) | undefined;
19
+ }>, {
20
+ items: AnchorItem[];
21
+ offsetTop: number;
22
+ smooth: boolean;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as Anchor } from './Anchor.vue';
2
+ export { Anchor };
3
+ export default Anchor;
4
+ export type { AnchorProps, AnchorItem } from './Anchor.vue';
@@ -0,0 +1,52 @@
1
+ export interface AutoCompleteOption {
2
+ value: string;
3
+ label?: string;
4
+ disabled?: boolean;
5
+ }
6
+ export type AutoCompleteSource = string[] | AutoCompleteOption[];
7
+ export interface AutoCompleteProps {
8
+ modelValue?: string;
9
+ /** 候选数据源,支持字符串数组或 { value, label } 数组 */
10
+ options?: AutoCompleteSource;
11
+ /** 输入框占位文案,不传时取语言包中的 `common.placeholder` */
12
+ placeholder?: string;
13
+ disabled?: boolean;
14
+ clearable?: boolean;
15
+ /** 是否按输入内容本地过滤,默认 true */
16
+ filter?: boolean;
17
+ /** 远程取数:返回候选数组,返回空数组表示无结果 */
18
+ fetchSuggestions?: (query: string) => AutoCompleteOption[] | Promise<AutoCompleteOption[]>;
19
+ size?: 'small' | 'medium' | 'large';
20
+ }
21
+ declare var __VLS_6: {
22
+ option: AutoCompleteOption;
23
+ };
24
+ type __VLS_Slots = {} & {
25
+ option?: (props: typeof __VLS_6) => any;
26
+ };
27
+ declare const __VLS_base: import('vue').DefineComponent<AutoCompleteProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
+ select: (option: AutoCompleteOption) => any;
29
+ "update:modelValue": (value: string) => any;
30
+ change: (value: string) => any;
31
+ }, string, import('vue').PublicProps, Readonly<AutoCompleteProps> & Readonly<{
32
+ onSelect?: ((option: AutoCompleteOption) => any) | undefined;
33
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
34
+ onChange?: ((value: string) => any) | undefined;
35
+ }>, {
36
+ filter: boolean;
37
+ size: "small" | "medium" | "large";
38
+ disabled: boolean;
39
+ modelValue: string;
40
+ placeholder: string;
41
+ clearable: boolean;
42
+ options: AutoCompleteSource;
43
+ fetchSuggestions: (query: string) => AutoCompleteOption[] | Promise<AutoCompleteOption[]>;
44
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
45
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
48
+ type __VLS_WithSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,4 @@
1
+ import { default as AutoComplete } from './AutoComplete.vue';
2
+ export { AutoComplete };
3
+ export default AutoComplete;
4
+ export type { AutoCompleteProps, AutoCompleteOption, AutoCompleteSource } from './AutoComplete.vue';
@@ -0,0 +1,35 @@
1
+ export interface BackTopProps {
2
+ /** 滚动距离超过该值时显示按钮 */
3
+ visibilityHeight?: number;
4
+ /** 滚动监听目标:CSS 选择器或元素,默认监听 window */
5
+ target?: string | HTMLElement;
6
+ /** 距视口右侧的距离(px) */
7
+ right?: number;
8
+ /** 距视口底部的距离(px) */
9
+ bottom?: number;
10
+ /** 回到顶部的动画时长(ms),0 表示直接跳转 */
11
+ duration?: number;
12
+ }
13
+ declare var __VLS_7: {};
14
+ type __VLS_Slots = {} & {
15
+ default?: (props: typeof __VLS_7) => any;
16
+ };
17
+ declare const __VLS_base: import('vue').DefineComponent<BackTopProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ click: (event: MouseEvent) => any;
19
+ }, string, import('vue').PublicProps, Readonly<BackTopProps> & Readonly<{
20
+ onClick?: ((event: MouseEvent) => any) | undefined;
21
+ }>, {
22
+ right: number;
23
+ bottom: number;
24
+ duration: number;
25
+ visibilityHeight: number;
26
+ target: string | HTMLElement;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,4 @@
1
+ import { default as BackTop } from './BackTop.vue';
2
+ export { BackTop };
3
+ export default BackTop;
4
+ export type { BackTopProps } from './BackTop.vue';
@@ -1,5 +1,20 @@
1
+ export interface CalendarDay {
2
+ date: Date;
3
+ inMonth: boolean;
4
+ isSelected: boolean;
5
+ /** 落在 [start, end] 开区间内(range 模式) */
6
+ inRange: boolean;
7
+ /** 是范围结束日(range 模式) */
8
+ isRangeEnd: boolean;
9
+ /** 被额外标记为已选(multiple 模式) */
10
+ isMarked: boolean;
11
+ }
1
12
  export interface CalendarProps {
2
13
  modelValue?: string;
14
+ /** 范围高亮 [start, end],由 DatePicker 的 range 模式传入 */
15
+ range?: [string, string] | null;
16
+ /** 额外高亮日期列表(YYYY-MM-DD),由 DatePicker 的 multiple 模式传入 */
17
+ marked?: string[];
3
18
  }
4
19
  declare const __VLS_export: import('vue').DefineComponent<CalendarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
20
  "update:modelValue": (value: string) => any;
@@ -7,6 +22,8 @@ declare const __VLS_export: import('vue').DefineComponent<CalendarProps, {}, {},
7
22
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
8
23
  }>, {
9
24
  modelValue: string;
25
+ range: [string, string] | null;
26
+ marked: string[];
10
27
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
28
  declare const _default: typeof __VLS_export;
12
29
  export default _default;
@@ -1,4 +1,4 @@
1
1
  import { default as Calendar } from './Calendar.vue';
2
2
  export { Calendar };
3
3
  export default Calendar;
4
- export type { CalendarProps } from './Calendar.vue';
4
+ export type { CalendarProps, CalendarDay } from './Calendar.vue';
@@ -2,20 +2,37 @@ export interface CascaderOption {
2
2
  label: string;
3
3
  value: string | number;
4
4
  children?: CascaderOption[];
5
+ /** 显式标记为叶子节点:异步模式下点击即收起,不再请求下一级 */
6
+ leaf?: boolean;
7
+ disabled?: boolean;
5
8
  }
9
+ export type CascaderValue = (string | number)[];
6
10
  export interface CascaderProps {
7
- options: CascaderOption[];
8
- modelValue?: (string | number)[];
11
+ options?: CascaderOption[];
12
+ modelValue?: CascaderValue;
13
+ /** 占位文案,不传时取语言包中的 `cascader.placeholder` */
9
14
  placeholder?: string;
15
+ /** 已选路径的展示分隔符 */
16
+ separator?: string;
17
+ disabled?: boolean;
18
+ clearable?: boolean;
19
+ /** 开启异步加载,需配合 lazyLoad 使用 */
20
+ lazy?: boolean;
21
+ /** 异步加载子节点,node 为 null 表示加载根级 */
22
+ lazyLoad?: (node: CascaderOption | null, resolve: (children: CascaderOption[]) => void) => void;
10
23
  }
11
24
  declare const __VLS_export: import('vue').DefineComponent<CascaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- "update:modelValue": (value: (string | number)[]) => any;
25
+ "update:modelValue": (value: CascaderValue) => any;
13
26
  }, string, import('vue').PublicProps, Readonly<CascaderProps> & Readonly<{
14
- "onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
27
+ "onUpdate:modelValue"?: ((value: CascaderValue) => any) | undefined;
15
28
  }>, {
16
- modelValue: (string | number)[];
29
+ disabled: boolean;
30
+ separator: string;
31
+ modelValue: CascaderValue;
17
32
  placeholder: string;
33
+ clearable: boolean;
18
34
  options: CascaderOption[];
35
+ lazy: boolean;
19
36
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
37
  declare const _default: typeof __VLS_export;
21
38
  export default _default;
@@ -2,6 +2,8 @@ export interface CheckboxProps {
2
2
  modelValue?: boolean;
3
3
  disabled?: boolean;
4
4
  label?: string;
5
+ /** 半选态(表头全选常用),仅影响视觉与 DOM,不参与 v-model */
6
+ indeterminate?: boolean;
5
7
  }
6
8
  declare var __VLS_1: {};
7
9
  type __VLS_Slots = {} & {
@@ -16,6 +18,7 @@ declare const __VLS_base: import('vue').DefineComponent<CheckboxProps, {}, {}, {
16
18
  }>, {
17
19
  disabled: boolean;
18
20
  modelValue: boolean;
21
+ indeterminate: boolean;
19
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
24
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,30 @@
1
+ import { ComponentSize, ThemeMode } from '../../composables/useGlobalConfig';
2
+ import { ProjectLocale, LocaleName } from '../../locale';
3
+ export interface ConfigProviderProps {
4
+ /** 语言包对象或语言名(`'zh-CN'` / `'en-US'`),默认 zh-CN */
5
+ locale?: ProjectLocale | LocaleName;
6
+ /** 组件统一尺寸,组件自身的 size 会覆盖此值,默认 medium */
7
+ size?: ComponentSize;
8
+ /** 弹层基础层级,默认 2000 */
9
+ zIndex?: number;
10
+ /** 主题模式,dark 时给 `<html>` 加 data-theme="dark",默认 light */
11
+ theme?: ThemeMode;
12
+ }
13
+ declare var __VLS_1: {};
14
+ type __VLS_Slots = {} & {
15
+ default?: (props: typeof __VLS_1) => any;
16
+ };
17
+ declare const __VLS_base: import('vue').DefineComponent<ConfigProviderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ConfigProviderProps> & Readonly<{}>, {
18
+ size: ComponentSize;
19
+ locale: ProjectLocale | LocaleName;
20
+ zIndex: number;
21
+ theme: ThemeMode;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,4 @@
1
+ import { default as ConfigProvider } from './ConfigProvider.vue';
2
+ export { ConfigProvider };
3
+ export default ConfigProvider;
4
+ export type { ConfigProviderProps } from './ConfigProvider.vue';
@@ -0,0 +1,42 @@
1
+ export interface ContextMenuItem {
2
+ /** 唯一标识,透传给 select 事件 */
3
+ key: string;
4
+ label: string;
5
+ /** 图标名,取自 Icon 组件内置图标 */
6
+ icon?: string;
7
+ disabled?: boolean;
8
+ /** 是否在本项上方显示分隔线 */
9
+ divided?: boolean;
10
+ }
11
+ export interface ContextMenuProps {
12
+ items?: ContextMenuItem[];
13
+ /** 是否禁用右键菜单 */
14
+ disabled?: boolean;
15
+ }
16
+ declare function close(): void;
17
+ declare var __VLS_1: {};
18
+ type __VLS_Slots = {} & {
19
+ default?: (props: typeof __VLS_1) => any;
20
+ };
21
+ declare const __VLS_base: import('vue').DefineComponent<ContextMenuProps, {
22
+ close: typeof close;
23
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
+ select: (key: string) => any;
25
+ close: () => any;
26
+ open: () => any;
27
+ }, string, import('vue').PublicProps, Readonly<ContextMenuProps> & Readonly<{
28
+ onSelect?: ((key: string) => any) | undefined;
29
+ onClose?: (() => any) | undefined;
30
+ onOpen?: (() => any) | undefined;
31
+ }>, {
32
+ disabled: boolean;
33
+ items: ContextMenuItem[];
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,4 @@
1
+ import { default as ContextMenu } from './ContextMenu.vue';
2
+ export { ContextMenu };
3
+ export default ContextMenu;
4
+ export type { ContextMenuProps, ContextMenuItem } from './ContextMenu.vue';
@@ -1,14 +1,28 @@
1
+ export type DatePickerMode = 'single' | 'range' | 'multiple';
1
2
  export interface DatePickerProps {
2
- modelValue?: string;
3
+ /** single 模式为字符串;range 模式为 [start, end];multiple 模式为日期数组 */
4
+ modelValue?: string | string[];
5
+ /** 选择模式:单日期 / 日期范围 / 多日期 */
6
+ mode?: DatePickerMode;
3
7
  placeholder?: string;
8
+ /** range 模式的起止分隔符 */
9
+ /** 范围分隔符,不传时取语言包中的 `datePicker.separator` */
10
+ separator?: string;
11
+ disabled?: boolean;
12
+ /** 是否显示清空按钮 */
13
+ clearable?: boolean;
4
14
  }
5
15
  declare const __VLS_export: import('vue').DefineComponent<DatePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
- "update:modelValue": (value: string) => any;
16
+ "update:modelValue": (value: string | string[]) => any;
7
17
  }, string, import('vue').PublicProps, Readonly<DatePickerProps> & Readonly<{
8
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
18
+ "onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
9
19
  }>, {
10
- modelValue: string;
20
+ disabled: boolean;
21
+ separator: string;
22
+ modelValue: string | string[];
11
23
  placeholder: string;
24
+ clearable: boolean;
25
+ mode: DatePickerMode;
12
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
27
  declare const _default: typeof __VLS_export;
14
28
  export default _default;
@@ -1,4 +1,4 @@
1
1
  import { default as DatePicker } from './DatePicker.vue';
2
2
  export { DatePicker };
3
3
  export default DatePicker;
4
- export type { DatePickerProps } from './DatePicker.vue';
4
+ export type { DatePickerProps, DatePickerMode } from './DatePicker.vue';
@@ -1,5 +1,5 @@
1
1
  export interface EmptyProps {
2
- /** 空状态文案 */
2
+ /** 空状态文案,不传时取语言包中的 `empty.description` */
3
3
  description?: string;
4
4
  }
5
5
  declare var __VLS_1: {}, __VLS_8: {};
@@ -0,0 +1,48 @@
1
+ export interface FloatButtonProps {
2
+ /** 类型(语义色) */
3
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
4
+ /** 形状 */
5
+ shape?: 'circle' | 'square';
6
+ /** 尺寸 */
7
+ size?: 'small' | 'default' | 'large';
8
+ /** 图标名(见 Icon 组件);与默认插槽二选一 */
9
+ icon?: string;
10
+ /** 文字描述,显示在图标下方 */
11
+ description?: string;
12
+ /** 悬浮提示 */
13
+ tooltip?: string;
14
+ /** 传入后渲染为链接 <a> */
15
+ href?: string;
16
+ /** 链接打开方式,配合 href 使用 */
17
+ target?: '_self' | '_blank';
18
+ disabled?: boolean;
19
+ loading?: boolean;
20
+ }
21
+ declare var __VLS_20: {};
22
+ type __VLS_Slots = {} & {
23
+ default?: (props: typeof __VLS_20) => any;
24
+ };
25
+ declare const __VLS_base: import('vue').DefineComponent<FloatButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
+ click: (event: MouseEvent) => any;
27
+ }, string, import('vue').PublicProps, Readonly<FloatButtonProps> & Readonly<{
28
+ onClick?: ((event: MouseEvent) => any) | undefined;
29
+ }>, {
30
+ type: "default" | "primary" | "success" | "warning" | "danger";
31
+ size: "small" | "default" | "large";
32
+ disabled: boolean;
33
+ loading: boolean;
34
+ tooltip: string;
35
+ description: string;
36
+ href: string;
37
+ target: "_self" | "_blank";
38
+ icon: string;
39
+ shape: "circle" | "square";
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
44
+ type __VLS_WithSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,38 @@
1
+ export interface FloatButtonGroupProps {
2
+ /** 展开方向 */
3
+ direction?: 'top' | 'bottom' | 'left' | 'right';
4
+ /** 触发方式:点击或悬浮展开 */
5
+ trigger?: 'click' | 'hover';
6
+ /** 是否展开(可用 v-model 双向绑定) */
7
+ open?: boolean;
8
+ /** 触发器图标 */
9
+ icon?: string;
10
+ /** 触发器形状 */
11
+ shape?: 'circle' | 'square';
12
+ /** 触发器的悬浮提示 */
13
+ tooltip?: string;
14
+ }
15
+ declare var __VLS_1: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => any;
18
+ };
19
+ declare const __VLS_base: import('vue').DefineComponent<FloatButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ "update:open": (open: boolean) => any;
21
+ }, string, import('vue').PublicProps, Readonly<FloatButtonGroupProps> & Readonly<{
22
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
23
+ }>, {
24
+ direction: "top" | "bottom" | "left" | "right";
25
+ open: boolean;
26
+ trigger: "click" | "hover";
27
+ tooltip: string;
28
+ icon: string;
29
+ shape: "circle" | "square";
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
34
+ type __VLS_WithSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -0,0 +1,5 @@
1
+ import { default as FloatButton } from './FloatButton.vue';
2
+ import { default as FloatButtonGroup } from './FloatButtonGroup.vue';
3
+ export { FloatButton, FloatButtonGroup };
4
+ export type { FloatButtonProps } from './FloatButton.vue';
5
+ export type { FloatButtonGroupProps } from './FloatButtonGroup.vue';
@@ -0,0 +1,37 @@
1
+ export interface ImageProps {
2
+ src: string;
3
+ alt?: string;
4
+ width?: string | number;
5
+ height?: string | number;
6
+ /** 是否允许点击打开预览,默认 true */
7
+ preview?: boolean;
8
+ /** 预览时的图片列表(多图可切换),默认只预览当前图 */
9
+ previewList?: string[];
10
+ /** 图片填充方式 */
11
+ fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
12
+ /** 加载失败时展示的替代图地址 */
13
+ fallback?: string;
14
+ }
15
+ declare var __VLS_1: {}, __VLS_3: {};
16
+ type __VLS_Slots = {} & {
17
+ error?: (props: typeof __VLS_1) => any;
18
+ } & {
19
+ mask?: (props: typeof __VLS_3) => any;
20
+ };
21
+ declare const __VLS_base: import('vue').DefineComponent<ImageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ImageProps> & Readonly<{}>, {
22
+ width: string | number;
23
+ height: string | number;
24
+ alt: string;
25
+ fallback: string;
26
+ preview: boolean;
27
+ previewList: string[];
28
+ fit: "fill" | "contain" | "cover" | "none" | "scale-down";
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,4 @@
1
+ import { default as Image } from './Image.vue';
2
+ export { Image };
3
+ export default Image;
4
+ export type { ImageProps } from './Image.vue';
@@ -0,0 +1,28 @@
1
+ export interface ImagePreviewProps {
2
+ /** 是否显示预览 */
3
+ visible?: boolean;
4
+ /** 图片地址列表 */
5
+ images?: string[];
6
+ /** 当前显示第几张(从 0 开始) */
7
+ index?: number;
8
+ /** 挂载位置,默认 body */
9
+ teleportTo?: string;
10
+ }
11
+ declare const __VLS_export: import('vue').DefineComponent<ImagePreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ close: () => any;
13
+ change: (index: number) => any;
14
+ "update:visible": (value: boolean) => any;
15
+ "update:index": (value: number) => any;
16
+ }, string, import('vue').PublicProps, Readonly<ImagePreviewProps> & Readonly<{
17
+ onClose?: (() => any) | undefined;
18
+ onChange?: ((index: number) => any) | undefined;
19
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
20
+ "onUpdate:index"?: ((value: number) => any) | undefined;
21
+ }>, {
22
+ visible: boolean;
23
+ index: number;
24
+ images: string[];
25
+ teleportTo: string;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as ImagePreview } from './ImagePreview.vue';
2
+ export { ImagePreview };
3
+ export default ImagePreview;
4
+ export type { ImagePreviewProps } from './ImagePreview.vue';
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };