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
@@ -0,0 +1,19 @@
1
+ export interface LayoutProps {
2
+ /** 布局方向;不传时按是否含 Sider 自动判断 */
3
+ direction?: 'horizontal' | 'vertical';
4
+ }
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import('vue').DefineComponent<LayoutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LayoutProps> & Readonly<{}>, {
10
+ direction: "horizontal" | "vertical";
11
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,37 @@
1
+ export interface SiderProps {
2
+ /** 展开时的宽度 */
3
+ width?: number | string;
4
+ /** 收起时的宽度 */
5
+ collapsedWidth?: number | string;
6
+ /** 是否收起(可用 v-model 双向绑定) */
7
+ collapsed?: boolean;
8
+ /** 是否显示折叠触发器 */
9
+ collapsible?: boolean;
10
+ /** 翻转触发器箭头方向(用于右侧侧边栏) */
11
+ reverseArrow?: boolean;
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<SiderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ collapse: (collapsed: boolean, type: "clickTrigger" | "responsive") => any;
19
+ "update:collapsed": (collapsed: boolean) => any;
20
+ }, string, import('vue').PublicProps, Readonly<SiderProps> & Readonly<{
21
+ onCollapse?: ((collapsed: boolean, type: "clickTrigger" | "responsive") => any) | undefined;
22
+ "onUpdate:collapsed"?: ((collapsed: boolean) => any) | undefined;
23
+ }>, {
24
+ width: number | string;
25
+ collapsedWidth: number | string;
26
+ collapsed: boolean;
27
+ collapsible: boolean;
28
+ reverseArrow: boolean;
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,7 @@
1
+ import { InjectionKey } from 'vue';
2
+ /** Layout 与 Sider 之间的上下文:Sider 挂载/卸载时登记,供 Layout 自动判断水平布局 */
3
+ export interface LayoutContext {
4
+ /** 登记一个 Sider,返回注销函数 */
5
+ registerSider: () => () => void;
6
+ }
7
+ export declare const LAYOUT_CONTEXT_KEY: InjectionKey<LayoutContext>;
@@ -0,0 +1,8 @@
1
+ import { default as Layout } from './Layout.vue';
2
+ import { default as Header } from './Header.vue';
3
+ import { default as Sider } from './Sider.vue';
4
+ import { default as Content } from './Content.vue';
5
+ import { default as Footer } from './Footer.vue';
6
+ export { Layout, Header, Sider, Content, Footer };
7
+ export type { LayoutProps } from './Layout.vue';
8
+ export type { SiderProps } from './Sider.vue';
@@ -1,5 +1,6 @@
1
1
  export interface ListProps<T = unknown> {
2
2
  items: T[];
3
+ /** 无数据时的文案,不传时取语言包中的 `list.empty` */
3
4
  empty?: string;
4
5
  bordered?: boolean;
5
6
  }
@@ -0,0 +1,37 @@
1
+ import { MentionFilter, MentionOption } from './types';
2
+ export interface MentionsProps {
3
+ modelValue?: string;
4
+ /** 候选项 */
5
+ options?: MentionOption[];
6
+ /** 触发前缀,可传多个 */
7
+ prefix?: string | string[];
8
+ rows?: number;
9
+ placeholder?: string;
10
+ disabled?: boolean;
11
+ readonly?: boolean;
12
+ /** 自定义过滤;传 false 关闭过滤 */
13
+ filterOption?: MentionFilter | false;
14
+ /** 无匹配时的文案 */
15
+ notFoundContent?: string;
16
+ }
17
+ declare const __VLS_export: import('vue').DefineComponent<MentionsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ search: (text: string, prefix: string) => any;
19
+ select: (option: MentionOption, prefix: string) => any;
20
+ "update:modelValue": (value: string) => any;
21
+ }, string, import('vue').PublicProps, Readonly<MentionsProps> & Readonly<{
22
+ onSearch?: ((text: string, prefix: string) => any) | undefined;
23
+ onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
24
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
25
+ }>, {
26
+ disabled: boolean;
27
+ modelValue: string;
28
+ placeholder: string;
29
+ readonly: boolean;
30
+ options: MentionOption[];
31
+ rows: number;
32
+ prefix: string | string[];
33
+ filterOption: MentionFilter | false;
34
+ notFoundContent: string;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { default as Mentions } from './Mentions.vue';
2
+ export { Mentions };
3
+ export default Mentions;
4
+ export type { MentionsProps } from './Mentions.vue';
5
+ export type { MentionOption, MentionFilter } from './types';
@@ -0,0 +1,10 @@
1
+ /** 提及候选项 */
2
+ export interface MentionOption {
3
+ /** 插入文本时使用的值 */
4
+ value: string;
5
+ /** 展示文案,缺省用 value */
6
+ label?: string;
7
+ disabled?: boolean;
8
+ }
9
+ /** 自定义过滤函数;返回 true 表示保留 */
10
+ export type MentionFilter = (search: string, option: MentionOption) => boolean;
@@ -1,7 +1,8 @@
1
1
  export interface PopconfirmProps {
2
2
  title: string;
3
- /** 确定按钮文字 */
3
+ /** 确定按钮文字,不传时取语言包中的 `popconfirm.confirmText` */
4
4
  confirmText?: string;
5
+ /** 取消按钮文字,不传时取语言包中的 `popconfirm.cancelText` */
5
6
  cancelText?: string;
6
7
  }
7
8
  declare var __VLS_1: {};
@@ -0,0 +1,36 @@
1
+ import { ECLevelName } from './qrcode';
2
+ export interface QRCodeProps {
3
+ /** 编码内容(文本 / URL) */
4
+ value: string;
5
+ /** 渲染像素尺寸(含静默区),默认 160 */
6
+ size?: number;
7
+ /** 错误校正等级,默认 M */
8
+ level?: ECLevelName;
9
+ /** 静默区(quiet zone)模块数,默认 4(规范要求 ≥4) */
10
+ margin?: number;
11
+ /** 暗模块颜色,默认 #000000 */
12
+ color?: string;
13
+ /** 背景(亮模块)颜色,默认 #FFFFFF */
14
+ bgColor?: string;
15
+ /** 无障碍替代文本,默认等于 value */
16
+ alt?: string;
17
+ }
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_base: import('vue').DefineComponent<QRCodeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QRCodeProps> & Readonly<{}>, {
23
+ size: number;
24
+ color: string;
25
+ level: ECLevelName;
26
+ margin: number;
27
+ bgColor: string;
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 QRCode } from './QRCode.vue';
2
+ export { QRCode };
3
+ export default QRCode;
4
+ export type { QRCodeProps } from './QRCode.vue';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 自实现的 QR Code 编码器(零运行时依赖)。
3
+ *
4
+ * 严格遵循 ISO/IEC 18004:2006 规范,算法结构参考 MIT 许可的
5
+ * Kazuhiko Arase `qrcode-generator` / node `qrcode` 实现,
6
+ * 但全部代码为本库自有实现,便于 tree-shaking 与 SSR。
7
+ *
8
+ * 测试(`__tests__/QRCode.spec.ts`)会以固定 mode / version / maskPattern
9
+ * 与 `qrcode` 参考库逐模块比对,确保编码结果完全一致。
10
+ */
11
+ export type ECLevelName = 'L' | 'M' | 'Q' | 'H';
12
+ export type QRModeName = 'numeric' | 'alphanumeric' | 'byte';
13
+ export interface QRCreateOptions {
14
+ /** 错误校正等级,默认 M */
15
+ level?: ECLevelName;
16
+ /** 指定版本 1-40(不指定则自动选择能容纳数据的最小版本) */
17
+ version?: number;
18
+ /** 指定编码模式;不指定则按数据自动选择 */
19
+ mode?: QRModeName;
20
+ /** 指定掩码 0-7;不指定则由惩罚函数自动选择最优掩码 */
21
+ maskPattern?: number;
22
+ /** 强制使用 UTF-8 字节模式(用于含中文等非 ASCII 文本) */
23
+ utf8?: boolean;
24
+ }
25
+ export interface QRResult {
26
+ /** 模块矩阵,行优先,true = 暗模块 */
27
+ modules: boolean[];
28
+ /** 模块边长(不含静默区) */
29
+ moduleCount: number;
30
+ version: number;
31
+ level: ECLevelName;
32
+ maskPattern: number;
33
+ }
34
+ export declare function createQRMatrix(value: string, options?: QRCreateOptions): QRResult;
@@ -1,6 +1,9 @@
1
1
  export interface SearchProps {
2
2
  modelValue?: string;
3
+ /** 占位文案,不传时取语言包中的 `search.placeholder` */
3
4
  placeholder?: string;
5
+ /** 搜索按钮文案,不传时取语言包中的 `search.action` */
6
+ buttonText?: string;
4
7
  size?: 'small' | 'medium' | 'large';
5
8
  }
6
9
  declare const __VLS_export: import('vue').DefineComponent<SearchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -13,6 +16,7 @@ declare const __VLS_export: import('vue').DefineComponent<SearchProps, {}, {}, {
13
16
  size: "small" | "medium" | "large";
14
17
  modelValue: string;
15
18
  placeholder: string;
19
+ buttonText: string;
16
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
21
  declare const _default: typeof __VLS_export;
18
22
  export default _default;
@@ -0,0 +1,34 @@
1
+ export interface SplitterProps {
2
+ /** 各面板的初始占比(百分比),长度即面板数量,默认两栏均分 */
3
+ modelValue?: number[];
4
+ /** 排列方向 */
5
+ layout?: 'horizontal' | 'vertical';
6
+ /** 最小占比(百分比),拖拽不会小于该值 */
7
+ min?: number;
8
+ /** 是否禁用拖拽 */
9
+ disabled?: boolean;
10
+ }
11
+ declare var __VLS_2: `panel-${number}`, __VLS_3: {
12
+ index: number;
13
+ };
14
+ type __VLS_Slots = {} & {
15
+ [K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
16
+ };
17
+ declare const __VLS_base: import('vue').DefineComponent<SplitterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "update:modelValue": (value: number[]) => any;
19
+ }, string, import('vue').PublicProps, Readonly<SplitterProps> & Readonly<{
20
+ "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
21
+ }>, {
22
+ disabled: boolean;
23
+ modelValue: number[];
24
+ min: number;
25
+ layout: "horizontal" | "vertical";
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,4 @@
1
+ import { default as Splitter } from './Splitter.vue';
2
+ export { Splitter };
3
+ export default Splitter;
4
+ export type { SplitterProps } from './Splitter.vue';
@@ -2,27 +2,65 @@ export interface TableColumn {
2
2
  prop: string;
3
3
  label: string;
4
4
  width?: string | number;
5
+ /** 是否可排序;'custom' 表示只派发 sort-change,由使用方自行排序(服务端排序) */
6
+ sortable?: boolean | 'custom';
7
+ /** 固定列,需配合 width 使用 */
8
+ fixed?: 'left' | 'right';
9
+ /** 单元格对齐方式 */
10
+ align?: 'left' | 'center' | 'right';
5
11
  }
6
12
  export interface TableProps {
7
13
  data: Record<string, unknown>[];
8
14
  columns: TableColumn[];
9
15
  stripe?: boolean;
10
16
  border?: boolean;
17
+ /** 尺寸 */
18
+ size?: 'small' | 'default' | 'large';
11
19
  /** 行唯一键字段名(默认用行索引) */
12
20
  rowKey?: string;
21
+ /** 分页:每页条数(0=不分页) */
22
+ pageSize?: number;
23
+ /** 分页:当前页(1-based) */
24
+ currentPage?: number;
25
+ /** 分页:总条数;传入即视为服务端分页——data 只放当前页数据,组件不再二次切片 */
26
+ total?: number;
27
+ /** 是否显示行选择列 */
28
+ selection?: boolean;
29
+ /** 已选行的 key,配合 v-model:selectedKeys */
30
+ selectedKeys?: (string | number)[];
31
+ /** 数据为空时的文案 */
32
+ /** 空数据文案,不传时取语言包中的 `table.emptyText` */
33
+ emptyText?: string;
13
34
  }
14
- declare var __VLS_1: {
35
+ declare var __VLS_15: {
15
36
  row: Record<string, unknown>;
16
37
  column: TableColumn;
17
38
  index: number;
18
39
  };
19
40
  type __VLS_Slots = {} & {
20
- cell?: (props: typeof __VLS_1) => any;
41
+ cell?: (props: typeof __VLS_15) => any;
21
42
  };
22
- declare const __VLS_base: import('vue').DefineComponent<TableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableProps> & Readonly<{}>, {
43
+ declare const __VLS_base: import('vue').DefineComponent<TableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
44
+ "update:currentPage": (page: number) => any;
45
+ "sort-change": (prop: string, order: "desc" | "asc" | null) => any;
46
+ "update:selectedKeys": (keys: (string | number)[]) => any;
47
+ "selection-change": (keys: (string | number)[]) => any;
48
+ }, string, import('vue').PublicProps, Readonly<TableProps> & Readonly<{
49
+ "onUpdate:currentPage"?: ((page: number) => any) | undefined;
50
+ "onSort-change"?: ((prop: string, order: "desc" | "asc" | null) => any) | undefined;
51
+ "onUpdate:selectedKeys"?: ((keys: (string | number)[]) => any) | undefined;
52
+ "onSelection-change"?: ((keys: (string | number)[]) => any) | undefined;
53
+ }>, {
54
+ size: "small" | "default" | "large";
55
+ total: number;
56
+ pageSize: number;
57
+ currentPage: number;
23
58
  stripe: boolean;
24
59
  border: boolean;
25
60
  rowKey: string;
61
+ selection: boolean;
62
+ selectedKeys: (string | number)[];
63
+ emptyText: string;
26
64
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
65
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
66
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,28 @@
1
+ export interface TimePickerProps {
2
+ /** 时间字符串,如 '09:30' 或 '09:30:00' */
3
+ modelValue?: string;
4
+ /** 展示与录入格式,默认 'HH:mm';含 ss 时启用秒列 */
5
+ format?: string;
6
+ /** 占位文案,不传时取语言包中的 `timePicker.placeholder` */
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ clearable?: boolean;
10
+ /** 分钟步长,默认 1 */
11
+ minuteStep?: number;
12
+ }
13
+ declare const __VLS_export: import('vue').DefineComponent<TimePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ "update:modelValue": (value: string) => any;
15
+ change: (value: string) => any;
16
+ }, string, import('vue').PublicProps, Readonly<TimePickerProps> & Readonly<{
17
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
18
+ onChange?: ((value: string) => any) | undefined;
19
+ }>, {
20
+ disabled: boolean;
21
+ modelValue: string;
22
+ placeholder: string;
23
+ clearable: boolean;
24
+ format: string;
25
+ minuteStep: number;
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 TimePicker } from './TimePicker.vue';
2
+ export { TimePicker };
3
+ export default TimePicker;
4
+ export type { TimePickerProps } from './TimePicker.vue';
@@ -0,0 +1,37 @@
1
+ export type TourPlacement = 'top' | 'bottom' | 'left' | 'right';
2
+ export interface TourStep {
3
+ /** 目标元素选择器,如 '#step-1';不传时气泡居中显示 */
4
+ target?: string;
5
+ title: string;
6
+ description?: string;
7
+ placement?: TourPlacement;
8
+ }
9
+ export interface TourProps {
10
+ /** 是否显示引导 */
11
+ modelValue?: boolean;
12
+ steps?: TourStep[];
13
+ current?: number;
14
+ /** 是否展示跳过按钮,默认 true */
15
+ showSkip?: boolean;
16
+ /** 遮罩是否允许点击关闭 */
17
+ maskClosable?: boolean;
18
+ }
19
+ declare const __VLS_export: import('vue').DefineComponent<TourProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ "update:modelValue": (value: boolean) => any;
21
+ change: (current: number) => any;
22
+ finish: () => any;
23
+ "update:current": (value: number) => any;
24
+ }, string, import('vue').PublicProps, Readonly<TourProps> & Readonly<{
25
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
26
+ onChange?: ((current: number) => any) | undefined;
27
+ onFinish?: (() => any) | undefined;
28
+ "onUpdate:current"?: ((value: number) => any) | undefined;
29
+ }>, {
30
+ modelValue: boolean;
31
+ current: number;
32
+ steps: TourStep[];
33
+ showSkip: boolean;
34
+ maskClosable: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as Tour } from './Tour.vue';
2
+ export { Tour };
3
+ export default Tour;
4
+ export type { TourProps, TourStep, TourPlacement } from './Tour.vue';
@@ -1,18 +1,34 @@
1
1
  export interface TransferItem {
2
2
  key: string;
3
3
  label: string;
4
+ disabled?: boolean;
4
5
  }
5
6
  export interface TransferProps {
6
- data: TransferItem[];
7
+ data?: TransferItem[];
7
8
  modelValue?: string[];
9
+ /** 左右面板标题 */
10
+ titles?: [string, string];
11
+ /** 是否开启搜索过滤 */
12
+ filterable?: boolean;
13
+ filterPlaceholder?: string;
14
+ /** 每页条数,0 表示不分页 */
15
+ pageSize?: number;
16
+ disabled?: boolean;
8
17
  }
9
18
  declare const __VLS_export: import('vue').DefineComponent<TransferProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
19
  "update:modelValue": (value: string[]) => any;
20
+ change: (value: string[], direction: "left" | "right") => any;
11
21
  }, string, import('vue').PublicProps, Readonly<TransferProps> & Readonly<{
12
22
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
23
+ onChange?: ((value: string[], direction: "left" | "right") => any) | undefined;
13
24
  }>, {
25
+ disabled: boolean;
14
26
  data: TransferItem[];
15
27
  modelValue: string[];
28
+ pageSize: number;
29
+ titles: [string, string];
30
+ filterable: boolean;
31
+ filterPlaceholder: string;
16
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
33
  declare const _default: typeof __VLS_export;
18
34
  export default _default;
@@ -2,16 +2,40 @@ export interface TreeNode {
2
2
  label: string;
3
3
  value?: string;
4
4
  children?: TreeNode[];
5
+ disabled?: boolean;
5
6
  }
6
- export interface TreeProps {
7
+ export type DropPosition = 'before' | 'after' | 'inner';
8
+ export interface TreeDropPayload {
9
+ dragNode: TreeNode;
10
+ dropNode: TreeNode;
11
+ position: DropPosition;
7
12
  data: TreeNode[];
8
13
  }
14
+ export interface TreeProps {
15
+ data?: TreeNode[];
16
+ /** 设置后启用虚拟滚动,值为可视区高度(px) */
17
+ height?: number | null;
18
+ /** 虚拟滚动下每一行的高度(px) */
19
+ itemHeight?: number;
20
+ /** 是否可拖拽排序 */
21
+ draggable?: boolean;
22
+ /** 拖拽落点校验,返回 false 则禁止落在此位置 */
23
+ allowDrop?: (drag: TreeNode, drop: TreeNode, position: DropPosition) => boolean;
24
+ /** 默认展开全部含子节点的节点 */
25
+ defaultExpandAll?: boolean;
26
+ }
9
27
  declare const __VLS_export: import('vue').DefineComponent<TreeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
28
  select: (node: TreeNode) => any;
29
+ drop: (payload: TreeDropPayload) => any;
11
30
  }, string, import('vue').PublicProps, Readonly<TreeProps> & Readonly<{
12
31
  onSelect?: ((node: TreeNode) => any) | undefined;
32
+ onDrop?: ((payload: TreeDropPayload) => any) | undefined;
13
33
  }>, {
14
34
  data: TreeNode[];
35
+ height: number | null;
36
+ itemHeight: number;
37
+ draggable: boolean;
38
+ defaultExpandAll: boolean;
15
39
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
40
  declare const _default: typeof __VLS_export;
17
41
  export default _default;
@@ -0,0 +1,32 @@
1
+ export interface TreeSelectNode {
2
+ label: string;
3
+ value: string | number;
4
+ children?: TreeSelectNode[];
5
+ disabled?: boolean;
6
+ }
7
+ export interface TreeSelectProps {
8
+ options?: TreeSelectNode[];
9
+ modelValue?: string | number | undefined;
10
+ /** 占位文案,不传时取语言包中的 `common.placeholder` */
11
+ placeholder?: string;
12
+ disabled?: boolean;
13
+ clearable?: boolean;
14
+ /** 初始是否展开全部可展开节点 */
15
+ defaultExpandAll?: boolean;
16
+ }
17
+ declare const __VLS_export: import('vue').DefineComponent<TreeSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "update:modelValue": (value: string | number | undefined) => any;
19
+ change: (value: string | number | undefined) => any;
20
+ }, string, import('vue').PublicProps, Readonly<TreeSelectProps> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
22
+ onChange?: ((value: string | number | undefined) => any) | undefined;
23
+ }>, {
24
+ disabled: boolean;
25
+ modelValue: string | number;
26
+ placeholder: string;
27
+ clearable: boolean;
28
+ options: TreeSelectNode[];
29
+ defaultExpandAll: boolean;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as TreeSelect } from './TreeSelect.vue';
2
+ export { TreeSelect };
3
+ export default TreeSelect;
4
+ export type { TreeSelectProps, TreeSelectNode } from './TreeSelect.vue';
@@ -47,8 +47,8 @@ declare const __VLS_export: import('vue').DefineComponent<UploadProps, {}, {}, {
47
47
  }>, {
48
48
  name: string;
49
49
  action: string;
50
- accept: string;
51
50
  multiple: boolean;
51
+ accept: string;
52
52
  withCredentials: boolean;
53
53
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
54
54
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,29 @@
1
+ import { VirtualListProps } from './types';
2
+ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<VirtualListProps<T> & {
4
+ onScroll?: ((scrollTop: number) => any) | undefined;
5
+ onReachEnd?: (() => any) | undefined;
6
+ }> & (typeof globalThis extends {
7
+ __VLS_PROPS_FALLBACK: infer P;
8
+ } ? P : {});
9
+ expose: (exposed: {}) => void;
10
+ attrs: any;
11
+ slots: {
12
+ item?: (props: {
13
+ item: T;
14
+ index: number;
15
+ }) => any;
16
+ } & {
17
+ empty?: (props: {}) => any;
18
+ };
19
+ emit: ((evt: "scroll", scrollTop: number) => void) & ((evt: "reachEnd") => void);
20
+ }>) => import('vue').VNode & {
21
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
22
+ };
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
26
+ [K in keyof T]: T[K];
27
+ } : {
28
+ [K in keyof T as K]: T[K];
29
+ }) & {};
@@ -0,0 +1,4 @@
1
+ import { default as VirtualList } from './VirtualList.vue';
2
+ export { VirtualList };
3
+ export default VirtualList;
4
+ export type { VirtualListProps } from './types';
@@ -0,0 +1,12 @@
1
+ export interface VirtualListProps<T = unknown> {
2
+ /** 数据源 */
3
+ items: T[];
4
+ /** 单项高度(px),固定高度模式 */
5
+ itemHeight: number;
6
+ /** 可视区高度(px) */
7
+ height: number;
8
+ /** 视口上下各额外渲染的项数,减少快速滚动时的白屏 */
9
+ buffer?: number;
10
+ /** 触发 reachEnd 的提前量(px) */
11
+ reachEndThreshold?: number;
12
+ }