@c2-markdown-ui/vue 0.0.0-stage → 0.4.4

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 (61) hide show
  1. package/README.md +112 -2
  2. package/dist/MarkdownUI.vue.d.ts +15 -0
  3. package/dist/favicon.ico +0 -0
  4. package/dist/index.css +1 -0
  5. package/dist/index.d.ts +23 -0
  6. package/dist/index.js +10843 -0
  7. package/dist/index.umd.cjs +53 -0
  8. package/dist/widgets/Button.vue.d.ts +19 -0
  9. package/dist/widgets/ButtonGroup.vue.d.ts +13 -0
  10. package/dist/widgets/Cascader.vue.d.ts +48 -0
  11. package/dist/widgets/Chart.vue.d.ts +24 -0
  12. package/dist/widgets/DatePicker.vue.d.ts +42 -0
  13. package/dist/widgets/Form.vue.d.ts +59 -0
  14. package/dist/widgets/Incomplete.vue.d.ts +2 -0
  15. package/dist/widgets/MultipleChoiceQuestion.vue.d.ts +20 -0
  16. package/dist/widgets/NumberInput.vue.d.ts +37 -0
  17. package/dist/widgets/Quiz.vue.d.ts +39 -0
  18. package/dist/widgets/RadioGroup.vue.d.ts +43 -0
  19. package/dist/widgets/Select.vue.d.ts +27 -0
  20. package/dist/widgets/SelectMulti.vue.d.ts +38 -0
  21. package/dist/widgets/ShortAnswerQuestion.vue.d.ts +22 -0
  22. package/dist/widgets/Slider.vue.d.ts +21 -0
  23. package/dist/widgets/Switch.vue.d.ts +28 -0
  24. package/dist/widgets/Text.vue.d.ts +22 -0
  25. package/dist/widgets/TextInput.vue.d.ts +32 -0
  26. package/dist/widgets/TreeSelect.vue.d.ts +109 -0
  27. package/dist/widgets/Widget.vue.d.ts +8 -0
  28. package/dist/widgets/chartRemoteData.d.ts +17 -0
  29. package/dist/widgets/index.d.ts +20 -0
  30. package/dist/widgets/remoteChoices.d.ts +22 -0
  31. package/dist/widgets/treeSelectTypes.d.ts +43 -0
  32. package/package.json +46 -4
  33. package/src/App.vue +11 -0
  34. package/src/lib/MarkdownUI.vue +105 -0
  35. package/src/lib/index.ts +28 -0
  36. package/src/lib/widgets/Button.vue +47 -0
  37. package/src/lib/widgets/ButtonGroup.vue +43 -0
  38. package/src/lib/widgets/Cascader.vue +475 -0
  39. package/src/lib/widgets/Chart.vue +287 -0
  40. package/src/lib/widgets/DatePicker.vue +659 -0
  41. package/src/lib/widgets/Form.vue +479 -0
  42. package/src/lib/widgets/Incomplete.vue +56 -0
  43. package/src/lib/widgets/MultipleChoiceQuestion.vue +73 -0
  44. package/src/lib/widgets/NumberInput.vue +179 -0
  45. package/src/lib/widgets/Quiz.vue +205 -0
  46. package/src/lib/widgets/RadioGroup.vue +237 -0
  47. package/src/lib/widgets/Select.vue +279 -0
  48. package/src/lib/widgets/SelectMulti.vue +145 -0
  49. package/src/lib/widgets/ShortAnswerQuestion.vue +79 -0
  50. package/src/lib/widgets/Slider.vue +61 -0
  51. package/src/lib/widgets/Switch.vue +68 -0
  52. package/src/lib/widgets/Text.vue +59 -0
  53. package/src/lib/widgets/TextInput.vue +83 -0
  54. package/src/lib/widgets/TreeSelect.vue +872 -0
  55. package/src/lib/widgets/Widget.vue +185 -0
  56. package/src/lib/widgets/chartRemoteData.ts +84 -0
  57. package/src/lib/widgets/index.ts +20 -0
  58. package/src/lib/widgets/remoteChoices.ts +64 -0
  59. package/src/lib/widgets/treeSelectTypes.ts +49 -0
  60. package/src/lib/widgets.css +1754 -0
  61. package/src/main.ts +4 -0
