@sdata/web-vue 3.5.0 → 3.7.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 +20 -16
- package/dist/sd.min.css +1 -1
- package/es/cascader/cascader-panel.vue.d.ts +0 -2
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +6 -13
- package/es/cascader/cascader.vue.d.ts +0 -2
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +5 -9
- package/es/cascader/types.d.ts +0 -4
- package/es/color-picker/color-picker.d.ts +0 -34
- package/es/color-picker/color-picker.js +6 -48
- package/es/color-picker/index.d.ts +0 -59
- package/es/color-picker/style/index.css +0 -7
- package/es/color-picker/style/index.scss +0 -11
- package/es/color-picker/style/token.scss +0 -2
- package/es/file-previewer/file-previewer.vue.d.ts +19 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +135 -52
- package/es/file-previewer/index.d.ts +86 -1
- package/es/file-previewer/style/index.css +20 -9
- package/es/file-previewer/style/index.scss +25 -7
- package/es/file-previewer/types.d.ts +17 -0
- package/es/index.css +20 -16
- package/es/index.d.ts +1 -1
- package/es/index.js +4 -4
- package/es/progress/circle.vue.d.ts +1 -1
- package/es/progress/index.d.ts +3 -3
- package/es/progress/line.vue.d.ts +1 -1
- package/es/progress/progress.vue.d.ts +1 -1
- package/es/progress/steps.vue.d.ts +1 -1
- package/es/sd-vue.js +4 -4
- package/es/select/index.d.ts +0 -20
- package/es/select/select.d.ts +0 -11
- package/es/select/select.js +5 -18
- package/es/tree-select/tree-select.vue.d.ts +0 -8
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +2 -17
- package/es/trigger/context.d.ts +1 -0
- package/es/trigger/trigger.js +37 -25
- package/json/vetur-attributes.json +10 -29
- package/json/vetur-tags.json +6 -11
- package/json/web-types.json +26 -66
- package/package.json +1 -1
- package/es/color-picker/input-alpha.d.ts +0 -19
- package/es/color-picker/input-hex.d.ts +0 -33
- package/es/color-picker/input-rgb.d.ts +0 -33
|
@@ -81,8 +81,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
81
81
|
color: string | Record<string, any>;
|
|
82
82
|
width: number;
|
|
83
83
|
status: string;
|
|
84
|
-
showText: boolean;
|
|
85
84
|
percent: number;
|
|
85
|
+
showText: boolean;
|
|
86
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
87
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
88
88
|
declare const _default: typeof __VLS_export;
|
package/es/progress/index.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ declare const Progress: {
|
|
|
45
45
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
46
46
|
type: "circle" | "line";
|
|
47
47
|
animation: boolean;
|
|
48
|
-
showText: boolean;
|
|
49
48
|
percent: number;
|
|
49
|
+
showText: boolean;
|
|
50
50
|
steps: number;
|
|
51
51
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
52
52
|
P: {};
|
|
@@ -98,8 +98,8 @@ declare const Progress: {
|
|
|
98
98
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
99
99
|
type: "circle" | "line";
|
|
100
100
|
animation: boolean;
|
|
101
|
-
showText: boolean;
|
|
102
101
|
percent: number;
|
|
102
|
+
showText: boolean;
|
|
103
103
|
steps: number;
|
|
104
104
|
}>;
|
|
105
105
|
__isFragment?: never;
|
|
@@ -148,8 +148,8 @@ declare const Progress: {
|
|
|
148
148
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
149
149
|
type: "circle" | "line";
|
|
150
150
|
animation: boolean;
|
|
151
|
-
showText: boolean;
|
|
152
151
|
percent: number;
|
|
152
|
+
showText: boolean;
|
|
153
153
|
steps: number;
|
|
154
154
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
155
155
|
$slots: {
|
|
@@ -80,8 +80,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
80
80
|
color: string | Record<string, any>;
|
|
81
81
|
width: string | number;
|
|
82
82
|
animation: boolean;
|
|
83
|
-
showText: boolean;
|
|
84
83
|
percent: number;
|
|
84
|
+
showText: boolean;
|
|
85
85
|
formatText: Function;
|
|
86
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
87
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -99,8 +99,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
99
99
|
}>> & Readonly<{}>, {
|
|
100
100
|
type: "circle" | "line";
|
|
101
101
|
animation: boolean;
|
|
102
|
-
showText: boolean;
|
|
103
102
|
percent: number;
|
|
103
|
+
showText: boolean;
|
|
104
104
|
steps: number;
|
|
105
105
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
106
106
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -63,8 +63,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
63
63
|
}>> & Readonly<{}>, {
|
|
64
64
|
color: string | Record<string, any>;
|
|
65
65
|
status: string;
|
|
66
|
-
showText: boolean;
|
|
67
66
|
percent: number;
|
|
67
|
+
showText: boolean;
|
|
68
68
|
steps: number;
|
|
69
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
70
70
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/es/sd-vue.js
CHANGED
|
@@ -66,6 +66,10 @@ import descriptions_item_default from "./descriptions/descriptions-item.js";
|
|
|
66
66
|
import Descriptions from "./descriptions/index.js";
|
|
67
67
|
import Divider from "./divider/index.js";
|
|
68
68
|
import Drawer from "./drawer/index.js";
|
|
69
|
+
import preview_action_default from "./image/preview-action.js";
|
|
70
|
+
import preview_default from "./image/preview.js";
|
|
71
|
+
import preview_group_default from "./image/preview-group.js";
|
|
72
|
+
import Image from "./image/index.js";
|
|
69
73
|
import FilePreviewer from "./file-previewer/index.js";
|
|
70
74
|
import grid_col_default from "./grid/grid-col.js";
|
|
71
75
|
import grid_item_default from "./grid/grid-item.js";
|
|
@@ -74,10 +78,6 @@ import Grid from "./grid/index.js";
|
|
|
74
78
|
import form_item_default from "./form/form-item.js";
|
|
75
79
|
import Form from "./form/index.js";
|
|
76
80
|
import Icon from "./icon-component/index.js";
|
|
77
|
-
import preview_action_default from "./image/preview-action.js";
|
|
78
|
-
import preview_default from "./image/preview.js";
|
|
79
|
-
import preview_group_default from "./image/preview-group.js";
|
|
80
|
-
import Image from "./image/index.js";
|
|
81
81
|
import Textarea from "./textarea/index.js";
|
|
82
82
|
import Mention from "./mention/index.js";
|
|
83
83
|
import Rate from "./rate/index.js";
|
package/es/select/index.d.ts
CHANGED
|
@@ -7,10 +7,6 @@ declare const Select: {
|
|
|
7
7
|
type: BooleanConstructor;
|
|
8
8
|
default: boolean;
|
|
9
9
|
};
|
|
10
|
-
value: {
|
|
11
|
-
type: import("vue").PropType<import("./interface").SelectModelValue>;
|
|
12
|
-
default: undefined;
|
|
13
|
-
};
|
|
14
10
|
modelValue: {
|
|
15
11
|
type: import("vue").PropType<import("./interface").SelectModelValue>;
|
|
16
12
|
default: undefined;
|
|
@@ -159,7 +155,6 @@ declare const Select: {
|
|
|
159
155
|
"onUpdate:modelValue"?: ((_value: import("./interface").SelectModelValue) => any) | undefined;
|
|
160
156
|
onDropdownScroll?: ((_ev: Event) => any) | undefined;
|
|
161
157
|
onDropdownReachBottom?: ((_ev: Event) => any) | undefined;
|
|
162
|
-
"onUpdate:value"?: ((_value: import("./interface").SelectModelValue) => any) | undefined;
|
|
163
158
|
"onUpdate:inputValue"?: ((_inputValue: string) => any) | undefined;
|
|
164
159
|
onInputValueChange?: ((_inputValue: string) => any) | undefined;
|
|
165
160
|
onRemove?: ((_removed: import("./interface").SelectOptionValue | undefined) => any) | undefined;
|
|
@@ -168,7 +163,6 @@ declare const Select: {
|
|
|
168
163
|
onExceedLimit?: ((_value: import("./interface").SelectOptionValue | undefined, _ev: Event) => any) | undefined;
|
|
169
164
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
170
165
|
'update:modelValue': (_value: import("./interface").SelectModelValue) => true;
|
|
171
|
-
'update:value': (_value: import("./interface").SelectModelValue) => true;
|
|
172
166
|
'update:inputValue': (_inputValue: string) => true;
|
|
173
167
|
'update:popupVisible': (_visible: boolean) => true;
|
|
174
168
|
'update:show': (_visible: boolean) => true;
|
|
@@ -185,7 +179,6 @@ declare const Select: {
|
|
|
185
179
|
}, import("vue").PublicProps, {
|
|
186
180
|
options: import("./interface").SelectOption[];
|
|
187
181
|
error: boolean;
|
|
188
|
-
value: import("./interface").SelectModelValue;
|
|
189
182
|
popupVisible: boolean;
|
|
190
183
|
defaultPopupVisible: boolean;
|
|
191
184
|
disabled: boolean;
|
|
@@ -1268,10 +1261,6 @@ declare const Select: {
|
|
|
1268
1261
|
type: BooleanConstructor;
|
|
1269
1262
|
default: boolean;
|
|
1270
1263
|
};
|
|
1271
|
-
value: {
|
|
1272
|
-
type: import("vue").PropType<import("./interface").SelectModelValue>;
|
|
1273
|
-
default: undefined;
|
|
1274
|
-
};
|
|
1275
1264
|
modelValue: {
|
|
1276
1265
|
type: import("vue").PropType<import("./interface").SelectModelValue>;
|
|
1277
1266
|
default: undefined;
|
|
@@ -1420,7 +1409,6 @@ declare const Select: {
|
|
|
1420
1409
|
"onUpdate:modelValue"?: ((_value: import("./interface").SelectModelValue) => any) | undefined;
|
|
1421
1410
|
onDropdownScroll?: ((_ev: Event) => any) | undefined;
|
|
1422
1411
|
onDropdownReachBottom?: ((_ev: Event) => any) | undefined;
|
|
1423
|
-
"onUpdate:value"?: ((_value: import("./interface").SelectModelValue) => any) | undefined;
|
|
1424
1412
|
"onUpdate:inputValue"?: ((_inputValue: string) => any) | undefined;
|
|
1425
1413
|
onInputValueChange?: ((_inputValue: string) => any) | undefined;
|
|
1426
1414
|
onRemove?: ((_removed: import("./interface").SelectOptionValue | undefined) => any) | undefined;
|
|
@@ -1430,7 +1418,6 @@ declare const Select: {
|
|
|
1430
1418
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
1431
1419
|
options: import("./interface").SelectOption[];
|
|
1432
1420
|
error: boolean;
|
|
1433
|
-
value: import("./interface").SelectModelValue;
|
|
1434
1421
|
popupVisible: boolean;
|
|
1435
1422
|
defaultPopupVisible: boolean;
|
|
1436
1423
|
disabled: boolean;
|
|
@@ -1470,10 +1457,6 @@ declare const Select: {
|
|
|
1470
1457
|
type: BooleanConstructor;
|
|
1471
1458
|
default: boolean;
|
|
1472
1459
|
};
|
|
1473
|
-
value: {
|
|
1474
|
-
type: import("vue").PropType<import("./interface").SelectModelValue>;
|
|
1475
|
-
default: undefined;
|
|
1476
|
-
};
|
|
1477
1460
|
modelValue: {
|
|
1478
1461
|
type: import("vue").PropType<import("./interface").SelectModelValue>;
|
|
1479
1462
|
default: undefined;
|
|
@@ -1622,7 +1605,6 @@ declare const Select: {
|
|
|
1622
1605
|
"onUpdate:modelValue"?: ((_value: import("./interface").SelectModelValue) => any) | undefined;
|
|
1623
1606
|
onDropdownScroll?: ((_ev: Event) => any) | undefined;
|
|
1624
1607
|
onDropdownReachBottom?: ((_ev: Event) => any) | undefined;
|
|
1625
|
-
"onUpdate:value"?: ((_value: import("./interface").SelectModelValue) => any) | undefined;
|
|
1626
1608
|
"onUpdate:inputValue"?: ((_inputValue: string) => any) | undefined;
|
|
1627
1609
|
onInputValueChange?: ((_inputValue: string) => any) | undefined;
|
|
1628
1610
|
onRemove?: ((_removed: import("./interface").SelectOptionValue | undefined) => any) | undefined;
|
|
@@ -1631,7 +1613,6 @@ declare const Select: {
|
|
|
1631
1613
|
onExceedLimit?: ((_value: import("./interface").SelectOptionValue | undefined, _ev: Event) => any) | undefined;
|
|
1632
1614
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1633
1615
|
'update:modelValue': (_value: import("./interface").SelectModelValue) => true;
|
|
1634
|
-
'update:value': (_value: import("./interface").SelectModelValue) => true;
|
|
1635
1616
|
'update:inputValue': (_inputValue: string) => true;
|
|
1636
1617
|
'update:popupVisible': (_visible: boolean) => true;
|
|
1637
1618
|
'update:show': (_visible: boolean) => true;
|
|
@@ -1648,7 +1629,6 @@ declare const Select: {
|
|
|
1648
1629
|
}, string, {
|
|
1649
1630
|
options: import("./interface").SelectOption[];
|
|
1650
1631
|
error: boolean;
|
|
1651
|
-
value: import("./interface").SelectModelValue;
|
|
1652
1632
|
popupVisible: boolean;
|
|
1653
1633
|
defaultPopupVisible: boolean;
|
|
1654
1634
|
disabled: boolean;
|
package/es/select/select.d.ts
CHANGED
|
@@ -10,10 +10,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
|
-
value: {
|
|
14
|
-
type: PropType<SelectModelValue>;
|
|
15
|
-
default: undefined;
|
|
16
|
-
};
|
|
17
13
|
modelValue: {
|
|
18
14
|
type: PropType<SelectModelValue>;
|
|
19
15
|
default: undefined;
|
|
@@ -155,7 +151,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
155
151
|
};
|
|
156
152
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
157
153
|
'update:modelValue': (_value: SelectModelValue) => true;
|
|
158
|
-
'update:value': (_value: SelectModelValue) => true;
|
|
159
154
|
'update:inputValue': (_inputValue: string) => true;
|
|
160
155
|
'update:popupVisible': (_visible: boolean) => true;
|
|
161
156
|
'update:show': (_visible: boolean) => true;
|
|
@@ -174,10 +169,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
174
169
|
type: BooleanConstructor;
|
|
175
170
|
default: boolean;
|
|
176
171
|
};
|
|
177
|
-
value: {
|
|
178
|
-
type: PropType<SelectModelValue>;
|
|
179
|
-
default: undefined;
|
|
180
|
-
};
|
|
181
172
|
modelValue: {
|
|
182
173
|
type: PropType<SelectModelValue>;
|
|
183
174
|
default: undefined;
|
|
@@ -326,7 +317,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
326
317
|
"onUpdate:modelValue"?: ((_value: SelectModelValue) => any) | undefined;
|
|
327
318
|
onDropdownScroll?: ((_ev: Event) => any) | undefined;
|
|
328
319
|
onDropdownReachBottom?: ((_ev: Event) => any) | undefined;
|
|
329
|
-
"onUpdate:value"?: ((_value: SelectModelValue) => any) | undefined;
|
|
330
320
|
"onUpdate:inputValue"?: ((_inputValue: string) => any) | undefined;
|
|
331
321
|
onInputValueChange?: ((_inputValue: string) => any) | undefined;
|
|
332
322
|
onRemove?: ((_removed: SelectOptionValue | undefined) => any) | undefined;
|
|
@@ -336,7 +326,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
336
326
|
}>, {
|
|
337
327
|
options: SelectOption[];
|
|
338
328
|
error: boolean;
|
|
339
|
-
value: SelectModelValue;
|
|
340
329
|
popupVisible: boolean;
|
|
341
330
|
defaultPopupVisible: boolean;
|
|
342
331
|
disabled: boolean;
|
package/es/select/select.js
CHANGED
|
@@ -41,16 +41,6 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
type: Boolean,
|
|
42
42
|
default: false
|
|
43
43
|
},
|
|
44
|
-
value: {
|
|
45
|
-
type: [
|
|
46
|
-
String,
|
|
47
|
-
Number,
|
|
48
|
-
Boolean,
|
|
49
|
-
Object,
|
|
50
|
-
Array
|
|
51
|
-
],
|
|
52
|
-
default: void 0
|
|
53
|
-
},
|
|
54
44
|
modelValue: {
|
|
55
45
|
type: [
|
|
56
46
|
String,
|
|
@@ -189,7 +179,6 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
189
179
|
},
|
|
190
180
|
emits: {
|
|
191
181
|
"update:modelValue": (_value) => true,
|
|
192
|
-
"update:value": (_value) => true,
|
|
193
182
|
"update:inputValue": (_inputValue) => true,
|
|
194
183
|
"update:popupVisible": (_visible) => true,
|
|
195
184
|
"update:show": (_visible) => true,
|
|
@@ -205,7 +194,7 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
205
194
|
"exceedLimit": (_value, _ev) => true
|
|
206
195
|
},
|
|
207
196
|
setup(props, { slots, emit, attrs, expose }) {
|
|
208
|
-
const { size, disabled, error, options, filterOption, valueKey, multiple,
|
|
197
|
+
const { size, disabled, error, options, filterOption, valueKey, multiple, popupVisible, show, defaultPopupVisible, defaultShow, showExtraOptions, modelValue, fieldNames, loading, defaultActiveFirstOption, allowClear, allowSearch } = toRefs(props);
|
|
209
198
|
const prefixCls = getPrefixCls("select");
|
|
210
199
|
const selectViewRef = ref(null);
|
|
211
200
|
const { mergedSize, mergedDisabled, mergedError, eventHandlers } = useFormItem({
|
|
@@ -233,8 +222,8 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
233
222
|
});
|
|
234
223
|
const _value = ref(props.defaultValue);
|
|
235
224
|
const computedValueObjects = computed(() => {
|
|
236
|
-
var
|
|
237
|
-
const mergedValue = (
|
|
225
|
+
var _props$modelValue;
|
|
226
|
+
const mergedValue = (_props$modelValue = props.modelValue) !== null && _props$modelValue !== void 0 ? _props$modelValue : _value.value;
|
|
238
227
|
const valueArray = [];
|
|
239
228
|
if (isArray(mergedValue)) valueArray.push(...mergedValue);
|
|
240
229
|
else if (mergedValue || isNumber(mergedValue) || isString(mergedValue) || isBoolean(mergedValue)) valueArray.push(mergedValue);
|
|
@@ -243,9 +232,8 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
243
232
|
key: getKeyFromValue(item, props.valueKey)
|
|
244
233
|
}));
|
|
245
234
|
});
|
|
246
|
-
watch(
|
|
247
|
-
|
|
248
|
-
if (isUndefined(mergedValue) || isNull(mergedValue)) _value.value = multiple.value ? [] : mergedValue;
|
|
235
|
+
watch(modelValue, (nextModelValue) => {
|
|
236
|
+
if (isUndefined(nextModelValue) || isNull(nextModelValue)) _value.value = multiple.value ? [] : nextModelValue;
|
|
249
237
|
});
|
|
250
238
|
const computedValueKeys = computed(() => computedValueObjects.value.map((item) => item.key));
|
|
251
239
|
const mergedFieldNames = computed(() => _objectSpread2(_objectSpread2({}, DEFAULT_FIELD_NAMES), fieldNames.value));
|
|
@@ -337,7 +325,6 @@ var select_default = /* @__PURE__ */ defineComponent({
|
|
|
337
325
|
const nextValue = getValueFromValueKeys(valueKeys);
|
|
338
326
|
_value.value = nextValue;
|
|
339
327
|
emit("update:modelValue", nextValue);
|
|
340
|
-
emit("update:value", nextValue);
|
|
341
328
|
emit("change", nextValue);
|
|
342
329
|
(_eventHandlers$value = eventHandlers.value) === null || _eventHandlers$value === void 0 || (_eventHandlers$value$ = _eventHandlers$value.onChange) === null || _eventHandlers$value$ === void 0 || _eventHandlers$value$.call(_eventHandlers$value);
|
|
343
330
|
updateSelectedOption(valueKeys);
|
|
@@ -76,9 +76,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
76
76
|
modelValue: {
|
|
77
77
|
type: PropType<string | number | Array<string | number> | LabelValue | LabelValue[]>;
|
|
78
78
|
};
|
|
79
|
-
value: {
|
|
80
|
-
type: PropType<string | number | Array<string | number> | LabelValue | LabelValue[]>;
|
|
81
|
-
};
|
|
82
79
|
fieldNames: {
|
|
83
80
|
type: PropType<TreeFieldNames>;
|
|
84
81
|
};
|
|
@@ -197,7 +194,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
197
194
|
change: (_value: TreeSelectValue | undefined) => any;
|
|
198
195
|
"update:popupVisible": (_visible: boolean) => any;
|
|
199
196
|
"update:modelValue": (_value: TreeSelectValue | undefined) => any;
|
|
200
|
-
"update:value": (_value: TreeSelectValue | undefined) => any;
|
|
201
197
|
"update:inputValue": (_inputValue: string) => any;
|
|
202
198
|
inputValueChange: (_inputValue: string) => any;
|
|
203
199
|
"update:show": (_visible: boolean) => any;
|
|
@@ -254,9 +250,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
254
250
|
modelValue: {
|
|
255
251
|
type: PropType<string | number | Array<string | number> | LabelValue | LabelValue[]>;
|
|
256
252
|
};
|
|
257
|
-
value: {
|
|
258
|
-
type: PropType<string | number | Array<string | number> | LabelValue | LabelValue[]>;
|
|
259
|
-
};
|
|
260
253
|
fieldNames: {
|
|
261
254
|
type: PropType<TreeFieldNames>;
|
|
262
255
|
};
|
|
@@ -375,7 +368,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
375
368
|
onChange?: ((_value: TreeSelectValue | undefined) => any) | undefined;
|
|
376
369
|
"onUpdate:popupVisible"?: ((_visible: boolean) => any) | undefined;
|
|
377
370
|
"onUpdate:modelValue"?: ((_value: TreeSelectValue | undefined) => any) | undefined;
|
|
378
|
-
"onUpdate:value"?: ((_value: TreeSelectValue | undefined) => any) | undefined;
|
|
379
371
|
"onUpdate:inputValue"?: ((_inputValue: string) => any) | undefined;
|
|
380
372
|
onInputValueChange?: ((_inputValue: string) => any) | undefined;
|
|
381
373
|
"onUpdate:show"?: ((_visible: boolean) => any) | undefined;
|
|
@@ -120,16 +120,6 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
120
120
|
Object
|
|
121
121
|
] },
|
|
122
122
|
/**
|
|
123
|
-
* @zh 绑定值,Naive 兼容别名
|
|
124
|
-
* @en Value, Naive compatibility alias
|
|
125
|
-
* */
|
|
126
|
-
value: { type: [
|
|
127
|
-
String,
|
|
128
|
-
Number,
|
|
129
|
-
Array,
|
|
130
|
-
Object
|
|
131
|
-
] },
|
|
132
|
-
/**
|
|
133
123
|
* @zh 指定节点数据中的字段名
|
|
134
124
|
* @en Specify the field name in the node data
|
|
135
125
|
* */
|
|
@@ -335,7 +325,6 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
335
325
|
emits: [
|
|
336
326
|
"change",
|
|
337
327
|
"update:modelValue",
|
|
338
|
-
"update:value",
|
|
339
328
|
"update:inputValue",
|
|
340
329
|
"popup-visible-change",
|
|
341
330
|
"update:popupVisible",
|
|
@@ -408,7 +397,7 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
408
397
|
* @en The footer of the drop-down box
|
|
409
398
|
* @slot footer
|
|
410
399
|
*/
|
|
411
|
-
const { defaultValue, modelValue, multiple, popupVisible, show, defaultPopupVisible, defaultShow, treeCheckable, treeCheckStrictly, data, options, fieldNames, disabled, labelInValue, filterTreeNode, disableFilter, dropdownStyle, treeProps, fallbackOption, selectable, checkable, checkStrategy, showPath, separator,
|
|
400
|
+
const { defaultValue, modelValue, multiple, popupVisible, show, defaultPopupVisible, defaultShow, treeCheckable, treeCheckStrictly, data, options, fieldNames, disabled, labelInValue, filterTreeNode, disableFilter, dropdownStyle, treeProps, fallbackOption, selectable, checkable, checkStrategy, showPath, separator, virtualScroll } = toRefs(props);
|
|
412
401
|
const { mergedDisabled, eventHandlers } = useFormItem({ disabled });
|
|
413
402
|
const prefixCls = getPrefixCls("tree-select");
|
|
414
403
|
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
@@ -423,10 +412,7 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
423
412
|
return (_props$virtualListPro = props.virtualListProps) !== null && _props$virtualListPro !== void 0 ? _props$virtualListPro : (_treeProps$value = treeProps.value) === null || _treeProps$value === void 0 ? void 0 : _treeProps$value.virtualListProps;
|
|
424
413
|
}));
|
|
425
414
|
const TreeSelectEmpty = configCtx === null || configCtx === void 0 || (_configCtx$slots$empt = (_configCtx$slots = configCtx.slots).empty) === null || _configCtx$slots$empt === void 0 || (_configCtx$slots$empt = _configCtx$slots$empt.call(_configCtx$slots, { component: "tree-select" })) === null || _configCtx$slots$empt === void 0 ? void 0 : _configCtx$slots$empt[0];
|
|
426
|
-
const mergedModelValue = computed(() =>
|
|
427
|
-
var _value$value;
|
|
428
|
-
return (_value$value = value.value) !== null && _value$value !== void 0 ? _value$value : modelValue.value;
|
|
429
|
-
});
|
|
415
|
+
const mergedModelValue = computed(() => modelValue.value);
|
|
430
416
|
const mergedData = computed(() => {
|
|
431
417
|
var _options$value;
|
|
432
418
|
return (_options$value = options.value) !== null && _options$value !== void 0 ? _options$value : data.value;
|
|
@@ -494,7 +480,6 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
494
480
|
const forEmitValue = (labelInValue.value ? localSelectedValue.value : localSelectedKeys.value) || [];
|
|
495
481
|
const emitValue = isMultiple.value ? forEmitValue : forEmitValue[0];
|
|
496
482
|
emit("update:modelValue", emitValue);
|
|
497
|
-
emit("update:value", emitValue);
|
|
498
483
|
emit("change", emitValue);
|
|
499
484
|
(_eventHandlers$value = eventHandlers.value) === null || _eventHandlers$value === void 0 || (_eventHandlers$value$ = _eventHandlers$value.onChange) === null || _eventHandlers$value$ === void 0 || _eventHandlers$value$.call(_eventHandlers$value);
|
|
500
485
|
});
|
package/es/trigger/context.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ComponentPublicInstance, InjectionKey } from 'vue';
|
|
|
2
2
|
export interface TriggerContext {
|
|
3
3
|
onMouseenter: (ev: MouseEvent) => void;
|
|
4
4
|
onMouseleave: (ev: MouseEvent) => void;
|
|
5
|
+
onContextmenu: (ev: MouseEvent) => void;
|
|
5
6
|
addChildRef: (ref: HTMLElement | ComponentPublicInstance) => void;
|
|
6
7
|
removeChildRef: (ref: HTMLElement | ComponentPublicInstance) => void;
|
|
7
8
|
}
|
package/es/trigger/trigger.js
CHANGED
|
@@ -10,11 +10,12 @@ import { useFirstElement } from "../_hooks/use-first-element.js";
|
|
|
10
10
|
import resize_observer_v2_default from "../_components/resize-observer-v2.js";
|
|
11
11
|
import usePickSlots from "../_hooks/use-pick-slots.js";
|
|
12
12
|
import usePopupManager from "../_hooks/use-popup-manager.js";
|
|
13
|
-
import { useResizeObserver } from "../_hooks/use-resize-observer.js";
|
|
13
|
+
import { useResizeObserver as useResizeObserver$1 } from "../_hooks/use-resize-observer.js";
|
|
14
14
|
import { useTeleportContainer } from "../_hooks/use-teleport-container.js";
|
|
15
15
|
import { triggerInjectionKey } from "./context.js";
|
|
16
16
|
import { getArrowStyle, getElementScrollRect, getPopupStyle, getScrollElements, getTransformOrigin } from "./utils.js";
|
|
17
17
|
import { Fragment, Teleport, Transition, computed, createVNode, defineComponent, inject, mergeProps, nextTick, onBeforeUnmount, onDeactivated, onMounted, onUpdated, provide, reactive, ref, vShow, watch, withDirectives } from "vue";
|
|
18
|
+
import { onClickOutside, useEventListener } from "@vueuse/core";
|
|
18
19
|
//#region components/trigger/trigger.tsx
|
|
19
20
|
var TRIGGER_EVENTS = [
|
|
20
21
|
"onClick",
|
|
@@ -375,7 +376,6 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
375
376
|
mergedPopupContainer
|
|
376
377
|
], syncThemePopupContainerZIndex, { immediate: true });
|
|
377
378
|
let delayTimer = 0;
|
|
378
|
-
let outsideListener = false;
|
|
379
379
|
let windowListener = false;
|
|
380
380
|
const cleanDelayTimer = () => {
|
|
381
381
|
if (delayTimer) {
|
|
@@ -494,6 +494,20 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
494
494
|
changeVisible(!computedVisible.value);
|
|
495
495
|
e.preventDefault();
|
|
496
496
|
};
|
|
497
|
+
const handleChildContextmenu = (e) => {
|
|
498
|
+
var _popupRef$value;
|
|
499
|
+
triggerCtx === null || triggerCtx === void 0 || triggerCtx.onContextmenu(e);
|
|
500
|
+
if (!props.clickOutsideToClose || !computedVisible.value) return;
|
|
501
|
+
if (!triggerMethods.value.includes("contextMenu")) return;
|
|
502
|
+
const target = e.target;
|
|
503
|
+
if ((_popupRef$value = popupRef.value) === null || _popupRef$value === void 0 ? void 0 : _popupRef$value.contains(target)) return;
|
|
504
|
+
if (getChildElements().some((element) => element.contains(target))) return;
|
|
505
|
+
changeVisible(false);
|
|
506
|
+
};
|
|
507
|
+
const handleContextmenuWithContext = (e) => {
|
|
508
|
+
triggerCtx === null || triggerCtx === void 0 || triggerCtx.onContextmenu(e);
|
|
509
|
+
handleContextmenu(e);
|
|
510
|
+
};
|
|
497
511
|
const addChildRef = (ref) => {
|
|
498
512
|
childrenRefs.add(ref);
|
|
499
513
|
triggerCtx === null || triggerCtx === void 0 || triggerCtx.addChildRef(ref);
|
|
@@ -505,29 +519,39 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
505
519
|
provide(triggerInjectionKey, reactive({
|
|
506
520
|
onMouseenter: handleMouseEnterWithContext,
|
|
507
521
|
onMouseleave: handleMouseLeaveWithContext,
|
|
522
|
+
onContextmenu: handleChildContextmenu,
|
|
508
523
|
addChildRef,
|
|
509
524
|
removeChildRef
|
|
510
525
|
}));
|
|
511
|
-
const removeOutsideListener = () => {
|
|
512
|
-
off(document.documentElement, "mousedown", handleOutsideClick);
|
|
513
|
-
outsideListener = false;
|
|
514
|
-
};
|
|
515
526
|
const contentSlot = usePickSlots(slots, "content");
|
|
516
527
|
const hidePopup = computed(() => {
|
|
517
528
|
var _contentSlot$value;
|
|
518
529
|
return props.hideEmpty && isEmptyChildren((_contentSlot$value = contentSlot.value) === null || _contentSlot$value === void 0 ? void 0 : _contentSlot$value.call(contentSlot));
|
|
519
530
|
});
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
if (((_firstElement$value = firstElement.value) === null || _firstElement$value === void 0 ? void 0 : _firstElement$value.contains(e.target)) || ((_popupRef$value = popupRef.value) === null || _popupRef$value === void 0 ? void 0 : _popupRef$value.contains(e.target))) return;
|
|
531
|
+
const getChildElements = () => {
|
|
532
|
+
const elements = [];
|
|
523
533
|
for (const item of childrenRefs) {
|
|
524
534
|
if (!item) continue;
|
|
525
535
|
const element = "value" in item ? item.value : item;
|
|
526
|
-
if (element
|
|
536
|
+
if (element) elements.push(element);
|
|
527
537
|
}
|
|
528
|
-
|
|
538
|
+
return elements;
|
|
539
|
+
};
|
|
540
|
+
const getOutsideIgnoreElements = () => [...triggerMethods.value.includes("contextMenu") || !firstElement.value ? [] : [firstElement.value], ...getChildElements()];
|
|
541
|
+
onClickOutside(popupRef, () => {
|
|
542
|
+
if (!props.clickOutsideToClose || !computedVisible.value) return;
|
|
543
|
+
changeVisible(false);
|
|
544
|
+
}, { ignore: getOutsideIgnoreElements });
|
|
545
|
+
const handleOutsideContextmenu = (e) => {
|
|
546
|
+
var _popupRef$value2;
|
|
547
|
+
if (!props.clickOutsideToClose || !computedVisible.value) return;
|
|
548
|
+
if (!triggerMethods.value.includes("contextMenu")) return;
|
|
549
|
+
const target = e.target;
|
|
550
|
+
if ((_popupRef$value2 = popupRef.value) === null || _popupRef$value2 === void 0 ? void 0 : _popupRef$value2.contains(target)) return;
|
|
551
|
+
if (getChildElements().some((element) => element.contains(target))) return;
|
|
529
552
|
changeVisible(false);
|
|
530
553
|
};
|
|
554
|
+
useEventListener(computed(() => typeof document === "undefined" ? void 0 : document), "contextmenu", handleOutsideContextmenu, { capture: true });
|
|
531
555
|
const isExceedThreshold = (oldPosition, element) => {
|
|
532
556
|
const [scrollTop, scrollLeft] = oldPosition;
|
|
533
557
|
const { scrollTop: newScrollTop, scrollLeft: newScrollLeft } = element;
|
|
@@ -573,13 +597,6 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
573
597
|
});
|
|
574
598
|
let scrollElements;
|
|
575
599
|
watch(computedVisible, (value) => {
|
|
576
|
-
if (props.clickOutsideToClose) {
|
|
577
|
-
if (!value && outsideListener) removeOutsideListener();
|
|
578
|
-
else if (value && !outsideListener) {
|
|
579
|
-
on(document.documentElement, "mousedown", handleOutsideClick);
|
|
580
|
-
outsideListener = true;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
600
|
if (props.scrollToClose || (configCtx === null || configCtx === void 0 ? void 0 : configCtx.scrollToClose)) {
|
|
584
601
|
on(window, "scroll", onWindowScroll);
|
|
585
602
|
windowListener = true;
|
|
@@ -598,7 +615,7 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
598
615
|
watch(() => [props.autoFitPopupWidth, props.autoFitPopupMinWidth], () => {
|
|
599
616
|
if (computedVisible.value) updatePopupStyle();
|
|
600
617
|
});
|
|
601
|
-
const { createResizeObserver, destroyResizeObserver } = useResizeObserver({
|
|
618
|
+
const { createResizeObserver, destroyResizeObserver } = useResizeObserver$1({
|
|
602
619
|
elementRef: containerRef,
|
|
603
620
|
onResize: handleResize
|
|
604
621
|
});
|
|
@@ -606,10 +623,6 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
606
623
|
createResizeObserver();
|
|
607
624
|
if (computedVisible.value) {
|
|
608
625
|
updatePopupStyle();
|
|
609
|
-
if (props.clickOutsideToClose && !outsideListener) {
|
|
610
|
-
on(document.documentElement, "mousedown", handleOutsideClick);
|
|
611
|
-
outsideListener = true;
|
|
612
|
-
}
|
|
613
626
|
if (props.updateAtScroll || (configCtx === null || configCtx === void 0 ? void 0 : configCtx.updateAtScroll)) {
|
|
614
627
|
scrollElements = getScrollElements(firstElement.value);
|
|
615
628
|
for (const item of scrollElements) item.addEventListener("scroll", handleScroll);
|
|
@@ -625,7 +638,6 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
625
638
|
onBeforeUnmount(() => {
|
|
626
639
|
triggerCtx === null || triggerCtx === void 0 || triggerCtx.removeChildRef(popupRef.value);
|
|
627
640
|
destroyResizeObserver();
|
|
628
|
-
if (outsideListener) removeOutsideListener();
|
|
629
641
|
if (windowListener) removeWindowScroll();
|
|
630
642
|
if (scrollElements) {
|
|
631
643
|
for (const item of scrollElements) item.removeEventListener("scroll", handleScroll);
|
|
@@ -658,7 +670,7 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
658
670
|
onMouseleave: handleMouseLeave,
|
|
659
671
|
onFocusin: handleFocusin,
|
|
660
672
|
onFocusout: handleFocusout,
|
|
661
|
-
onContextmenu:
|
|
673
|
+
onContextmenu: handleContextmenuWithContext
|
|
662
674
|
});
|
|
663
675
|
return createVNode(Fragment, null, [props.autoFixPosition ? createVNode(resize_observer_v2_default, { "onResize": onTargetResize }, { default: () => [children.value] }) : children.value, createVNode(client_only_default, null, { default: () => [createVNode(Teleport, {
|
|
664
676
|
"to": teleportContainer.value,
|
|
@@ -522,7 +522,7 @@
|
|
|
522
522
|
"sd-color-picker/popup-visible-change": {
|
|
523
523
|
"description": "Triggered when the color panel is expanded and collapsed"
|
|
524
524
|
},
|
|
525
|
-
"sd-color-picker/value": {
|
|
525
|
+
"sd-color-picker/model-value": {
|
|
526
526
|
"description": "Value",
|
|
527
527
|
"type": "string"
|
|
528
528
|
},
|
|
@@ -567,31 +567,6 @@
|
|
|
567
567
|
"sd-color-picker/trigger-props": {
|
|
568
568
|
"description": "Trigger props"
|
|
569
569
|
},
|
|
570
|
-
"sd-color-picker/history-colors": {
|
|
571
|
-
"description": "Legacy history colors"
|
|
572
|
-
},
|
|
573
|
-
"sd-color-picker/preset-colors": {
|
|
574
|
-
"description": "Legacy preset colors"
|
|
575
|
-
},
|
|
576
|
-
"sd-color-picker/show-text": {
|
|
577
|
-
"description": "Legacy show text",
|
|
578
|
-
"type": "boolean"
|
|
579
|
-
},
|
|
580
|
-
"sd-color-picker/show-history": {
|
|
581
|
-
"description": "Legacy show history",
|
|
582
|
-
"type": "boolean"
|
|
583
|
-
},
|
|
584
|
-
"sd-color-picker/show-preset": {
|
|
585
|
-
"description": "Legacy show preset",
|
|
586
|
-
"type": "boolean"
|
|
587
|
-
},
|
|
588
|
-
"sd-color-picker/disabled-alpha": {
|
|
589
|
-
"description": "Legacy disable alpha",
|
|
590
|
-
"type": "boolean"
|
|
591
|
-
},
|
|
592
|
-
"sd-color-picker/select-input-props": {
|
|
593
|
-
"description": "Select input props"
|
|
594
|
-
},
|
|
595
570
|
"sd-comment/author": {
|
|
596
571
|
"description": "Display as the comment author",
|
|
597
572
|
"type": "string"
|
|
@@ -1218,6 +1193,15 @@
|
|
|
1218
1193
|
"description": "Whether to render to body",
|
|
1219
1194
|
"type": "boolean"
|
|
1220
1195
|
},
|
|
1196
|
+
"sd-file-previewer/image-props": {
|
|
1197
|
+
"description": "Image previewer props"
|
|
1198
|
+
},
|
|
1199
|
+
"sd-file-previewer/media-props": {
|
|
1200
|
+
"description": "Video and audio previewer props"
|
|
1201
|
+
},
|
|
1202
|
+
"sd-file-previewer/pdf-props": {
|
|
1203
|
+
"description": "PDF previewer props"
|
|
1204
|
+
},
|
|
1221
1205
|
"sd-form-item/field": {
|
|
1222
1206
|
"description": "The path of the form element in the data object (required for the data item)",
|
|
1223
1207
|
"type": "string"
|
|
@@ -3952,9 +3936,6 @@
|
|
|
3952
3936
|
"sd-tree-select/model-value": {
|
|
3953
3937
|
"description": "Value"
|
|
3954
3938
|
},
|
|
3955
|
-
"sd-tree-select/value": {
|
|
3956
|
-
"description": "Value, Naive compatibility alias"
|
|
3957
|
-
},
|
|
3958
3939
|
"sd-tree-select/field-names": {
|
|
3959
3940
|
"description": "Specify the field name in the node data"
|
|
3960
3941
|
},
|
package/json/vetur-tags.json
CHANGED
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
"attributes": [
|
|
250
250
|
"change",
|
|
251
251
|
"popup-visible-change",
|
|
252
|
-
"value",
|
|
252
|
+
"model-value",
|
|
253
253
|
"default-value",
|
|
254
254
|
"format",
|
|
255
255
|
"size",
|
|
@@ -261,14 +261,7 @@
|
|
|
261
261
|
"swatch-colors",
|
|
262
262
|
"disabled",
|
|
263
263
|
"hide-trigger",
|
|
264
|
-
"trigger-props"
|
|
265
|
-
"history-colors",
|
|
266
|
-
"preset-colors",
|
|
267
|
-
"show-text",
|
|
268
|
-
"show-history",
|
|
269
|
-
"show-preset",
|
|
270
|
-
"disabled-alpha",
|
|
271
|
-
"select-input-props"
|
|
264
|
+
"trigger-props"
|
|
272
265
|
]
|
|
273
266
|
},
|
|
274
267
|
"sd-comment": {
|
|
@@ -519,7 +512,10 @@
|
|
|
519
512
|
"closable",
|
|
520
513
|
"esc-to-close",
|
|
521
514
|
"popup-container",
|
|
522
|
-
"render-to-body"
|
|
515
|
+
"render-to-body",
|
|
516
|
+
"image-props",
|
|
517
|
+
"media-props",
|
|
518
|
+
"pdf-props"
|
|
523
519
|
]
|
|
524
520
|
},
|
|
525
521
|
"sd-form-item": {
|
|
@@ -1596,7 +1592,6 @@
|
|
|
1596
1592
|
"multiple",
|
|
1597
1593
|
"default-value",
|
|
1598
1594
|
"model-value",
|
|
1599
|
-
"value",
|
|
1600
1595
|
"field-names",
|
|
1601
1596
|
"data",
|
|
1602
1597
|
"options",
|