@veltra/desktop 1.3.8 → 1.3.10
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 +2 -2
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/auto-complete/auto-complete.js +6 -1
- package/dist/components/auto-complete/auto-complete.js.map +1 -1
- package/dist/components/auto-complete/auto-complete.vue.d.ts +2 -2
- package/dist/components/auto-complete/style2.css +6 -4
- package/dist/components/batch-edit/batch-edit.vue.d.ts +8 -8
- package/dist/components/cascade/cascade.vue.d.ts +4 -4
- 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/code-editor/code-editor.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 +2 -2
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +2 -2
- package/dist/components/grid-input/grid-input.vue.d.ts +1 -1
- package/dist/components/input/input.vue.d.ts +4 -4
- package/dist/components/multi-select/multi-select.vue.d.ts +2 -2
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +4 -4
- 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/password-input/password-input.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 +2 -2
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-vertical.vue.d.ts +2 -2
- package/dist/components/tabs/tabs.vue.d.ts +2 -2
- package/dist/components/textarea/textarea.vue.d.ts +4 -4
- package/dist/components/tree-select/tree-select.vue.d.ts +4 -4
- package/dist/components/watermark/watermark.vue.d.ts +1 -1
- package/package.json +6 -6
- package/src/components/auto-complete/auto-complete.vue +8 -0
- package/src/components/auto-complete/style.scss +6 -4
|
@@ -6,11 +6,11 @@ type __VLS_Slots = {
|
|
|
6
6
|
default?: () => VNode[];
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<ActionGroupProps, _ActionGroupExposed, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionGroupProps> & Readonly<{}>, {
|
|
9
|
-
type: import("@veltra/utils").ColorType;
|
|
10
9
|
size: "small" | "default" | "large";
|
|
10
|
+
type: import("@veltra/utils").ColorType;
|
|
11
|
+
max: number;
|
|
11
12
|
text: boolean;
|
|
12
13
|
circle: boolean;
|
|
13
|
-
max: number;
|
|
14
14
|
loading: boolean;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,8 +14,8 @@ declare const __VLS_base: import("vue").DefineComponent<ActionProps, {}, {}, {},
|
|
|
14
14
|
}, string, import("vue").PublicProps, Readonly<ActionProps> & Readonly<{
|
|
15
15
|
onRun?: (() => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
type: ButtonType;
|
|
18
17
|
size: import("@veltra/utils").ComponentSize;
|
|
18
|
+
type: ButtonType;
|
|
19
19
|
text: boolean;
|
|
20
20
|
circle: boolean;
|
|
21
21
|
loading: boolean;
|
|
@@ -112,6 +112,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
112
112
|
}
|
|
113
113
|
handleKeydown(event);
|
|
114
114
|
};
|
|
115
|
+
/** 用户输入时展开建议面板(选中项不会触发原生 input 事件,因此不会误展开) */
|
|
116
|
+
const handleNativeInput = () => {
|
|
117
|
+
if (!dropdownVisible.value) dropdownVisible.value = true;
|
|
118
|
+
};
|
|
115
119
|
watch([point, keyboardOptions], ([currentPoint, options]) => {
|
|
116
120
|
if (!scrollRef.value || currentPoint < 0) return;
|
|
117
121
|
const currentOption = options[currentPoint];
|
|
@@ -160,7 +164,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
160
164
|
clearable: __props.clearable,
|
|
161
165
|
modelValue: model.value,
|
|
162
166
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
163
|
-
onKeydown: handleInputKeydown
|
|
167
|
+
onKeydown: handleInputKeydown,
|
|
168
|
+
"onNative:input": handleNativeInput
|
|
164
169
|
}, createSlots({ _: 2 }, [slots.suffix ? {
|
|
165
170
|
name: "suffix",
|
|
166
171
|
fn: withCtx(() => [renderSlot(_ctx.$slots, "suffix")]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-complete.js","names":["$attrs"],"sources":["../../../src/components/auto-complete/auto-complete.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n trigger=\"click\"\n :class=\"[cls.b, cls.m(size), bem.is('disabled', disabled)]\"\n ref=\"dropdownRef\"\n v-model:visible=\"dropdownVisible\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size)]\"\n :disabled=\"disabled\"\n >\n <!-- 触发 -->\n <template #trigger>\n <!-- 单选 -->\n <u-input\n :size=\"size\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n v-model=\"model\"\n @keydown=\"handleInputKeydown\"\n >\n <template #suffix v-if=\"slots.suffix\">\n <slot name=\"suffix\" />\n </template>\n\n <template #prefix v-if=\"slots.prefix\">\n <slot name=\"prefix\" />\n </template>\n </u-input>\n </template>\n\n <!-- 下拉内容 -->\n <template #content>\n <u-scroll tag=\"ul\" :class=\"cls.e('options')\" ref=\"scrollRef\">\n <li\n v-if=\"displayCachedSuggestion\"\n :class=\"[optionClass, bem.is('active', isCachedActive)]\"\n @click=\"handleSelectCachedOption(displayCachedSuggestion)\"\n v-ripple=\"cls.e('ripple')\"\n :data-key=\"displayCachedSuggestion\"\n :key=\"displayCachedSuggestion\"\n >\n <slot v-bind=\"{ option: displayCachedSuggestion, index: -1 }\">\n {{ displayCachedSuggestion }}\n </slot>\n </li>\n\n <li\n v-for=\"(option, index) of suggestions\"\n :class=\"[\n optionClass,\n bem.is('selected', option === model),\n bem.is('active', isActiveOption(index))\n ]\"\n @click=\"handleSelect(option)\"\n v-ripple=\"cls.e('ripple')\"\n :data-key=\"option\"\n :key=\"option\"\n >\n <slot v-bind=\"{ option, index }\">\n {{ option }}\n </slot>\n </li>\n </u-scroll>\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ model || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFormFallbackProps } from '@veltra/compositions'\nimport { vRipple } from '@veltra/directives'\nimport { bem, FORM_EMPTY_CONTENT, scrollIntoContainerView } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport type { AutoCompleteEmits, AutoCompleteProps, _AutoCompleteExposed } from '../../types'\nimport type { DropdownExposed, ScrollExposed } from '../../types'\nimport { UDropdown } from '../dropdown'\nimport { UInput } from '../input'\nimport { UScroll } from '../scroll'\nimport { useKeyboard } from './use-keyboard'\nimport { useSuggestions } from './use-suggestions'\n\ndefineOptions({ name: 'UAutoComplete', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<AutoCompleteProps>(), {\n placeholder: '请输入',\n clearable: true,\n allowCustom: true,\n disabled: undefined,\n readonly: undefined\n})\n\nconst emit = defineEmits<AutoCompleteEmits>()\n\nconst slots = defineSlots<{\n default?: (props: { option: string; index: number }) => any\n suffix?: () => any\n prefix?: () => any\n}>()\n\n// 当前输入框的值\nconst model = defineModel<string>()\n\nconst cls = bem('auto-complete')\n\nconst optionClass = cls.e('option')\n\nconst { formProps } = injectFormContext()\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props], {\n size: 'default',\n disabled: false,\n readonly: false\n})\n\nconst dropdownRef = shallowRef<DropdownExposed>()\nconst dropdownVisible = shallowRef(false)\nconst scrollRef = shallowRef<ScrollExposed>()\n\nwatch(scrollRef, (scroll) => {\n if (scroll && model.value !== undefined) {\n const li = scroll.contentRef!.querySelector(`li[data-key=\"${model.value}\"]`) as HTMLElement\n li && scrollIntoContainerView(li, scroll.containerRef ?? null)\n }\n})\n\nconst { suggestions, appendedSuggestions, cachedSuggestion } = useSuggestions({ props, model })\n\nconst displayCachedSuggestion = computed(() => {\n if (!props.allowCustom) return undefined\n return cachedSuggestion.value\n})\n\nconst keyboardOptions = computed(() => {\n const currentSuggestions = suggestions.value\n return displayCachedSuggestion.value\n ? [displayCachedSuggestion.value, ...currentSuggestions]\n : currentSuggestions\n})\n\nconst { point, handleKeydown } = useKeyboard({\n options: keyboardOptions,\n dropdownVisible,\n getDefaultIndex: (options) => {\n if (!options.length) return -1\n if (model.value) {\n const matchIndex = options.indexOf(model.value)\n if (matchIndex > -1) return matchIndex\n }\n return 0\n },\n onSelect: (option, index) => {\n if (displayCachedSuggestion.value && index === 0) {\n handleSelectCachedOption(option)\n return\n }\n handleSelect(option)\n }\n})\n\nconst isCachedActive = computed(() => !!displayCachedSuggestion.value && point.value === 0)\n\nconst isActiveOption = (index: number) => {\n const offset = displayCachedSuggestion.value ? 1 : 0\n return point.value === index + offset\n}\n\nconst handleInputKeydown = (event: KeyboardEvent) => {\n if (!dropdownVisible.value && event.key === 'Enter' && displayCachedSuggestion.value) {\n event.preventDefault()\n event.stopPropagation()\n handleSelectCachedOption(displayCachedSuggestion.value)\n return\n }\n handleKeydown(event)\n}\n\nwatch([point, keyboardOptions], ([currentPoint, options]) => {\n if (!scrollRef.value || currentPoint < 0) return\n const currentOption = options[currentPoint]\n if (!currentOption) return\n const target = scrollRef.value.contentRef?.querySelector(\n `li[data-key=\"${currentOption}\"]`\n ) as HTMLElement | null\n if (target) {\n scrollIntoContainerView(target, scrollRef.value.containerRef ?? null)\n }\n})\n\n/** 选中选项 */\nconst handleSelect = (option: string) => {\n model.value = option\n dropdownRef.value?.close()\n saveCache()\n emit('select', option)\n}\n\nfunction saveCache() {\n if (!model.value) return\n appendedSuggestions.value = [...appendedSuggestions.value, model.value]\n}\n\nconst handleSelectCachedOption = (cachedOption: string) => {\n appendedSuggestions.value = [...appendedSuggestions.value, cachedOption]\n dropdownRef.value?.close()\n}\n\ndefineExpose<_AutoCompleteExposed>({\n open: () => dropdownRef.value?.open(),\n close: () => dropdownRef.value?.close()\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0FA,MAAM,QAAQ;EAQd,MAAM,OAAO;EAEb,MAAM,QAAQ,SAAA;EAOd,MAAM,QAAQ,SAAmB,SAAA,YAAC;EAElC,MAAM,MAAM,IAAI,eAAe;EAE/B,MAAM,cAAc,IAAI,EAAE,QAAQ;EAElC,MAAM,EAAE,cAAc,kBAAkB;EACxC,MAAM,EAAE,MAAM,UAAU,aAAa,qBAAqB,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG;GAClF,MAAM;GACN,UAAU;GACV,UAAU;EACZ,CAAC;EAED,MAAM,cAAc,WAA4B;EAChD,MAAM,kBAAkB,WAAW,KAAK;EACxC,MAAM,YAAY,WAA0B;EAE5C,MAAM,YAAY,WAAW;GAC3B,IAAI,UAAU,MAAM,UAAU,KAAA,GAAW;IACvC,MAAM,KAAK,OAAO,WAAY,cAAc,gBAAgB,MAAM,MAAM,GAAG;IAC3E,MAAM,wBAAwB,IAAI,OAAO,gBAAgB,IAAI;GAC/D;EACF,CAAC;EAED,MAAM,EAAE,aAAa,qBAAqB,qBAAqB,eAAe;GAAE;GAAO;EAAM,CAAC;EAE9F,MAAM,0BAA0B,eAAe;GAC7C,IAAI,CAAC,MAAM,aAAa,OAAO,KAAA;GAC/B,OAAO,iBAAiB;EAC1B,CAAC;EAED,MAAM,kBAAkB,eAAe;GACrC,MAAM,qBAAqB,Y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AAA,EAAA,GAAA,CAAA,gBAAA,gBADN,MAAA,SAAS,MAAA,kBAAA,CAAkB,GAAA,CAAA,CAAA,GAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"auto-complete.js","names":["$attrs"],"sources":["../../../src/components/auto-complete/auto-complete.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n trigger=\"click\"\n :class=\"[cls.b, cls.m(size), bem.is('disabled', disabled)]\"\n ref=\"dropdownRef\"\n v-model:visible=\"dropdownVisible\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size)]\"\n :disabled=\"disabled\"\n >\n <!-- 触发 -->\n <template #trigger>\n <!-- 单选 -->\n <u-input\n :size=\"size\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n v-model=\"model\"\n @keydown=\"handleInputKeydown\"\n @native:input=\"handleNativeInput\"\n >\n <template #suffix v-if=\"slots.suffix\">\n <slot name=\"suffix\" />\n </template>\n\n <template #prefix v-if=\"slots.prefix\">\n <slot name=\"prefix\" />\n </template>\n </u-input>\n </template>\n\n <!-- 下拉内容 -->\n <template #content>\n <u-scroll tag=\"ul\" :class=\"cls.e('options')\" ref=\"scrollRef\">\n <li\n v-if=\"displayCachedSuggestion\"\n :class=\"[optionClass, bem.is('active', isCachedActive)]\"\n @click=\"handleSelectCachedOption(displayCachedSuggestion)\"\n v-ripple=\"cls.e('ripple')\"\n :data-key=\"displayCachedSuggestion\"\n :key=\"displayCachedSuggestion\"\n >\n <slot v-bind=\"{ option: displayCachedSuggestion, index: -1 }\">\n {{ displayCachedSuggestion }}\n </slot>\n </li>\n\n <li\n v-for=\"(option, index) of suggestions\"\n :class=\"[\n optionClass,\n bem.is('selected', option === model),\n bem.is('active', isActiveOption(index))\n ]\"\n @click=\"handleSelect(option)\"\n v-ripple=\"cls.e('ripple')\"\n :data-key=\"option\"\n :key=\"option\"\n >\n <slot v-bind=\"{ option, index }\">\n {{ option }}\n </slot>\n </li>\n </u-scroll>\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ model || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFormFallbackProps } from '@veltra/compositions'\nimport { vRipple } from '@veltra/directives'\nimport { bem, FORM_EMPTY_CONTENT, scrollIntoContainerView } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport type { AutoCompleteEmits, AutoCompleteProps, _AutoCompleteExposed } from '../../types'\nimport type { DropdownExposed, ScrollExposed } from '../../types'\nimport { UDropdown } from '../dropdown'\nimport { UInput } from '../input'\nimport { UScroll } from '../scroll'\nimport { useKeyboard } from './use-keyboard'\nimport { useSuggestions } from './use-suggestions'\n\ndefineOptions({ name: 'UAutoComplete', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<AutoCompleteProps>(), {\n placeholder: '请输入',\n clearable: true,\n allowCustom: true,\n disabled: undefined,\n readonly: undefined\n})\n\nconst emit = defineEmits<AutoCompleteEmits>()\n\nconst slots = defineSlots<{\n default?: (props: { option: string; index: number }) => any\n suffix?: () => any\n prefix?: () => any\n}>()\n\n// 当前输入框的值\nconst model = defineModel<string>()\n\nconst cls = bem('auto-complete')\n\nconst optionClass = cls.e('option')\n\nconst { formProps } = injectFormContext()\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props], {\n size: 'default',\n disabled: false,\n readonly: false\n})\n\nconst dropdownRef = shallowRef<DropdownExposed>()\nconst dropdownVisible = shallowRef(false)\nconst scrollRef = shallowRef<ScrollExposed>()\n\nwatch(scrollRef, (scroll) => {\n if (scroll && model.value !== undefined) {\n const li = scroll.contentRef!.querySelector(`li[data-key=\"${model.value}\"]`) as HTMLElement\n li && scrollIntoContainerView(li, scroll.containerRef ?? null)\n }\n})\n\nconst { suggestions, appendedSuggestions, cachedSuggestion } = useSuggestions({ props, model })\n\nconst displayCachedSuggestion = computed(() => {\n if (!props.allowCustom) return undefined\n return cachedSuggestion.value\n})\n\nconst keyboardOptions = computed(() => {\n const currentSuggestions = suggestions.value\n return displayCachedSuggestion.value\n ? [displayCachedSuggestion.value, ...currentSuggestions]\n : currentSuggestions\n})\n\nconst { point, handleKeydown } = useKeyboard({\n options: keyboardOptions,\n dropdownVisible,\n getDefaultIndex: (options) => {\n if (!options.length) return -1\n if (model.value) {\n const matchIndex = options.indexOf(model.value)\n if (matchIndex > -1) return matchIndex\n }\n return 0\n },\n onSelect: (option, index) => {\n if (displayCachedSuggestion.value && index === 0) {\n handleSelectCachedOption(option)\n return\n }\n handleSelect(option)\n }\n})\n\nconst isCachedActive = computed(() => !!displayCachedSuggestion.value && point.value === 0)\n\nconst isActiveOption = (index: number) => {\n const offset = displayCachedSuggestion.value ? 1 : 0\n return point.value === index + offset\n}\n\nconst handleInputKeydown = (event: KeyboardEvent) => {\n if (!dropdownVisible.value && event.key === 'Enter' && displayCachedSuggestion.value) {\n event.preventDefault()\n event.stopPropagation()\n handleSelectCachedOption(displayCachedSuggestion.value)\n return\n }\n handleKeydown(event)\n}\n\n/** 用户输入时展开建议面板(选中项不会触发原生 input 事件,因此不会误展开) */\nconst handleNativeInput = () => {\n if (!dropdownVisible.value) {\n dropdownVisible.value = true\n }\n}\n\nwatch([point, keyboardOptions], ([currentPoint, options]) => {\n if (!scrollRef.value || currentPoint < 0) return\n const currentOption = options[currentPoint]\n if (!currentOption) return\n const target = scrollRef.value.contentRef?.querySelector(\n `li[data-key=\"${currentOption}\"]`\n ) as HTMLElement | null\n if (target) {\n scrollIntoContainerView(target, scrollRef.value.containerRef ?? null)\n }\n})\n\n/** 选中选项 */\nconst handleSelect = (option: string) => {\n model.value = option\n dropdownRef.value?.close()\n saveCache()\n emit('select', option)\n}\n\nfunction saveCache() {\n if (!model.value) return\n appendedSuggestions.value = [...appendedSuggestions.value, model.value]\n}\n\nconst handleSelectCachedOption = (cachedOption: string) => {\n appendedSuggestions.value = [...appendedSuggestions.value, cachedOption]\n dropdownR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ineComponent<__VLS_PublicProps, _Auto
|
|
|
23
23
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
24
24
|
onSelect?: ((value: string) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
readonly: boolean;
|
|
26
28
|
placeholder: string;
|
|
27
29
|
clearable: boolean;
|
|
28
30
|
allowCustom: boolean;
|
|
29
|
-
disabled: boolean;
|
|
30
|
-
readonly: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("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;
|
|
@@ -41,14 +41,16 @@
|
|
|
41
41
|
white-space: nowrap;
|
|
42
42
|
}
|
|
43
43
|
.u-auto-complete__option:hover {
|
|
44
|
-
background-color: var(--u-
|
|
44
|
+
background-color: var(--u-nav-hover-bg);
|
|
45
|
+
color: var(--u-nav-hover-color);
|
|
45
46
|
}
|
|
46
47
|
.u-auto-complete__option.is-active {
|
|
47
|
-
background-color: var(--u-
|
|
48
|
+
background-color: var(--u-nav-hover-bg);
|
|
49
|
+
color: var(--u-nav-hover-color);
|
|
48
50
|
}
|
|
49
51
|
.u-auto-complete__option.is-selected {
|
|
50
|
-
background-color: var(--u-
|
|
51
|
-
color: var(--u-
|
|
52
|
+
background-color: var(--u-nav-active-bg);
|
|
53
|
+
color: var(--u-nav-active-color);
|
|
52
54
|
}
|
|
53
55
|
.u-auto-complete__ripple {
|
|
54
56
|
background-color: var(--u-color-primary-light-7);
|
|
@@ -8,28 +8,28 @@ declare const __VLS_base: import("vue").DefineComponent<BatchEditProps, {}, {},
|
|
|
8
8
|
"update:selected": (value: Record<string, any> | undefined) => any;
|
|
9
9
|
"update:checked": (value: Record<string, any>[]) => any;
|
|
10
10
|
"update:current": (row?: TableRow | undefined) => any;
|
|
11
|
+
"update:rows": (rows: TableRow[]) => any;
|
|
12
|
+
"update:forest": (rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any;
|
|
13
|
+
"cell-click": (row: TableRow, column: TableColumn, ev: MouseEvent) => any;
|
|
14
|
+
"row-click": (row: TableRow, ev: MouseEvent) => any;
|
|
11
15
|
create: () => any;
|
|
12
16
|
"update:data": (value: Record<string, any>[]) => any;
|
|
13
17
|
"create-prev": (row: TableRow) => any;
|
|
14
18
|
"create-next": (row: TableRow) => any;
|
|
15
19
|
"create-child": (row: TableRow) => any;
|
|
16
|
-
"update:rows": (rows: TableRow[]) => any;
|
|
17
|
-
"update:forest": (rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any;
|
|
18
|
-
"cell-click": (row: TableRow, column: TableColumn, ev: MouseEvent) => any;
|
|
19
|
-
"row-click": (row: TableRow, ev: MouseEvent) => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<BatchEditProps> & Readonly<{
|
|
21
21
|
"onUpdate:selected"?: ((value: Record<string, any> | undefined) => any) | undefined;
|
|
22
22
|
"onUpdate:checked"?: ((value: Record<string, any>[]) => any) | undefined;
|
|
23
23
|
"onUpdate:current"?: ((row?: TableRow | undefined) => any) | undefined;
|
|
24
|
+
"onUpdate:rows"?: ((rows: TableRow[]) => any) | undefined;
|
|
25
|
+
"onUpdate:forest"?: ((rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any) | undefined;
|
|
26
|
+
"onCell-click"?: ((row: TableRow, column: TableColumn, ev: MouseEvent) => any) | undefined;
|
|
27
|
+
"onRow-click"?: ((row: TableRow, ev: MouseEvent) => any) | undefined;
|
|
24
28
|
onCreate?: (() => any) | undefined;
|
|
25
29
|
"onUpdate:data"?: ((value: Record<string, any>[]) => any) | undefined;
|
|
26
30
|
"onCreate-prev"?: ((row: TableRow) => any) | undefined;
|
|
27
31
|
"onCreate-next"?: ((row: TableRow) => any) | undefined;
|
|
28
32
|
"onCreate-child"?: ((row: TableRow) => any) | undefined;
|
|
29
|
-
"onUpdate:rows"?: ((rows: TableRow[]) => any) | undefined;
|
|
30
|
-
"onUpdate:forest"?: ((rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any) | undefined;
|
|
31
|
-
"onCell-click"?: ((row: TableRow, column: TableColumn, ev: MouseEvent) => any) | undefined;
|
|
32
|
-
"onRow-click"?: ((row: TableRow, ev: MouseEvent) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
34
|
cols: string | [string, string];
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,23 +3,23 @@ import "../../types/index.js";
|
|
|
3
3
|
//#region src/components/cascade/cascade.vue.d.ts
|
|
4
4
|
declare const __VLS_export: import("vue").DefineComponent<CascadeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
5
|
"update:modelValue": (value?: string | string[] | undefined) => any;
|
|
6
|
-
clear: () => any;
|
|
7
6
|
change: (...args: [item?: Record<string, any> | undefined] | [items: Record<string, any>[]]) => any;
|
|
7
|
+
clear: () => any;
|
|
8
8
|
"update:label": (label?: string | string[] | undefined) => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<CascadeProps> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((value?: string | string[] | undefined) => any) | undefined;
|
|
11
|
-
onClear?: (() => any) | undefined;
|
|
12
11
|
onChange?: ((...args: [item?: Record<string, any> | undefined] | [items: Record<string, any>[]]) => any) | undefined;
|
|
12
|
+
onClear?: (() => any) | undefined;
|
|
13
13
|
"onUpdate:label"?: ((label?: string | string[] | undefined) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
readonly: boolean;
|
|
15
17
|
labelKey: string;
|
|
16
18
|
valueKey: string;
|
|
17
19
|
childrenKey: string;
|
|
18
20
|
data: Record<string, any>[];
|
|
19
21
|
placeholder: string;
|
|
20
22
|
clearable: boolean;
|
|
21
|
-
disabled: boolean;
|
|
22
|
-
readonly: boolean;
|
|
23
23
|
filterable: boolean;
|
|
24
24
|
visibilityLimit: number;
|
|
25
25
|
separator: string;
|
|
@@ -18,9 +18,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
18
18
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
19
19
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
|
-
type: import("@veltra/utils").ColorType;
|
|
22
21
|
disabled: boolean;
|
|
23
22
|
readonly: boolean;
|
|
23
|
+
type: import("@veltra/utils").ColorType;
|
|
24
24
|
round: boolean;
|
|
25
25
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -13,10 +13,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
14
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
labelKey: string;
|
|
17
|
-
valueKey: string;
|
|
18
16
|
disabled: boolean;
|
|
19
17
|
readonly: boolean;
|
|
18
|
+
labelKey: string;
|
|
19
|
+
valueKey: string;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
22
22
|
//#endregion
|
|
@@ -12,12 +12,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
12
12
|
"update:lang": (value: CodeEditorLang | undefined) => any;
|
|
13
13
|
} & {
|
|
14
14
|
"update:modelValue": (value: string) => any;
|
|
15
|
-
change: (value: string) => any;
|
|
16
15
|
"update:lang": (value: CodeEditorLang | undefined) => any;
|
|
16
|
+
change: (value: string) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
-
onChange?: ((value: string) => any) | undefined;
|
|
20
19
|
"onUpdate:lang"?: ((value: CodeEditorLang | undefined) => any) | undefined;
|
|
20
|
+
onChange?: ((value: string) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
disabled: boolean;
|
|
23
23
|
readonly: boolean;
|
|
@@ -8,8 +8,8 @@ declare const __VLS_export: import("vue").DefineComponent<DatePanelProps, {}, {}
|
|
|
8
8
|
"onSelect:range-date"?: ((rangeDate?: [import("@cat-kit/core").Dater, import("@cat-kit/core").Dater] | undefined) => any) | undefined;
|
|
9
9
|
"onSelect:date"?: ((date: import("@cat-kit/core").Dater) => any) | undefined;
|
|
10
10
|
}>, {
|
|
11
|
-
type: "date" | "month" | "year";
|
|
12
11
|
size: import("@veltra/utils").ComponentSize;
|
|
12
|
+
type: "date" | "month" | "year";
|
|
13
13
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
15
15
|
//#endregion
|
|
@@ -6,11 +6,11 @@ declare const __VLS_export: import("vue").DefineComponent<DatePickerProps, {}, {
|
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
7
7
|
"onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
readonly: boolean;
|
|
9
11
|
type: "date" | "month" | "year";
|
|
10
12
|
placeholder: string;
|
|
11
13
|
clearable: boolean;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
readonly: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const _default: typeof __VLS_export;
|
|
16
16
|
//#endregion
|
|
@@ -6,11 +6,11 @@ declare const __VLS_export: import("vue").DefineComponent<DateRangePickerProps,
|
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<DateRangePickerProps> & Readonly<{
|
|
7
7
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
readonly: boolean;
|
|
9
11
|
type: "date" | "month" | "year";
|
|
10
12
|
placeholder: [string, string];
|
|
11
13
|
clearable: boolean;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
readonly: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const _default: typeof __VLS_export;
|
|
16
16
|
//#endregion
|
|
@@ -10,8 +10,8 @@ declare const __VLS_export: import("vue").DefineComponent<GridInputProps, import
|
|
|
10
10
|
onInput?: ((value: string) => any) | undefined;
|
|
11
11
|
}>, {
|
|
12
12
|
length: number;
|
|
13
|
-
separator: string;
|
|
14
13
|
zero: boolean;
|
|
14
|
+
separator: string;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
//#endregion
|
|
@@ -16,8 +16,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, _Inpu
|
|
|
16
16
|
"update:modelValue": (value: string | undefined) => any;
|
|
17
17
|
} & {
|
|
18
18
|
"update:modelValue": (value: string) => any;
|
|
19
|
-
clear: () => any;
|
|
20
19
|
change: (value: string) => any;
|
|
20
|
+
clear: () => any;
|
|
21
21
|
"suffix:click": (value?: string | undefined) => any;
|
|
22
22
|
"prefix:click": (value?: string | undefined) => any;
|
|
23
23
|
focus: (value?: string | undefined) => any;
|
|
@@ -25,18 +25,18 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, _Inpu
|
|
|
25
25
|
"native:input": (ev: Event) => any;
|
|
26
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
27
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
28
|
-
onClear?: (() => any) | undefined;
|
|
29
28
|
onChange?: ((value: string) => any) | undefined;
|
|
29
|
+
onClear?: (() => any) | undefined;
|
|
30
30
|
"onSuffix:click"?: ((value?: string | undefined) => any) | undefined;
|
|
31
31
|
"onPrefix:click"?: ((value?: string | undefined) => any) | undefined;
|
|
32
32
|
onFocus?: ((value?: string | undefined) => any) | undefined;
|
|
33
33
|
onBlur?: ((value?: string | undefined) => any) | undefined;
|
|
34
34
|
"onNative:input"?: ((ev: Event) => any) | undefined;
|
|
35
35
|
}>, {
|
|
36
|
-
placeholder: string;
|
|
37
|
-
clearable: boolean;
|
|
38
36
|
disabled: boolean;
|
|
39
37
|
readonly: boolean;
|
|
38
|
+
placeholder: string;
|
|
39
|
+
clearable: boolean;
|
|
40
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
42
|
declare const _default: typeof __VLS_export;
|
|
@@ -27,12 +27,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
27
27
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
28
28
|
onChange?: ((options: Record<string, any>[]) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
readonly: boolean;
|
|
30
32
|
labelKey: string;
|
|
31
33
|
valueKey: string;
|
|
32
34
|
placeholder: string;
|
|
33
35
|
clearable: boolean;
|
|
34
|
-
disabled: boolean;
|
|
35
|
-
readonly: boolean;
|
|
36
36
|
minWidth: string;
|
|
37
37
|
visibilityLimit: number;
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -14,20 +14,20 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
14
14
|
"update:modelValue": (value: (string | number)[]) => any;
|
|
15
15
|
} & {
|
|
16
16
|
"update:modelValue": (value: any[]) => any;
|
|
17
|
-
clear: () => any;
|
|
18
17
|
change: (checked: Record<string, any>[]) => any;
|
|
18
|
+
clear: () => any;
|
|
19
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
20
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
21
|
-
onClear?: (() => any) | undefined;
|
|
22
21
|
onChange?: ((checked: Record<string, any>[]) => any) | undefined;
|
|
22
|
+
onClear?: (() => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
readonly: boolean;
|
|
24
26
|
expandAll: boolean;
|
|
25
27
|
labelKey: string;
|
|
26
28
|
valueKey: string;
|
|
27
29
|
placeholder: string;
|
|
28
30
|
clearable: boolean;
|
|
29
|
-
disabled: boolean;
|
|
30
|
-
readonly: boolean;
|
|
31
31
|
filterable: boolean;
|
|
32
32
|
minWidth: string;
|
|
33
33
|
visibilityLimit: number;
|
|
@@ -15,17 +15,17 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
15
15
|
"update:modelValue": (value: number | undefined) => any;
|
|
16
16
|
} & {
|
|
17
17
|
"update:modelValue": (value?: number | undefined) => any;
|
|
18
|
-
clear: () => any;
|
|
19
18
|
change: (value?: number | undefined) => any;
|
|
19
|
+
clear: () => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((value?: number | undefined) => any) | undefined;
|
|
22
|
-
onClear?: (() => any) | undefined;
|
|
23
22
|
onChange?: ((value?: number | undefined) => any) | undefined;
|
|
23
|
+
onClear?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
-
placeholder: string;
|
|
26
|
-
clearable: boolean;
|
|
27
25
|
disabled: boolean;
|
|
28
26
|
readonly: boolean;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
clearable: boolean;
|
|
29
29
|
}, {}, {}, {}, string, import("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;
|
|
@@ -23,9 +23,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
23
23
|
"onUpdate:start"?: ((value: number | undefined) => any) | undefined;
|
|
24
24
|
"onUpdate:end"?: ((value: number | undefined) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
|
-
clearable: boolean;
|
|
27
26
|
disabled: boolean;
|
|
28
27
|
readonly: boolean;
|
|
28
|
+
clearable: boolean;
|
|
29
29
|
separator: string;
|
|
30
30
|
startPlaceholder: string;
|
|
31
31
|
endPlaceholder: string;
|
|
@@ -14,9 +14,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
14
14
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
15
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
clearable: boolean;
|
|
18
17
|
disabled: boolean;
|
|
19
18
|
readonly: boolean;
|
|
19
|
+
clearable: boolean;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -15,10 +15,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
15
15
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
16
16
|
onChange?: ((item: Record<string, any>) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
labelKey: string;
|
|
19
|
-
valueKey: string;
|
|
20
18
|
disabled: boolean;
|
|
21
19
|
readonly: boolean;
|
|
20
|
+
labelKey: string;
|
|
21
|
+
valueKey: string;
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
24
24
|
//#endregion
|
|
@@ -12,9 +12,9 @@ declare const __VLS_export: import("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, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -19,12 +19,12 @@ declare const __VLS_base: import("vue").DefineComponent<SelectProps, {}, {}, {},
|
|
|
19
19
|
onChange?: ((option?: Record<string, any> | undefined) => any) | undefined;
|
|
20
20
|
"onUpdate:text"?: ((text?: string | undefined) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
readonly: boolean;
|
|
22
24
|
labelKey: string;
|
|
23
25
|
valueKey: string;
|
|
24
26
|
placeholder: string;
|
|
25
27
|
clearable: boolean;
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
readonly: boolean;
|
|
28
28
|
}, {}, {}, {}, string, import("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;
|
|
@@ -16,12 +16,12 @@ declare const __VLS_base: import("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, import("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
27
|
block: boolean;
|
|
@@ -16,12 +16,12 @@ declare const __VLS_base: import("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, import("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
27
|
rounded: boolean;
|
|
@@ -11,12 +11,12 @@ declare const __VLS_base: import("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, import("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
22
|
block: boolean;
|
|
@@ -10,21 +10,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
10
10
|
"update:modelValue": (value: string | undefined) => any;
|
|
11
11
|
} & {
|
|
12
12
|
"update:modelValue": (value: string) => any;
|
|
13
|
-
clear: () => any;
|
|
14
13
|
change: (value: string) => any;
|
|
14
|
+
clear: () => any;
|
|
15
15
|
focus: () => any;
|
|
16
16
|
blur: () => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
-
onClear?: (() => any) | undefined;
|
|
20
19
|
onChange?: ((value: string) => any) | undefined;
|
|
20
|
+
onClear?: (() => any) | undefined;
|
|
21
21
|
onFocus?: (() => any) | undefined;
|
|
22
22
|
onBlur?: (() => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
|
-
placeholder: string;
|
|
25
|
-
clearable: boolean;
|
|
26
24
|
disabled: boolean;
|
|
27
25
|
readonly: boolean;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
clearable: boolean;
|
|
28
28
|
resize: boolean;
|
|
29
29
|
autosize: boolean;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -17,22 +17,22 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
17
17
|
"update:modelValue": (value: string | number | undefined) => any;
|
|
18
18
|
} & {
|
|
19
19
|
"update:modelValue": (value?: string | number | undefined) => any;
|
|
20
|
-
clear: () => any;
|
|
21
20
|
change: (selectedData?: Record<string, any> | undefined) => any;
|
|
21
|
+
clear: () => any;
|
|
22
22
|
"update:text": (text?: string | undefined) => any;
|
|
23
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
24
|
"onUpdate:modelValue"?: ((value?: string | number | undefined) => any) | undefined;
|
|
25
|
-
onClear?: (() => any) | undefined;
|
|
26
25
|
onChange?: ((selectedData?: Record<string, any> | undefined) => any) | undefined;
|
|
26
|
+
onClear?: (() => any) | undefined;
|
|
27
27
|
"onUpdate:text"?: ((text?: string | undefined) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
readonly: boolean;
|
|
29
31
|
expandAll: boolean;
|
|
30
32
|
labelKey: string;
|
|
31
33
|
valueKey: string;
|
|
32
34
|
placeholder: string;
|
|
33
35
|
clearable: boolean;
|
|
34
|
-
disabled: boolean;
|
|
35
|
-
readonly: boolean;
|
|
36
36
|
filterable: boolean;
|
|
37
37
|
minWidth: string;
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,8 +6,8 @@ type __VLS_Slots = {} & {
|
|
|
6
6
|
default?: (props: typeof __VLS_7) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<WatermarkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WatermarkProps> & Readonly<{}>, {
|
|
9
|
-
route: number;
|
|
10
9
|
fontSize: number;
|
|
10
|
+
route: number;
|
|
11
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltra/desktop",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.10",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"@cat-kit/core": ">=1.1.8",
|
|
58
58
|
"@cat-kit/excel": ">=1.0.0",
|
|
59
59
|
"@cat-kit/fe": "^1.1.8",
|
|
60
|
-
"@veltra/compositions": "1.3.
|
|
61
|
-
"@veltra/directives": "1.3.
|
|
62
|
-
"@veltra/icons": "1.3.
|
|
63
|
-
"@veltra/styles": "1.3.
|
|
64
|
-
"@veltra/utils": "1.3.
|
|
60
|
+
"@veltra/compositions": "1.3.10",
|
|
61
|
+
"@veltra/directives": "1.3.10",
|
|
62
|
+
"@veltra/icons": "1.3.10",
|
|
63
|
+
"@veltra/styles": "1.3.10",
|
|
64
|
+
"@veltra/utils": "1.3.10",
|
|
65
65
|
"vue": ">=3.5.40"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
:clearable="clearable"
|
|
20
20
|
v-model="model"
|
|
21
21
|
@keydown="handleInputKeydown"
|
|
22
|
+
@native:input="handleNativeInput"
|
|
22
23
|
>
|
|
23
24
|
<template #suffix v-if="slots.suffix">
|
|
24
25
|
<slot name="suffix" />
|
|
@@ -180,6 +181,13 @@ const handleInputKeydown = (event: KeyboardEvent) => {
|
|
|
180
181
|
handleKeydown(event)
|
|
181
182
|
}
|
|
182
183
|
|
|
184
|
+
/** 用户输入时展开建议面板(选中项不会触发原生 input 事件,因此不会误展开) */
|
|
185
|
+
const handleNativeInput = () => {
|
|
186
|
+
if (!dropdownVisible.value) {
|
|
187
|
+
dropdownVisible.value = true
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
183
191
|
watch([point, keyboardOptions], ([currentPoint, options]) => {
|
|
184
192
|
if (!scrollRef.value || currentPoint < 0) return
|
|
185
193
|
const currentOption = options[currentPoint]
|
|
@@ -32,16 +32,18 @@ $root-name: auto-complete;
|
|
|
32
32
|
@include m.ellipsis;
|
|
33
33
|
|
|
34
34
|
&:hover {
|
|
35
|
-
background-color:
|
|
35
|
+
background-color: var(--u-nav-hover-bg);
|
|
36
|
+
color: var(--u-nav-hover-color);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
@include m.is(active) {
|
|
39
|
-
background-color:
|
|
40
|
+
background-color: var(--u-nav-hover-bg);
|
|
41
|
+
color: var(--u-nav-hover-color);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
@include m.is(selected) {
|
|
43
|
-
background-color:
|
|
44
|
-
color:
|
|
45
|
+
background-color: var(--u-nav-active-bg);
|
|
46
|
+
color: var(--u-nav-active-color);
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
|