@@ -0,0 +1,19 @@
1
+ interface ButtonProps {
2
+ /** 按钮文字 */
3
+ label?: string;
4
+ /** 背景色(十六进制或 CSS 颜色名) */
5
+ color?: string;
6
+ /** 字体颜色(十六进制或 CSS 颜色名) */
7
+ textColor?: string;
8
+ /** 尺寸:small / medium / large,默认 medium */
9
+ size?: 'small' | 'medium' | 'large';
10
+ }
11
+ declare const _default: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ change: (value: string) => any;
13
+ }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
14
+ onChange?: (value: string) => any;
15
+ }>, {
16
+ label: string;
17
+ size: "small" | "medium" | "large";
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
+ export default _default;
@@ -0,0 +1,13 @@
1
+ interface ButtonGroupProps {
2
+ choices: string[];
3
+ label?: string;
4
+ default?: string;
5
+ }
6
+ declare const _default: import("vue").DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ change: (value: string) => any;
8
+ }, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{
9
+ onChange?: (value: string) => any;
10
+ }>, {
11
+ label: string;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,48 @@
1
+ interface CascadeNode {
2
+ value?: string | number;
3
+ /** value 的别名(key:label 风格数据源) */
4
+ key?: string | number;
5
+ label?: string | number;
6
+ children?: CascadeNode[];
7
+ /** lazy 模式:子级是否已请求过(请求返回空数组时为真叶子,标记避免重复请求) */
8
+ loaded?: boolean;
9
+ [extra: string]: any;
10
+ }
11
+ interface CascaderProps {
12
+ choices: string[];
13
+ /** 嵌套对象树数据源(与扁平路径 choices 兼容共存,优先于 choices) */
14
+ data?: CascadeNode[];
15
+ /** 远端数据源 URL:设置后运行时 fetch 拉取嵌套树,data/choices 作为初始/后备 */
16
+ url?: string;
17
+ /** 懒加载模式(url 存在时生效):首次只拉根级,点击父级后以 url?parent=<value> 逐级请求子级 */
18
+ lazy?: boolean;
19
+ label?: string;
20
+ default?: string;
21
+ placeholder?: string;
22
+ hint?: string;
23
+ required?: boolean;
24
+ /** 校验失败提示文案 */
25
+ message?: string;
26
+ /** 外部(form 提交时)传入的错误信息 */
27
+ error?: string;
28
+ /** 是否禁用 */
29
+ disabled?: boolean;
30
+ }
31
+ declare const _default: import("vue").DefineComponent<CascaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ change: (value: string) => any;
33
+ }, string, import("vue").PublicProps, Readonly<CascaderProps> & Readonly<{
34
+ onChange?: (value: string) => any;
35
+ }>, {
36
+ label: string;
37
+ default: string;
38
+ data: CascadeNode[];
39
+ required: boolean;
40
+ url: string;
41
+ lazy: boolean;
42
+ placeholder: string;
43
+ hint: string;
44
+ message: string;
45
+ error: string;
46
+ disabled: boolean;
47
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
48
+ export default _default;
@@ -0,0 +1,24 @@
1
+ interface Dataset {
2
+ label: string;
3
+ data: number[];
4
+ }
5
+ interface Props {
6
+ type: "chart-line" | "chart-bar" | "chart-pie" | "chart-scatter";
7
+ title?: string;
8
+ height?: number;
9
+ /** 远端数据源 URL:设置后运行时 fetch 拉取(CSV 文本或 JSON),本地 CSV 作为初始/后备数据 */
10
+ url?: string;
11
+ labels: string[];
12
+ datasets: Dataset[];
13
+ options?: Record<string, any>;
14
+ }
15
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ change: (data: any) => any;
17
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
18
+ onChange?: (data: any) => any;
19
+ }>, {
20
+ url: string;
21
+ height: number;
22
+ options: Record<string, any>;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ export default _default;
@@ -0,0 +1,42 @@
1
+ interface DatePickerProps {
2
+ label?: string;
3
+ /** 选择模式:date 仅日期(默认)/ datetime 日期+时间 */
4
+ picker?: 'date' | 'datetime';
5
+ /** 范围选择(antd RangePicker 效果:双月历面板) */
6
+ range?: boolean;
7
+ /** 默认值:时间戳(毫秒)或格式化时间字符串;range 模式为 [start, end] */
8
+ default?: number | string | (number | string)[];
9
+ /** 显示格式:默认按模式推导——date 为 YYYY-MM-DD,datetime 为 YYYY-MM-DD HH:mm:ss */
10
+ format?: string;
11
+ placeholder?: string;
12
+ /** 禁用当前日期之前的日期 */
13
+ disableBeforeNow?: boolean;
14
+ /** 禁用当前日期之后的日期 */
15
+ disableAfterNow?: boolean;
16
+ hint?: string;
17
+ required?: boolean;
18
+ /** 校验失败提示文案 */
19
+ message?: string;
20
+ /** 外部(form 提交时)传入的错误信息 */
21
+ error?: string;
22
+ /** 是否禁用(整组件不可交互) */
23
+ disabled?: boolean;
24
+ }
25
+ declare const _default: import("vue").DefineComponent<DatePickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ change: (value: number | number[]) => any;
27
+ }, string, import("vue").PublicProps, Readonly<DatePickerProps> & Readonly<{
28
+ onChange?: (value: number | number[]) => any;
29
+ }>, {
30
+ label: string;
31
+ required: boolean;
32
+ placeholder: string;
33
+ hint: string;
34
+ message: string;
35
+ error: string;
36
+ disabled: boolean;
37
+ range: boolean;
38
+ picker: "date" | "datetime";
39
+ disableBeforeNow: boolean;
40
+ disableAfterNow: boolean;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
42
+ export default _default;
@@ -0,0 +1,59 @@
1
+ interface Field {
2
+ type: string;
3
+ id: string;
4
+ /** 在 row 内占据的栅格数(1-24,类似 antd Col 的 span) */
5
+ span?: number;
6
+ [key: string]: any;
7
+ }
8
+ interface FormRow {
9
+ /** 列间距(px),类似 antd Row 的 gutter */
10
+ gutter?: number;
11
+ fields: Field[];
12
+ }
13
+ interface FormProps {
14
+ /** 表单 id(字段级统计事件携带,用于区分多个表单) */
15
+ id?: string;
16
+ fields: Field[];
17
+ /** 行分组(对象形态 { gutter, fields };兼容旧数组形态 Field[][]) */
18
+ rows?: (FormRow | Field[])[];
19
+ inline?: boolean;
20
+ columns?: number;
21
+ submitLabel?: string;
22
+ /** 取消按钮文案,未设置则不显示 */
23
+ cancelLabel?: string;
24
+ /** 清空/重置按钮文案,未设置则不显示 */
25
+ resetLabel?: string;
26
+ /** 按钮组对齐:left / center / right */
27
+ buttonsAlign?: 'left' | 'center' | 'right';
28
+ /** 字段 label 与内容的布局:vertical 上下(默认)/ horizontal 左右 */
29
+ layout?: 'vertical' | 'horizontal';
30
+ /** 左右布局时 label 的宽度(px),默认 80 */
31
+ labelWidth?: number;
32
+ /** 左右布局时内容区域的宽度(px 或省略自适应填满) */
33
+ contentWidth?: number;
34
+ /** 是否禁用:级联禁用所有字段与按钮 */
35
+ disabled?: boolean;
36
+ /** 外部注入的初始值 { 字段id: 值 },优先级高于字段 default;仅覆盖表单中已声明的字段 id */
37
+ initialData?: Record<string, unknown>;
38
+ }
39
+ /** 表单统计信息:字段级变化事件携带 */
40
+ export interface FormStats {
41
+ /** 表单 id */
42
+ id: string;
43
+ /** 当前展示(可见)的字段数 */
44
+ visibleCount: number;
45
+ /** 已填写(非空)的字段数 */
46
+ filledCount: number;
47
+ /** 当前表单数据(含隐藏字段值) */
48
+ values: Record<string, unknown>;
49
+ }
50
+ declare const _default: import("vue").DefineComponent<FormProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
51
+ change: (values: Record<string, unknown>) => any;
52
+ submit: (values: Record<string, unknown>) => any;
53
+ fieldchange: (stats: FormStats) => any;
54
+ }, string, import("vue").PublicProps, Readonly<FormProps> & Readonly<{
55
+ onChange?: (values: Record<string, unknown>) => any;
56
+ onSubmit?: (values: Record<string, unknown>) => any;
57
+ onFieldchange?: (stats: FormStats) => any;
58
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
59
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,20 @@
1
+ interface Props {
2
+ question: string;
3
+ choices: string[];
4
+ correctAnswer?: string;
5
+ showFeedback?: boolean;
6
+ }
7
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ change: (value: {
9
+ answer: string;
10
+ isCorrect?: boolean;
11
+ }) => any;
12
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
13
+ onChange?: (value: {
14
+ answer: string;
15
+ isCorrect?: boolean;
16
+ }) => any;
17
+ }>, {
18
+ showFeedback: boolean;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ export default _default;
@@ -0,0 +1,37 @@
1
+ interface NumberInputProps {
2
+ label?: string;
3
+ /** 最小值 */
4
+ min?: number;
5
+ /** 最大值 */
6
+ max?: number;
7
+ /** 步长(点击上下按钮/方向键的增减量),默认 1 */
8
+ step?: number;
9
+ /** 数值精度(小数位数) */
10
+ precision?: number;
11
+ default?: number;
12
+ placeholder?: string;
13
+ hint?: string;
14
+ /** 是否必填:空值提交校验不通过 */
15
+ required?: boolean;
16
+ /** 校验失败提示文案 */
17
+ message?: string;
18
+ /** 外部(form 提交时)传入的错误信息,优先于组件内部即时校验 */
19
+ error?: string;
20
+ /** 是否禁用 */
21
+ disabled?: boolean;
22
+ }
23
+ declare const _default: import("vue").DefineComponent<NumberInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ change: (value: number) => any;
25
+ }, string, import("vue").PublicProps, Readonly<NumberInputProps> & Readonly<{
26
+ onChange?: (value: number) => any;
27
+ }>, {
28
+ label: string;
29
+ required: boolean;
30
+ placeholder: string;
31
+ hint: string;
32
+ message: string;
33
+ error: string;
34
+ disabled: boolean;
35
+ step: number;
36
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
+ export default _default;
@@ -0,0 +1,39 @@
1
+ interface QuizQuestion {
2
+ id: string;
3
+ type: 'mcq' | 'short-answer';
4
+ question: string;
5
+ points: number;
6
+ choices?: string[];
7
+ correctAnswer?: string;
8
+ placeholder?: string;
9
+ correctAnswers?: string[];
10
+ }
11
+ interface QuizAnswer {
12
+ answer: string;
13
+ isCorrect: boolean;
14
+ points: number;
15
+ submitted: boolean;
16
+ }
17
+ interface QuizState {
18
+ answers: Record<string, QuizAnswer>;
19
+ totalScore: number;
20
+ maxScore: number;
21
+ questionsAnswered: number;
22
+ isCompleted: boolean;
23
+ }
24
+ interface Props {
25
+ title: string;
26
+ questions: QuizQuestion[];
27
+ showScore?: boolean;
28
+ showProgress?: boolean;
29
+ passingScore?: number;
30
+ }
31
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ change: (value: QuizState) => any;
33
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
34
+ onChange?: (value: QuizState) => any;
35
+ }>, {
36
+ showScore: boolean;
37
+ showProgress: boolean;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ export default _default;
@@ -0,0 +1,43 @@
1
+ interface RadioGroupProps {
2
+ /** 选项:字符串数组(每项支持 key:label 格式)或对象数组({key|value,label},取值为 key/value,展示 label) */
3
+ choices: string[] | Array<{
4
+ value?: string;
5
+ key?: string;
6
+ label?: string;
7
+ }>;
8
+ label?: string;
9
+ default?: string | string[];
10
+ /** 按钮样式(参考 antd Radio optionType:button):渲染为按钮组而非圆点单选 */
11
+ button?: boolean;
12
+ /** 远端数据源 URL:设置后运行时 fetch 拉取选项,choices 作为初始/后备选项 */
13
+ url?: string;
14
+ /** 选项排列方向:vertical 纵向(默认)/ horizontal 横向;按钮样式默认 horizontal */
15
+ direction?: 'vertical' | 'horizontal';
16
+ /** 自定义布局:每行列数(设置后按 N 列网格排列,优先于 direction) */
17
+ columns?: number;
18
+ hint?: string;
19
+ /** 是否必填 */
20
+ required?: boolean;
21
+ /** 校验失败提示文案 */
22
+ message?: string;
23
+ /** 外部(form 提交时)传入的错误信息 */
24
+ error?: string;
25
+ /** 是否禁用 */
26
+ disabled?: boolean;
27
+ }
28
+ declare const _default: import("vue").DefineComponent<RadioGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
+ change: (value: string) => any;
30
+ }, string, import("vue").PublicProps, Readonly<RadioGroupProps> & Readonly<{
31
+ onChange?: (value: string) => any;
32
+ }>, {
33
+ label: string;
34
+ required: boolean;
35
+ button: boolean;
36
+ url: string;
37
+ hint: string;
38
+ message: string;
39
+ error: string;
40
+ disabled: boolean;
41
+ columns: number;
42
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
43
+ export default _default;
@@ -0,0 +1,27 @@
1
+ interface SelectProps {
2
+ choices: string[];
3
+ label?: string;
4
+ default?: string;
5
+ /** 远端数据源 URL:设置后运行时 fetch 拉取选项,choices 作为初始/后备选项 */
6
+ url?: string;
7
+ /** 是否可搜索:开启后下拉面板内置搜索框,按 key/value 与 label 过滤选项 */
8
+ searchable?: boolean;
9
+ /** 是否禁用 */
10
+ disabled?: boolean;
11
+ hint?: string;
12
+ /** 是否必填 */
13
+ required?: boolean;
14
+ }
15
+ declare const _default: import("vue").DefineComponent<SelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ change: (value: string | string[]) => any;
17
+ }, string, import("vue").PublicProps, Readonly<SelectProps> & Readonly<{
18
+ onChange?: (value: string | string[]) => any;
19
+ }>, {
20
+ label: string;
21
+ required: boolean;
22
+ url: string;
23
+ hint: string;
24
+ disabled: boolean;
25
+ searchable: boolean;
26
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ export default _default;
@@ -0,0 +1,38 @@
1
+ interface SelectMultiProps {
2
+ /** 选项:字符串数组(每项支持 key:label 格式)或对象数组({key|value,label},取值为 key/value,展示 label) */
3
+ choices: string[] | Array<{
4
+ value?: string;
5
+ key?: string;
6
+ label?: string;
7
+ }>;
8
+ label?: string;
9
+ default?: string | string[];
10
+ /** 选项排列方向:vertical 纵向(默认)/ horizontal 横向 */
11
+ direction?: 'vertical' | 'horizontal';
12
+ /** 自定义布局:每行列数(设置后按 N 列网格排列,优先于 direction) */
13
+ columns?: number;
14
+ hint?: string;
15
+ /** 是否必填:至少勾选一项 */
16
+ required?: boolean;
17
+ /** 校验失败提示文案 */
18
+ message?: string;
19
+ /** 外部(form 提交时)传入的错误信息 */
20
+ error?: string;
21
+ /** 是否禁用 */
22
+ disabled?: boolean;
23
+ }
24
+ declare const _default: import("vue").DefineComponent<SelectMultiProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ change: (value: string | string[]) => any;
26
+ }, string, import("vue").PublicProps, Readonly<SelectMultiProps> & Readonly<{
27
+ onChange?: (value: string | string[]) => any;
28
+ }>, {
29
+ label: string;
30
+ required: boolean;
31
+ hint: string;
32
+ message: string;
33
+ error: string;
34
+ disabled: boolean;
35
+ direction: "vertical" | "horizontal";
36
+ columns: number;
37
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
+ export default _default;
@@ -0,0 +1,22 @@
1
+ interface Props {
2
+ question: string;
3
+ placeholder?: string;
4
+ correctAnswer?: string;
5
+ correctAnswers?: string[];
6
+ showFeedback?: boolean;
7
+ }
8
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ change: (value: {
10
+ answer: string;
11
+ isCorrect?: boolean;
12
+ }) => any;
13
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
14
+ onChange?: (value: {
15
+ answer: string;
16
+ isCorrect?: boolean;
17
+ }) => any;
18
+ }>, {
19
+ placeholder: string;
20
+ showFeedback: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ export default _default;
@@ -0,0 +1,21 @@
1
+ interface SliderProps {
2
+ min: number;
3
+ max: number;
4
+ step?: number;
5
+ label?: string;
6
+ default?: number;
7
+ hint?: string;
8
+ /** 是否必填(slider 始终有值,仅语义标记) */
9
+ required?: boolean;
10
+ }
11
+ declare const _default: import("vue").DefineComponent<SliderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ change: (value: number) => any;
13
+ }, string, import("vue").PublicProps, Readonly<SliderProps> & Readonly<{
14
+ onChange?: (value: number) => any;
15
+ }>, {
16
+ label: string;
17
+ required: boolean;
18
+ hint: string;
19
+ step: number;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,28 @@
1
+ interface SwitchProps {
2
+ /** 显示标签 */
3
+ label?: string;
4
+ /** 默认是否选中(缺省 false) */
5
+ default?: boolean;
6
+ /** 选中时展示的文案(antd checkedChildren) */
7
+ checkedText?: string;
8
+ /** 未选中时展示的文案(antd unCheckedChildren) */
9
+ unCheckedText?: string;
10
+ /** 是否禁用 */
11
+ disabled?: boolean;
12
+ hint?: string;
13
+ /** 是否必填 */
14
+ required?: boolean;
15
+ }
16
+ declare const _default: import("vue").DefineComponent<SwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ change: (value: boolean) => any;
18
+ }, string, import("vue").PublicProps, Readonly<SwitchProps> & Readonly<{
19
+ onChange?: (value: boolean) => any;
20
+ }>, {
21
+ label: string;
22
+ required: boolean;
23
+ hint: string;
24
+ disabled: boolean;
25
+ checkedText: string;
26
+ unCheckedText: string;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
+ export default _default;
@@ -0,0 +1,22 @@
1
+ interface TextProps {
2
+ /** 文字内容 */
3
+ text?: string;
4
+ /** 字号(12-48),默认 14 */
5
+ size?: number;
6
+ /** 字体颜色(十六进制或 CSS 颜色名) */
7
+ color?: string;
8
+ /** 加粗 */
9
+ bold?: boolean;
10
+ /** 文字对齐:left / center / right */
11
+ align?: 'left' | 'center' | 'right';
12
+ /** 是否启用 Alert 提示风格(参考 antd Alert) */
13
+ alert?: boolean;
14
+ /** Alert 风格:info(默认)/ warning / error */
15
+ alertStyle?: 'info' | 'warning' | 'error';
16
+ }
17
+ declare const _default: import("vue").DefineComponent<TextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextProps> & Readonly<{}>, {
18
+ text: string;
19
+ alert: boolean;
20
+ alertStyle: "info" | "warning" | "error";
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
+ export default _default;
@@ -0,0 +1,32 @@
1
+ interface TextInputProps {
2
+ placeholder?: string;
3
+ label?: string;
4
+ default?: string;
5
+ hint?: string;
6
+ /** 是否必填 */
7
+ required?: boolean;
8
+ /** 正则校验规则(JS 正则源字符串) */
9
+ pattern?: string;
10
+ /** 校验失败提示文案 */
11
+ message?: string;
12
+ /** 外部(form 提交时)传入的错误信息,优先于组件内部即时校验 */
13
+ error?: string;
14
+ /** 是否禁用 */
15
+ disabled?: boolean;
16
+ }
17
+ declare const _default: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ change: (value: string) => any;
19
+ }, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{
20
+ onChange?: (value: string) => any;
21
+ }>, {
22
+ label: string;
23
+ default: string;
24
+ required: boolean;
25
+ pattern: string;
26
+ placeholder: string;
27
+ hint: string;
28
+ message: string;
29
+ error: string;
30
+ disabled: boolean;
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
+ export default _default;
@@ -0,0 +1,109 @@
1
+ import type { TreeNodeRaw, TreeSelectProps } from './treeSelectTypes';
2
+ import { type VNode } from 'vue';
3
+ import type { TreeSelectNode } from './treeSelectTypes';
4
+ declare const TreeNode: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ node: {
6
+ type: () => TreeSelectNode;
7
+ required: true;
8
+ };
9
+ depth: {
10
+ type: NumberConstructor;
11
+ required: true;
12
+ };
13
+ multiple: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ checked: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ indeterminate: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ treeLine: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ lazy: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ url: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
+ [key: string]: any;
39
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("load" | "toggle" | "check")[], "load" | "toggle" | "check", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
40
+ node: {
41
+ type: () => TreeSelectNode;
42
+ required: true;
43
+ };
44
+ depth: {
45
+ type: NumberConstructor;
46
+ required: true;
47
+ };
48
+ multiple: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ checked: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ indeterminate: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ treeLine: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ lazy: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ url: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ }>> & Readonly<{
73
+ onLoad?: (...args: any[]) => any;
74
+ onToggle?: (...args: any[]) => any;
75
+ onCheck?: (...args: any[]) => any;
76
+ }>, {
77
+ url: string;
78
+ lazy: boolean;
79
+ multiple: boolean;
80
+ checked: boolean;
81
+ indeterminate: boolean;
82
+ treeLine: boolean;
83
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
84
+ export { TreeNode };
85
+ declare const _default: import("vue").DefineComponent<TreeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
86
+ change: (value: string | string[]) => any;
87
+ }, string, import("vue").PublicProps, Readonly<TreeSelectProps> & Readonly<{
88
+ onChange?: (value: string | string[]) => any;
89
+ }>, {
90
+ label: string;
91
+ default: string | string[];
92
+ data: TreeNodeRaw[];
93
+ required: boolean;
94
+ choices: string[];
95
+ url: string;
96
+ lazy: boolean;
97
+ placeholder: string;
98
+ hint: string;
99
+ message: string;
100
+ error: string;
101
+ disabled: boolean;
102
+ multiple: boolean;
103
+ treeLine: boolean;
104
+ checkStrictly: boolean;
105
+ showCheckedStrategy: string;
106
+ maxTagCount: number;
107
+ searchable: boolean;
108
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
109
+ export default _default;