@sdata/web-vue 4.4.3 → 4.5.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 +1 -1
- package/dist/sd.min.css +1 -1
- package/es/index.css +1 -1
- package/es/tabs/index.d.ts +17 -57
- package/es/tabs/style/index.css +1 -1
- package/es/tabs/style/index.scss +2 -1
- package/es/tabs/tab-pane.vue.d.ts +1 -13
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +25 -4
- package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +7 -6
- package/json/web-types.json +1 -1
- package/package.json +1 -1
package/es/index.css
CHANGED
|
@@ -5825,7 +5825,7 @@ body.sd-tour-active .sd-tour-popover * {
|
|
|
5825
5825
|
border-top: none;
|
|
5826
5826
|
}
|
|
5827
5827
|
.sd-tabs-content-animation {
|
|
5828
|
-
transition:
|
|
5828
|
+
transition: transform 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
5829
5829
|
}
|
|
5830
5830
|
.sd-tabs-horizontal.sd-tabs-justify {
|
|
5831
5831
|
display: flex;
|
package/es/tabs/index.d.ts
CHANGED
|
@@ -329,55 +329,7 @@ declare const Tabs: {
|
|
|
329
329
|
extra(): unknown;
|
|
330
330
|
};
|
|
331
331
|
}) & {
|
|
332
|
-
TabPane: {
|
|
333
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
334
|
-
title: StringConstructor;
|
|
335
|
-
disabled: {
|
|
336
|
-
type: BooleanConstructor;
|
|
337
|
-
default: boolean;
|
|
338
|
-
};
|
|
339
|
-
closable: {
|
|
340
|
-
type: BooleanConstructor;
|
|
341
|
-
default: boolean;
|
|
342
|
-
};
|
|
343
|
-
destroyOnHide: {
|
|
344
|
-
type: BooleanConstructor;
|
|
345
|
-
default: boolean;
|
|
346
|
-
};
|
|
347
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
348
|
-
disabled: boolean;
|
|
349
|
-
closable: boolean;
|
|
350
|
-
destroyOnHide: boolean;
|
|
351
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
352
|
-
P: {};
|
|
353
|
-
B: {};
|
|
354
|
-
D: {};
|
|
355
|
-
C: {};
|
|
356
|
-
M: {};
|
|
357
|
-
Defaults: {};
|
|
358
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
359
|
-
title: StringConstructor;
|
|
360
|
-
disabled: {
|
|
361
|
-
type: BooleanConstructor;
|
|
362
|
-
default: boolean;
|
|
363
|
-
};
|
|
364
|
-
closable: {
|
|
365
|
-
type: BooleanConstructor;
|
|
366
|
-
default: boolean;
|
|
367
|
-
};
|
|
368
|
-
destroyOnHide: {
|
|
369
|
-
type: BooleanConstructor;
|
|
370
|
-
default: boolean;
|
|
371
|
-
};
|
|
372
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
373
|
-
disabled: boolean;
|
|
374
|
-
closable: boolean;
|
|
375
|
-
destroyOnHide: boolean;
|
|
376
|
-
}>;
|
|
377
|
-
__isFragment?: never;
|
|
378
|
-
__isTeleport?: never;
|
|
379
|
-
__isSuspense?: never;
|
|
380
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
332
|
+
TabPane: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
381
333
|
title: StringConstructor;
|
|
382
334
|
disabled: {
|
|
383
335
|
type: BooleanConstructor;
|
|
@@ -391,17 +343,25 @@ declare const Tabs: {
|
|
|
391
343
|
type: BooleanConstructor;
|
|
392
344
|
default: boolean;
|
|
393
345
|
};
|
|
394
|
-
}
|
|
346
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
347
|
+
title: StringConstructor;
|
|
348
|
+
disabled: {
|
|
349
|
+
type: BooleanConstructor;
|
|
350
|
+
default: boolean;
|
|
351
|
+
};
|
|
352
|
+
closable: {
|
|
353
|
+
type: BooleanConstructor;
|
|
354
|
+
default: boolean;
|
|
355
|
+
};
|
|
356
|
+
destroyOnHide: {
|
|
357
|
+
type: BooleanConstructor;
|
|
358
|
+
default: boolean;
|
|
359
|
+
};
|
|
360
|
+
}>> & Readonly<{}>, {
|
|
395
361
|
disabled: boolean;
|
|
396
362
|
closable: boolean;
|
|
397
363
|
destroyOnHide: boolean;
|
|
398
|
-
}, {},
|
|
399
|
-
$slots: {
|
|
400
|
-
default?: (props: {}) => any;
|
|
401
|
-
} & {
|
|
402
|
-
default?: (props: {}) => any;
|
|
403
|
-
};
|
|
404
|
-
});
|
|
364
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
405
365
|
install: (app: App, options?: SDOptions) => void;
|
|
406
366
|
};
|
|
407
367
|
export type TabsInstance = InstanceType<typeof _Tabs>;
|
package/es/tabs/style/index.css
CHANGED
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
border-top: none;
|
|
408
408
|
}
|
|
409
409
|
.sd-tabs-content-animation {
|
|
410
|
-
transition:
|
|
410
|
+
transition: transform 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
411
411
|
}
|
|
412
412
|
.sd-tabs-horizontal.sd-tabs-justify {
|
|
413
413
|
display: flex;
|
package/es/tabs/style/index.scss
CHANGED
|
@@ -627,7 +627,8 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
|
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
&-content-animation {
|
|
630
|
-
|
|
630
|
+
// transform 位移动画由合成器处理,避免重型面板逐帧 reflow
|
|
631
|
+
transition: transform theme.$transition-duration-2 theme.$transition-timing-function-standard;
|
|
631
632
|
}
|
|
632
633
|
|
|
633
634
|
&-horizontal#{&}-justify {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
declare
|
|
2
|
-
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof __VLS_7) => any;
|
|
4
|
-
} & {
|
|
5
|
-
default?: (props: typeof __VLS_9) => any;
|
|
6
|
-
};
|
|
7
|
-
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
2
|
title: StringConstructor;
|
|
9
3
|
disabled: {
|
|
10
4
|
type: BooleanConstructor;
|
|
@@ -37,11 +31,5 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
37
31
|
closable: boolean;
|
|
38
32
|
destroyOnHide: boolean;
|
|
39
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
34
|
declare const _default: typeof __VLS_export;
|
|
42
35
|
export default _default;
|
|
43
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
44
|
-
new (): {
|
|
45
|
-
$slots: S;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -2,7 +2,7 @@ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.146.0/helpers/es
|
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import Scrollbar from "../scrollbar/index.js";
|
|
4
4
|
import { tabsInjectionKey } from "./context.js";
|
|
5
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, getCurrentInstance, inject, mergeProps, normalizeClass, onBeforeUnmount, onUpdated, openBlock, reactive, ref,
|
|
5
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, getCurrentInstance, inject, mergeProps, normalizeClass, onBeforeUnmount, onUpdated, openBlock, reactive, ref, toRefs, unref, useSlots, watch, withCtx } from "vue";
|
|
6
6
|
//#region components/tabs/tab-pane.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = [
|
|
8
8
|
"id",
|
|
@@ -76,6 +76,27 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
76
76
|
return scrollbar !== false && scrollbar !== void 0;
|
|
77
77
|
});
|
|
78
78
|
const paneCls = computed(() => [`${prefixCls}-pane`, { [`${prefixCls}-pane-scroll`]: hasPaneScrollbar.value }]);
|
|
79
|
+
/**
|
|
80
|
+
* 非激活时冻结面板内容:复用上次渲染的同一批 vnode 引用,Vue 渲染器对
|
|
81
|
+
* 相同引用会整体跳过 patch,避免切换标签时重型面板子树被反复重建和 diff。
|
|
82
|
+
* 面板激活期间始终渲染最新内容并同步缓存,重新激活时自动补上隐藏期间
|
|
83
|
+
* 错过的父作用域数据更新。
|
|
84
|
+
*/
|
|
85
|
+
const PaneContent = defineComponent({
|
|
86
|
+
name: "TabPaneContent",
|
|
87
|
+
setup() {
|
|
88
|
+
let cache = null;
|
|
89
|
+
return () => {
|
|
90
|
+
var _cache2, _slots$default3, _slots$default4;
|
|
91
|
+
if (active.value) {
|
|
92
|
+
var _slots$default, _slots$default2;
|
|
93
|
+
cache = (_slots$default = (_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)) !== null && _slots$default !== void 0 ? _slots$default : null;
|
|
94
|
+
return cache;
|
|
95
|
+
}
|
|
96
|
+
return (_cache2 = cache) !== null && _cache2 !== void 0 ? _cache2 : cache = (_slots$default3 = (_slots$default4 = slots.default) === null || _slots$default4 === void 0 ? void 0 : _slots$default4.call(slots)) !== null && _slots$default3 !== void 0 ? _slots$default3 : null;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
79
100
|
const data = reactive({
|
|
80
101
|
key,
|
|
81
102
|
title,
|
|
@@ -119,9 +140,9 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
119
140
|
key: 0,
|
|
120
141
|
"outer-class": `${unref(prefixCls)}-pane-scrollbar`
|
|
121
142
|
}, paneScrollbarProps.value), {
|
|
122
|
-
default: withCtx(() => [
|
|
123
|
-
_:
|
|
124
|
-
}, 16, ["outer-class"])) :
|
|
143
|
+
default: withCtx(() => [createVNode(unref(PaneContent))]),
|
|
144
|
+
_: 1
|
|
145
|
+
}, 16, ["outer-class"])) : (openBlock(), createBlock(unref(PaneContent), { key: 1 }))], 2)) : createCommentVNode("", true)], 10, _hoisted_1);
|
|
125
146
|
};
|
|
126
147
|
}
|
|
127
148
|
}));
|
|
@@ -130,6 +130,12 @@ var tabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
130
130
|
const index = tabKeys.value.indexOf(computedActiveKey.value);
|
|
131
131
|
return index === -1 ? 0 : index;
|
|
132
132
|
});
|
|
133
|
+
const configContext = inject(configProviderInjectionKey, void 0);
|
|
134
|
+
const rtl = computed(() => {
|
|
135
|
+
var _configContext$rtl;
|
|
136
|
+
return (_configContext$rtl = configContext === null || configContext === void 0 ? void 0 : configContext.rtl) !== null && _configContext$rtl !== void 0 ? _configContext$rtl : false;
|
|
137
|
+
});
|
|
138
|
+
const contentStyle = computed(() => ({ transform: `translateX(${rtl.value ? "" : "-"}${activeIndex.value * 100}%)` }));
|
|
133
139
|
const { scrollbarProps } = useScrollbar(toRef(props, "scrollbar"));
|
|
134
140
|
const paneScrollbar = computed(() => props.fullHeight && props.scrollbar !== false ? scrollbarProps.value : false);
|
|
135
141
|
const addItem = (id, data) => {
|
|
@@ -164,11 +170,6 @@ var tabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
164
170
|
if (props.autoSwitch) nextTick(() => handleChange(tabKeys.value[tabKeys.value.length - 1]));
|
|
165
171
|
};
|
|
166
172
|
const handleDelete = (key, event) => emit("delete", key, event);
|
|
167
|
-
const configContext = inject(configProviderInjectionKey, void 0);
|
|
168
|
-
const rtl = computed(() => {
|
|
169
|
-
var _configContext$rtl;
|
|
170
|
-
return (_configContext$rtl = configContext === null || configContext === void 0 ? void 0 : configContext.rtl) !== null && _configContext$rtl !== void 0 ? _configContext$rtl : false;
|
|
171
|
-
});
|
|
172
173
|
const cls = computed(() => [
|
|
173
174
|
prefixCls,
|
|
174
175
|
`${prefixCls}-${mergedDirection.value}`,
|
|
@@ -190,7 +191,7 @@ var tabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
190
191
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(DefineContent), null, {
|
|
191
192
|
default: withCtx(() => [createElementVNode("div", { class: normalizeClass([`${unref(prefixCls)}-content`, { [`${unref(prefixCls)}-content-hide`]: props.hideContent }]) }, [createElementVNode("div", {
|
|
192
193
|
class: normalizeClass([`${unref(prefixCls)}-content-list`, { [`${unref(prefixCls)}-content-animation`]: props.animation }]),
|
|
193
|
-
style: normalizeStyle(
|
|
194
|
+
style: normalizeStyle(contentStyle.value)
|
|
194
195
|
}, [createVNode(VNodeRenderer, { content: getChildren() }, null, 8, ["content"])], 6)], 2)]),
|
|
195
196
|
_: 1
|
|
196
197
|
}), createElementVNode("div", mergeProps(unref(attrs), { class: cls.value }), [
|
package/json/web-types.json
CHANGED