@sdata/web-vue 3.19.0 → 3.21.0
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/sd.css +11 -0
- package/dist/sd.min.css +1 -1
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/basic-crud-table/types.d.ts +2 -0
- package/es/card/card.d.ts +22 -0
- package/es/card/card.js +11 -2
- package/es/card/index.d.ts +39 -0
- package/es/cascader/base-cascader-panel.d.ts +3 -0
- package/es/cascader/base-cascader-panel.js +2 -1
- package/es/cascader/cascader-search-panel.d.ts +3 -0
- package/es/cascader/cascader-search-panel.js +2 -1
- package/es/cascader/cascader.vue.d.ts +20 -8
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +42 -4
- package/es/cascader/index.d.ts +1 -1
- package/es/cascader/types.d.ts +13 -0
- package/es/color-picker/color-picker.js +13 -1
- package/es/color-picker/index.d.ts +1 -1
- package/es/color-picker/interface.d.ts +10 -0
- package/es/config-provider/config-provider.vue.d.ts +67 -0
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +67 -1
- package/es/config-provider/context.d.ts +12 -0
- package/es/config-provider/index.d.ts +99 -0
- package/es/date-picker/index.d.ts +12 -1
- package/es/date-picker/interface.d.ts +19 -0
- package/es/date-picker/picker.vue.d.ts +23 -13
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +23 -2
- package/es/date-picker/range-picker.vue.d.ts +25 -14
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +21 -2
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/index.css +11 -0
- package/es/index.d.ts +2 -2
- package/es/list/index.d.ts +9 -0
- package/es/list/list.d.ts +7 -0
- package/es/list/list.js +8 -2
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/qr-code/index.d.ts +18 -12
- package/es/qr-code/qr-code.vue.d.ts +5 -3
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/select/index.d.ts +10 -1
- package/es/select/interface.d.ts +10 -0
- package/es/select/select-dropdown.vue.d.ts +3 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +2 -4
- package/es/select/select.d.ts +7 -0
- package/es/select/select.js +30 -2
- package/es/sender/index.d.ts +1 -1
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +117 -93
- package/es/sender/style/index.css +11 -0
- package/es/sender/style/index.scss +13 -0
- package/es/sender/types.d.ts +60 -3
- package/es/sender/use-speech.d.ts +12 -2
- package/es/sender/use-speech.js +293 -75
- package/es/spin/index.d.ts +15 -0
- package/es/spin/spin.d.ts +9 -0
- package/es/spin/spin.js +72 -10
- package/es/table/index.d.ts +51 -6
- package/es/table/interface.d.ts +3 -0
- package/es/table/table.d.ts +22 -3
- package/es/table/table.js +7 -2
- package/es/time-picker/index.d.ts +12 -1
- package/es/time-picker/interface.d.ts +10 -0
- package/es/time-picker/time-picker.vue.d.ts +15 -4
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +22 -2
- package/es/timeline/index.d.ts +39 -0
- package/es/timeline/timeline.d.ts +22 -0
- package/es/timeline/timeline.js +11 -2
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/toolbar/types.d.ts +2 -0
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/interface.d.ts +10 -0
- package/es/tree-select/tree-select.vue.d.ts +17 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +27 -2
- package/json/vetur-attributes.json +63 -3
- package/json/vetur-tags.json +20 -0
- package/json/web-types.json +163 -3
- package/package.json +1 -1
package/es/list/index.d.ts
CHANGED
|
@@ -24,6 +24,9 @@ declare const List: {
|
|
|
24
24
|
type: BooleanConstructor;
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
|
+
spinProps: {
|
|
28
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
29
|
+
};
|
|
27
30
|
hoverable: {
|
|
28
31
|
type: BooleanConstructor;
|
|
29
32
|
default: boolean;
|
|
@@ -100,6 +103,9 @@ declare const List: {
|
|
|
100
103
|
type: BooleanConstructor;
|
|
101
104
|
default: boolean;
|
|
102
105
|
};
|
|
106
|
+
spinProps: {
|
|
107
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
108
|
+
};
|
|
103
109
|
hoverable: {
|
|
104
110
|
type: BooleanConstructor;
|
|
105
111
|
default: boolean;
|
|
@@ -168,6 +174,9 @@ declare const List: {
|
|
|
168
174
|
type: BooleanConstructor;
|
|
169
175
|
default: boolean;
|
|
170
176
|
};
|
|
177
|
+
spinProps: {
|
|
178
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
179
|
+
};
|
|
171
180
|
hoverable: {
|
|
172
181
|
type: BooleanConstructor;
|
|
173
182
|
default: boolean;
|
package/es/list/list.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import type { ScrollIntoViewOptions, VirtualListProps } from '../_components/virtual-list/interface';
|
|
3
|
+
import type { SpinProps } from '../spin';
|
|
3
4
|
import { PaginationProps } from '../pagination';
|
|
4
5
|
import { ScrollbarProps } from '../scrollbar';
|
|
5
6
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -22,6 +23,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
22
23
|
type: BooleanConstructor;
|
|
23
24
|
default: boolean;
|
|
24
25
|
};
|
|
26
|
+
spinProps: {
|
|
27
|
+
type: PropType<SpinProps>;
|
|
28
|
+
};
|
|
25
29
|
hoverable: {
|
|
26
30
|
type: BooleanConstructor;
|
|
27
31
|
default: boolean;
|
|
@@ -77,6 +81,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
77
81
|
type: BooleanConstructor;
|
|
78
82
|
default: boolean;
|
|
79
83
|
};
|
|
84
|
+
spinProps: {
|
|
85
|
+
type: PropType<SpinProps>;
|
|
86
|
+
};
|
|
80
87
|
hoverable: {
|
|
81
88
|
type: BooleanConstructor;
|
|
82
89
|
default: boolean;
|
package/es/list/list.js
CHANGED
|
@@ -59,6 +59,11 @@ var list_default = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
default: false
|
|
60
60
|
},
|
|
61
61
|
/**
|
|
62
|
+
* @zh 传递给加载中 Spin 的属性
|
|
63
|
+
* @en Props passed to the loading Spin
|
|
64
|
+
*/
|
|
65
|
+
spinProps: { type: Object },
|
|
66
|
+
/**
|
|
62
67
|
* @zh 是否显示选中样式
|
|
63
68
|
* @en Whether to display the selected style
|
|
64
69
|
*/
|
|
@@ -163,6 +168,7 @@ var list_default = /* @__PURE__ */ defineComponent({
|
|
|
163
168
|
const { scrollbar } = toRefs(props);
|
|
164
169
|
const prefixCls = getPrefixCls("list");
|
|
165
170
|
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
171
|
+
const mergedSpinProps = computed(() => _objectSpread2(_objectSpread2({}, configCtx === null || configCtx === void 0 ? void 0 : configCtx.listSpinProps), props.spinProps));
|
|
166
172
|
const { componentRef, elementRef: listRef } = useComponentRef("containerRef");
|
|
167
173
|
const isVirtualList = computed(() => props.virtualListProps);
|
|
168
174
|
const { scrollbarProps } = useScrollbar(scrollbar);
|
|
@@ -337,10 +343,10 @@ var list_default = /* @__PURE__ */ defineComponent({
|
|
|
337
343
|
return createVNode("div", {
|
|
338
344
|
"class": `${prefixCls}-wrapper`,
|
|
339
345
|
"style": wrapperStyle.value
|
|
340
|
-
}, [createVNode(Spin, {
|
|
346
|
+
}, [createVNode(Spin, mergeProps(mergedSpinProps.value, {
|
|
341
347
|
"class": `${prefixCls}-spin`,
|
|
342
348
|
"loading": props.loading
|
|
343
|
-
}, { default: () => [createVNode(ContentComponent, mergeProps({
|
|
349
|
+
}), { default: () => [createVNode(ContentComponent, mergeProps({
|
|
344
350
|
"ref": componentRef,
|
|
345
351
|
"class": cls.value,
|
|
346
352
|
"style": contentStyle.value
|
|
@@ -15,8 +15,8 @@ import client_only_default from "../_components/client-only.js";
|
|
|
15
15
|
import usePopupManager from "../_hooks/use-popup-manager.js";
|
|
16
16
|
import { useTeleportContainer } from "../_hooks/use-teleport-container.js";
|
|
17
17
|
import Button from "../button/index.js";
|
|
18
|
-
import Ellipsis from "../ellipsis/index.js";
|
|
19
18
|
import { useConfigProviderProp } from "../_hooks/use-config-provider-prop.js";
|
|
19
|
+
import Ellipsis from "../ellipsis/index.js";
|
|
20
20
|
import { getFocusableElements, useFocusTrap } from "../_hooks/use-focus-trap.js";
|
|
21
21
|
import { useOverflow } from "../_hooks/use-overflow.js";
|
|
22
22
|
import { useDraggable } from "./hooks/use-draggable.js";
|
package/es/qr-code/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare const QrCode: {
|
|
|
60
60
|
default: undefined;
|
|
61
61
|
};
|
|
62
62
|
spinProps: {
|
|
63
|
-
type: import("vue").PropType<import("../
|
|
63
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
64
64
|
default: undefined;
|
|
65
65
|
};
|
|
66
66
|
}>> & Readonly<{
|
|
@@ -72,19 +72,21 @@ declare const QrCode: {
|
|
|
72
72
|
color: string;
|
|
73
73
|
size: number;
|
|
74
74
|
icon: string;
|
|
75
|
-
bordered: boolean;
|
|
76
|
-
status: import("./types").QrCodeStatusType;
|
|
77
75
|
spinProps: Partial<{
|
|
78
76
|
dot: boolean;
|
|
79
77
|
loading: boolean;
|
|
78
|
+
delay: number | boolean;
|
|
80
79
|
hideIcon: boolean;
|
|
81
80
|
}> & Omit<{
|
|
82
81
|
readonly dot: boolean;
|
|
83
82
|
readonly loading: boolean;
|
|
83
|
+
readonly delay: number | boolean;
|
|
84
84
|
readonly hideIcon: boolean;
|
|
85
85
|
readonly size?: number | undefined;
|
|
86
86
|
readonly tip?: string | undefined;
|
|
87
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "hideIcon">;
|
|
87
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "delay" | "hideIcon">;
|
|
88
|
+
bordered: boolean;
|
|
89
|
+
status: import("./types").QrCodeStatusType;
|
|
88
90
|
iconAlt: string;
|
|
89
91
|
iconSize: import("./types").QrCodeIconSize;
|
|
90
92
|
bgColor: string;
|
|
@@ -157,7 +159,7 @@ declare const QrCode: {
|
|
|
157
159
|
default: undefined;
|
|
158
160
|
};
|
|
159
161
|
spinProps: {
|
|
160
|
-
type: import("vue").PropType<import("../
|
|
162
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
161
163
|
default: undefined;
|
|
162
164
|
};
|
|
163
165
|
}>> & Readonly<{
|
|
@@ -167,19 +169,21 @@ declare const QrCode: {
|
|
|
167
169
|
color: string;
|
|
168
170
|
size: number;
|
|
169
171
|
icon: string;
|
|
170
|
-
bordered: boolean;
|
|
171
|
-
status: import("./types").QrCodeStatusType;
|
|
172
172
|
spinProps: Partial<{
|
|
173
173
|
dot: boolean;
|
|
174
174
|
loading: boolean;
|
|
175
|
+
delay: number | boolean;
|
|
175
176
|
hideIcon: boolean;
|
|
176
177
|
}> & Omit<{
|
|
177
178
|
readonly dot: boolean;
|
|
178
179
|
readonly loading: boolean;
|
|
180
|
+
readonly delay: number | boolean;
|
|
179
181
|
readonly hideIcon: boolean;
|
|
180
182
|
readonly size?: number | undefined;
|
|
181
183
|
readonly tip?: string | undefined;
|
|
182
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "hideIcon">;
|
|
184
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "delay" | "hideIcon">;
|
|
185
|
+
bordered: boolean;
|
|
186
|
+
status: import("./types").QrCodeStatusType;
|
|
183
187
|
iconAlt: string;
|
|
184
188
|
iconSize: import("./types").QrCodeIconSize;
|
|
185
189
|
bgColor: string;
|
|
@@ -249,7 +253,7 @@ declare const QrCode: {
|
|
|
249
253
|
default: undefined;
|
|
250
254
|
};
|
|
251
255
|
spinProps: {
|
|
252
|
-
type: import("vue").PropType<import("../
|
|
256
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
253
257
|
default: undefined;
|
|
254
258
|
};
|
|
255
259
|
}>> & Readonly<{
|
|
@@ -261,19 +265,21 @@ declare const QrCode: {
|
|
|
261
265
|
color: string;
|
|
262
266
|
size: number;
|
|
263
267
|
icon: string;
|
|
264
|
-
bordered: boolean;
|
|
265
|
-
status: import("./types").QrCodeStatusType;
|
|
266
268
|
spinProps: Partial<{
|
|
267
269
|
dot: boolean;
|
|
268
270
|
loading: boolean;
|
|
271
|
+
delay: number | boolean;
|
|
269
272
|
hideIcon: boolean;
|
|
270
273
|
}> & Omit<{
|
|
271
274
|
readonly dot: boolean;
|
|
272
275
|
readonly loading: boolean;
|
|
276
|
+
readonly delay: number | boolean;
|
|
273
277
|
readonly hideIcon: boolean;
|
|
274
278
|
readonly size?: number | undefined;
|
|
275
279
|
readonly tip?: string | undefined;
|
|
276
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "hideIcon">;
|
|
280
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "delay" | "hideIcon">;
|
|
281
|
+
bordered: boolean;
|
|
282
|
+
status: import("./types").QrCodeStatusType;
|
|
277
283
|
iconAlt: string;
|
|
278
284
|
iconSize: import("./types").QrCodeIconSize;
|
|
279
285
|
bgColor: string;
|
|
@@ -136,19 +136,21 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
136
136
|
color: string;
|
|
137
137
|
size: number;
|
|
138
138
|
icon: string;
|
|
139
|
-
bordered: boolean;
|
|
140
|
-
status: QrCodeStatusType;
|
|
141
139
|
spinProps: Partial<{
|
|
142
140
|
dot: boolean;
|
|
143
141
|
loading: boolean;
|
|
142
|
+
delay: number | boolean;
|
|
144
143
|
hideIcon: boolean;
|
|
145
144
|
}> & Omit<{
|
|
146
145
|
readonly dot: boolean;
|
|
147
146
|
readonly loading: boolean;
|
|
147
|
+
readonly delay: number | boolean;
|
|
148
148
|
readonly hideIcon: boolean;
|
|
149
149
|
readonly size?: number | undefined;
|
|
150
150
|
readonly tip?: string | undefined;
|
|
151
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "hideIcon">;
|
|
151
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dot" | "loading" | "delay" | "hideIcon">;
|
|
152
|
+
bordered: boolean;
|
|
153
|
+
status: QrCodeStatusType;
|
|
152
154
|
iconAlt: string;
|
|
153
155
|
iconSize: QrCodeIconSize;
|
|
154
156
|
bgColor: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
1
2
|
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectSpread2.js";
|
|
2
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
4
|
import { useI18n } from "../locale/index.js";
|
|
4
5
|
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/asyncToGenerator.js";
|
|
5
6
|
import qr_code_status_default from "./qr-code-status.js";
|
|
6
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useSlots, watch } from "vue";
|
|
7
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, inject, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useSlots, watch } from "vue";
|
|
7
8
|
import QRCode from "qrcode";
|
|
8
9
|
//#region components/qr-code/qr-code.vue?vue&type=script&setup=true&lang.ts
|
|
9
10
|
var _hoisted_1 = ["aria-label"];
|
|
@@ -158,6 +159,8 @@ var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
158
159
|
const props = __props;
|
|
159
160
|
const emit = __emit;
|
|
160
161
|
const { t } = useI18n();
|
|
162
|
+
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
163
|
+
const resolvedSpinProps = computed(() => _objectSpread2(_objectSpread2({}, configCtx === null || configCtx === void 0 ? void 0 : configCtx.qrCodeSpinProps), props.spinProps));
|
|
161
164
|
const prefixCls = getPrefixCls("qr-code");
|
|
162
165
|
const canvasRef = ref();
|
|
163
166
|
const svgMarkup = ref("");
|
|
@@ -281,7 +284,7 @@ var qr_code_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
281
284
|
}, () => [createVNode(qr_code_status_default, {
|
|
282
285
|
"prefix-cls": unref(prefixCls),
|
|
283
286
|
status: __props.status,
|
|
284
|
-
"spin-props":
|
|
287
|
+
"spin-props": resolvedSpinProps.value,
|
|
285
288
|
onRefresh: handleRefresh
|
|
286
289
|
}, null, 8, [
|
|
287
290
|
"prefix-cls",
|
package/es/select/index.d.ts
CHANGED
|
@@ -40,6 +40,9 @@ declare const Select: {
|
|
|
40
40
|
type: BooleanConstructor;
|
|
41
41
|
default: boolean;
|
|
42
42
|
};
|
|
43
|
+
spinProps: {
|
|
44
|
+
type: import("vue").PropType<import("..").SpinProps>;
|
|
45
|
+
};
|
|
43
46
|
disabled: {
|
|
44
47
|
type: BooleanConstructor;
|
|
45
48
|
default: boolean;
|
|
@@ -1395,6 +1398,9 @@ declare const Select: {
|
|
|
1395
1398
|
type: BooleanConstructor;
|
|
1396
1399
|
default: boolean;
|
|
1397
1400
|
};
|
|
1401
|
+
spinProps: {
|
|
1402
|
+
type: import("vue").PropType<import("..").SpinProps>;
|
|
1403
|
+
};
|
|
1398
1404
|
disabled: {
|
|
1399
1405
|
type: BooleanConstructor;
|
|
1400
1406
|
default: boolean;
|
|
@@ -1609,6 +1615,9 @@ declare const Select: {
|
|
|
1609
1615
|
type: BooleanConstructor;
|
|
1610
1616
|
default: boolean;
|
|
1611
1617
|
};
|
|
1618
|
+
spinProps: {
|
|
1619
|
+
type: import("vue").PropType<import("..").SpinProps>;
|
|
1620
|
+
};
|
|
1612
1621
|
disabled: {
|
|
1613
1622
|
type: BooleanConstructor;
|
|
1614
1623
|
default: boolean;
|
|
@@ -2923,5 +2932,5 @@ declare const Select: {
|
|
|
2923
2932
|
install: (app: App, options?: SDOptions) => void;
|
|
2924
2933
|
};
|
|
2925
2934
|
export type SelectInstance = InstanceType<typeof _Select>;
|
|
2926
|
-
export type { SelectProps, SelectOption, SelectOptionData, SelectOptionGroup, SelectFieldNames, FilterOption, SelectFallbackOption, } from './interface';
|
|
2935
|
+
export type { SelectProps, SelectOption, SelectOptionData, SelectOptionGroup, SelectFieldNames, SelectTriggerSlotProps, FilterOption, SelectFallbackOption, } from './interface';
|
|
2927
2936
|
export default Select;
|
package/es/select/interface.d.ts
CHANGED
|
@@ -5,6 +5,16 @@ import type { ScrollbarProps } from '../scrollbar';
|
|
|
5
5
|
import type { TriggerProps } from '../trigger';
|
|
6
6
|
export type SelectOptionValue = string | number | boolean | Record<string, unknown>;
|
|
7
7
|
export type SelectModelValue = SelectOptionValue | SelectOptionValue[] | null | undefined;
|
|
8
|
+
export interface SelectTriggerSlotProps {
|
|
9
|
+
value: SelectModelValue;
|
|
10
|
+
displayValue: string | string[];
|
|
11
|
+
inputValue: string;
|
|
12
|
+
selectedOptions: SelectOptionData[];
|
|
13
|
+
popupVisible: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
loading: boolean;
|
|
16
|
+
multiple: boolean;
|
|
17
|
+
}
|
|
8
18
|
export interface OptionValueWithKey {
|
|
9
19
|
value: SelectOptionValue;
|
|
10
20
|
key: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { EmitType } from '../_utils/types';
|
|
3
|
+
import type { SpinProps } from '../spin';
|
|
3
4
|
import { ScrollbarProps } from '../scrollbar';
|
|
4
5
|
declare var __VLS_1: {}, __VLS_8: {}, __VLS_15: {}, __VLS_27: {}, __VLS_29: {};
|
|
5
6
|
type __VLS_Slots = {} & {
|
|
@@ -15,6 +16,7 @@ type __VLS_Slots = {} & {
|
|
|
15
16
|
};
|
|
16
17
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
18
|
loading: BooleanConstructor;
|
|
19
|
+
spinProps: PropType<SpinProps>;
|
|
18
20
|
empty: BooleanConstructor;
|
|
19
21
|
virtualList: BooleanConstructor;
|
|
20
22
|
bottomOffset: {
|
|
@@ -44,6 +46,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
44
46
|
reachBottom: (_ev: Event) => any;
|
|
45
47
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
48
|
loading: BooleanConstructor;
|
|
49
|
+
spinProps: PropType<SpinProps>;
|
|
47
50
|
empty: BooleanConstructor;
|
|
48
51
|
virtualList: BooleanConstructor;
|
|
49
52
|
bottomOffset: {
|
|
@@ -12,6 +12,7 @@ var select_dropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
12
12
|
__name: "select-dropdown",
|
|
13
13
|
props: {
|
|
14
14
|
loading: Boolean,
|
|
15
|
+
spinProps: Object,
|
|
15
16
|
empty: Boolean,
|
|
16
17
|
virtualList: Boolean,
|
|
17
18
|
bottomOffset: {
|
|
@@ -60,10 +61,7 @@ var select_dropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
60
61
|
key: 0,
|
|
61
62
|
class: normalizeClass(`${unref(prefixCls)}-header`)
|
|
62
63
|
}, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("", true),
|
|
63
|
-
__props.loading ? (openBlock(), createBlock(unref(Spin), {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: normalizeClass(`${unref(prefixCls)}-loading`)
|
|
66
|
-
}, null, 8, ["class"])) : __props.empty ? (openBlock(), createElementBlock("div", {
|
|
64
|
+
__props.loading ? (openBlock(), createBlock(unref(Spin), mergeProps({ key: 1 }, __props.spinProps, { class: `${unref(prefixCls)}-loading` }), null, 16, ["class"])) : __props.empty ? (openBlock(), createElementBlock("div", {
|
|
67
65
|
key: 2,
|
|
68
66
|
class: normalizeClass(`${unref(prefixCls)}-empty`)
|
|
69
67
|
}, [renderSlot(_ctx.$slots, "empty", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(unref(SelectEmpty) || unref(Empty))))])], 2)) : createCommentVNode("", true),
|
package/es/select/select.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { VirtualListProps } from '../_components/virtual-list/interface';
|
|
|
4
4
|
import type { Size } from '../_utils/constant';
|
|
5
5
|
import type { FloatingOptions } from '../_utils/floating';
|
|
6
6
|
import type { ScrollbarProps } from '../scrollbar';
|
|
7
|
+
import type { SpinProps } from '../spin';
|
|
7
8
|
import type { SelectFieldNames, SelectModelValue, SelectOption, SelectOptionData, SelectOptionValue } from './interface';
|
|
8
9
|
import { type TriggerProps } from '../trigger';
|
|
9
10
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -44,6 +45,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
44
45
|
type: BooleanConstructor;
|
|
45
46
|
default: boolean;
|
|
46
47
|
};
|
|
48
|
+
spinProps: {
|
|
49
|
+
type: PropType<SpinProps>;
|
|
50
|
+
};
|
|
47
51
|
disabled: {
|
|
48
52
|
type: BooleanConstructor;
|
|
49
53
|
default: boolean;
|
|
@@ -218,6 +222,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
218
222
|
type: BooleanConstructor;
|
|
219
223
|
default: boolean;
|
|
220
224
|
};
|
|
225
|
+
spinProps: {
|
|
226
|
+
type: PropType<SpinProps>;
|
|
227
|
+
};
|
|
221
228
|
disabled: {
|
|
222
229
|
type: BooleanConstructor;
|
|
223
230
|
default: boolean;
|
package/es/select/select.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
+
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
3
|
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectSpread2.js";
|
|
3
4
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
5
|
import { isArray, isBoolean, isEmptyObject, isFunction, isNull, isNumber, isObject, isString, isUndefined } from "../_utils/is.js";
|
|
@@ -17,7 +18,7 @@ import select_view_default from "../_components/select-view/select-view.js";
|
|
|
17
18
|
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
18
19
|
import { useTrigger } from "../_hooks/use-trigger.js";
|
|
19
20
|
import Checkbox from "../checkbox/index.js";
|
|
20
|
-
import { computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps, nextTick, ref, toRef, toRefs, watch, watchEffect } from "vue";
|
|
21
|
+
import { computed, createVNode, defineComponent, getCurrentInstance, inject, isVNode, mergeProps, nextTick, ref, toRef, toRefs, watch, watchEffect } from "vue";
|
|
21
22
|
//#region components/select/select.tsx
|
|
22
23
|
function _isSlot(s) {
|
|
23
24
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -90,6 +91,11 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
90
91
|
type: Boolean,
|
|
91
92
|
default: false
|
|
92
93
|
},
|
|
94
|
+
/**
|
|
95
|
+
* @zh 传递给下拉加载中 Spin 的属性
|
|
96
|
+
* @en Props passed to the loading Spin in the dropdown
|
|
97
|
+
*/
|
|
98
|
+
spinProps: { type: Object },
|
|
93
99
|
disabled: {
|
|
94
100
|
type: Boolean,
|
|
95
101
|
default: false
|
|
@@ -221,6 +227,8 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
221
227
|
"exceedLimit": (_value, _ev) => true
|
|
222
228
|
},
|
|
223
229
|
setup(props, { slots, emit, attrs, expose }) {
|
|
230
|
+
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
231
|
+
const mergedSpinProps = computed(() => _objectSpread2(_objectSpread2({}, configCtx === null || configCtx === void 0 ? void 0 : configCtx.selectSpinProps), props.spinProps));
|
|
224
232
|
const { size, disabled, error, options, filterOption, valueKey, multiple, popupVisible, show, defaultPopupVisible, defaultShow, showExtraOptions, modelValue, fieldNames, loading, defaultActiveFirstOption, allowClear, allowSearch } = toRefs(props);
|
|
225
233
|
const prefixCls = getPrefixCls("select");
|
|
226
234
|
const selectViewRef = ref(null);
|
|
@@ -460,6 +468,16 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
460
468
|
}
|
|
461
469
|
return result;
|
|
462
470
|
});
|
|
471
|
+
const triggerValue = computed(() => {
|
|
472
|
+
const values = computedValueObjects.value.map((item) => item.value);
|
|
473
|
+
return props.multiple ? values : values[0];
|
|
474
|
+
});
|
|
475
|
+
const triggerDisplayValue = computed(() => {
|
|
476
|
+
var _labels$;
|
|
477
|
+
const labels = selectViewValue.value.map((item) => String(item.label));
|
|
478
|
+
return props.multiple ? labels : (_labels$ = labels[0]) !== null && _labels$ !== void 0 ? _labels$ : "";
|
|
479
|
+
});
|
|
480
|
+
const triggerSelectedOptions = computed(() => selectViewValue.value.map((item) => item.option).filter((option) => Boolean(option)));
|
|
463
481
|
const ellipsisPrefixCls = getPrefixCls("ellipsis");
|
|
464
482
|
const renderOptionEllipsis = (label) => createVNode("span", { "class": [ellipsisPrefixCls, `${ellipsisPrefixCls}--single-line`] }, [createVNode("span", { "class": `${ellipsisPrefixCls}-content` }, [label])]);
|
|
465
483
|
const getOptionContentFunc = (optionInfo) => {
|
|
@@ -528,6 +546,7 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
528
546
|
const renderDropDown = () => createVNode(select_dropdown_default, {
|
|
529
547
|
"ref": dropdownRef,
|
|
530
548
|
"loading": props.loading,
|
|
549
|
+
"spinProps": mergedSpinProps.value,
|
|
531
550
|
"empty": validOptionInfos.value.length === 0,
|
|
532
551
|
"virtualList": Boolean(resolvedVirtualListProps.value),
|
|
533
552
|
"scrollbar": props.scrollbar,
|
|
@@ -601,7 +620,16 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
601
620
|
}, props.triggerProps, { "floatingOptions": (_props$floatingOption = props.floatingOptions) !== null && _props$floatingOption !== void 0 ? _props$floatingOption : (_props$triggerProps = props.triggerProps) === null || _props$triggerProps === void 0 ? void 0 : _props$triggerProps.floatingOptions }), {
|
|
602
621
|
default: () => {
|
|
603
622
|
var _slots$trigger, _slots$trigger2;
|
|
604
|
-
return [(_slots$trigger = (_slots$trigger2 = slots.trigger) === null || _slots$trigger2 === void 0 ? void 0 : _slots$trigger2.call(slots
|
|
623
|
+
return [(_slots$trigger = (_slots$trigger2 = slots.trigger) === null || _slots$trigger2 === void 0 ? void 0 : _slots$trigger2.call(slots, {
|
|
624
|
+
value: triggerValue.value,
|
|
625
|
+
displayValue: triggerDisplayValue.value,
|
|
626
|
+
inputValue: computedInputValue.value,
|
|
627
|
+
selectedOptions: triggerSelectedOptions.value,
|
|
628
|
+
popupVisible: computedPopupVisible.value,
|
|
629
|
+
disabled: mergedDisabled.value,
|
|
630
|
+
loading: props.loading,
|
|
631
|
+
multiple: props.multiple
|
|
632
|
+
})) !== null && _slots$trigger !== void 0 ? _slots$trigger : createVNode(select_view_default, mergeProps({
|
|
605
633
|
"ref": selectViewRef,
|
|
606
634
|
"class": prefixCls,
|
|
607
635
|
"modelValue": selectViewValue.value,
|
package/es/sender/index.d.ts
CHANGED
|
@@ -115,5 +115,5 @@ export declare const SenderSwitch: {
|
|
|
115
115
|
export type SenderInstance = InstanceType<typeof _Sender>;
|
|
116
116
|
export type SenderHeaderInstance = InstanceType<typeof _SenderHeader>;
|
|
117
117
|
export type SenderSwitchInstance = InstanceType<typeof _SenderSwitch>;
|
|
118
|
-
export type { SenderActionContext, SenderAllowSpeech, SenderComponents, SenderContentSlotConfig, SenderControlledSpeechConfig, SenderCustomSlotConfig, SenderCustomSlotRender, SenderCustomSlotState, SenderEmits, SenderFocusOptions, SenderHeaderSemanticType, SenderHeaderProps, SenderInsertPosition, SenderInputSlotConfig, SenderProps, SenderRef, SenderResolvedSlotConfig, SenderSelectSlotConfig, SenderSemanticType, SenderSkill, SenderSkillClosableConfig, SenderSlotConfig, SenderSlotConfigBase, SenderSubmitType, SenderSwitchProps, SenderTagSlotConfig, SenderTextSlotConfig, SenderValue, } from './types';
|
|
118
|
+
export type { SenderActionContext, SenderAllowSpeech, SenderComponents, SenderContentSlotConfig, SenderControlledSpeechConfig, SenderCustomSlotConfig, SenderCustomSlotRender, SenderCustomSlotState, SenderEmits, SenderFocusOptions, SenderHeaderSemanticType, SenderHeaderProps, SenderInsertPosition, SenderInputSlotConfig, SenderProps, SenderRef, SenderResolvedSlotConfig, SenderSelectSlotConfig, SenderSemanticType, SenderSkill, SenderSkillClosableConfig, SenderSpeechConfig, SenderSpeechDataEvent, SenderSpeechEndEvent, SenderSpeechEndReason, SenderSpeechErrorEvent, SenderSpeechErrorPhase, SenderSpeechStartEvent, SenderSpeechTransportCloseEvent, SenderSpeechTransportMessageEvent, SenderSpeechTransportOpenEvent, SenderSlotConfig, SenderSlotConfigBase, SenderSubmitType, SenderSuffixPlacement, SenderSwitchProps, SenderTagSlotConfig, SenderTextSlotConfig, SenderValue, } from './types';
|
|
119
119
|
export default Sender;
|