@sdata/web-vue 2.3.1 → 2.6.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/README.md +1 -1
- package/dist/sd.css +117 -191
- package/dist/sd.min.css +1 -1
- package/es/_components/transition/expand-transition.vue.d.ts +2 -2
- package/es/_hooks/use-responsive.d.ts +2 -2
- package/es/_hooks/use-theme-mode.d.ts +3 -0
- package/es/{calendar/hooks/use-calendar-theme.js → _hooks/use-theme-mode.js} +14 -10
- package/es/_utils/responsive-observe.d.ts +5 -4
- package/es/_utils/responsive-observe.js +2 -1
- package/es/alert/index.d.ts +3 -3
- package/es/anchor/index.d.ts +3 -3
- package/es/avatar/index.d.ts +20 -20
- package/es/border-beam/border-beam.js +5 -0
- package/es/border-beam/border-beam.vue.d.ts +52 -0
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +623 -0
- package/es/border-beam/index.d.ts +106 -0
- package/es/border-beam/index.js +10 -0
- package/es/border-beam/pulseDriver.d.ts +2 -0
- package/es/border-beam/pulseDriver.js +74 -0
- package/es/border-beam/style/css.js +2 -0
- package/es/border-beam/style/index.css +21 -0
- package/es/border-beam/style/index.d.ts +2 -0
- package/es/border-beam/style/index.js +2 -0
- package/es/border-beam/style/index.scss +12 -0
- package/es/border-beam/style/token.scss +12 -0
- package/es/border-beam/styles.d.ts +42 -0
- package/es/border-beam/styles.js +3545 -0
- package/es/border-beam/types.d.ts +27 -0
- package/es/button/index.d.ts +24 -24
- package/es/calendar/components/cell.vue.d.ts +26 -26
- package/es/calendar/components/index.vue.d.ts +1 -1
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/calendar/index.d.ts +5 -5
- package/es/carousel/index.d.ts +3 -3
- package/es/cascader/cascader.vue.d.ts +8 -8
- package/es/checkbox/checkbox.d.ts +3 -3
- package/es/collapse/collapse-item.d.ts +5 -5
- package/es/collapse/index.d.ts +3 -3
- package/es/components.d.ts +1 -0
- package/es/config-provider/index.d.ts +21 -21
- package/es/date-picker/index.d.ts +14 -14
- package/es/date-picker/panels/date/index.vue.d.ts +2 -2
- package/es/date-picker/panels/month/index.vue.d.ts +2 -2
- package/es/date-picker/panels/quarter/index.vue.d.ts +2 -2
- package/es/date-picker/panels/week/index.vue.d.ts +2 -2
- package/es/date-picker/panels/year/index.vue.d.ts +2 -2
- package/es/date-picker/picker-panel.vue.d.ts +12 -12
- package/es/date-picker/picker.vue.d.ts +14 -14
- package/es/date-picker/range-picker.vue.d.ts +15 -15
- package/es/descriptions/index.d.ts +24 -24
- package/es/drawer/drawer.vue.d.ts +5 -5
- package/es/drawer/index.d.ts +15 -15
- package/es/dropdown/dropdown-button.vue.d.ts +4 -4
- package/es/dropdown/index.d.ts +15 -15
- package/es/ellipsis/ellipsis.vue.d.ts +7 -7
- package/es/ellipsis/performant-ellipsis.vue.d.ts +5 -5
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/form/index.d.ts +3 -3
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +10 -10
- package/es/icon/icon-menu/icon-menu.js +5 -0
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +52 -0
- package/es/icon/icon-menu/index.js +9 -0
- package/es/image/preview.vue.d.ts +2 -2
- package/es/index.css +117 -191
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -2
- package/es/index.scss +1 -0
- package/es/input/index.d.ts +7 -7
- package/es/input/input-password.vue.d.ts +3 -3
- package/es/json-form/index.d.ts +9 -9
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/json-form.vue.d.ts +3 -3
- package/es/layout/content.vue.d.ts +2 -2
- package/es/layout/content.vue_vue_type_script_setup_true_lang.js +8 -3
- package/es/layout/context.d.ts +12 -9
- package/es/layout/context.js +11 -3
- package/es/layout/footer.vue.d.ts +2 -2
- package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +8 -3
- package/es/layout/header.vue.d.ts +3 -30
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +9 -339
- package/es/layout/hooks/use-has-sider.d.ts +2 -0
- package/es/layout/hooks/use-has-sider.js +38 -0
- package/es/layout/index.d.ts +91 -380
- package/es/layout/index.js +2 -2
- package/es/layout/interface.d.ts +12 -46
- package/es/layout/layout.vue.d.ts +4 -2
- package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +38 -14
- package/es/layout/sider.vue.d.ts +47 -183
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +191 -370
- package/es/layout/style/index.css +112 -190
- package/es/layout/style/index.scss +127 -239
- package/es/layout/style/token.scss +46 -26
- package/es/link/index.d.ts +6 -6
- package/es/list/index.d.ts +18 -18
- package/es/menu/base-menu.vue.d.ts +1 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +14 -14
- package/es/menu/item.d.ts +1 -1
- package/es/menu/menu.d.ts +12 -12
- package/es/menu/menu.js +3 -3
- package/es/modal/index.d.ts +15 -15
- package/es/modal/modal.vue.d.ts +4 -4
- package/es/popconfirm/index.d.ts +12 -12
- package/es/popover/index.d.ts +12 -12
- package/es/progress/index.d.ts +6 -6
- package/es/qr-code/index.d.ts +3 -3
- package/es/radio/radio.d.ts +3 -3
- package/es/resize-box/resize-box.vue.d.ts +4 -4
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +7 -7
- package/es/result/index.d.ts +3 -3
- package/es/scrollbar/style/index.css +1 -1
- package/es/scrollbar/style/index.scss +4 -1
- package/es/sd-vue.js +3 -1
- package/es/select/select.d.ts +17 -17
- package/es/slider/index.d.ts +3 -3
- package/es/split/split.vue.d.ts +4 -4
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +6 -6
- package/es/steps/index.d.ts +6 -6
- package/es/tabs/index.d.ts +6 -6
- package/es/tag/index.d.ts +6 -6
- package/es/tag/tag.vue.d.ts +2 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/theme-provider/index.d.ts +9 -9
- package/es/time-picker/index.d.ts +6 -6
- package/es/time-picker/time-picker.vue.d.ts +2 -2
- package/es/timeline/index.d.ts +3 -3
- package/es/timeline/timeline.d.ts +1 -1
- package/es/tooltip/index.d.ts +3 -3
- package/es/tour/index.d.ts +3 -3
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +6 -6
- package/es/tree/expand-transition.vue.d.ts +2 -2
- package/es/tree/node-switcher.vue.d.ts +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +23 -23
- package/es/tree-select/tree-select.vue.d.ts +9 -9
- package/json/vetur-attributes.json +23 -156
- package/json/vetur-tags.json +12 -44
- package/json/web-types.json +38 -304
- package/package.json +5 -5
- package/es/calendar/hooks/use-calendar-theme.d.ts +0 -4
- package/es/layout/utils.d.ts +0 -1
- package/es/layout/utils.js +0 -11
package/es/timeline/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare const Timeline: {
|
|
|
9
9
|
type: BooleanConstructor;
|
|
10
10
|
};
|
|
11
11
|
direction: {
|
|
12
|
-
type: import("vue").PropType<import("
|
|
12
|
+
type: import("vue").PropType<import("../index.ts").Direction>;
|
|
13
13
|
default: string;
|
|
14
14
|
};
|
|
15
15
|
mode: {
|
|
@@ -196,7 +196,7 @@ declare const Timeline: {
|
|
|
196
196
|
type: BooleanConstructor;
|
|
197
197
|
};
|
|
198
198
|
direction: {
|
|
199
|
-
type: import("vue").PropType<import("
|
|
199
|
+
type: import("vue").PropType<import("../index.ts").Direction>;
|
|
200
200
|
default: string;
|
|
201
201
|
};
|
|
202
202
|
mode: {
|
|
@@ -224,7 +224,7 @@ declare const Timeline: {
|
|
|
224
224
|
type: BooleanConstructor;
|
|
225
225
|
};
|
|
226
226
|
direction: {
|
|
227
|
-
type: import("vue").PropType<import("
|
|
227
|
+
type: import("vue").PropType<import("../index.ts").Direction>;
|
|
228
228
|
default: string;
|
|
229
229
|
};
|
|
230
230
|
mode: {
|
|
@@ -198,7 +198,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
198
198
|
loading: boolean;
|
|
199
199
|
hideIcon: boolean;
|
|
200
200
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
201
|
-
install: (app: import("vue").App, options?: import("../_utils/types").SDOptions) => void;
|
|
201
|
+
install: (app: import("vue").App, options?: import("../_utils/types.ts").SDOptions) => void;
|
|
202
202
|
};
|
|
203
203
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
204
204
|
export default _default;
|
package/es/tooltip/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare const Tooltip: {
|
|
|
17
17
|
};
|
|
18
18
|
content: StringConstructor;
|
|
19
19
|
position: {
|
|
20
|
-
type: import("vue").PropType<import("
|
|
20
|
+
type: import("vue").PropType<import("../index.ts").TriggerPosition>;
|
|
21
21
|
default: string;
|
|
22
22
|
};
|
|
23
23
|
mini: {
|
|
@@ -76,7 +76,7 @@ declare const Tooltip: {
|
|
|
76
76
|
};
|
|
77
77
|
content: StringConstructor;
|
|
78
78
|
position: {
|
|
79
|
-
type: import("vue").PropType<import("
|
|
79
|
+
type: import("vue").PropType<import("../index.ts").TriggerPosition>;
|
|
80
80
|
default: string;
|
|
81
81
|
};
|
|
82
82
|
mini: {
|
|
@@ -129,7 +129,7 @@ declare const Tooltip: {
|
|
|
129
129
|
};
|
|
130
130
|
content: StringConstructor;
|
|
131
131
|
position: {
|
|
132
|
-
type: import("vue").PropType<import("
|
|
132
|
+
type: import("vue").PropType<import("../index.ts").TriggerPosition>;
|
|
133
133
|
default: string;
|
|
134
134
|
};
|
|
135
135
|
mini: {
|
package/es/tour/index.d.ts
CHANGED
|
@@ -162,7 +162,7 @@ declare const Tour: {
|
|
|
162
162
|
}, import("vue").PublicProps, {
|
|
163
163
|
animate: boolean;
|
|
164
164
|
visible: boolean;
|
|
165
|
-
buttonProps: Partial<Record<import("./types").TourButtonKind, import("
|
|
165
|
+
buttonProps: Partial<Record<import("./types").TourButtonKind, import("../index.ts").ButtonProps>>;
|
|
166
166
|
defaultVisible: boolean;
|
|
167
167
|
zIndex: number;
|
|
168
168
|
current: number;
|
|
@@ -360,7 +360,7 @@ declare const Tour: {
|
|
|
360
360
|
}>, import("./types").TourExpose, {}, {}, {}, {
|
|
361
361
|
animate: boolean;
|
|
362
362
|
visible: boolean;
|
|
363
|
-
buttonProps: Partial<Record<import("./types").TourButtonKind, import("
|
|
363
|
+
buttonProps: Partial<Record<import("./types").TourButtonKind, import("../index.ts").ButtonProps>>;
|
|
364
364
|
defaultVisible: boolean;
|
|
365
365
|
zIndex: number;
|
|
366
366
|
current: number;
|
|
@@ -561,7 +561,7 @@ declare const Tour: {
|
|
|
561
561
|
}, string, {
|
|
562
562
|
animate: boolean;
|
|
563
563
|
visible: boolean;
|
|
564
|
-
buttonProps: Partial<Record<import("./types").TourButtonKind, import("
|
|
564
|
+
buttonProps: Partial<Record<import("./types").TourButtonKind, import("../index.ts").ButtonProps>>;
|
|
565
565
|
defaultVisible: boolean;
|
|
566
566
|
zIndex: number;
|
|
567
567
|
current: number;
|
|
@@ -373,7 +373,7 @@ var tour_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
373
373
|
if (isFirstStep.value) disabledButtons.push("previous");
|
|
374
374
|
return Array.from(new Set(disabledButtons));
|
|
375
375
|
});
|
|
376
|
-
const
|
|
376
|
+
const mergedShowProgress = computed(() => {
|
|
377
377
|
var _ref, _resolvedPopover$valu2;
|
|
378
378
|
return (_ref = (_resolvedPopover$valu2 = resolvedPopover.value.showProgress) !== null && _resolvedPopover$valu2 !== void 0 ? _resolvedPopover$valu2 : mergedConfig.value.showProgress) !== null && _ref !== void 0 ? _ref : false;
|
|
379
379
|
});
|
|
@@ -382,9 +382,9 @@ var tour_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
382
382
|
const showNextButton = computed(() => resolvedShowButtons.value.includes("next"));
|
|
383
383
|
const showFooter = computed(() => {
|
|
384
384
|
if (slots.footer) return true;
|
|
385
|
-
return
|
|
385
|
+
return mergedShowProgress.value || showCloseButton.value || showPreviousButton.value || showNextButton.value;
|
|
386
386
|
});
|
|
387
|
-
const progressVisibilityStyle = computed(() => ({ display:
|
|
387
|
+
const progressVisibilityStyle = computed(() => ({ display: mergedShowProgress.value ? "block" : "none" }));
|
|
388
388
|
const previousButtonText = computed(() => {
|
|
389
389
|
var _ref2, _resolvedPopover$valu3;
|
|
390
390
|
return (_ref2 = (_resolvedPopover$valu3 = resolvedPopover.value.prevBtnText) !== null && _resolvedPopover$valu3 !== void 0 ? _resolvedPopover$valu3 : mergedConfig.value.prevBtnText) !== null && _ref2 !== void 0 ? _ref2 : DEFAULT_PREVIOUS_TEXT;
|
|
@@ -397,7 +397,7 @@ var tour_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
397
397
|
}
|
|
398
398
|
return (_ref4 = (_resolvedPopover$valu5 = resolvedPopover.value.nextBtnText) !== null && _resolvedPopover$valu5 !== void 0 ? _resolvedPopover$valu5 : mergedConfig.value.nextBtnText) !== null && _ref4 !== void 0 ? _ref4 : DEFAULT_NEXT_TEXT;
|
|
399
399
|
});
|
|
400
|
-
const
|
|
400
|
+
const mergedProgressText = computed(() => {
|
|
401
401
|
var _ref5, _resolvedPopover$valu6;
|
|
402
402
|
return ((_ref5 = (_resolvedPopover$valu6 = resolvedPopover.value.progressText) !== null && _resolvedPopover$valu6 !== void 0 ? _resolvedPopover$valu6 : mergedConfig.value.progressText) !== null && _ref5 !== void 0 ? _ref5 : DEFAULT_PROGRESS_TEXT).replaceAll("{{current}}", `${displayCurrent.value}`).replaceAll("{{total}}", `${displayTotal.value}`).replaceAll("{current}", `${displayCurrent.value}`).replaceAll("{total}", `${displayTotal.value}`);
|
|
403
403
|
});
|
|
@@ -1150,10 +1150,10 @@ var tour_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
1150
1150
|
step: activeStep.value,
|
|
1151
1151
|
current: displayCurrent.value,
|
|
1152
1152
|
total: displayTotal.value,
|
|
1153
|
-
text:
|
|
1153
|
+
text: mergedProgressText.value,
|
|
1154
1154
|
controller: controllerRef.value,
|
|
1155
1155
|
state: tourState.value
|
|
1156
|
-
}, () => [createTextVNode(toDisplayString(
|
|
1156
|
+
}, () => [createTextVNode(toDisplayString(mergedProgressText.value), 1)])], 6), createElementVNode("div", {
|
|
1157
1157
|
ref_key: "footerButtonsRef",
|
|
1158
1158
|
ref: footerButtonsRef,
|
|
1159
1159
|
class: normalizeClass(`${unref(prefixCls)}-popover-navigation-btns`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_9: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
3
|
+
default?: (props: typeof __VLS_9) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
expanded: BooleanConstructor;
|
|
@@ -83,6 +83,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
83
83
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
84
84
|
click: (_ev: MouseEvent) => any;
|
|
85
85
|
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
86
|
-
install: (app: import("vue").App, options?: import("../_utils/types.
|
|
86
|
+
install: (app: import("vue").App, options?: import("../_utils/types.ts").SDIconOptions) => void;
|
|
87
87
|
};
|
|
88
88
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -313,7 +313,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
313
313
|
loadMore,
|
|
314
314
|
draggable
|
|
315
315
|
}));
|
|
316
|
-
const { checkedKeys, indeterminateKeys, setCheckedState } = useCheckedState(reactive({
|
|
316
|
+
const { checkedKeys: mergedCheckedKeys, indeterminateKeys, setCheckedState } = useCheckedState(reactive({
|
|
317
317
|
defaultCheckedKeys,
|
|
318
318
|
checkedKeys: propCheckedKeys,
|
|
319
319
|
checkStrictly,
|
|
@@ -321,7 +321,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
321
321
|
halfCheckedKeys,
|
|
322
322
|
onlyCheckLeaf
|
|
323
323
|
}));
|
|
324
|
-
const [
|
|
324
|
+
const [mergedSelectedKeys, setMergedSelectedKeys] = useMergeState((defaultSelectedKeys === null || defaultSelectedKeys === void 0 ? void 0 : defaultSelectedKeys.value) || [], reactive({ value: propSelectedKeys }));
|
|
325
325
|
const loadingKeys = ref([]);
|
|
326
326
|
const dragNode = ref();
|
|
327
327
|
function getDefaultExpandedKeys() {
|
|
@@ -345,20 +345,20 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
345
345
|
(node.pathParentKeys || []).forEach((k) => expandedKeysSet.add(k));
|
|
346
346
|
});
|
|
347
347
|
};
|
|
348
|
-
if (defaultExpandSelected.value) addToExpandKeysSet(
|
|
349
|
-
if (defaultExpandChecked.value) addToExpandKeysSet(
|
|
348
|
+
if (defaultExpandSelected.value) addToExpandKeysSet(mergedSelectedKeys.value);
|
|
349
|
+
if (defaultExpandChecked.value) addToExpandKeysSet(mergedCheckedKeys.value);
|
|
350
350
|
return [...expandedKeysSet];
|
|
351
351
|
}
|
|
352
352
|
return [];
|
|
353
353
|
}
|
|
354
|
-
const [
|
|
355
|
-
watch(() =>
|
|
354
|
+
const [mergedExpandedKeys, setExpandState] = useMergeState(getDefaultExpandedKeys(), reactive({ value: propExpandedKeys }));
|
|
355
|
+
watch(() => mergedExpandedKeys.value.join(","), () => {
|
|
356
356
|
if (!virtualListProps.value || enableVirtualExpandAnimation.value) return;
|
|
357
357
|
virtualListVersion.value += 1;
|
|
358
358
|
});
|
|
359
359
|
const currentExpandKeys = ref([]);
|
|
360
360
|
const visibleTreeNodeList = computed(() => {
|
|
361
|
-
const expandedKeysSet = new Set(
|
|
361
|
+
const expandedKeysSet = new Set(mergedExpandedKeys.value);
|
|
362
362
|
const currentExpandKeysSet = new Set(currentExpandKeys.value);
|
|
363
363
|
const filteredNodeList = flattenTreeData.value.filter((node) => {
|
|
364
364
|
var _node$pathParentKeys;
|
|
@@ -441,7 +441,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
441
441
|
function setSelectedKeys(keys) {
|
|
442
442
|
let newSelectedKeys = keys;
|
|
443
443
|
if (!multiple.value && keys.length > 1) newSelectedKeys = [keys[0]];
|
|
444
|
-
|
|
444
|
+
setMergedSelectedKeys(newSelectedKeys);
|
|
445
445
|
emitSelectEvent({ newSelectedKeys });
|
|
446
446
|
}
|
|
447
447
|
function setExpandedKeys(keys) {
|
|
@@ -451,7 +451,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
451
451
|
}
|
|
452
452
|
function checkNodes(keys, checked, targetKey) {
|
|
453
453
|
if (!keys.length) return;
|
|
454
|
-
let newCheckedKeys = [...
|
|
454
|
+
let newCheckedKeys = [...mergedCheckedKeys.value];
|
|
455
455
|
let newIndeterminateKeys = [...indeterminateKeys.value];
|
|
456
456
|
keys.forEach((key) => {
|
|
457
457
|
const node = key2TreeNode.value.get(key);
|
|
@@ -475,13 +475,13 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
475
475
|
if (!keys.length) return;
|
|
476
476
|
let newSelectedKeys;
|
|
477
477
|
if (multiple.value) {
|
|
478
|
-
const selectedKeysSet = new Set(
|
|
478
|
+
const selectedKeysSet = new Set(mergedSelectedKeys.value);
|
|
479
479
|
keys.forEach((key) => {
|
|
480
480
|
selected ? selectedKeysSet.add(key) : selectedKeysSet.delete(key);
|
|
481
481
|
});
|
|
482
482
|
newSelectedKeys = [...selectedKeysSet];
|
|
483
483
|
} else newSelectedKeys = selected ? [keys[0]] : [];
|
|
484
|
-
|
|
484
|
+
setMergedSelectedKeys(newSelectedKeys);
|
|
485
485
|
emitSelectEvent({
|
|
486
486
|
targetKey,
|
|
487
487
|
targetSelected: isUndefined(targetKey) ? void 0 : selected,
|
|
@@ -489,7 +489,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
function expandNodes(keys, expanded, targetKey) {
|
|
492
|
-
const expandedKeysSet = new Set(
|
|
492
|
+
const expandedKeysSet = new Set(mergedExpandedKeys.value);
|
|
493
493
|
keys.forEach((key) => {
|
|
494
494
|
expanded ? expandedKeysSet.add(key) : expandedKeysSet.delete(key);
|
|
495
495
|
onExpandEnd(key);
|
|
@@ -508,7 +508,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
508
508
|
const [newCheckedKeys, newIndeterminateKeys] = getCheckedStateByCheck({
|
|
509
509
|
node,
|
|
510
510
|
checked,
|
|
511
|
-
checkedKeys:
|
|
511
|
+
checkedKeys: mergedCheckedKeys.value,
|
|
512
512
|
indeterminateKeys: indeterminateKeys.value,
|
|
513
513
|
checkStrictly: checkStrictly.value
|
|
514
514
|
});
|
|
@@ -526,7 +526,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
526
526
|
let newSelectedKeys;
|
|
527
527
|
let selected;
|
|
528
528
|
if (multiple.value) {
|
|
529
|
-
const selectedKeysSet = new Set(
|
|
529
|
+
const selectedKeysSet = new Set(mergedSelectedKeys.value);
|
|
530
530
|
selected = !selectedKeysSet.has(key);
|
|
531
531
|
selected ? selectedKeysSet.add(key) : selectedKeysSet.delete(key);
|
|
532
532
|
newSelectedKeys = [...selectedKeysSet];
|
|
@@ -534,7 +534,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
534
534
|
selected = true;
|
|
535
535
|
newSelectedKeys = [key];
|
|
536
536
|
}
|
|
537
|
-
|
|
537
|
+
setMergedSelectedKeys(newSelectedKeys);
|
|
538
538
|
emitSelectEvent({
|
|
539
539
|
targetKey: key,
|
|
540
540
|
targetSelected: selected,
|
|
@@ -545,7 +545,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
545
545
|
function onExpand(expanded, key, e) {
|
|
546
546
|
if (currentExpandKeys.value.includes(key)) return;
|
|
547
547
|
if (!key2TreeNode.value.get(key)) return;
|
|
548
|
-
const expandedKeysSet = new Set(
|
|
548
|
+
const expandedKeysSet = new Set(mergedExpandedKeys.value);
|
|
549
549
|
expanded ? expandedKeysSet.add(key) : expandedKeysSet.delete(key);
|
|
550
550
|
const newExpandedKeys = [...expandedKeysSet];
|
|
551
551
|
setExpandState(newExpandedKeys);
|
|
@@ -572,10 +572,10 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
572
572
|
treeData,
|
|
573
573
|
flattenTreeData,
|
|
574
574
|
key2TreeNode,
|
|
575
|
-
checkedKeys,
|
|
575
|
+
checkedKeys: mergedCheckedKeys,
|
|
576
576
|
indeterminateKeys,
|
|
577
|
-
selectedKeys,
|
|
578
|
-
expandedKeys,
|
|
577
|
+
selectedKeys: mergedSelectedKeys,
|
|
578
|
+
expandedKeys: mergedExpandedKeys,
|
|
579
579
|
loadingKeys,
|
|
580
580
|
currentExpandKeys,
|
|
581
581
|
onLoadMore: computed(() => (loadMore === null || loadMore === void 0 ? void 0 : loadMore.value) ? function() {
|
|
@@ -589,7 +589,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
589
589
|
yield loadMore.value(treeNodeData);
|
|
590
590
|
loadingKeys.value = loadingKeys.value.filter((v) => v !== key);
|
|
591
591
|
onExpand(true, key);
|
|
592
|
-
if (
|
|
592
|
+
if (mergedCheckedKeys.value.includes(key)) onCheck(true, key);
|
|
593
593
|
} catch (err) {
|
|
594
594
|
loadingKeys.value = loadingKeys.value.filter((v) => v !== key);
|
|
595
595
|
console.error("[tree]load data error: ", err);
|
|
@@ -664,7 +664,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
664
664
|
* @version 2.19.0
|
|
665
665
|
*/
|
|
666
666
|
function getSelectedNodes() {
|
|
667
|
-
return getNodes(
|
|
667
|
+
return getNodes(mergedSelectedKeys.value);
|
|
668
668
|
}
|
|
669
669
|
/**
|
|
670
670
|
* @zh 获取选中复选框的节点。支持传入 `checkedStrategy`,没有传则取组件的配置。
|
|
@@ -676,7 +676,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
676
676
|
*/
|
|
677
677
|
function getCheckedNodes(options = {}) {
|
|
678
678
|
const { checkedStrategy, includeHalfChecked } = options;
|
|
679
|
-
return [...getNodes(getPublicCheckedKeys(
|
|
679
|
+
return [...getNodes(getPublicCheckedKeys(mergedCheckedKeys.value, checkedStrategy)), ...includeHalfChecked ? getHalfCheckedNodes() : []];
|
|
680
680
|
}
|
|
681
681
|
/**
|
|
682
682
|
* @zh 获取复选框半选的节点
|
|
@@ -696,7 +696,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
696
696
|
* @version 2.19.0
|
|
697
697
|
*/
|
|
698
698
|
function getExpandedNodes() {
|
|
699
|
-
return getNodes(
|
|
699
|
+
return getNodes(mergedExpandedKeys.value);
|
|
700
700
|
}
|
|
701
701
|
/**
|
|
702
702
|
* @zh 设置全部节点的复选框状态
|
|
@@ -5,25 +5,25 @@ import { ScrollbarProps } from '../scrollbar';
|
|
|
5
5
|
import { TreeFieldNames, TreeNodeData, TreeProps } from '../tree/interface';
|
|
6
6
|
import { TriggerProps } from '../trigger';
|
|
7
7
|
import { LabelValue, TreeSelectValue } from './interface';
|
|
8
|
-
declare var __VLS_10: {},
|
|
8
|
+
declare var __VLS_10: {}, __VLS_23: {}, __VLS_26: any, __VLS_29: {
|
|
9
9
|
data: any;
|
|
10
|
-
},
|
|
10
|
+
}, __VLS_32: {}, __VLS_34: {}, __VLS_41: {}, __VLS_55: {};
|
|
11
11
|
type __VLS_Slots = {} & {
|
|
12
12
|
trigger?: (props: typeof __VLS_10) => any;
|
|
13
13
|
} & {
|
|
14
|
-
prefix?: (props: typeof
|
|
14
|
+
prefix?: (props: typeof __VLS_23) => any;
|
|
15
15
|
} & {
|
|
16
|
-
label?: (props: typeof
|
|
16
|
+
label?: (props: typeof __VLS_26) => any;
|
|
17
17
|
} & {
|
|
18
|
-
tag?: (props: typeof
|
|
18
|
+
tag?: (props: typeof __VLS_29) => any;
|
|
19
19
|
} & {
|
|
20
|
-
header?: (props: typeof
|
|
20
|
+
header?: (props: typeof __VLS_32) => any;
|
|
21
21
|
} & {
|
|
22
|
-
loader?: (props: typeof
|
|
22
|
+
loader?: (props: typeof __VLS_34) => any;
|
|
23
23
|
} & {
|
|
24
|
-
empty?: (props: typeof
|
|
24
|
+
empty?: (props: typeof __VLS_41) => any;
|
|
25
25
|
} & {
|
|
26
|
-
footer?: (props: typeof
|
|
26
|
+
footer?: (props: typeof __VLS_55) => any;
|
|
27
27
|
};
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
29
29
|
disabled: {
|
|
@@ -1843,186 +1843,53 @@
|
|
|
1843
1843
|
"sd-input-search/button-props": {
|
|
1844
1844
|
"description": "Button props"
|
|
1845
1845
|
},
|
|
1846
|
-
"sd-header/title": {
|
|
1847
|
-
"description": "Header title",
|
|
1848
|
-
"type": "string"
|
|
1849
|
-
},
|
|
1850
|
-
"sd-header/image": {
|
|
1851
|
-
"description": "Header image url",
|
|
1852
|
-
"type": "string"
|
|
1853
|
-
},
|
|
1854
|
-
"sd-header/model-value": {
|
|
1855
|
-
"description": "Whether header is visible",
|
|
1856
|
-
"type": "boolean"
|
|
1857
|
-
},
|
|
1858
|
-
"sd-header/default-visible": {
|
|
1859
|
-
"description": "Whether header is visible by default",
|
|
1860
|
-
"type": "boolean"
|
|
1861
|
-
},
|
|
1862
|
-
"sd-header/height": {
|
|
1863
|
-
"description": "Header content height"
|
|
1864
|
-
},
|
|
1865
|
-
"sd-header/density": {
|
|
1866
|
-
"description": "Header density"
|
|
1867
|
-
},
|
|
1868
|
-
"sd-header/extended": {
|
|
1869
|
-
"description": "Whether extension area is enabled",
|
|
1870
|
-
"type": "boolean"
|
|
1871
|
-
},
|
|
1872
|
-
"sd-header/extension-height": {
|
|
1873
|
-
"description": "Extension area height"
|
|
1874
|
-
},
|
|
1875
|
-
"sd-header/collapse": {
|
|
1876
|
-
"description": "Whether to collapse extension area",
|
|
1877
|
-
"type": "boolean"
|
|
1878
|
-
},
|
|
1879
|
-
"sd-header/flat": {
|
|
1880
|
-
"description": "Whether to remove shadow",
|
|
1881
|
-
"type": "boolean"
|
|
1882
|
-
},
|
|
1883
|
-
"sd-header/floating": {
|
|
1884
|
-
"description": "Whether to use floating style",
|
|
1885
|
-
"type": "boolean"
|
|
1886
|
-
},
|
|
1887
|
-
"sd-header/fixed": {
|
|
1888
|
-
"description": "Whether header is fixed to viewport edge",
|
|
1889
|
-
"type": "boolean"
|
|
1890
|
-
},
|
|
1891
|
-
"sd-header/sticky": {
|
|
1892
|
-
"description": "Whether header uses sticky positioning",
|
|
1893
|
-
"type": "boolean"
|
|
1894
|
-
},
|
|
1895
|
-
"sd-header/absolute": {
|
|
1896
|
-
"description": "Whether header uses absolute positioning",
|
|
1897
|
-
"type": "boolean"
|
|
1898
|
-
},
|
|
1899
|
-
"sd-header/location": {
|
|
1900
|
-
"description": "Header location"
|
|
1901
|
-
},
|
|
1902
|
-
"sd-header/scroll-behavior": {
|
|
1903
|
-
"description": "Scroll behavior tokens",
|
|
1904
|
-
"type": "string"
|
|
1905
|
-
},
|
|
1906
|
-
"sd-header/scroll-target": {
|
|
1907
|
-
"description": "Scroll container selector, defaults to window",
|
|
1908
|
-
"type": "string"
|
|
1909
|
-
},
|
|
1910
|
-
"sd-header/scroll-threshold": {
|
|
1911
|
-
"description": "Scroll threshold"
|
|
1912
|
-
},
|
|
1913
1846
|
"sd-layout/has-sider": {
|
|
1914
|
-
"description": "
|
|
1847
|
+
"description": "Whether contains Sider, overrides auto detection when set to a boolean",
|
|
1915
1848
|
"type": "boolean"
|
|
1916
1849
|
},
|
|
1917
|
-
"sd-sider/
|
|
1918
|
-
"description": "
|
|
1919
|
-
"type": "string"
|
|
1850
|
+
"sd-sider/collapse": {
|
|
1851
|
+
"description": "Triggered when the collapsed state changes"
|
|
1920
1852
|
},
|
|
1921
|
-
"sd-sider/
|
|
1922
|
-
"description": "
|
|
1923
|
-
"type": "boolean"
|
|
1853
|
+
"sd-sider/breakpoint": {
|
|
1854
|
+
"description": "Triggered when the responsive breakpoint match state changes"
|
|
1924
1855
|
},
|
|
1925
|
-
"sd-sider/
|
|
1926
|
-
"description": "Whether
|
|
1856
|
+
"sd-sider/collapsible": {
|
|
1857
|
+
"description": "Whether can be collapsed",
|
|
1927
1858
|
"type": "boolean"
|
|
1928
1859
|
},
|
|
1929
1860
|
"sd-sider/collapsed": {
|
|
1930
|
-
"description": "Current collapsed state",
|
|
1861
|
+
"description": "Current collapsed state (controlled)",
|
|
1931
1862
|
"type": "boolean"
|
|
1932
1863
|
},
|
|
1933
1864
|
"sd-sider/default-collapsed": {
|
|
1934
|
-
"description": "
|
|
1935
|
-
"type": "boolean"
|
|
1936
|
-
},
|
|
1937
|
-
"sd-sider/collapsible": {
|
|
1938
|
-
"description": "Whether is collapsible",
|
|
1939
|
-
"type": "boolean"
|
|
1940
|
-
},
|
|
1941
|
-
"sd-sider/rail": {
|
|
1942
|
-
"description": "Whether to enable rail mode",
|
|
1943
|
-
"type": "boolean"
|
|
1944
|
-
},
|
|
1945
|
-
"sd-sider/default-rail": {
|
|
1946
|
-
"description": "Whether to enable rail mode by default",
|
|
1865
|
+
"description": "Default collapsed state (uncontrolled)",
|
|
1947
1866
|
"type": "boolean"
|
|
1948
1867
|
},
|
|
1949
|
-
"sd-sider/
|
|
1950
|
-
"description": "
|
|
1951
|
-
"type": "number|string"
|
|
1952
|
-
},
|
|
1953
|
-
"sd-sider/expand-on-hover": {
|
|
1954
|
-
"description": "Whether to expand rail on hover",
|
|
1868
|
+
"sd-sider/reverse-arrow": {
|
|
1869
|
+
"description": "Whether to reverse the arrow direction when collapsed",
|
|
1955
1870
|
"type": "boolean"
|
|
1956
1871
|
},
|
|
1957
|
-
"sd-sider/
|
|
1958
|
-
"description": "
|
|
1959
|
-
"type": "
|
|
1872
|
+
"sd-sider/zero-width-trigger-style": {
|
|
1873
|
+
"description": "Custom style of zero-width trigger when collapsedWidth is 0",
|
|
1874
|
+
"type": "object"
|
|
1960
1875
|
},
|
|
1961
|
-
"sd-sider/
|
|
1962
|
-
"description": "Whether to
|
|
1876
|
+
"sd-sider/hide-trigger": {
|
|
1877
|
+
"description": "Whether to hide the built-in collapse trigger, control collapse via collapsed",
|
|
1963
1878
|
"type": "boolean"
|
|
1964
1879
|
},
|
|
1965
1880
|
"sd-sider/width": {
|
|
1966
|
-
"description": "Width",
|
|
1967
|
-
"type": "number|string"
|
|
1968
|
-
},
|
|
1969
|
-
"sd-sider/height": {
|
|
1970
|
-
"description": "Height of top or bottom drawer",
|
|
1881
|
+
"description": "Width when expanded",
|
|
1971
1882
|
"type": "number|string"
|
|
1972
1883
|
},
|
|
1973
1884
|
"sd-sider/collapsed-width": {
|
|
1974
|
-
"description": "
|
|
1975
|
-
"type": "number"
|
|
1976
|
-
},
|
|
1977
|
-
"sd-sider/temporary": {
|
|
1978
|
-
"description": "Whether to use temporary drawer mode",
|
|
1979
|
-
"type": "boolean"
|
|
1980
|
-
},
|
|
1981
|
-
"sd-sider/permanent": {
|
|
1982
|
-
"description": "Whether to always keep the drawer active",
|
|
1983
|
-
"type": "boolean"
|
|
1984
|
-
},
|
|
1985
|
-
"sd-sider/persistent": {
|
|
1986
|
-
"description": "Whether temporary drawer should stay open after scrim click",
|
|
1987
|
-
"type": "boolean"
|
|
1988
|
-
},
|
|
1989
|
-
"sd-sider/mask": {
|
|
1990
|
-
"description": "Whether to show the temporary drawer mask",
|
|
1991
|
-
"type": "boolean"
|
|
1992
|
-
},
|
|
1993
|
-
"sd-sider/mask-closable": {
|
|
1994
|
-
"description": "Whether the drawer can be closed by clicking the mask",
|
|
1995
|
-
"type": "boolean"
|
|
1996
|
-
},
|
|
1997
|
-
"sd-sider/esc-to-close": {
|
|
1998
|
-
"description": "Whether temporary drawer can be closed with ESC",
|
|
1999
|
-
"type": "boolean"
|
|
2000
|
-
},
|
|
2001
|
-
"sd-sider/location": {
|
|
2002
|
-
"description": "Navigation drawer location"
|
|
2003
|
-
},
|
|
2004
|
-
"sd-sider/floating": {
|
|
2005
|
-
"description": "Whether to enable floating mode",
|
|
2006
|
-
"type": "boolean"
|
|
2007
|
-
},
|
|
2008
|
-
"sd-sider/sticky": {
|
|
2009
|
-
"description": "Whether to enable sticky mode",
|
|
2010
|
-
"type": "boolean"
|
|
2011
|
-
},
|
|
2012
|
-
"sd-sider/reverse-arrow": {
|
|
2013
|
-
"description": "Flip and fold the direction of the hint arrow, which can be used when Sider is on the right",
|
|
2014
|
-
"type": "boolean"
|
|
2015
|
-
},
|
|
2016
|
-
"sd-sider/breakpoint": {
|
|
2017
|
-
"description": "Trigger breakpoints for responsive layout, see [Responsive Grid](/vue/component/grid) for details",
|
|
2018
|
-
"type": "string"
|
|
1885
|
+
"description": "Width when collapsed",
|
|
1886
|
+
"type": "number|string"
|
|
2019
1887
|
},
|
|
2020
|
-
"sd-sider/
|
|
2021
|
-
"description": "
|
|
1888
|
+
"sd-sider/theme": {
|
|
1889
|
+
"description": "Theme color, follows ConfigProvider's themeMode when not set"
|
|
2022
1890
|
},
|
|
2023
|
-
"sd-sider/
|
|
2024
|
-
"description": "
|
|
2025
|
-
"type": "boolean"
|
|
1891
|
+
"sd-sider/scrollbar": {
|
|
1892
|
+
"description": "Scroll config, use the component Scrollbar by default; set to false for native overflow:auto, pass an object to configure Scrollbar"
|
|
2026
1893
|
},
|
|
2027
1894
|
"sd-link/click": {
|
|
2028
1895
|
"description": "Emitted when the link is clicked"
|
package/json/vetur-tags.json
CHANGED
|
@@ -108,6 +108,9 @@
|
|
|
108
108
|
"count"
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
|
+
"sd-border-beam": {
|
|
112
|
+
"attributes": []
|
|
113
|
+
},
|
|
111
114
|
"sd-breadcrumb": {
|
|
112
115
|
"attributes": [
|
|
113
116
|
"max-count",
|
|
@@ -764,26 +767,7 @@
|
|
|
764
767
|
"attributes": []
|
|
765
768
|
},
|
|
766
769
|
"sd-header": {
|
|
767
|
-
"attributes": [
|
|
768
|
-
"title",
|
|
769
|
-
"image",
|
|
770
|
-
"model-value",
|
|
771
|
-
"default-visible",
|
|
772
|
-
"height",
|
|
773
|
-
"density",
|
|
774
|
-
"extended",
|
|
775
|
-
"extension-height",
|
|
776
|
-
"collapse",
|
|
777
|
-
"flat",
|
|
778
|
-
"floating",
|
|
779
|
-
"fixed",
|
|
780
|
-
"sticky",
|
|
781
|
-
"absolute",
|
|
782
|
-
"location",
|
|
783
|
-
"scroll-behavior",
|
|
784
|
-
"scroll-target",
|
|
785
|
-
"scroll-threshold"
|
|
786
|
-
]
|
|
770
|
+
"attributes": []
|
|
787
771
|
},
|
|
788
772
|
"sd-layout": {
|
|
789
773
|
"attributes": [
|
|
@@ -792,34 +776,18 @@
|
|
|
792
776
|
},
|
|
793
777
|
"sd-sider": {
|
|
794
778
|
"attributes": [
|
|
795
|
-
"
|
|
796
|
-
"
|
|
797
|
-
"
|
|
779
|
+
"collapse",
|
|
780
|
+
"breakpoint",
|
|
781
|
+
"collapsible",
|
|
798
782
|
"collapsed",
|
|
799
783
|
"default-collapsed",
|
|
800
|
-
"
|
|
801
|
-
"
|
|
802
|
-
"
|
|
803
|
-
"rail-width",
|
|
804
|
-
"expand-on-hover",
|
|
805
|
-
"disable-resize-watcher",
|
|
806
|
-
"disable-route-watcher",
|
|
784
|
+
"reverse-arrow",
|
|
785
|
+
"zero-width-trigger-style",
|
|
786
|
+
"hide-trigger",
|
|
807
787
|
"width",
|
|
808
|
-
"height",
|
|
809
788
|
"collapsed-width",
|
|
810
|
-
"
|
|
811
|
-
"
|
|
812
|
-
"persistent",
|
|
813
|
-
"mask",
|
|
814
|
-
"mask-closable",
|
|
815
|
-
"esc-to-close",
|
|
816
|
-
"location",
|
|
817
|
-
"floating",
|
|
818
|
-
"sticky",
|
|
819
|
-
"reverse-arrow",
|
|
820
|
-
"breakpoint",
|
|
821
|
-
"resize-directions",
|
|
822
|
-
"hide-trigger"
|
|
789
|
+
"theme",
|
|
790
|
+
"scrollbar"
|
|
823
791
|
]
|
|
824
792
|
},
|
|
825
793
|
"sd-link": {
|