@veltra/desktop 1.0.12 → 1.0.13
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.
- package/dist/components/action/action-group.vue.d.ts +1 -1
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/cascade/cascade.vue.d.ts +1 -1
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/collapse/collapse.js.map +1 -1
- package/dist/components/collapse/collapse.vue.d.ts +2 -10
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/drawer/drawer.vue.d.ts +2 -2
- package/dist/components/multi-select/multi-select.vue.d.ts +1 -1
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +1 -1
- package/dist/components/notification/notification.vue.d.ts +1 -1
- package/dist/components/pop-confirm/pop-confirm.vue.d.ts +1 -1
- package/dist/components/progress-nodes/progress-nodes.vue.d.ts +2 -2
- package/dist/components/steps/steps.vue.d.ts +1 -1
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +3 -3
- package/dist/components/tabs/tabs-vertical.vue.d.ts +3 -3
- package/dist/components/tabs/tabs.vue.d.ts +3 -3
- package/dist/components/tip/tip.vue.d.ts +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +1 -1
- package/dist/types/collapse.d.ts +6 -5
- package/package.json +11 -11
- package/src/components/collapse/collapse.vue +5 -24
- package/src/types/collapse.ts +6 -6
|
@@ -7,8 +7,8 @@ type __VLS_Slots = {
|
|
|
7
7
|
default?: () => VNode[];
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: _$vue.DefineComponent<ActionGroupProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ActionGroupProps> & Readonly<{}>, {
|
|
10
|
-
circle: boolean;
|
|
11
10
|
max: number;
|
|
11
|
+
circle: boolean;
|
|
12
12
|
loading: boolean;
|
|
13
13
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: _$vue.DefineComponent<ActionProps, {}, {}, {}, {}, _$v
|
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<ActionProps> & Readonly<{
|
|
16
16
|
onRun?: (() => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
type: ButtonType;
|
|
19
18
|
size: _$_veltra_utils0.ComponentSize;
|
|
19
|
+
type: ButtonType;
|
|
20
20
|
text: boolean;
|
|
21
21
|
circle: boolean;
|
|
22
22
|
loading: boolean;
|
|
@@ -20,8 +20,8 @@ declare const __VLS_export: _$vue.DefineComponent<CascadeProps, {}, {}, {}, {},
|
|
|
20
20
|
placeholder: string;
|
|
21
21
|
clearable: boolean;
|
|
22
22
|
filterable: boolean;
|
|
23
|
-
separator: string;
|
|
24
23
|
visibilityLimit: number;
|
|
24
|
+
separator: string;
|
|
25
25
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
27
27
|
//#endregion
|
|
@@ -21,8 +21,8 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
21
21
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
disabled: boolean;
|
|
24
|
-
type: _$_veltra_utils0.ColorType;
|
|
25
24
|
readonly: boolean;
|
|
25
|
+
type: _$_veltra_utils0.ColorType;
|
|
26
26
|
round: boolean;
|
|
27
27
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse.js","names":[],"sources":["../../../src/components/collapse/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"classList\" role=\"region\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFormFallbackProps, useModel } from '@veltra/compositions'\nimport { bem } from '@veltra/utils'\nimport { computed, provide } from 'vue'\n\nimport type {\n CollapseEmits,\n
|
|
1
|
+
{"version":3,"file":"collapse.js","names":[],"sources":["../../../src/components/collapse/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"classList\" role=\"region\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFormFallbackProps, useModel } from '@veltra/compositions'\nimport { bem } from '@veltra/utils'\nimport { computed, provide } from 'vue'\n\nimport type {\n CollapseEmits,\n CollapseModelValue,\n CollapseProps,\n CollapseValue,\n _CollapseExposed\n} from '../../types'\nimport { CollapseDIKey } from './di'\n\ndefineOptions({\n name: 'Collapse'\n})\n\nconst props = withDefaults(defineProps<CollapseProps>(), {\n accordion: false,\n bordered: true,\n iconPosition: 'right'\n})\nconst emit = defineEmits<CollapseEmits>()\n\nconst cls = bem('collapse')\n\nconst { size } = useFormFallbackProps([props], { size: 'default' })\n\nconst iconPosition = computed(() => props.iconPosition ?? 'right')\nconst expandIcon = computed(() => props.expandIcon)\n\nconst classList = computed(() => [\n cls.b,\n cls.m(size.value),\n cls.m(`icon-${iconPosition.value}`),\n bem.is('bordered', props.bordered)\n])\n\nconst modelValue = useModel<CollapseProps, 'modelValue'>({\n props,\n emit,\n propName: 'modelValue'\n})\n\nconst activeValues = computed<CollapseValue[]>(() => {\n const v = modelValue.value\n if (v === undefined || v === null) return []\n return Array.isArray(v) ? v : [v]\n})\n\nconst update = (next: CollapseModelValue) => {\n modelValue.value = next\n emit('change', next)\n}\n\nconst toggle = (value: CollapseValue) => {\n if (props.accordion) {\n update(activeValues.value[0] === value ? [] : value)\n return\n }\n\n const values = activeValues.value.slice()\n const index = values.indexOf(value)\n if (index > -1) values.splice(index, 1)\n else values.push(value)\n update(values)\n}\n\nconst expand = (value: CollapseValue) => {\n if (activeValues.value.includes(value)) return\n if (props.accordion) {\n update(value)\n return\n }\n update([...activeValues.value, value])\n}\n\nconst collapse = (value: CollapseValue) => {\n if (!activeValues.value.includes(value)) return\n if (props.accordion) {\n update([])\n return\n }\n update(activeValues.value.filter((v) => v !== value))\n}\n\nconst expandAll = (values: CollapseValue[]) => {\n if (props.accordion) {\n update(values[0] ?? [])\n return\n }\n update([...values])\n}\n\nconst collapseAll = () => {\n update([])\n}\n\nprovide(CollapseDIKey, {\n cls,\n size,\n iconPosition,\n expandIcon,\n activeValues,\n toggle\n})\n\ndefineExpose<_CollapseExposed>({\n toggle,\n expand,\n collapse,\n expandAll,\n collapseAll\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,WAAU;EAE1B,MAAM,EAAE,SAAS,qBAAqB,CAAC,MAAM,EAAE,EAAE,MAAM,WAAW,CAAA;EAElE,MAAM,eAAe,eAAe,MAAM,gBAAgB,QAAO;EACjE,MAAM,aAAa,eAAe,MAAM,WAAU;EAElD,MAAM,YAAY,eAAe;GAC/B,IAAI;GACJ,IAAI,EAAE,KAAK,MAAM;GACjB,IAAI,EAAE,QAAQ,aAAa,QAAQ;GACnC,IAAI,GAAG,YAAY,MAAM,SAAQ;GAClC,CAAA;EAED,MAAM,aAAa,WAAsC;GACvD;GACA;GACA,UAAU;GACX,CAAA;EAED,MAAM,eAAe,eAAgC;GACnD,MAAM,IAAI,WAAW;AACrB,OAAI,MAAM,KAAA,KAAa,MAAM,KAAM,QAAO,EAAC;AAC3C,UAAO,MAAM,QAAQ,EAAE,GAAG,IAAI,CAAC,EAAC;IACjC;EAED,MAAM,UAAU,SAA6B;AAC3C,cAAW,QAAQ;AACnB,QAAK,UAAU,KAAI;;EAGrB,MAAM,UAAU,UAAyB;AACvC,OAAI,MAAM,WAAW;AACnB,WAAO,aAAa,MAAM,OAAO,QAAQ,EAAE,GAAG,MAAK;AACnD;;GAGF,MAAM,SAAS,aAAa,MAAM,OAAM;GACxC,MAAM,QAAQ,OAAO,QAAQ,MAAK;AAClC,OAAI,QAAQ,GAAI,QAAO,OAAO,OAAO,EAAC;OACjC,QAAO,KAAK,MAAK;AACtB,UAAO,OAAM;;EAGf,MAAM,UAAU,UAAyB;AACvC,OAAI,aAAa,MAAM,SAAS,MAAM,CAAE;AACxC,OAAI,MAAM,WAAW;AACnB,WAAO,MAAK;AACZ;;AAEF,UAAO,CAAC,GAAG,aAAa,OAAO,MAAM,CAAA;;EAGvC,MAAM,YAAY,UAAyB;AACzC,OAAI,CAAC,aAAa,MAAM,SAAS,MAAM,CAAE;AACzC,OAAI,MAAM,WAAW;AACnB,WAAO,EAAE,CAAA;AACT;;AAEF,UAAO,aAAa,MAAM,QAAQ,MAAM,MAAM,MAAM,CAAA;;EAGtD,MAAM,aAAa,WAA4B;AAC7C,OAAI,MAAM,WAAW;AACnB,WAAO,OAAO,MAAM,EAAE,CAAA;AACtB;;AAEF,UAAO,CAAC,GAAG,OAAO,CAAA;;EAGpB,MAAM,oBAAoB;AACxB,UAAO,EAAE,CAAA;;AAGX,UAAQ,eAAe;GACrB;GACA;GACA;GACA;GACA;GACA;GACD,CAAA;AAED,WAA+B;GAC7B;GACA;GACA;GACA;GACA;GACD,CAAA;;uBAvHC,mBAEM,OAAA;IAFA,OAAK,eAAE,UAAA,MAAS;IAAE,MAAK;OAC3B,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA"}
|
|
@@ -2,22 +2,14 @@ import { CollapseIconPosition, CollapseModelValue, CollapseProps, _CollapseExpos
|
|
|
2
2
|
import * as _$vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/collapse/collapse.vue.d.ts
|
|
5
|
-
type __VLS_Props = {
|
|
6
|
-
/** 当前展开项的 value(单个或多个) */modelValue?: CollapseModelValue; /** 是否手风琴模式(一次只能展开一项) */
|
|
7
|
-
accordion?: boolean; /** 是否显示外层与项之间的分隔线(设为 false 时为 ghost 风格) */
|
|
8
|
-
bordered?: boolean; /** 展开/收起图标位置 */
|
|
9
|
-
iconPosition?: CollapseIconPosition; /** 自定义展开图标组件,活动态会自动旋转 90° */
|
|
10
|
-
expandIcon?: CollapseProps['expandIcon']; /** 组件尺寸 */
|
|
11
|
-
size?: CollapseProps['size'];
|
|
12
|
-
};
|
|
13
5
|
declare var __VLS_1: {};
|
|
14
6
|
type __VLS_Slots = {} & {
|
|
15
7
|
default?: (props: typeof __VLS_1) => any;
|
|
16
8
|
};
|
|
17
|
-
declare const __VLS_base: _$vue.DefineComponent<
|
|
9
|
+
declare const __VLS_base: _$vue.DefineComponent<CollapseProps, _CollapseExposed, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
|
|
18
10
|
"update:modelValue": (value: CollapseModelValue) => any;
|
|
19
11
|
change: (value: CollapseModelValue) => any;
|
|
20
|
-
}, string, _$vue.PublicProps, Readonly<
|
|
12
|
+
}, string, _$vue.PublicProps, Readonly<CollapseProps> & Readonly<{
|
|
21
13
|
"onUpdate:modelValue"?: ((value: CollapseModelValue) => any) | undefined;
|
|
22
14
|
onChange?: ((value: CollapseModelValue) => any) | undefined;
|
|
23
15
|
}>, {
|
|
@@ -11,8 +11,8 @@ declare const __VLS_export: _$vue.DefineComponent<DatePanelProps, {}, {}, {}, {}
|
|
|
11
11
|
"onSelect:range-date"?: ((rangeDate?: [_$_cat_kit_core0.Dater, _$_cat_kit_core0.Dater] | undefined) => any) | undefined;
|
|
12
12
|
"onSelect:date"?: ((date: _$_cat_kit_core0.Dater) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
type: "date" | "month" | "year";
|
|
15
14
|
size: _$_veltra_utils0.ComponentSize;
|
|
15
|
+
type: "date" | "month" | "year";
|
|
16
16
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
18
18
|
//#endregion
|
|
@@ -8,8 +8,8 @@ declare const __VLS_export: _$vue.DefineComponent<DatePickerProps, {}, {}, {}, {
|
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
10
|
disabled: boolean;
|
|
11
|
-
type: "date" | "month" | "year";
|
|
12
11
|
readonly: boolean;
|
|
12
|
+
type: "date" | "month" | "year";
|
|
13
13
|
placeholder: string;
|
|
14
14
|
clearable: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -8,8 +8,8 @@ declare const __VLS_export: _$vue.DefineComponent<DateRangePickerProps, {}, {},
|
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
10
|
disabled: boolean;
|
|
11
|
-
type: "date" | "month" | "year";
|
|
12
11
|
readonly: boolean;
|
|
12
|
+
type: "date" | "month" | "year";
|
|
13
13
|
placeholder: [string, string];
|
|
14
14
|
clearable: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -14,12 +14,12 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: boolean) => any;
|
|
16
16
|
} & {
|
|
17
|
-
close: () => any;
|
|
18
17
|
"update:modelValue": (value: boolean) => any;
|
|
18
|
+
close: () => any;
|
|
19
19
|
closed: () => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
-
onClose?: (() => any) | undefined;
|
|
22
21
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
onClose?: (() => any) | undefined;
|
|
23
23
|
onClosed?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
direction: DrawerDirection;
|
|
@@ -28,9 +28,9 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
28
28
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
29
29
|
onChange?: ((options: Record<string, any>[]) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
-
minWidth: string;
|
|
32
31
|
disabled: boolean;
|
|
33
32
|
readonly: boolean;
|
|
33
|
+
minWidth: string;
|
|
34
34
|
labelKey: string;
|
|
35
35
|
valueKey: string;
|
|
36
36
|
placeholder: string;
|
|
@@ -22,9 +22,9 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
22
22
|
onClear?: (() => any) | undefined;
|
|
23
23
|
onChange?: ((checked: Record<string, any>[]) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
-
minWidth: string;
|
|
26
25
|
disabled: boolean;
|
|
27
26
|
readonly: boolean;
|
|
27
|
+
minWidth: string;
|
|
28
28
|
expandAll: boolean;
|
|
29
29
|
labelKey: string;
|
|
30
30
|
valueKey: string;
|
|
@@ -5,10 +5,10 @@ import * as _$_veltra_utils0 from "@veltra/utils";
|
|
|
5
5
|
//#region src/components/notification/notification.vue.d.ts
|
|
6
6
|
declare const __VLS_export: _$vue.DefineComponent<NotificationProps, _$_veltra_utils0.DeconstructValue<_NotificationExposed>, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<NotificationProps> & Readonly<{}>, {
|
|
7
7
|
closable: boolean;
|
|
8
|
+
position: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
8
9
|
duration: number;
|
|
9
10
|
offset: number;
|
|
10
11
|
buttonText: string;
|
|
11
|
-
position: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
12
12
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
//#endregion
|
|
@@ -14,8 +14,8 @@ declare const __VLS_base: _$vue.DefineComponent<PopConfirmProps, {}, {}, {}, {},
|
|
|
14
14
|
onConfirm?: (() => any) | undefined;
|
|
15
15
|
onCancel?: (() => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
trigger: "hover" | "click";
|
|
18
17
|
direction: TipDirection;
|
|
18
|
+
trigger: "hover" | "click";
|
|
19
19
|
icon: _$vue.Component;
|
|
20
20
|
iconColor: string;
|
|
21
21
|
confirmText: string;
|
|
@@ -16,11 +16,11 @@ type __VLS_Slots = {} & {
|
|
|
16
16
|
default?: (props: typeof __VLS_3) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: _$vue.DefineComponent<ProgressNodesProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
|
|
19
|
-
click: (node: Record<string, any>, index: number) => any;
|
|
20
19
|
"update:modelValue": (value: string | number) => any;
|
|
20
|
+
click: (node: Record<string, any>, index: number) => any;
|
|
21
21
|
}, string, _$vue.PublicProps, Readonly<ProgressNodesProps> & Readonly<{
|
|
22
|
-
onClick?: ((node: Record<string, any>, index: number) => any) | undefined;
|
|
23
22
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
23
|
+
onClick?: ((node: Record<string, any>, index: number) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
labelKey: string;
|
|
26
26
|
valueKey: string;
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: _$vue.DefineComponent<StepsProps, {}, {}, {}, {}, _$vu
|
|
|
15
15
|
"onUpdate:current"?: ((value?: string | number | undefined) => any) | undefined;
|
|
16
16
|
"onItem-click"?: ((item: Record<string, any>, index: number) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
labelKey: string;
|
|
19
18
|
direction: "horizontal" | "vertical";
|
|
19
|
+
labelKey: string;
|
|
20
20
|
finishedStepType: _$_veltra_utils0.ColorType;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -15,17 +15,17 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
15
15
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
16
16
|
"update:modelValue": (value: string | undefined) => any;
|
|
17
17
|
} & {
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
18
19
|
close: (item: TabItem, index: number) => any;
|
|
19
20
|
click: (item: TabItem, index: number) => any;
|
|
20
|
-
"update:modelValue": (value: string) => any;
|
|
21
21
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
23
|
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
23
24
|
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
24
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
closable: boolean;
|
|
27
|
-
position: "top" | "bottom";
|
|
28
27
|
rounded: boolean;
|
|
28
|
+
position: "top" | "bottom";
|
|
29
29
|
block: boolean;
|
|
30
30
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,17 +14,17 @@ type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_2>]?: (props: typeof __
|
|
|
14
14
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: string | undefined) => any;
|
|
16
16
|
} & {
|
|
17
|
+
"update:modelValue": (value: string) => any;
|
|
17
18
|
close: (item: TabItem, index: number) => any;
|
|
18
19
|
click: (item: TabItem, index: number) => any;
|
|
19
|
-
"update:modelValue": (value: string) => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
21
22
|
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
22
23
|
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
23
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
closable: boolean;
|
|
26
|
-
position: "left" | "right";
|
|
27
26
|
rounded: boolean;
|
|
27
|
+
position: "left" | "right";
|
|
28
28
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
29
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,17 +10,17 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
10
10
|
declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
11
11
|
"update:modelValue": (value: string | undefined) => any;
|
|
12
12
|
} & {
|
|
13
|
+
"update:modelValue": (value: string) => any;
|
|
13
14
|
close: (item: TabItem, index: number) => any;
|
|
14
15
|
click: (item: TabItem, index: number) => any;
|
|
15
|
-
"update:modelValue": (value: string) => any;
|
|
16
16
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
17
18
|
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
18
19
|
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
19
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
closable: boolean;
|
|
22
|
-
position: "left" | "right" | "top" | "bottom";
|
|
23
22
|
rounded: boolean;
|
|
23
|
+
position: "left" | "right" | "top" | "bottom";
|
|
24
24
|
block: boolean;
|
|
25
25
|
keepAlive: boolean;
|
|
26
26
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -11,10 +11,10 @@ declare const __VLS_base: _$vue.DefineComponent<TipProps, {}, {}, {}, {}, _$vue.
|
|
|
11
11
|
}, string, _$vue.PublicProps, Readonly<TipProps> & Readonly<{
|
|
12
12
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
+
direction: TipDirection;
|
|
14
15
|
trigger: "hover" | "click";
|
|
15
16
|
contentTag: string;
|
|
16
17
|
visible: boolean;
|
|
17
|
-
direction: TipDirection;
|
|
18
18
|
content: string;
|
|
19
19
|
alignment: TipAlign;
|
|
20
20
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -24,9 +24,9 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
24
24
|
onChange?: ((value?: string | number | undefined, selectedData?: Record<string, any> | undefined) => any) | undefined;
|
|
25
25
|
"onUpdate:text"?: ((text?: string | undefined) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
-
minWidth: string;
|
|
28
27
|
disabled: boolean;
|
|
29
28
|
readonly: boolean;
|
|
29
|
+
minWidth: string;
|
|
30
30
|
expandAll: boolean;
|
|
31
31
|
labelKey: string;
|
|
32
32
|
valueKey: string;
|
package/dist/types/collapse.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentProps, DeconstructValue } from "@veltra/utils";
|
|
3
3
|
|
|
4
4
|
//#region src/types/collapse.d.ts
|
|
5
5
|
/** Collapse 项的唯一标识 */
|
|
@@ -9,10 +9,13 @@ type CollapseModelValue = CollapseValue | CollapseValue[];
|
|
|
9
9
|
/** 展开图标位置 */
|
|
10
10
|
type CollapseIconPosition = 'left' | 'right';
|
|
11
11
|
/** Collapse 组件属性 */
|
|
12
|
-
interface CollapseProps {
|
|
12
|
+
interface CollapseProps extends ComponentProps {
|
|
13
13
|
/** 当前展开项的 value(单个或多个) */
|
|
14
14
|
modelValue?: CollapseModelValue;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* 是否手风琴模式(一次只能展开一项)
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
16
19
|
accordion?: boolean;
|
|
17
20
|
/**
|
|
18
21
|
* 是否显示外层与项之间的分隔线(设为 false 时为 ghost 风格)
|
|
@@ -29,8 +32,6 @@ interface CollapseProps {
|
|
|
29
32
|
* 接受任意 Vue 组件(SFC、Functional Component 等)。
|
|
30
33
|
*/
|
|
31
34
|
expandIcon?: Component;
|
|
32
|
-
/** 组件尺寸,与全局尺寸 token 联动 */
|
|
33
|
-
size?: ComponentSize;
|
|
34
35
|
}
|
|
35
36
|
interface CollapseEmits {
|
|
36
37
|
(e: 'update:modelValue', value: CollapseModelValue): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltra/desktop",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -62,22 +62,22 @@
|
|
|
62
62
|
"@lexical/rich-text": "^0.43.0",
|
|
63
63
|
"@lexical/selection": "^0.43.0",
|
|
64
64
|
"@lexical/utils": "^0.43.0",
|
|
65
|
-
"@veltra/compositions": "1.0.
|
|
66
|
-
"@veltra/directives": "1.0.
|
|
67
|
-
"@veltra/icons": "1.0.
|
|
68
|
-
"@veltra/styles": "1.0.
|
|
69
|
-
"@veltra/utils": "1.0.
|
|
65
|
+
"@veltra/compositions": "1.0.13",
|
|
66
|
+
"@veltra/directives": "1.0.13",
|
|
67
|
+
"@veltra/icons": "1.0.13",
|
|
68
|
+
"@veltra/styles": "1.0.13",
|
|
69
|
+
"@veltra/utils": "1.0.13",
|
|
70
70
|
"@visactor/vtable": "^1.26.0",
|
|
71
71
|
"codemirror": "^6.0.2",
|
|
72
72
|
"docx-preview": "^0.3.7",
|
|
73
73
|
"lexical": "^0.43.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@veltra/compositions": "1.0.
|
|
77
|
-
"@veltra/directives": "1.0.
|
|
78
|
-
"@veltra/icons": "1.0.
|
|
79
|
-
"@veltra/styles": "1.0.
|
|
80
|
-
"@veltra/utils": "1.0.
|
|
76
|
+
"@veltra/compositions": "1.0.13",
|
|
77
|
+
"@veltra/directives": "1.0.13",
|
|
78
|
+
"@veltra/icons": "1.0.13",
|
|
79
|
+
"@veltra/styles": "1.0.13",
|
|
80
|
+
"@veltra/utils": "1.0.13",
|
|
81
81
|
"vue": "^3.5.33"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -11,7 +11,6 @@ import { computed, provide } from 'vue'
|
|
|
11
11
|
|
|
12
12
|
import type {
|
|
13
13
|
CollapseEmits,
|
|
14
|
-
CollapseIconPosition,
|
|
15
14
|
CollapseModelValue,
|
|
16
15
|
CollapseProps,
|
|
17
16
|
CollapseValue,
|
|
@@ -23,29 +22,11 @@ defineOptions({
|
|
|
23
22
|
name: 'Collapse'
|
|
24
23
|
})
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
modelValue?: CollapseModelValue
|
|
32
|
-
/** 是否手风琴模式(一次只能展开一项) */
|
|
33
|
-
accordion?: boolean
|
|
34
|
-
/** 是否显示外层与项之间的分隔线(设为 false 时为 ghost 风格) */
|
|
35
|
-
bordered?: boolean
|
|
36
|
-
/** 展开/收起图标位置 */
|
|
37
|
-
iconPosition?: CollapseIconPosition
|
|
38
|
-
/** 自定义展开图标组件,活动态会自动旋转 90° */
|
|
39
|
-
expandIcon?: CollapseProps['expandIcon']
|
|
40
|
-
/** 组件尺寸 */
|
|
41
|
-
size?: CollapseProps['size']
|
|
42
|
-
}>(),
|
|
43
|
-
{
|
|
44
|
-
accordion: false,
|
|
45
|
-
bordered: true,
|
|
46
|
-
iconPosition: 'right'
|
|
47
|
-
}
|
|
48
|
-
)
|
|
25
|
+
const props = withDefaults(defineProps<CollapseProps>(), {
|
|
26
|
+
accordion: false,
|
|
27
|
+
bordered: true,
|
|
28
|
+
iconPosition: 'right'
|
|
29
|
+
})
|
|
49
30
|
const emit = defineEmits<CollapseEmits>()
|
|
50
31
|
|
|
51
32
|
const cls = bem('collapse')
|
package/src/types/collapse.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps, DeconstructValue } from '@veltra/utils'
|
|
2
2
|
import type { Component } from 'vue'
|
|
3
3
|
|
|
4
4
|
/** Collapse 项的唯一标识 */
|
|
@@ -11,11 +11,14 @@ export type CollapseModelValue = CollapseValue | CollapseValue[]
|
|
|
11
11
|
export type CollapseIconPosition = 'left' | 'right'
|
|
12
12
|
|
|
13
13
|
/** Collapse 组件属性 */
|
|
14
|
-
export interface CollapseProps {
|
|
14
|
+
export interface CollapseProps extends ComponentProps {
|
|
15
15
|
/** 当前展开项的 value(单个或多个) */
|
|
16
16
|
modelValue?: CollapseModelValue
|
|
17
17
|
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* 是否手风琴模式(一次只能展开一项)
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
19
22
|
accordion?: boolean
|
|
20
23
|
|
|
21
24
|
/**
|
|
@@ -35,9 +38,6 @@ export interface CollapseProps {
|
|
|
35
38
|
* 接受任意 Vue 组件(SFC、Functional Component 等)。
|
|
36
39
|
*/
|
|
37
40
|
expandIcon?: Component
|
|
38
|
-
|
|
39
|
-
/** 组件尺寸,与全局尺寸 token 联动 */
|
|
40
|
-
size?: ComponentSize
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export interface CollapseEmits {
|