@veltra/desktop 1.1.3 → 1.1.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.
- package/dist/components/action/action-group.vue.d.ts +3 -3
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/auto-complete/auto-complete.vue.d.ts +2 -2
- package/dist/components/cascade/cascade.vue.d.ts +5 -5
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +3 -3
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +3 -3
- package/dist/components/expression-editor/style2.css +1 -0
- package/dist/components/group-input/group-input.js +1 -0
- package/dist/components/group-input/group-input.js.map +1 -1
- package/dist/components/group-input/style.js +1 -0
- package/dist/components/input/input.vue.d.ts +4 -4
- package/dist/components/multi-select/multi-select-option.js +19 -14
- package/dist/components/multi-select/multi-select-option.js.map +1 -1
- package/dist/components/multi-select/multi-select.vue.d.ts +4 -4
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +6 -6
- package/dist/components/notification/notification.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +4 -4
- package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
- package/dist/components/number-range-input/style2.css +1 -0
- package/dist/components/password-input/password-input.vue.d.ts +1 -1
- package/dist/components/pop-confirm/pop-confirm.vue.d.ts +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
- package/dist/components/select/select.vue.d.ts +3 -3
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +4 -4
- package/dist/components/tabs/tabs-vertical.vue.d.ts +3 -3
- package/dist/components/tabs/tabs.vue.d.ts +4 -4
- package/dist/components/textarea/textarea.vue.d.ts +4 -4
- package/dist/components/tree-select/tree-select.vue.d.ts +6 -6
- package/package.json +11 -11
- package/src/components/expression-editor/style.scss +1 -0
- package/src/components/group-input/group-input.vue +8 -1
- package/src/components/group-input/style.ts +1 -0
- package/src/components/multi-select/multi-select-option.vue +19 -13
- package/src/components/number-range-input/style.scss +1 -0
|
@@ -16,12 +16,12 @@ type __VLS_Slots = {
|
|
|
16
16
|
default?: () => VNode[];
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: _$vue.DefineComponent<_Props, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_Props> & Readonly<{}>, {
|
|
19
|
-
type: ColorType;
|
|
20
|
-
max: number;
|
|
21
19
|
size: "small" | "default" | "large";
|
|
22
|
-
|
|
20
|
+
type: ColorType;
|
|
23
21
|
hover: boolean;
|
|
22
|
+
text: boolean;
|
|
24
23
|
circle: boolean;
|
|
24
|
+
max: number;
|
|
25
25
|
loading: boolean;
|
|
26
26
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
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;
|
|
@@ -24,10 +24,10 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
24
24
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
25
25
|
onSelect?: ((value: string) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
-
clearable: boolean;
|
|
28
|
-
placeholder: string;
|
|
29
27
|
disabled: boolean;
|
|
30
28
|
readonly: boolean;
|
|
29
|
+
placeholder: string;
|
|
30
|
+
clearable: boolean;
|
|
31
31
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -4,23 +4,23 @@ import * as _$vue from "vue";
|
|
|
4
4
|
//#region src/components/cascade/cascade.vue.d.ts
|
|
5
5
|
declare const __VLS_export: _$vue.DefineComponent<CascadeProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
|
|
6
6
|
"update:modelValue": (value?: string | string[] | undefined) => any;
|
|
7
|
-
change: (...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any;
|
|
8
7
|
clear: () => any;
|
|
8
|
+
change: (...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any;
|
|
9
9
|
}, string, _$vue.PublicProps, Readonly<CascadeProps> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((value?: string | string[] | undefined) => any) | undefined;
|
|
11
|
-
onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
|
|
12
11
|
onClear?: (() => any) | undefined;
|
|
12
|
+
onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
readonly: boolean;
|
|
14
16
|
labelKey: string;
|
|
15
17
|
valueKey: string;
|
|
16
18
|
childrenKey: string;
|
|
17
19
|
data: Record<string, any>[];
|
|
18
|
-
clearable: boolean;
|
|
19
20
|
placeholder: string;
|
|
21
|
+
clearable: boolean;
|
|
20
22
|
filterable: boolean;
|
|
21
23
|
visibilityLimit: number;
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
readonly: boolean;
|
|
24
24
|
separator: string;
|
|
25
25
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -20,9 +20,9 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
20
20
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
21
21
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
-
type: _$_veltra_utils0.ColorType;
|
|
24
23
|
disabled: boolean;
|
|
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>;
|
|
@@ -14,10 +14,10 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
14
14
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
15
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
labelKey: string;
|
|
18
|
-
valueKey: string;
|
|
19
17
|
disabled: boolean;
|
|
20
18
|
readonly: boolean;
|
|
19
|
+
labelKey: string;
|
|
20
|
+
valueKey: string;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
//#endregion
|
|
@@ -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
|
|
@@ -7,11 +7,11 @@ declare const __VLS_export: _$vue.DefineComponent<DatePickerProps, {}, {}, {}, {
|
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
type: "date" | "month" | "year";
|
|
11
|
-
clearable: boolean;
|
|
12
|
-
placeholder: string;
|
|
13
10
|
disabled: boolean;
|
|
14
11
|
readonly: boolean;
|
|
12
|
+
type: "date" | "month" | "year";
|
|
13
|
+
placeholder: string;
|
|
14
|
+
clearable: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
//#endregion
|
|
@@ -7,11 +7,11 @@ declare const __VLS_export: _$vue.DefineComponent<DateRangePickerProps, {}, {},
|
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DateRangePickerProps> & Readonly<{
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
type: "date" | "month" | "year";
|
|
11
|
-
clearable: boolean;
|
|
12
|
-
placeholder: [string, string];
|
|
13
10
|
disabled: boolean;
|
|
14
11
|
readonly: boolean;
|
|
12
|
+
type: "date" | "month" | "year";
|
|
13
|
+
placeholder: [string, string];
|
|
14
|
+
clearable: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-input.js","names":[],"sources":["../../../src/components/group-input/group-input.vue"],"sourcesContent":["<template>\n <ul :class=\"[cls.b, cls.m(size)]\" v-if=\"!readonly\">\n <li v-if=\"isEmpty && creatable\">\n <u-button style=\"width: 100%\" :icon=\"Plus\" @click=\"handleAdd(0)\" :size=\"size\">\n 新增\n </u-button>\n </li>\n <li v-for=\"(item, index) of items\" :key=\"item.id\" :class=\"cls.e('item')\" :style=\"itemStyle\">\n <slot v-bind=\"{ item: item.data, index }\" />\n <span :class=\"cls.e('actions')\">\n <u-button\n :icon=\"Minus\"\n circle\n :disabled=\"disabled\"\n :size=\"size\"\n @click=\"handleRemove(index)\"\n />\n <u-button
|
|
1
|
+
{"version":3,"file":"group-input.js","names":[],"sources":["../../../src/components/group-input/group-input.vue"],"sourcesContent":["<template>\n <ul :class=\"[cls.b, cls.m(size)]\" v-if=\"!readonly\">\n <li v-if=\"isEmpty && creatable\">\n <u-button style=\"width: 100%\" :icon=\"Plus\" @click=\"handleAdd(0)\" :size=\"size\">\n 新增\n </u-button>\n </li>\n <li v-for=\"(item, index) of items\" :key=\"item.id\" :class=\"cls.e('item')\" :style=\"itemStyle\">\n <slot v-bind=\"{ item: item.data, index }\" />\n <span :class=\"cls.e('actions')\">\n <u-button\n :icon=\"Minus\"\n circle\n :disabled=\"disabled\"\n :size=\"size\"\n @click=\"handleRemove(index)\"\n />\n <u-button\n :icon=\"Plus\"\n circle\n :disabled=\"disabled\"\n :size=\"size\"\n type=\"primary\"\n @click=\"handleAdd(index)\"\n />\n </span>\n </li>\n </ul>\n\n <template v-else-if=\"items?.length\">\n <ul :class=\"[cls.b, cls.m(size)]\">\n <li v-for=\"item of items\" :key=\"item.id\" :class=\"cls.e('item')\">\n <span v-for=\"v in item.data\">{{ v }}</span>\n </li>\n </ul>\n </template>\n\n <template v-else>\n {{ FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup generic=\"GroupItem extends Record<string, any>\">\nimport { useFormFallbackProps } from '@veltra/compositions'\nimport { Minus, Plus } from '@veltra/icons/normal'\nimport { bem, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed } from 'vue'\n\nimport type { GroupInputEmits, GroupInputProps } from '../../types'\nimport { UButton } from '../button'\nimport { useGroupItems } from './use-group-items'\n\ndefineOptions({\n name: 'GroupInput'\n})\n\nconst props = withDefaults(defineProps<GroupInputProps<GroupItem>>(), {\n modelValue: () => [],\n disabled: undefined,\n readonly: undefined,\n creatable: true\n})\n\nconst emit = defineEmits<GroupInputEmits>()\n\nconst cls = bem('group-input')\n\nconst { formProps } = injectFormContext()\nconst { disabled, size, readonly } = useFormFallbackProps([formProps ?? {}, props], {\n size: 'default',\n disabled: false,\n readonly: false\n})\n\nconst { items, createItem, runByEvent } = useGroupItems({\n props,\n emit\n})\n\nconst isEmpty = computed(() => {\n return !items.value.length\n})\n\nfunction handleAdd(index: number) {\n runByEvent(() => {\n items.value = [\n ...items.value.slice(0, index + 1),\n createItem({}),\n ...items.value.slice(index + 1)\n ]\n })\n}\n\nfunction handleRemove(index: number) {\n runByEvent(() => {\n items.value = [...items.value.slice(0, index), ...items.value.slice(index + 1)]\n })\n}\n</script>\n"],"mappings":"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"}
|
|
@@ -17,27 +17,27 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, _InputExposed
|
|
|
17
17
|
"update:modelValue": (value: string | undefined) => any;
|
|
18
18
|
} & {
|
|
19
19
|
"update:modelValue": (value: string) => any;
|
|
20
|
+
clear: () => any;
|
|
20
21
|
change: (value: string) => any;
|
|
21
22
|
"suffix:click": (value?: string | undefined) => any;
|
|
22
23
|
"prefix:click": (value?: string | undefined) => any;
|
|
23
24
|
focus: (value?: string | undefined) => any;
|
|
24
|
-
clear: () => any;
|
|
25
25
|
blur: (value?: string | undefined) => any;
|
|
26
26
|
"native:input": (ev: Event) => any;
|
|
27
27
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
28
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
|
+
onClear?: (() => any) | undefined;
|
|
29
30
|
onChange?: ((value: string) => any) | undefined;
|
|
30
31
|
"onSuffix:click"?: ((value?: string | undefined) => any) | undefined;
|
|
31
32
|
"onPrefix:click"?: ((value?: string | undefined) => any) | undefined;
|
|
32
33
|
onFocus?: ((value?: string | undefined) => any) | undefined;
|
|
33
|
-
onClear?: (() => any) | undefined;
|
|
34
34
|
onBlur?: ((value?: string | undefined) => any) | undefined;
|
|
35
35
|
"onNative:input"?: ((ev: Event) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
|
-
clearable: boolean;
|
|
38
|
-
placeholder: string;
|
|
39
37
|
disabled: boolean;
|
|
40
38
|
readonly: boolean;
|
|
39
|
+
placeholder: string;
|
|
40
|
+
clearable: boolean;
|
|
41
41
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
42
42
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
43
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _sfc_main$1 from "../checkbox/checkbox.js";
|
|
2
2
|
import { MultiSelectDIKey } from "./di.js";
|
|
3
|
-
import { createElementBlock, createVNode, defineComponent, inject, normalizeClass, onBeforeUnmount, openBlock, renderSlot, unref, withModifiers } from "vue";
|
|
3
|
+
import { createElementBlock, createVNode, defineComponent, inject, normalizeClass, onBeforeUnmount, openBlock, renderSlot, shallowRef, unref, withModifiers } from "vue";
|
|
4
4
|
import { Ripple } from "@veltra/directives";
|
|
5
5
|
//#region src/components/multi-select/multi-select-option.vue
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -16,32 +16,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
emits: ["check"],
|
|
17
17
|
setup(__props, { emit: __emit }) {
|
|
18
18
|
const props = __props;
|
|
19
|
-
const { disabled = false, checked } = props;
|
|
20
19
|
function measureRef(el) {
|
|
21
20
|
if (typeof props.index !== "number" || !props.measureElement) return;
|
|
22
21
|
props.measureElement(props.index, el);
|
|
23
22
|
}
|
|
24
23
|
const emit = __emit;
|
|
25
24
|
const { optionClass, rippleClass, checkboxClass } = inject(MultiSelectDIKey);
|
|
26
|
-
|
|
25
|
+
const rippleRef = shallowRef(null);
|
|
27
26
|
function handleClick(e) {
|
|
28
|
-
if (disabled) return;
|
|
29
|
-
emit("check", !checked);
|
|
27
|
+
if (props.disabled) return;
|
|
28
|
+
emit("check", !props.checked);
|
|
30
29
|
}
|
|
31
30
|
function handleMousedown(e) {
|
|
32
|
-
if (disabled) return;
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
if (props.disabled) return;
|
|
32
|
+
if (rippleRef.value) {
|
|
33
|
+
rippleRef.value.remove();
|
|
34
|
+
rippleRef.value = null;
|
|
35
|
+
}
|
|
36
|
+
rippleRef.value = new Ripple(e.currentTarget, { rippleClass });
|
|
37
|
+
rippleRef.value.showByEvent(e);
|
|
35
38
|
}
|
|
36
39
|
function handleMouseleave() {
|
|
37
|
-
|
|
40
|
+
rippleRef.value?.remove();
|
|
41
|
+
rippleRef.value = null;
|
|
38
42
|
}
|
|
39
43
|
function handleMouseup() {
|
|
40
|
-
|
|
44
|
+
rippleRef.value?.remove();
|
|
45
|
+
rippleRef.value = null;
|
|
41
46
|
}
|
|
42
47
|
onBeforeUnmount(() => {
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
rippleRef.value?.remove();
|
|
49
|
+
rippleRef.value = null;
|
|
45
50
|
});
|
|
46
51
|
return (_ctx, _cache) => {
|
|
47
52
|
return openBlock(), createElementBlock("li", {
|
|
@@ -53,10 +58,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
58
|
ref: measureRef
|
|
54
59
|
}, [createVNode(unref(_sfc_main$1), {
|
|
55
60
|
class: normalizeClass(unref(checkboxClass)),
|
|
56
|
-
"model-value":
|
|
61
|
+
"model-value": __props.checked,
|
|
57
62
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("check", $event)),
|
|
58
63
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
|
|
59
|
-
disabled:
|
|
64
|
+
disabled: __props.disabled
|
|
60
65
|
}, null, 8, [
|
|
61
66
|
"class",
|
|
62
67
|
"model-value",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-select-option.js","names":[],"sources":["../../../src/components/multi-select/multi-select-option.vue"],"sourcesContent":["<template>\n <li\n :class=\"optionClass\"\n @click=\"handleClick\"\n @mousedown=\"handleMousedown\"\n @mouseup=\"handleMouseup\"\n @mouseleave=\"handleMouseleave\"\n :ref=\"measureRef\"\n >\n <u-checkbox\n :class=\"checkboxClass\"\n :model-value=\"checked\"\n @update:model-value=\"emit('check', $event)\"\n @click.stop\n :disabled=\"disabled\"\n />\n\n <slot />\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Ripple } from '@veltra/directives'\nimport { inject, onBeforeUnmount } from 'vue'\n\nimport { UCheckbox } from '../checkbox'\nimport { MultiSelectDIKey } from './di'\n\ndefineOptions({\n name: 'MultiSelectOption'\n})\n\nconst props = defineProps<{\n option: Record<string, any>\n disabled?: boolean\n checked: boolean\n /**\n * 虚拟项索引:对应 `options` 数组中的绝对位置。\n * 非虚拟模式下可省略;虚拟模式下必须传入,否则元素卸载时 Virtualizer 无法及时解绑,\n * 会因为 ResizeObserver 对脱离 DOM 的元素回调 size=0 而污染尺寸缓存。\n */\n index?: number\n measureElement?: (index: number, el: Element | null) => void\n}>()\n\
|
|
1
|
+
{"version":3,"file":"multi-select-option.js","names":[],"sources":["../../../src/components/multi-select/multi-select-option.vue"],"sourcesContent":["<template>\n <li\n :class=\"optionClass\"\n @click=\"handleClick\"\n @mousedown=\"handleMousedown\"\n @mouseup=\"handleMouseup\"\n @mouseleave=\"handleMouseleave\"\n :ref=\"measureRef\"\n >\n <u-checkbox\n :class=\"checkboxClass\"\n :model-value=\"checked\"\n @update:model-value=\"emit('check', $event)\"\n @click.stop\n :disabled=\"disabled\"\n />\n\n <slot />\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Ripple } from '@veltra/directives'\nimport { inject, onBeforeUnmount, shallowRef } from 'vue'\n\nimport { UCheckbox } from '../checkbox'\nimport { MultiSelectDIKey } from './di'\n\ndefineOptions({\n name: 'MultiSelectOption'\n})\n\nconst props = defineProps<{\n option: Record<string, any>\n disabled?: boolean\n checked: boolean\n /**\n * 虚拟项索引:对应 `options` 数组中的绝对位置。\n * 非虚拟模式下可省略;虚拟模式下必须传入,否则元素卸载时 Virtualizer 无法及时解绑,\n * 会因为 ResizeObserver 对脱离 DOM 的元素回调 size=0 而污染尺寸缓存。\n */\n index?: number\n measureElement?: (index: number, el: Element | null) => void\n}>()\n\nfunction measureRef(el: unknown) {\n if (typeof props.index !== 'number' || !props.measureElement) return\n props.measureElement(props.index, el as Element | null)\n}\n\nconst emit = defineEmits<{\n (e: 'check', checked: boolean): void\n}>()\n\nconst { optionClass, rippleClass, checkboxClass } = inject(MultiSelectDIKey)!\n\nconst rippleRef = shallowRef<Ripple | null>(null)\n\nfunction handleClick(e) {\n if (props.disabled) return\n emit('check', !props.checked)\n}\n\nfunction handleMousedown(e: MouseEvent) {\n if (props.disabled) return\n\n // 清理旧实例,避免同一元素上多个 Ripple 实例同时修改样式\n if (rippleRef.value) {\n rippleRef.value.remove()\n rippleRef.value = null\n }\n\n rippleRef.value = new Ripple(e.currentTarget as HTMLElement, {\n rippleClass\n })\n\n rippleRef.value.showByEvent(e)\n}\n\nfunction handleMouseleave() {\n rippleRef.value?.remove()\n rippleRef.value = null\n}\n\nfunction handleMouseup() {\n rippleRef.value?.remove()\n rippleRef.value = null\n}\n\nonBeforeUnmount(() => {\n rippleRef.value?.remove()\n rippleRef.value = null\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAgCA,MAAM,QAAQ;EAad,SAAS,WAAW,IAAa;AAC/B,OAAI,OAAO,MAAM,UAAU,YAAY,CAAC,MAAM,eAAgB;AAC9D,SAAM,eAAe,MAAM,OAAO,GAAoB;;EAGxD,MAAM,OAAO;EAIb,MAAM,EAAE,aAAa,aAAa,kBAAkB,OAAO,iBAAiB;EAE5E,MAAM,YAAY,WAA0B,KAAI;EAEhD,SAAS,YAAY,GAAG;AACtB,OAAI,MAAM,SAAU;AACpB,QAAK,SAAS,CAAC,MAAM,QAAO;;EAG9B,SAAS,gBAAgB,GAAe;AACtC,OAAI,MAAM,SAAU;AAGpB,OAAI,UAAU,OAAO;AACnB,cAAU,MAAM,QAAO;AACvB,cAAU,QAAQ;;AAGpB,aAAU,QAAQ,IAAI,OAAO,EAAE,eAA8B,EAC3D,aACD,CAAA;AAED,aAAU,MAAM,YAAY,EAAC;;EAG/B,SAAS,mBAAmB;AAC1B,aAAU,OAAO,QAAO;AACxB,aAAU,QAAQ;;EAGpB,SAAS,gBAAgB;AACvB,aAAU,OAAO,QAAO;AACxB,aAAU,QAAQ;;AAGpB,wBAAsB;AACpB,aAAU,OAAO,QAAO;AACxB,aAAU,QAAQ;IACnB;;uBA3FC,mBAiBK,MAAA;IAhBF,OAAK,eAAE,MAAA,YAAW,CAAA;IAClB,SAAO;IACP,aAAW;IACX,WAAS;IACT,cAAY;IACZ,KAAK;OAEN,YAME,MAAA,YAAA,EAAA;IALC,OAAK,eAAE,MAAA,cAAa,CAAA;IACpB,eAAa,QAAA;IACb,uBAAkB,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAU,OAAM;IACxC,SAAK,OAAA,OAAA,OAAA,KAAA,oBAAN,IAAW,CAAA,OAAA,CAAA;IACV,UAAU,QAAA;;;;;OAGb,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
|
|
@@ -28,14 +28,14 @@ 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
|
+
disabled: boolean;
|
|
32
|
+
readonly: boolean;
|
|
31
33
|
labelKey: string;
|
|
32
34
|
valueKey: string;
|
|
33
|
-
|
|
35
|
+
minWidth: string;
|
|
34
36
|
placeholder: string;
|
|
37
|
+
clearable: boolean;
|
|
35
38
|
visibilityLimit: number;
|
|
36
|
-
minWidth: string;
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
readonly: boolean;
|
|
39
39
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -15,23 +15,23 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
15
15
|
"update:modelValue": (value: (string | number)[]) => any;
|
|
16
16
|
} & {
|
|
17
17
|
"update:modelValue": (value: any[]) => any;
|
|
18
|
-
change: (checked: Record<string, any>[]) => any;
|
|
19
18
|
clear: () => any;
|
|
19
|
+
change: (checked: Record<string, any>[]) => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
22
|
-
onChange?: ((checked: Record<string, any>[]) => any) | undefined;
|
|
23
22
|
onClear?: (() => any) | undefined;
|
|
23
|
+
onChange?: ((checked: Record<string, any>[]) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
readonly: boolean;
|
|
25
27
|
expandAll: boolean;
|
|
26
28
|
labelKey: string;
|
|
27
29
|
valueKey: string;
|
|
28
|
-
|
|
30
|
+
minWidth: string;
|
|
29
31
|
placeholder: string;
|
|
32
|
+
clearable: boolean;
|
|
30
33
|
filterable: boolean;
|
|
31
34
|
visibilityLimit: number;
|
|
32
|
-
minWidth: string;
|
|
33
|
-
disabled: boolean;
|
|
34
|
-
readonly: boolean;
|
|
35
35
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
@@ -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
|
|
@@ -15,17 +15,17 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
15
15
|
"update:modelValue": (value: number | undefined) => any;
|
|
16
16
|
} & {
|
|
17
17
|
"update:modelValue": (value?: number | undefined) => any;
|
|
18
|
-
change: (value?: number | undefined) => any;
|
|
19
18
|
clear: () => any;
|
|
19
|
+
change: (value?: number | undefined) => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((value?: number | undefined) => any) | undefined;
|
|
22
|
-
onChange?: ((value?: number | undefined) => any) | undefined;
|
|
23
22
|
onClear?: (() => any) | undefined;
|
|
23
|
+
onChange?: ((value?: number | undefined) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
-
clearable: boolean;
|
|
26
|
-
placeholder: string;
|
|
27
25
|
disabled: boolean;
|
|
28
26
|
readonly: boolean;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
clearable: boolean;
|
|
29
29
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -24,9 +24,9 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
24
24
|
"onUpdate:start"?: ((value: number | undefined) => any) | undefined;
|
|
25
25
|
"onUpdate:end"?: ((value: number | undefined) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
-
clearable: boolean;
|
|
28
27
|
disabled: boolean;
|
|
29
28
|
readonly: boolean;
|
|
29
|
+
clearable: boolean;
|
|
30
30
|
startPlaceholder: string;
|
|
31
31
|
endPlaceholder: string;
|
|
32
32
|
separator: string;
|
|
@@ -15,9 +15,9 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
16
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
clearable: boolean;
|
|
19
18
|
disabled: boolean;
|
|
20
19
|
readonly: boolean;
|
|
20
|
+
clearable: boolean;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -14,9 +14,9 @@ declare const __VLS_base: _$vue.DefineComponent<PopConfirmProps, {}, {}, {}, {},
|
|
|
14
14
|
onConfirm?: (() => any) | undefined;
|
|
15
15
|
onCancel?: (() => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
icon: _$vue.Component;
|
|
18
17
|
trigger: "hover" | "click";
|
|
19
18
|
direction: TipDirection;
|
|
19
|
+
icon: _$vue.Component;
|
|
20
20
|
iconColor: string;
|
|
21
21
|
confirmText: string;
|
|
22
22
|
cancelText: string;
|
|
@@ -16,10 +16,10 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
16
16
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
17
17
|
onChange?: ((item: Record<string, any>) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
labelKey: string;
|
|
20
|
-
valueKey: string;
|
|
21
19
|
disabled: boolean;
|
|
22
20
|
readonly: boolean;
|
|
21
|
+
labelKey: string;
|
|
22
|
+
valueKey: string;
|
|
23
23
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
25
25
|
//#endregion
|
|
@@ -12,9 +12,9 @@ declare const __VLS_export: _$vue.DefineComponent<RichTextEditorProps & {
|
|
|
12
12
|
}> & Readonly<{
|
|
13
13
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
|
-
placeholder: string;
|
|
16
15
|
disabled: boolean;
|
|
17
16
|
readonly: boolean;
|
|
17
|
+
placeholder: string;
|
|
18
18
|
format: RichTextFormat;
|
|
19
19
|
toolbar: ToolbarItem[];
|
|
20
20
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -26,12 +26,12 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
26
26
|
"onUpdate:text"?: ((value: any) => any) | undefined;
|
|
27
27
|
"onUpdate:label"?: ((label?: string | undefined) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
readonly: boolean;
|
|
29
31
|
labelKey: string;
|
|
30
32
|
valueKey: string;
|
|
31
|
-
clearable: boolean;
|
|
32
33
|
placeholder: string;
|
|
33
|
-
|
|
34
|
-
readonly: boolean;
|
|
34
|
+
clearable: boolean;
|
|
35
35
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
@@ -16,17 +16,17 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
16
16
|
"update:modelValue": (value: string | undefined) => any;
|
|
17
17
|
} & {
|
|
18
18
|
"update:modelValue": (value: string) => any;
|
|
19
|
-
close: (item: TabItem, index: number) => any;
|
|
20
19
|
click: (item: TabItem, index: number) => any;
|
|
20
|
+
close: (item: TabItem, index: number) => any;
|
|
21
21
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
22
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
|
-
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
24
23
|
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
24
|
+
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
closable: boolean;
|
|
27
|
-
position: "top" | "bottom";
|
|
28
|
-
rounded: boolean;
|
|
29
27
|
block: boolean;
|
|
28
|
+
rounded: boolean;
|
|
29
|
+
position: "top" | "bottom";
|
|
30
30
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
@@ -15,16 +15,16 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
15
15
|
"update:modelValue": (value: string | undefined) => any;
|
|
16
16
|
} & {
|
|
17
17
|
"update:modelValue": (value: string) => any;
|
|
18
|
-
close: (item: TabItem, index: number) => any;
|
|
19
18
|
click: (item: TabItem, index: number) => any;
|
|
19
|
+
close: (item: TabItem, index: number) => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
-
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
23
22
|
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
23
|
+
onClose?: ((item: TabItem, index: number) => 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;
|
|
@@ -11,17 +11,17 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
11
11
|
"update:modelValue": (value: string | undefined) => any;
|
|
12
12
|
} & {
|
|
13
13
|
"update:modelValue": (value: string) => any;
|
|
14
|
-
close: (item: TabItem, index: number) => any;
|
|
15
14
|
click: (item: TabItem, index: number) => any;
|
|
15
|
+
close: (item: TabItem, index: number) => any;
|
|
16
16
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
17
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
-
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
19
18
|
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
19
|
+
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
closable: boolean;
|
|
22
|
-
position: "left" | "right" | "top" | "bottom";
|
|
23
|
-
rounded: boolean;
|
|
24
22
|
block: boolean;
|
|
23
|
+
rounded: boolean;
|
|
24
|
+
position: "left" | "right" | "top" | "bottom";
|
|
25
25
|
keepAlive: boolean;
|
|
26
26
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -11,21 +11,21 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
11
11
|
"update:modelValue": (value: string | undefined) => any;
|
|
12
12
|
} & {
|
|
13
13
|
"update:modelValue": (value: string) => any;
|
|
14
|
+
clear: () => any;
|
|
14
15
|
change: (value: string) => any;
|
|
15
16
|
focus: () => any;
|
|
16
|
-
clear: () => any;
|
|
17
17
|
blur: () => any;
|
|
18
18
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
19
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
20
|
+
onClear?: (() => any) | undefined;
|
|
20
21
|
onChange?: ((value: string) => any) | undefined;
|
|
21
22
|
onFocus?: (() => any) | undefined;
|
|
22
|
-
onClear?: (() => any) | undefined;
|
|
23
23
|
onBlur?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
-
clearable: boolean;
|
|
26
|
-
placeholder: string;
|
|
27
25
|
disabled: boolean;
|
|
28
26
|
readonly: boolean;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
clearable: boolean;
|
|
29
29
|
resize: boolean;
|
|
30
30
|
autosize: boolean;
|
|
31
31
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -15,24 +15,24 @@ 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 | number | undefined) => any;
|
|
17
17
|
} & {
|
|
18
|
-
change: (value?: string | number | undefined, selectedData?: Record<string, any> | undefined) => any;
|
|
19
18
|
clear: () => any;
|
|
19
|
+
change: (value?: string | number | undefined, selectedData?: Record<string, any> | undefined) => any;
|
|
20
20
|
"update:text": (text?: string | undefined) => any;
|
|
21
21
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
22
|
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
|
|
23
|
-
onChange?: ((value?: string | number | undefined, selectedData?: Record<string, any> | undefined) => any) | undefined;
|
|
24
23
|
onClear?: (() => any) | undefined;
|
|
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
|
+
disabled: boolean;
|
|
28
|
+
readonly: boolean;
|
|
27
29
|
expandAll: boolean;
|
|
28
30
|
labelKey: string;
|
|
29
31
|
valueKey: string;
|
|
30
|
-
|
|
32
|
+
minWidth: string;
|
|
31
33
|
placeholder: string;
|
|
34
|
+
clearable: boolean;
|
|
32
35
|
filterable: boolean;
|
|
33
|
-
minWidth: string;
|
|
34
|
-
disabled: boolean;
|
|
35
|
-
readonly: boolean;
|
|
36
36
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
37
37
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
38
38
|
declare const _default: typeof __VLS_export;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltra/desktop",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -61,22 +61,22 @@
|
|
|
61
61
|
"@lexical/rich-text": "^0.43.0",
|
|
62
62
|
"@lexical/selection": "^0.43.0",
|
|
63
63
|
"@lexical/utils": "^0.43.0",
|
|
64
|
-
"@veltra/compositions": "1.1.
|
|
65
|
-
"@veltra/directives": "1.1.
|
|
66
|
-
"@veltra/icons": "1.1.
|
|
67
|
-
"@veltra/styles": "1.1.
|
|
68
|
-
"@veltra/utils": "1.1.
|
|
64
|
+
"@veltra/compositions": "1.1.4",
|
|
65
|
+
"@veltra/directives": "1.1.4",
|
|
66
|
+
"@veltra/icons": "1.1.4",
|
|
67
|
+
"@veltra/styles": "1.1.4",
|
|
68
|
+
"@veltra/utils": "1.1.4",
|
|
69
69
|
"@visactor/vtable": "^1.26.0",
|
|
70
70
|
"codemirror": "^6.0.2",
|
|
71
71
|
"docx-preview": "^0.3.7",
|
|
72
72
|
"lexical": "^0.43.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@veltra/compositions": "1.1.
|
|
76
|
-
"@veltra/directives": "1.1.
|
|
77
|
-
"@veltra/icons": "1.1.
|
|
78
|
-
"@veltra/styles": "1.1.
|
|
79
|
-
"@veltra/utils": "1.1.
|
|
75
|
+
"@veltra/compositions": "1.1.4",
|
|
76
|
+
"@veltra/directives": "1.1.4",
|
|
77
|
+
"@veltra/icons": "1.1.4",
|
|
78
|
+
"@veltra/styles": "1.1.4",
|
|
79
|
+
"@veltra/utils": "1.1.4",
|
|
80
80
|
"vue": "^3.5.33"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -15,7 +15,14 @@
|
|
|
15
15
|
:size="size"
|
|
16
16
|
@click="handleRemove(index)"
|
|
17
17
|
/>
|
|
18
|
-
<u-button
|
|
18
|
+
<u-button
|
|
19
|
+
:icon="Plus"
|
|
20
|
+
circle
|
|
21
|
+
:disabled="disabled"
|
|
22
|
+
:size="size"
|
|
23
|
+
type="primary"
|
|
24
|
+
@click="handleAdd(index)"
|
|
25
|
+
/>
|
|
19
26
|
</span>
|
|
20
27
|
</li>
|
|
21
28
|
</ul>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
<script lang="ts" setup>
|
|
23
23
|
import { Ripple } from '@veltra/directives'
|
|
24
|
-
import { inject, onBeforeUnmount } from 'vue'
|
|
24
|
+
import { inject, onBeforeUnmount, shallowRef } from 'vue'
|
|
25
25
|
|
|
26
26
|
import { UCheckbox } from '../checkbox'
|
|
27
27
|
import { MultiSelectDIKey } from './di'
|
|
@@ -43,8 +43,6 @@ const props = defineProps<{
|
|
|
43
43
|
measureElement?: (index: number, el: Element | null) => void
|
|
44
44
|
}>()
|
|
45
45
|
|
|
46
|
-
const { disabled = false, checked } = props
|
|
47
|
-
|
|
48
46
|
function measureRef(el: unknown) {
|
|
49
47
|
if (typeof props.index !== 'number' || !props.measureElement) return
|
|
50
48
|
props.measureElement(props.index, el as Element | null)
|
|
@@ -56,33 +54,41 @@ const emit = defineEmits<{
|
|
|
56
54
|
|
|
57
55
|
const { optionClass, rippleClass, checkboxClass } = inject(MultiSelectDIKey)!
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
const rippleRef = shallowRef<Ripple | null>(null)
|
|
60
58
|
|
|
61
59
|
function handleClick(e) {
|
|
62
|
-
if (disabled) return
|
|
63
|
-
emit('check', !checked)
|
|
60
|
+
if (props.disabled) return
|
|
61
|
+
emit('check', !props.checked)
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
function handleMousedown(e: MouseEvent) {
|
|
67
|
-
if (disabled) return
|
|
65
|
+
if (props.disabled) return
|
|
66
|
+
|
|
67
|
+
// 清理旧实例,避免同一元素上多个 Ripple 实例同时修改样式
|
|
68
|
+
if (rippleRef.value) {
|
|
69
|
+
rippleRef.value.remove()
|
|
70
|
+
rippleRef.value = null
|
|
71
|
+
}
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
rippleRef.value = new Ripple(e.currentTarget as HTMLElement, {
|
|
70
74
|
rippleClass
|
|
71
75
|
})
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
rippleRef.value.showByEvent(e)
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
function handleMouseleave() {
|
|
77
|
-
|
|
81
|
+
rippleRef.value?.remove()
|
|
82
|
+
rippleRef.value = null
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
function handleMouseup() {
|
|
81
|
-
|
|
86
|
+
rippleRef.value?.remove()
|
|
87
|
+
rippleRef.value = null
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
onBeforeUnmount(() => {
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
rippleRef.value?.remove()
|
|
92
|
+
rippleRef.value = null
|
|
87
93
|
})
|
|
88
94
|
</script>
|