vue-devui 1.6.15 → 1.6.16
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/auto-complete/index.es.js +41 -4
- package/auto-complete/index.umd.js +12 -12
- package/breadcrumb/index.es.js +40 -3
- package/breadcrumb/index.umd.js +1 -1
- package/category-search/index.es.js +74 -6
- package/category-search/index.umd.js +21 -21
- package/checkbox/index.es.js +41 -4
- package/checkbox/index.umd.js +16 -16
- package/code-review/index.es.js +41 -4
- package/code-review/index.umd.js +17 -17
- package/data-grid/index.es.js +41 -4
- package/data-grid/index.umd.js +14 -14
- package/date-picker-pro/index.es.js +41 -4
- package/date-picker-pro/index.umd.js +8 -8
- package/dropdown/index.es.js +40 -3
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +47 -5
- package/editable-select/index.umd.js +15 -15
- package/editor-md/index.es.js +50 -6
- package/editor-md/index.umd.js +26 -26
- package/form/index.es.js +41 -4
- package/form/index.umd.js +14 -14
- package/input/index.es.js +40 -3
- package/input/index.umd.js +19 -19
- package/input-number/index.es.js +41 -4
- package/input-number/index.umd.js +18 -18
- package/mention/index.es.js +41 -4
- package/mention/index.umd.js +19 -19
- package/message/index.es.js +13 -13
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +40 -3
- package/modal/index.umd.js +2 -2
- package/overlay/index.es.js +41 -4
- package/overlay/index.umd.js +1 -1
- package/package.json +2 -1
- package/pagination/index.es.js +58 -21
- package/pagination/index.umd.js +17 -17
- package/pagination/style.css +1 -1
- package/popover/index.es.js +41 -4
- package/popover/index.umd.js +9 -9
- package/radio/index.es.js +41 -4
- package/radio/index.umd.js +17 -17
- package/search/index.es.js +41 -4
- package/search/index.umd.js +17 -17
- package/select/index.es.js +58 -21
- package/select/index.umd.js +19 -19
- package/select/style.css +1 -1
- package/splitter/index.es.js +41 -4
- package/splitter/index.umd.js +15 -15
- package/style.css +1 -1
- package/switch/index.es.js +41 -4
- package/switch/index.umd.js +14 -14
- package/table/index.es.js +40 -3
- package/table/index.umd.js +15 -15
- package/textarea/index.es.js +41 -4
- package/textarea/index.umd.js +16 -16
- package/time-picker/index.es.js +40 -3
- package/time-picker/index.umd.js +15 -15
- package/time-select/index.es.js +58 -21
- package/time-select/index.umd.js +17 -17
- package/time-select/style.css +1 -1
- package/tooltip/index.es.js +41 -4
- package/tooltip/index.umd.js +12 -12
- package/tree/index.es.js +40 -3
- package/tree/index.umd.js +10 -10
- package/types/category-search/src/category-search-types.d.ts +5 -0
- package/types/editable-select/src/editable-select-types.d.ts +3 -0
- package/types/overlay/src/flexible-overlay/flexible-overlay-types.d.ts +5 -6
- package/types/overlay/src/flexible-overlay/index.d.ts +9 -0
- package/types/overlay/src/flexible-overlay/use-flexible-overlay.d.ts +11 -2
- package/types/select/src/composables/use-select-content.d.ts +21 -2
- package/types/select/src/select-types.d.ts +7 -44
- package/types/select/src/use-select.d.ts +26 -2
- package/vue-devui.es.js +121 -41
- package/vue-devui.umd.js +74 -74
|
@@ -129,6 +129,9 @@ export interface ExtendConfig {
|
|
|
129
129
|
disabled?: boolean;
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
+
export interface ITagContext {
|
|
133
|
+
toggle: (status?: boolean) => void;
|
|
134
|
+
}
|
|
132
135
|
export declare const categorySearchProps: {
|
|
133
136
|
category: {
|
|
134
137
|
type: PropType<ICategorySearchTagItem[]>;
|
|
@@ -236,6 +239,8 @@ export interface CategorySearchInjection {
|
|
|
236
239
|
showCurrentSearchCategory: (tag: ICategorySearchTagItem) => void;
|
|
237
240
|
onInputBackspace: () => void;
|
|
238
241
|
onInputToggle: () => void;
|
|
242
|
+
addTagContext: (field: string, context: ITagContext) => void;
|
|
243
|
+
removeTagContext: (field: string) => void;
|
|
239
244
|
}
|
|
240
245
|
export declare const categorySearchInjectionKey: InjectionKey<CategorySearchInjection>;
|
|
241
246
|
export declare const categorySearchDropdownProps: {
|
|
@@ -71,6 +71,9 @@ export declare const editableSelectProps: {
|
|
|
71
71
|
readonly type: BooleanConstructor;
|
|
72
72
|
readonly default: true;
|
|
73
73
|
};
|
|
74
|
+
readonly maxLength: {
|
|
75
|
+
readonly type: NumberConstructor;
|
|
76
|
+
};
|
|
74
77
|
};
|
|
75
78
|
export declare type EditableSelectProps = ExtractPropTypes<typeof editableSelectProps>;
|
|
76
79
|
export interface EditableSelectContext {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
export declare type Placement = 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end';
|
|
3
3
|
export declare type Alignment = 'start' | 'end';
|
|
4
4
|
export declare type OffsetOptions = {
|
|
@@ -9,11 +9,6 @@ export declare type Point = {
|
|
|
9
9
|
x?: number;
|
|
10
10
|
y?: number;
|
|
11
11
|
};
|
|
12
|
-
export declare type UseOverlayFn = {
|
|
13
|
-
arrowRef: Ref<HTMLElement | undefined>;
|
|
14
|
-
overlayRef: Ref<HTMLElement | undefined>;
|
|
15
|
-
updatePosition: () => void;
|
|
16
|
-
};
|
|
17
12
|
export declare type EmitEventFn = (event: 'positionChange' | 'update:modelValue', result?: unknown) => void;
|
|
18
13
|
export interface Rect {
|
|
19
14
|
x: number;
|
|
@@ -57,5 +52,9 @@ export declare const flexibleOverlayProps: {
|
|
|
57
52
|
type: BooleanConstructor;
|
|
58
53
|
default: boolean;
|
|
59
54
|
};
|
|
55
|
+
fitOriginWidth: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
60
59
|
};
|
|
61
60
|
export declare type FlexibleOverlayProps = ExtractPropTypes<typeof flexibleOverlayProps>;
|
|
@@ -35,6 +35,10 @@ export declare const FlexibleOverlay: import("vue").DefineComponent<{
|
|
|
35
35
|
type: BooleanConstructor;
|
|
36
36
|
default: boolean;
|
|
37
37
|
};
|
|
38
|
+
fitOriginWidth: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
38
42
|
}, () => false | JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "positionChange")[], "update:modelValue" | "positionChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
43
|
modelValue: {
|
|
40
44
|
type: BooleanConstructor;
|
|
@@ -71,6 +75,10 @@ export declare const FlexibleOverlay: import("vue").DefineComponent<{
|
|
|
71
75
|
type: BooleanConstructor;
|
|
72
76
|
default: boolean;
|
|
73
77
|
};
|
|
78
|
+
fitOriginWidth: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
default: boolean;
|
|
81
|
+
};
|
|
74
82
|
}>> & {
|
|
75
83
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
76
84
|
onPositionChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -82,4 +90,5 @@ export declare const FlexibleOverlay: import("vue").DefineComponent<{
|
|
|
82
90
|
showArrow: boolean;
|
|
83
91
|
isArrowCenter: boolean;
|
|
84
92
|
clickEventBubble: boolean;
|
|
93
|
+
fitOriginWidth: boolean;
|
|
85
94
|
}, {}>;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import { FlexibleOverlayProps,
|
|
2
|
-
export declare function useOverlay(props: FlexibleOverlayProps, emit: EmitEventFn):
|
|
1
|
+
import { FlexibleOverlayProps, EmitEventFn } from './flexible-overlay-types';
|
|
2
|
+
export declare function useOverlay(props: FlexibleOverlayProps, emit: EmitEventFn): {
|
|
3
|
+
arrowRef: import("vue").Ref<HTMLElement | undefined>;
|
|
4
|
+
overlayRef: import("vue").Ref<HTMLElement | undefined>;
|
|
5
|
+
styles: import("vue").ComputedRef<{
|
|
6
|
+
width: string;
|
|
7
|
+
} | {
|
|
8
|
+
width?: undefined;
|
|
9
|
+
}>;
|
|
10
|
+
updatePosition: () => Promise<void>;
|
|
11
|
+
};
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function useSelectContent():
|
|
1
|
+
import { OptionObjectItem } from '../select-types';
|
|
2
|
+
export default function useSelectContent(): {
|
|
3
|
+
select: import("../select-types").SelectContext | undefined;
|
|
4
|
+
searchQuery: import("vue").Ref<string>;
|
|
5
|
+
selectedData: import("vue").ComputedRef<OptionObjectItem[]>;
|
|
6
|
+
isSelectDisable: import("vue").ComputedRef<boolean>;
|
|
7
|
+
isSupportCollapseTags: import("vue").ComputedRef<boolean>;
|
|
8
|
+
isDisabledTooltip: import("vue").ComputedRef<boolean>;
|
|
9
|
+
isReadOnly: import("vue").ComputedRef<boolean>;
|
|
10
|
+
selectionCls: import("vue").ComputedRef<string>;
|
|
11
|
+
inputCls: import("vue").ComputedRef<string>;
|
|
12
|
+
tagSize: import("vue").ComputedRef<string>;
|
|
13
|
+
placeholder: import("vue").ComputedRef<string>;
|
|
14
|
+
isMultiple: import("vue").ComputedRef<boolean>;
|
|
15
|
+
displayInputValue: import("vue").ComputedRef<string>;
|
|
16
|
+
handleClear: (e: MouseEvent) => void;
|
|
17
|
+
tagDelete: (data: OptionObjectItem) => void;
|
|
18
|
+
onFocus: (e: FocusEvent) => void;
|
|
19
|
+
onBlur: (e: FocusEvent) => void;
|
|
20
|
+
queryFilter: (e: Event) => void;
|
|
21
|
+
};
|
|
@@ -105,34 +105,16 @@ export declare const selectProps: {
|
|
|
105
105
|
readonly type: BooleanConstructor;
|
|
106
106
|
readonly default: true;
|
|
107
107
|
};
|
|
108
|
+
readonly menuClass: {
|
|
109
|
+
readonly type: StringConstructor;
|
|
110
|
+
readonly default: "";
|
|
111
|
+
};
|
|
112
|
+
readonly maxLength: {
|
|
113
|
+
readonly type: NumberConstructor;
|
|
114
|
+
};
|
|
108
115
|
};
|
|
109
116
|
export declare type SelectProps = ExtractPropTypes<typeof selectProps>;
|
|
110
117
|
export declare type OptionModelValue = number | string;
|
|
111
|
-
export interface UseSelectReturnType {
|
|
112
|
-
selectDisabled: ComputedRef<boolean>;
|
|
113
|
-
selectSize: ComputedRef<SelectSize>;
|
|
114
|
-
originRef: Ref<HTMLElement | undefined>;
|
|
115
|
-
dropdownRef: Ref<HTMLElement | undefined>;
|
|
116
|
-
isOpen: Ref<boolean>;
|
|
117
|
-
selectCls: ComputedRef<string>;
|
|
118
|
-
mergeOptions: Ref<OptionObjectItem[]>;
|
|
119
|
-
selectedOptions: ComputedRef<OptionObjectItem[]>;
|
|
120
|
-
filterQuery: Ref<string>;
|
|
121
|
-
emptyText: ComputedRef<string>;
|
|
122
|
-
isLoading: Ref<boolean>;
|
|
123
|
-
isShowEmptyText: ComputedRef<boolean>;
|
|
124
|
-
handleClear: (e: MouseEvent) => void;
|
|
125
|
-
valueChange: (item: OptionObjectItem) => void;
|
|
126
|
-
handleClose: () => void;
|
|
127
|
-
updateInjectOptions: (item: Record<string, unknown>, operation: string, isObject: boolean) => void;
|
|
128
|
-
tagDelete: (data: OptionObjectItem) => void;
|
|
129
|
-
onFocus: (e: FocusEvent) => void;
|
|
130
|
-
onBlur: (e: FocusEvent) => void;
|
|
131
|
-
isDisabled: (item: OptionObjectItem) => boolean;
|
|
132
|
-
toggleChange: (bool: boolean) => void;
|
|
133
|
-
debounceQueryFilter: (query: string) => void;
|
|
134
|
-
isShowCreateOption: ComputedRef<boolean>;
|
|
135
|
-
}
|
|
136
118
|
export interface SelectContext extends SelectProps {
|
|
137
119
|
selectDisabled: boolean;
|
|
138
120
|
selectSize: string;
|
|
@@ -172,25 +154,6 @@ export interface UseOptionReturnType {
|
|
|
172
154
|
isVisible: ComputedRef<boolean>;
|
|
173
155
|
optionSelect: () => void;
|
|
174
156
|
}
|
|
175
|
-
export interface UseSelectContentReturnType {
|
|
176
|
-
searchQuery: Ref<string>;
|
|
177
|
-
selectedData: ComputedRef<OptionObjectItem[]>;
|
|
178
|
-
isSelectDisable: ComputedRef<boolean>;
|
|
179
|
-
isSupportCollapseTags: ComputedRef<boolean>;
|
|
180
|
-
isDisabledTooltip: ComputedRef<boolean>;
|
|
181
|
-
isReadOnly: ComputedRef<boolean>;
|
|
182
|
-
selectionCls: ComputedRef<string>;
|
|
183
|
-
inputCls: ComputedRef<string>;
|
|
184
|
-
tagSize: ComputedRef<string>;
|
|
185
|
-
placeholder: ComputedRef<string>;
|
|
186
|
-
isMultiple: ComputedRef<boolean>;
|
|
187
|
-
displayInputValue: ComputedRef<string>;
|
|
188
|
-
handleClear: (e: MouseEvent) => void;
|
|
189
|
-
tagDelete: (data: OptionObjectItem) => void;
|
|
190
|
-
onFocus: (e: FocusEvent) => void;
|
|
191
|
-
onBlur: (e: FocusEvent) => void;
|
|
192
|
-
queryFilter: (e: Event) => void;
|
|
193
|
-
}
|
|
194
157
|
export interface UseSelectFunctionReturn {
|
|
195
158
|
isSelectFocus: Ref<boolean>;
|
|
196
159
|
blur: () => void;
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import type { SetupContext } from 'vue';
|
|
3
|
-
import { SelectProps,
|
|
4
|
-
export default function useSelect(props: SelectProps, selectRef: Ref<HTMLElement | undefined>, ctx: SetupContext, focus: () => void, blur: () => void, isSelectFocus: Ref<boolean>, t: (path: string) => unknown):
|
|
3
|
+
import { SelectProps, OptionObjectItem } from './select-types';
|
|
4
|
+
export default function useSelect(props: SelectProps, selectRef: Ref<HTMLElement | undefined>, ctx: SetupContext, focus: () => void, blur: () => void, isSelectFocus: Ref<boolean>, t: (path: string) => unknown): {
|
|
5
|
+
selectDisabled: import("vue").ComputedRef<any>;
|
|
6
|
+
selectSize: import("vue").ComputedRef<import("./select-types").SelectSize>;
|
|
7
|
+
originRef: Ref<HTMLElement | undefined>;
|
|
8
|
+
dropdownRef: Ref<any>;
|
|
9
|
+
isOpen: Ref<boolean>;
|
|
10
|
+
selectCls: import("vue").ComputedRef<string>;
|
|
11
|
+
mergeOptions: import("vue").ComputedRef<OptionObjectItem[]>;
|
|
12
|
+
selectedOptions: import("vue").ComputedRef<OptionObjectItem[]>;
|
|
13
|
+
filterQuery: Ref<string>;
|
|
14
|
+
emptyText: import("vue").ComputedRef<string>;
|
|
15
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
16
|
+
isShowEmptyText: import("vue").ComputedRef<boolean>;
|
|
17
|
+
handleClear: () => void;
|
|
18
|
+
valueChange: (item: OptionObjectItem) => void;
|
|
19
|
+
handleClose: () => void;
|
|
20
|
+
updateInjectOptions: (item: Record<string, unknown>, operation: string, isObject: boolean) => void;
|
|
21
|
+
tagDelete: (data: OptionObjectItem) => void;
|
|
22
|
+
onFocus: (e: FocusEvent) => void;
|
|
23
|
+
onBlur: (e: FocusEvent) => void;
|
|
24
|
+
isDisabled: (item: OptionObjectItem) => boolean;
|
|
25
|
+
toggleChange: (bool: boolean) => void;
|
|
26
|
+
debounceQueryFilter: import("lodash").DebouncedFunc<(query: string) => void>;
|
|
27
|
+
isShowCreateOption: import("vue").ComputedRef<boolean>;
|
|
28
|
+
};
|
package/vue-devui.es.js
CHANGED
|
@@ -7853,6 +7853,10 @@ const flexibleOverlayProps = {
|
|
|
7853
7853
|
clickEventBubble: {
|
|
7854
7854
|
type: Boolean,
|
|
7855
7855
|
default: false
|
|
7856
|
+
},
|
|
7857
|
+
fitOriginWidth: {
|
|
7858
|
+
type: Boolean,
|
|
7859
|
+
default: false
|
|
7856
7860
|
}
|
|
7857
7861
|
};
|
|
7858
7862
|
function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
@@ -7875,9 +7879,18 @@ function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
|
7875
7879
|
return { x, y };
|
|
7876
7880
|
}
|
|
7877
7881
|
function useOverlay(props, emit) {
|
|
7878
|
-
const { position, showArrow } = toRefs(props);
|
|
7882
|
+
const { fitOriginWidth, position, showArrow } = toRefs(props);
|
|
7879
7883
|
const overlayRef = ref();
|
|
7880
7884
|
const arrowRef = ref();
|
|
7885
|
+
const overlayWidth = ref(0);
|
|
7886
|
+
let originObserver;
|
|
7887
|
+
const styles = computed(() => {
|
|
7888
|
+
if (fitOriginWidth.value) {
|
|
7889
|
+
return { width: overlayWidth.value + "px" };
|
|
7890
|
+
} else {
|
|
7891
|
+
return {};
|
|
7892
|
+
}
|
|
7893
|
+
});
|
|
7881
7894
|
const updateArrowPosition = (arrowEl, placement, point, overlayEl) => {
|
|
7882
7895
|
const { x, y } = adjustArrowPosition(props.isArrowCenter, point, placement, overlayEl.getBoundingClientRect());
|
|
7883
7896
|
const staticSide = {
|
|
@@ -7922,21 +7935,43 @@ function useOverlay(props, emit) {
|
|
|
7922
7935
|
updatePosition();
|
|
7923
7936
|
}
|
|
7924
7937
|
};
|
|
7938
|
+
const updateWidth = (originEl) => {
|
|
7939
|
+
overlayWidth.value = originEl.getBoundingClientRect().width;
|
|
7940
|
+
updatePosition();
|
|
7941
|
+
};
|
|
7942
|
+
const observeOrigin = () => {
|
|
7943
|
+
var _a2, _b;
|
|
7944
|
+
if (fitOriginWidth.value && typeof window !== "undefined") {
|
|
7945
|
+
const originEl = (_b = (_a2 = props.origin) == null ? void 0 : _a2.$el) != null ? _b : props.origin;
|
|
7946
|
+
if (originEl) {
|
|
7947
|
+
originObserver = new window.ResizeObserver(() => updateWidth(originEl));
|
|
7948
|
+
originObserver.observe(originEl);
|
|
7949
|
+
}
|
|
7950
|
+
}
|
|
7951
|
+
};
|
|
7952
|
+
const unobserveOrigin = () => {
|
|
7953
|
+
var _a2, _b;
|
|
7954
|
+
const originEl = (_b = (_a2 = props.origin) == null ? void 0 : _a2.$el) != null ? _b : props.origin;
|
|
7955
|
+
originEl && (originObserver == null ? void 0 : originObserver.unobserve(originEl));
|
|
7956
|
+
};
|
|
7925
7957
|
watch(() => props.modelValue, () => {
|
|
7926
7958
|
if (props.modelValue && props.origin) {
|
|
7927
7959
|
nextTick(updatePosition);
|
|
7928
7960
|
window.addEventListener("scroll", scrollCallback, true);
|
|
7929
7961
|
window.addEventListener("resize", updatePosition);
|
|
7962
|
+
observeOrigin();
|
|
7930
7963
|
} else {
|
|
7931
7964
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
7932
7965
|
window.removeEventListener("resize", updatePosition);
|
|
7966
|
+
unobserveOrigin();
|
|
7933
7967
|
}
|
|
7934
7968
|
});
|
|
7935
7969
|
onUnmounted(() => {
|
|
7936
7970
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
7937
7971
|
window.removeEventListener("resize", updatePosition);
|
|
7972
|
+
unobserveOrigin();
|
|
7938
7973
|
});
|
|
7939
|
-
return { arrowRef, overlayRef, updatePosition };
|
|
7974
|
+
return { arrowRef, overlayRef, styles, updatePosition };
|
|
7940
7975
|
}
|
|
7941
7976
|
var flexibleOverlay = "";
|
|
7942
7977
|
const FlexibleOverlay = defineComponent({
|
|
@@ -7957,6 +7992,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
7957
7992
|
const {
|
|
7958
7993
|
arrowRef,
|
|
7959
7994
|
overlayRef,
|
|
7995
|
+
styles,
|
|
7960
7996
|
updatePosition
|
|
7961
7997
|
} = useOverlay(props, emit);
|
|
7962
7998
|
expose({
|
|
@@ -7966,7 +8002,8 @@ const FlexibleOverlay = defineComponent({
|
|
|
7966
8002
|
var _a2;
|
|
7967
8003
|
return props.modelValue && createVNode("div", mergeProps({
|
|
7968
8004
|
"ref": overlayRef,
|
|
7969
|
-
"class": ns2.b()
|
|
8005
|
+
"class": ns2.b(),
|
|
8006
|
+
"style": styles.value
|
|
7970
8007
|
}, attrs, {
|
|
7971
8008
|
"onClick": withModifiers(() => ({}), [clickEventBubble.value ? "" : "stop"]),
|
|
7972
8009
|
"onPointerup": withModifiers(() => ({}), ["stop"])
|
|
@@ -14401,7 +14438,9 @@ var CategorySearchTagDropdown = defineComponent({
|
|
|
14401
14438
|
const {
|
|
14402
14439
|
rootCtx,
|
|
14403
14440
|
ComponentMap,
|
|
14404
|
-
onSearchKeyTagClick
|
|
14441
|
+
onSearchKeyTagClick,
|
|
14442
|
+
addTagContext,
|
|
14443
|
+
removeTagContext
|
|
14405
14444
|
} = inject(categorySearchInjectionKey);
|
|
14406
14445
|
const isVisible = ref(false);
|
|
14407
14446
|
const checkType = (tag2) => {
|
|
@@ -14416,6 +14455,21 @@ var CategorySearchTagDropdown = defineComponent({
|
|
|
14416
14455
|
const onDropdownClose = () => {
|
|
14417
14456
|
isVisible.value = false;
|
|
14418
14457
|
};
|
|
14458
|
+
const toggle = (status2) => {
|
|
14459
|
+
if (typeof status2 === "boolean") {
|
|
14460
|
+
isVisible.value = status2;
|
|
14461
|
+
} else {
|
|
14462
|
+
onTagClick();
|
|
14463
|
+
}
|
|
14464
|
+
};
|
|
14465
|
+
onMounted(() => {
|
|
14466
|
+
addTagContext(item.value.field, {
|
|
14467
|
+
toggle
|
|
14468
|
+
});
|
|
14469
|
+
});
|
|
14470
|
+
onUnmounted(() => {
|
|
14471
|
+
removeTagContext(item.value.field);
|
|
14472
|
+
});
|
|
14419
14473
|
return () => item.value.type !== "keyword" ? createVNode(Dropdown$1, {
|
|
14420
14474
|
"visible": isVisible.value,
|
|
14421
14475
|
"trigger": "manually",
|
|
@@ -16750,12 +16804,24 @@ function useCategorySearch(props, ctx2) {
|
|
|
16750
16804
|
watch(() => extendConfig == null ? void 0 : extendConfig.value, () => {
|
|
16751
16805
|
merge$2(operationConfig, (extendConfig == null ? void 0 : extendConfig.value) || {});
|
|
16752
16806
|
}, { immediate: true, deep: true });
|
|
16807
|
+
const tagContextMap = {};
|
|
16808
|
+
const addTagContext = (field, context2) => {
|
|
16809
|
+
Reflect.defineProperty(tagContextMap, field, { value: context2 });
|
|
16810
|
+
};
|
|
16811
|
+
const removeTagContext = (field) => {
|
|
16812
|
+
Reflect.deleteProperty(tagContextMap, field);
|
|
16813
|
+
};
|
|
16814
|
+
const toggleTagMenu = (field, status2) => {
|
|
16815
|
+
var _a2;
|
|
16816
|
+
(_a2 = tagContextMap[field]) == null ? void 0 : _a2.toggle(status2);
|
|
16817
|
+
};
|
|
16753
16818
|
ctx2.expose({
|
|
16754
16819
|
chooseItem,
|
|
16755
16820
|
chooseItems,
|
|
16756
16821
|
getTextInputValue,
|
|
16757
16822
|
getNumberRangeValue,
|
|
16758
|
-
searchCategory
|
|
16823
|
+
searchCategory,
|
|
16824
|
+
toggleTagMenu
|
|
16759
16825
|
});
|
|
16760
16826
|
onMounted(() => scrollToTail(true));
|
|
16761
16827
|
provide(categorySearchInjectionKey, {
|
|
@@ -16795,7 +16861,9 @@ function useCategorySearch(props, ctx2) {
|
|
|
16795
16861
|
searchCategory,
|
|
16796
16862
|
showCurrentSearchCategory,
|
|
16797
16863
|
onInputBackspace,
|
|
16798
|
-
onInputToggle
|
|
16864
|
+
onInputToggle,
|
|
16865
|
+
addTagContext,
|
|
16866
|
+
removeTagContext
|
|
16799
16867
|
});
|
|
16800
16868
|
function init() {
|
|
16801
16869
|
var _a2, _b;
|
|
@@ -33657,6 +33725,9 @@ const editableSelectProps = {
|
|
|
33657
33725
|
showGlowStyle: {
|
|
33658
33726
|
type: Boolean,
|
|
33659
33727
|
default: true
|
|
33728
|
+
},
|
|
33729
|
+
maxLength: {
|
|
33730
|
+
type: Number
|
|
33660
33731
|
}
|
|
33661
33732
|
};
|
|
33662
33733
|
const SELECT_KEY = Symbol("EditableSelect");
|
|
@@ -34134,7 +34205,8 @@ var EditableSelect = defineComponent({
|
|
|
34134
34205
|
disabled,
|
|
34135
34206
|
modelValue,
|
|
34136
34207
|
position,
|
|
34137
|
-
placeholder
|
|
34208
|
+
placeholder,
|
|
34209
|
+
maxLength
|
|
34138
34210
|
} = toRefs(props);
|
|
34139
34211
|
const align = computed(() => position.value.some((item) => item.includes("start") || item.includes("end")) ? "start" : null);
|
|
34140
34212
|
const {
|
|
@@ -34247,6 +34319,7 @@ var EditableSelect = defineComponent({
|
|
|
34247
34319
|
"disabled": disabled.value,
|
|
34248
34320
|
"placeholder": placeholder.value,
|
|
34249
34321
|
"value": states.inputValue,
|
|
34322
|
+
"maxlength": maxLength == null ? void 0 : maxLength.value,
|
|
34250
34323
|
"type": "text",
|
|
34251
34324
|
"onInput": onInput,
|
|
34252
34325
|
"onFocus": handleFocus,
|
|
@@ -37333,6 +37406,13 @@ var EditorMd = defineComponent({
|
|
|
37333
37406
|
fullscreenZIndex
|
|
37334
37407
|
} = toRefs(props);
|
|
37335
37408
|
const showFullscreen = ref(false);
|
|
37409
|
+
const finalModelValue = computed(() => {
|
|
37410
|
+
if (typeof maxlength.value === "number") {
|
|
37411
|
+
return modelValue.value.substring(0, maxlength.value);
|
|
37412
|
+
} else {
|
|
37413
|
+
return modelValue.value;
|
|
37414
|
+
}
|
|
37415
|
+
});
|
|
37336
37416
|
const {
|
|
37337
37417
|
editorRef,
|
|
37338
37418
|
overlayRef,
|
|
@@ -37390,7 +37470,7 @@ var EditorMd = defineComponent({
|
|
|
37390
37470
|
}, [createVNode("textarea", {
|
|
37391
37471
|
"ref": editorRef,
|
|
37392
37472
|
"placeholder": placeholder.value
|
|
37393
|
-
}, [
|
|
37473
|
+
}, [finalModelValue.value]), createVNode(FlexibleOverlay, {
|
|
37394
37474
|
"ref": overlayRef,
|
|
37395
37475
|
"modelValue": isHintShow.value,
|
|
37396
37476
|
"onUpdate:modelValue": ($event) => isHintShow.value = $event,
|
|
@@ -37406,11 +37486,11 @@ var EditorMd = defineComponent({
|
|
|
37406
37486
|
}
|
|
37407
37487
|
}), Boolean(maxlength == null ? void 0 : maxlength.value) && createVNode("div", {
|
|
37408
37488
|
"class": "dp-md-count"
|
|
37409
|
-
}, [
|
|
37489
|
+
}, [finalModelValue.value.length || 0, createTextVNode("/"), maxlength.value])]), createVNode(MdRender, {
|
|
37410
37490
|
"ref": renderRef,
|
|
37411
37491
|
"base-url": baseUrl.value,
|
|
37412
37492
|
"breaks": breaks.value,
|
|
37413
|
-
"content":
|
|
37493
|
+
"content": finalModelValue.value,
|
|
37414
37494
|
"custom-parse": customParse.value,
|
|
37415
37495
|
"render-parse": renderParse.value,
|
|
37416
37496
|
"md-rules": mdRules.value,
|
|
@@ -41046,10 +41126,12 @@ function ErrorIcon$1() {
|
|
|
41046
41126
|
var message$1 = "";
|
|
41047
41127
|
var Message$1 = defineComponent({
|
|
41048
41128
|
name: "DMessage",
|
|
41129
|
+
inheritAttrs: false,
|
|
41049
41130
|
props: messageProps,
|
|
41050
41131
|
emits: ["destroy", "close"],
|
|
41051
41132
|
setup(props, {
|
|
41052
41133
|
emit,
|
|
41134
|
+
attrs,
|
|
41053
41135
|
slots
|
|
41054
41136
|
}) {
|
|
41055
41137
|
const {
|
|
@@ -41134,19 +41216,17 @@ var Message$1 = defineComponent({
|
|
|
41134
41216
|
"onClick": close2
|
|
41135
41217
|
}, [createVNode(Close$1, null, null)]);
|
|
41136
41218
|
});
|
|
41137
|
-
return () => {
|
|
41138
|
-
|
|
41139
|
-
|
|
41140
|
-
|
|
41141
|
-
|
|
41142
|
-
|
|
41143
|
-
|
|
41144
|
-
|
|
41145
|
-
|
|
41146
|
-
|
|
41147
|
-
|
|
41148
|
-
});
|
|
41149
|
-
};
|
|
41219
|
+
return () => createVNode(Transition, {
|
|
41220
|
+
"name": "message-fade",
|
|
41221
|
+
"onAfterLeave": handleDestroy
|
|
41222
|
+
}, {
|
|
41223
|
+
default: () => [visible.value && createVNode("div", mergeProps({
|
|
41224
|
+
"class": classes.value,
|
|
41225
|
+
"style": __spreadValues({}, styles.value),
|
|
41226
|
+
"onMouseenter": interrupt,
|
|
41227
|
+
"onMouseleave": removeReset
|
|
41228
|
+
}, attrs), [renderIcon.value, renderText.value, renderClose.value])]
|
|
41229
|
+
});
|
|
41150
41230
|
}
|
|
41151
41231
|
});
|
|
41152
41232
|
function _isSlot$6(s) {
|
|
@@ -42545,6 +42625,13 @@ const selectProps = {
|
|
|
42545
42625
|
showGlowStyle: {
|
|
42546
42626
|
type: Boolean,
|
|
42547
42627
|
default: true
|
|
42628
|
+
},
|
|
42629
|
+
menuClass: {
|
|
42630
|
+
type: String,
|
|
42631
|
+
default: ""
|
|
42632
|
+
},
|
|
42633
|
+
maxLength: {
|
|
42634
|
+
type: Number
|
|
42548
42635
|
}
|
|
42549
42636
|
};
|
|
42550
42637
|
const optionProps = {
|
|
@@ -42730,6 +42817,7 @@ function useSelectContent() {
|
|
|
42730
42817
|
}
|
|
42731
42818
|
};
|
|
42732
42819
|
return {
|
|
42820
|
+
select: select2,
|
|
42733
42821
|
searchQuery,
|
|
42734
42822
|
selectedData,
|
|
42735
42823
|
isSelectDisable,
|
|
@@ -42765,6 +42853,7 @@ var SelectContent = defineComponent({
|
|
|
42765
42853
|
const multipleCls = ns2.e("multiple");
|
|
42766
42854
|
const multipleInputCls = ns2.em("multiple", "input");
|
|
42767
42855
|
const {
|
|
42856
|
+
select: select2,
|
|
42768
42857
|
searchQuery,
|
|
42769
42858
|
selectedData,
|
|
42770
42859
|
isSelectDisable,
|
|
@@ -42828,6 +42917,7 @@ var SelectContent = defineComponent({
|
|
|
42828
42917
|
"placeholder": placeholder.value,
|
|
42829
42918
|
"readonly": isReadOnly.value,
|
|
42830
42919
|
"disabled": isSelectDisable.value,
|
|
42920
|
+
"maxlength": select2 == null ? void 0 : select2.maxLength,
|
|
42831
42921
|
"onInput": queryFilter,
|
|
42832
42922
|
"onFocus": onFocus,
|
|
42833
42923
|
"onBlur": onBlur
|
|
@@ -42839,6 +42929,7 @@ var SelectContent = defineComponent({
|
|
|
42839
42929
|
"placeholder": placeholder.value,
|
|
42840
42930
|
"readonly": isReadOnly.value,
|
|
42841
42931
|
"disabled": isSelectDisable.value,
|
|
42932
|
+
"maxlength": select2 == null ? void 0 : select2.maxLength,
|
|
42842
42933
|
"onFocus": onFocus,
|
|
42843
42934
|
"onBlur": onBlur,
|
|
42844
42935
|
"onInput": queryFilter
|
|
@@ -42932,7 +43023,6 @@ var Select = defineComponent({
|
|
|
42932
43023
|
const isRender = ref(false);
|
|
42933
43024
|
const currentPosition = ref("bottom");
|
|
42934
43025
|
const position = ref(["bottom-start", "top-start"]);
|
|
42935
|
-
const dropdownWidth = ref("0");
|
|
42936
43026
|
const handlePositionChange = (pos) => {
|
|
42937
43027
|
currentPosition.value = pos.split("-")[0] === "top" ? "top" : "bottom";
|
|
42938
43028
|
};
|
|
@@ -42940,14 +43030,9 @@ var Select = defineComponent({
|
|
|
42940
43030
|
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%",
|
|
42941
43031
|
"z-index": "var(--devui-z-index-dropdown, 1052)"
|
|
42942
43032
|
}));
|
|
42943
|
-
const updateDropdownWidth = () => {
|
|
42944
|
-
var _a2;
|
|
42945
|
-
dropdownWidth.value = ((_a2 = originRef == null ? void 0 : originRef.value) == null ? void 0 : _a2.clientWidth) ? originRef.value.clientWidth + "px" : "100%";
|
|
42946
|
-
};
|
|
42947
43033
|
watch(selectRef, (val) => {
|
|
42948
43034
|
if (val) {
|
|
42949
43035
|
originRef.value = val.$el;
|
|
42950
|
-
updateDropdownWidth();
|
|
42951
43036
|
}
|
|
42952
43037
|
});
|
|
42953
43038
|
const scrollToBottom = () => {
|
|
@@ -42959,15 +43044,11 @@ var Select = defineComponent({
|
|
|
42959
43044
|
};
|
|
42960
43045
|
onMounted(() => {
|
|
42961
43046
|
isRender.value = true;
|
|
42962
|
-
updateDropdownWidth();
|
|
42963
|
-
window.addEventListener("resize", updateDropdownWidth);
|
|
42964
43047
|
nextTick(() => {
|
|
42965
|
-
|
|
43048
|
+
var _a2;
|
|
43049
|
+
(_a2 = dropdownContainer.value) == null ? void 0 : _a2.addEventListener("scroll", scrollToBottom);
|
|
42966
43050
|
});
|
|
42967
43051
|
});
|
|
42968
|
-
onUnmounted(() => {
|
|
42969
|
-
window.removeEventListener("resize", updateDropdownWidth);
|
|
42970
|
-
});
|
|
42971
43052
|
provide(SELECT_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
|
|
42972
43053
|
selectDisabled,
|
|
42973
43054
|
selectSize,
|
|
@@ -43003,17 +43084,16 @@ var Select = defineComponent({
|
|
|
43003
43084
|
"origin": originRef.value,
|
|
43004
43085
|
"align": "start",
|
|
43005
43086
|
"offset": 4,
|
|
43087
|
+
"fit-origin-width": true,
|
|
43006
43088
|
"position": position.value,
|
|
43007
43089
|
"onPositionChange": handlePositionChange,
|
|
43008
|
-
"style": styles.value
|
|
43090
|
+
"style": styles.value,
|
|
43091
|
+
"class": props.menuClass
|
|
43009
43092
|
}, {
|
|
43010
43093
|
default: () => {
|
|
43011
43094
|
var _a2, _b, _c, _d;
|
|
43012
43095
|
return [withDirectives(createVNode("div", {
|
|
43013
|
-
"class": dropdownCls
|
|
43014
|
-
"style": {
|
|
43015
|
-
width: `${dropdownWidth.value}`
|
|
43016
|
-
}
|
|
43096
|
+
"class": dropdownCls
|
|
43017
43097
|
}, [withDirectives(createVNode("ul", {
|
|
43018
43098
|
"class": listCls,
|
|
43019
43099
|
"ref": dropdownContainer
|
|
@@ -54356,7 +54436,7 @@ const installs = [
|
|
|
54356
54436
|
VirtualListInstall
|
|
54357
54437
|
];
|
|
54358
54438
|
var vueDevui = {
|
|
54359
|
-
version: "1.6.
|
|
54439
|
+
version: "1.6.16",
|
|
54360
54440
|
install(app) {
|
|
54361
54441
|
installs.forEach((p) => app.use(p));
|
|
54362
54442
|
}
|