@manohub/ui 1.0.9 → 1.1.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 +3 -3
- package/dist/components/button/index.d.ts +74 -20
- package/dist/components/button/index.js +59 -14
- package/dist/components/button/segmented.d.ts +122 -0
- package/dist/components/button/segmented.js +99 -0
- package/dist/components/capsule/index.d.ts +2 -2
- package/dist/components/card/index.js +1 -1
- package/dist/components/filter/index.d.ts +3 -3
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/input/index.d.ts +6 -6
- package/dist/components/input/number-input.d.ts +1 -1
- package/dist/components/list/index.d.ts +19 -0
- package/dist/components/list/list-shared.d.ts +196 -0
- package/dist/components/list/list-shared.js +143 -0
- package/dist/components/list/list.d.ts +221 -0
- package/dist/components/list/list.js +131 -0
- package/dist/components/{tree/index.d.ts → list/tree.d.ts} +33 -33
- package/dist/components/{tree/index.js → list/tree.js} +23 -62
- package/dist/components/list-view/index.d.ts +7 -7
- package/dist/components/notice/index.d.ts +1 -1
- package/dist/components/panel/index.d.ts +39 -84
- package/dist/components/panel/index.js +18 -32
- package/dist/components/radio/index.d.ts +233 -118
- package/dist/components/radio/index.js +146 -150
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.js +6 -3
- package/dist/components/select/select-panel.d.ts +20 -0
- package/dist/components/select/select-panel.js +8 -1
- package/dist/components/select/select-tree-filter.d.ts +9 -9
- package/dist/components/select/select-tree.d.ts +23 -23
- package/dist/components/select/select-tree.js +16 -3
- package/dist/components/select/select-trigger.d.ts +43 -1
- package/dist/components/select/select-trigger.js +22 -5
- package/dist/components/steps/index.d.ts +4 -4
- package/dist/components/table/index.d.ts +4 -4
- package/dist/components/table/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/index.d.ts +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +5 -3
- package/dist/styles/components/button.css +107 -33
- package/dist/styles/components/{tree.css → list.css} +24 -24
- package/dist/styles/components/{tree.tokens.css → list.tokens.css} +5 -5
- package/dist/styles/components/pagination.css +3 -3
- package/dist/styles/components/panel.css +2 -9
- package/dist/styles/components/radio.css +21 -20
- package/dist/styles/components/select.css +2 -2
- package/dist/styles/components/select.tokens.css +2 -2
- package/dist/styles/index.css +2 -3
- package/dist/utils/vnode-children.d.ts +10 -0
- package/dist/utils/vnode-children.js +26 -0
- package/package.json +2 -2
- package/dist/components/nav/index.d.ts +0 -299
- package/dist/components/nav/index.js +0 -174
- package/dist/styles/components/nav.css +0 -48
|
@@ -7,9 +7,9 @@ import { type Padding } from '../part-padding';
|
|
|
7
7
|
*
|
|
8
8
|
* ## 三件结构(与 `Page` 同款复合写法)
|
|
9
9
|
*
|
|
10
|
-
* `<Panel>` → `<Panel.Header title=…
|
|
10
|
+
* `<Panel>` → `<Panel.Header title=… extra=… />` + `<Panel.Body>…内容(表格 / 树 / 表单)…</Panel.Body>`
|
|
11
11
|
* + `<Panel.Footer><分页器 … /></Panel.Footer>`。
|
|
12
|
-
* 简写仍可用(等价于「内建 Header + 包一层的 Body」):`<Panel title=…
|
|
12
|
+
* 简写仍可用(等价于「内建 Header + 包一层的 Body」):`<Panel title=… extra=…>内容</Panel>`;两种
|
|
13
13
|
* 写法可混用 —— 显式的 `Panel.Header/Body/Footer` 会被提到对应位置,其余子节点自动进 Body。
|
|
14
14
|
*
|
|
15
15
|
* ## 分页归属(**跟承载表格的容器走**)
|
|
@@ -36,24 +36,23 @@ import { type Padding } from '../part-padding';
|
|
|
36
36
|
* - `Panel.Header` = 内建头那一行的内距;走 `header` 插槽时(整行替换)会把自定义头**包一层**只带内距的 div
|
|
37
37
|
* (自定义头内部的几何仍归消费方)。
|
|
38
38
|
*
|
|
39
|
-
* ##
|
|
39
|
+
* ## 区域头只有一位(`extra`)
|
|
40
40
|
*
|
|
41
|
-
* `
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
* 右端是**一个自由位** `extra`:本区域的筛选 / 搜索控件与该区域的操作按钮都放这里,**由消费方自己排序**
|
|
42
|
+
* (2026-10-12 并位 —— 原先按「筛选位 / 操作位」分成的两个专属位已撤除,筛选与操作不再用位名区分)。
|
|
43
|
+
* 筛选的归属判据仍是同一条:**先问「过滤谁的数据」决定放哪个区域的 `extra`**,再问「几个字段」——
|
|
44
|
+
* 字段数 > 3 时上提为页面级筛选区;同一字段不得摆两处。
|
|
44
45
|
* 完全自定义的面板头请走 `Panel.Header`(不传 `title`)或 `header` 插槽(需在接入方登记为白名单)。**只给
|
|
45
|
-
* `
|
|
46
|
-
*
|
|
46
|
+
* `extra`、不给 `title` 也是合法形态**:那一行照渲染(标题在容器外层时用,如弹窗内的区域 —— 弹窗标题栏
|
|
47
|
+
* 已写了区域名,面板头只剩一行「搜索 + 操作」);两样都不给才不渲染头。
|
|
47
48
|
*
|
|
48
49
|
* 用法见 `docs/demos/panel/`(每个维度一份可运行样例;文档页 `docs/components/panel.md`)。
|
|
49
50
|
*/
|
|
50
51
|
export interface PanelProps {
|
|
51
52
|
/** 面板标题;缺省时若提供了 `header` 插槽则走完全自定义面板头 */
|
|
52
53
|
title?: string;
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
-
/** 本区域的操作位(新建 / 刷新等) */
|
|
56
|
-
actions?: unknown;
|
|
54
|
+
/** 区域头右端的自由位(本区域的筛选 / 操作都放这里,由消费方排序) */
|
|
55
|
+
extra?: unknown;
|
|
57
56
|
/**
|
|
58
57
|
* 面板内距(**px 数字**,与 `Form.labelWidth` / `表格.rowHeight` 同口径:几何值是设计基准,不跟根字号):
|
|
59
58
|
* - `number` → 四边同值(`padding={16}`);
|
|
@@ -68,20 +67,15 @@ export interface PanelProps {
|
|
|
68
67
|
}
|
|
69
68
|
/** 面板(及其三件)的内距:与 `Form` / `Panel` 共用一套口径(`number` = 四边同值;`{ y, x }` 分别给) */
|
|
70
69
|
export type PanelPadding = Padding;
|
|
71
|
-
/** 面板标题行(区域级):标题 +
|
|
70
|
+
/** 面板标题行(区域级):标题 + 右端自由位(`extra`) */
|
|
72
71
|
export declare const PanelHeader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
73
|
-
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `
|
|
72
|
+
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `extra` 那一行(无标题的区域头,见组件头注释);要给完全自定义的头走 `header` 插槽。 */
|
|
74
73
|
title: {
|
|
75
74
|
type: StringConstructor;
|
|
76
75
|
default: undefined;
|
|
77
76
|
};
|
|
78
|
-
/**
|
|
79
|
-
|
|
80
|
-
type: PropType<any>;
|
|
81
|
-
default: undefined;
|
|
82
|
-
};
|
|
83
|
-
/** 本区域的操作位(新建 / 刷新等);节点或返回节点的函数 */
|
|
84
|
-
actions: {
|
|
77
|
+
/** 区域头右端的自由位(本区域的筛选 / 操作都放这里);节点或返回节点的函数 */
|
|
78
|
+
extra: {
|
|
85
79
|
type: PropType<any>;
|
|
86
80
|
default: undefined;
|
|
87
81
|
};
|
|
@@ -91,18 +85,13 @@ export declare const PanelHeader: import("vue").DefineComponent<import("vue").Ex
|
|
|
91
85
|
default: undefined;
|
|
92
86
|
};
|
|
93
87
|
}>, () => VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
94
|
-
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `
|
|
88
|
+
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `extra` 那一行(无标题的区域头,见组件头注释);要给完全自定义的头走 `header` 插槽。 */
|
|
95
89
|
title: {
|
|
96
90
|
type: StringConstructor;
|
|
97
91
|
default: undefined;
|
|
98
92
|
};
|
|
99
|
-
/**
|
|
100
|
-
|
|
101
|
-
type: PropType<any>;
|
|
102
|
-
default: undefined;
|
|
103
|
-
};
|
|
104
|
-
/** 本区域的操作位(新建 / 刷新等);节点或返回节点的函数 */
|
|
105
|
-
actions: {
|
|
93
|
+
/** 区域头右端的自由位(本区域的筛选 / 操作都放这里);节点或返回节点的函数 */
|
|
94
|
+
extra: {
|
|
106
95
|
type: PropType<any>;
|
|
107
96
|
default: undefined;
|
|
108
97
|
};
|
|
@@ -113,15 +102,13 @@ export declare const PanelHeader: import("vue").DefineComponent<import("vue").Ex
|
|
|
113
102
|
};
|
|
114
103
|
}>> & Readonly<{}>, {
|
|
115
104
|
padding: Padding;
|
|
116
|
-
toolbar: any;
|
|
117
105
|
title: string;
|
|
118
|
-
|
|
106
|
+
extra: any;
|
|
119
107
|
}, SlotsType<{
|
|
120
108
|
header?: () => VNodeChild;
|
|
121
109
|
/** 自定义标题节点(替代 `title` 属性;标题里要放图标 / 计数 / 状态点时用它) */
|
|
122
110
|
title?: () => VNodeChild;
|
|
123
|
-
|
|
124
|
-
actions?: () => VNodeChild;
|
|
111
|
+
extra?: () => VNodeChild;
|
|
125
112
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
126
113
|
/**
|
|
127
114
|
* 面板内容区:**区域内的滚动唯一归属**(Header / Footer 固定,只有它滚)。
|
|
@@ -178,13 +165,8 @@ export declare const Panel: {
|
|
|
178
165
|
type: StringConstructor;
|
|
179
166
|
default: undefined;
|
|
180
167
|
};
|
|
181
|
-
/**
|
|
182
|
-
|
|
183
|
-
type: PropType<any>;
|
|
184
|
-
default: undefined;
|
|
185
|
-
};
|
|
186
|
-
/** 简写操作位:等价于内建 `Panel.Header` 的 actions */
|
|
187
|
-
actions: {
|
|
168
|
+
/** 简写右端自由位:等价于内建 `Panel.Header` 的 extra */
|
|
169
|
+
extra: {
|
|
188
170
|
type: PropType<any>;
|
|
189
171
|
default: undefined;
|
|
190
172
|
};
|
|
@@ -195,14 +177,12 @@ export declare const Panel: {
|
|
|
195
177
|
};
|
|
196
178
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
197
179
|
padding: Padding;
|
|
198
|
-
toolbar: any;
|
|
199
180
|
title: string;
|
|
200
|
-
|
|
181
|
+
extra: any;
|
|
201
182
|
}, true, {}, SlotsType<{
|
|
202
183
|
default?: () => VNodeChild;
|
|
203
184
|
header?: () => VNodeChild;
|
|
204
|
-
|
|
205
|
-
actions?: () => VNodeChild;
|
|
185
|
+
extra?: () => VNodeChild;
|
|
206
186
|
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
207
187
|
P: {};
|
|
208
188
|
B: {};
|
|
@@ -216,13 +196,8 @@ export declare const Panel: {
|
|
|
216
196
|
type: StringConstructor;
|
|
217
197
|
default: undefined;
|
|
218
198
|
};
|
|
219
|
-
/**
|
|
220
|
-
|
|
221
|
-
type: PropType<any>;
|
|
222
|
-
default: undefined;
|
|
223
|
-
};
|
|
224
|
-
/** 简写操作位:等价于内建 `Panel.Header` 的 actions */
|
|
225
|
-
actions: {
|
|
199
|
+
/** 简写右端自由位:等价于内建 `Panel.Header` 的 extra */
|
|
200
|
+
extra: {
|
|
226
201
|
type: PropType<any>;
|
|
227
202
|
default: undefined;
|
|
228
203
|
};
|
|
@@ -233,9 +208,8 @@ export declare const Panel: {
|
|
|
233
208
|
};
|
|
234
209
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
235
210
|
padding: Padding;
|
|
236
|
-
toolbar: any;
|
|
237
211
|
title: string;
|
|
238
|
-
|
|
212
|
+
extra: any;
|
|
239
213
|
}>;
|
|
240
214
|
__isFragment?: never;
|
|
241
215
|
__isTeleport?: never;
|
|
@@ -246,13 +220,8 @@ export declare const Panel: {
|
|
|
246
220
|
type: StringConstructor;
|
|
247
221
|
default: undefined;
|
|
248
222
|
};
|
|
249
|
-
/**
|
|
250
|
-
|
|
251
|
-
type: PropType<any>;
|
|
252
|
-
default: undefined;
|
|
253
|
-
};
|
|
254
|
-
/** 简写操作位:等价于内建 `Panel.Header` 的 actions */
|
|
255
|
-
actions: {
|
|
223
|
+
/** 简写右端自由位:等价于内建 `Panel.Header` 的 extra */
|
|
224
|
+
extra: {
|
|
256
225
|
type: PropType<any>;
|
|
257
226
|
default: undefined;
|
|
258
227
|
};
|
|
@@ -263,28 +232,21 @@ export declare const Panel: {
|
|
|
263
232
|
};
|
|
264
233
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
265
234
|
padding: Padding;
|
|
266
|
-
toolbar: any;
|
|
267
235
|
title: string;
|
|
268
|
-
|
|
236
|
+
extra: any;
|
|
269
237
|
}, {}, string, SlotsType<{
|
|
270
238
|
default?: () => VNodeChild;
|
|
271
239
|
header?: () => VNodeChild;
|
|
272
|
-
|
|
273
|
-
actions?: () => VNodeChild;
|
|
240
|
+
extra?: () => VNodeChild;
|
|
274
241
|
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
275
242
|
Header: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
276
|
-
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `
|
|
243
|
+
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `extra` 那一行(无标题的区域头,见组件头注释);要给完全自定义的头走 `header` 插槽。 */
|
|
277
244
|
title: {
|
|
278
245
|
type: StringConstructor;
|
|
279
246
|
default: undefined;
|
|
280
247
|
};
|
|
281
|
-
/**
|
|
282
|
-
|
|
283
|
-
type: PropType<any>;
|
|
284
|
-
default: undefined;
|
|
285
|
-
};
|
|
286
|
-
/** 本区域的操作位(新建 / 刷新等);节点或返回节点的函数 */
|
|
287
|
-
actions: {
|
|
248
|
+
/** 区域头右端的自由位(本区域的筛选 / 操作都放这里);节点或返回节点的函数 */
|
|
249
|
+
extra: {
|
|
288
250
|
type: PropType<any>;
|
|
289
251
|
default: undefined;
|
|
290
252
|
};
|
|
@@ -294,18 +256,13 @@ export declare const Panel: {
|
|
|
294
256
|
default: undefined;
|
|
295
257
|
};
|
|
296
258
|
}>, () => VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
297
|
-
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `
|
|
259
|
+
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `extra` 那一行(无标题的区域头,见组件头注释);要给完全自定义的头走 `header` 插槽。 */
|
|
298
260
|
title: {
|
|
299
261
|
type: StringConstructor;
|
|
300
262
|
default: undefined;
|
|
301
263
|
};
|
|
302
|
-
/**
|
|
303
|
-
|
|
304
|
-
type: PropType<any>;
|
|
305
|
-
default: undefined;
|
|
306
|
-
};
|
|
307
|
-
/** 本区域的操作位(新建 / 刷新等);节点或返回节点的函数 */
|
|
308
|
-
actions: {
|
|
264
|
+
/** 区域头右端的自由位(本区域的筛选 / 操作都放这里);节点或返回节点的函数 */
|
|
265
|
+
extra: {
|
|
309
266
|
type: PropType<any>;
|
|
310
267
|
default: undefined;
|
|
311
268
|
};
|
|
@@ -316,15 +273,13 @@ export declare const Panel: {
|
|
|
316
273
|
};
|
|
317
274
|
}>> & Readonly<{}>, {
|
|
318
275
|
padding: Padding;
|
|
319
|
-
toolbar: any;
|
|
320
276
|
title: string;
|
|
321
|
-
|
|
277
|
+
extra: any;
|
|
322
278
|
}, SlotsType<{
|
|
323
279
|
header?: () => VNodeChild;
|
|
324
280
|
/** 自定义标题节点(替代 `title` 属性;标题里要放图标 / 计数 / 状态点时用它) */
|
|
325
281
|
title?: () => VNodeChild;
|
|
326
|
-
|
|
327
|
-
actions?: () => VNodeChild;
|
|
282
|
+
extra?: () => VNodeChild;
|
|
328
283
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
329
284
|
Body: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
330
285
|
/** 内容区内距(与根件同一口径);缺省 0 = 内容贴面板边(页面里的区域通常如此) */
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, h, createVNode } from "vue";
|
|
2
2
|
import { mergePartStyle, partPaddingStyle } from "../part-padding.js";
|
|
3
3
|
const PanelHeader = /* @__PURE__ */ defineComponent({
|
|
4
4
|
name: "PanelHeader",
|
|
5
5
|
inheritAttrs: false,
|
|
6
6
|
props: {
|
|
7
|
-
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `
|
|
7
|
+
/** 面板标题;缺省时**不渲染标题节点**,但仍会渲染 `extra` 那一行(无标题的区域头,见组件头注释);要给完全自定义的头走 `header` 插槽。 */
|
|
8
8
|
title: {
|
|
9
9
|
type: String,
|
|
10
10
|
default: void 0
|
|
11
11
|
},
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
type: [Function, Object, Array, String],
|
|
15
|
-
default: void 0
|
|
16
|
-
},
|
|
17
|
-
/** 本区域的操作位(新建 / 刷新等);节点或返回节点的函数 */
|
|
18
|
-
actions: {
|
|
12
|
+
/** 区域头右端的自由位(本区域的筛选 / 操作都放这里);节点或返回节点的函数 */
|
|
13
|
+
extra: {
|
|
19
14
|
type: [Function, Object, Array, String],
|
|
20
15
|
default: void 0
|
|
21
16
|
},
|
|
@@ -36,8 +31,7 @@ const PanelHeader = /* @__PURE__ */ defineComponent({
|
|
|
36
31
|
return propValue;
|
|
37
32
|
};
|
|
38
33
|
return () => {
|
|
39
|
-
const
|
|
40
|
-
const actions = renderSlotValue(slots.actions, props.actions);
|
|
34
|
+
const extra = renderSlotValue(slots.extra, props.extra);
|
|
41
35
|
if (slots.header) {
|
|
42
36
|
const custom = slots.header();
|
|
43
37
|
const paddingStyle = partPaddingStyle(props.padding);
|
|
@@ -45,19 +39,15 @@ const PanelHeader = /* @__PURE__ */ defineComponent({
|
|
|
45
39
|
"style": paddingStyle
|
|
46
40
|
}, [custom]);
|
|
47
41
|
}
|
|
48
|
-
if (!props.title && !slots.title && !
|
|
42
|
+
if (!props.title && !slots.title && !extra) return null;
|
|
49
43
|
return createVNode("div", {
|
|
50
44
|
"class": ["mh-panel__header", attrs.class].filter(Boolean).join(" "),
|
|
51
45
|
"style": mergePartStyle(attrs.style, props.padding)
|
|
52
46
|
}, [slots.title || props.title ? createVNode("span", {
|
|
53
47
|
"class": "mh-panel__header-title"
|
|
54
|
-
}, [slots.title ? slots.title() : props.title]) : null, createVNode("div", {
|
|
55
|
-
"class": "mh-panel__header-
|
|
56
|
-
}, [
|
|
57
|
-
"class": "mh-panel__header-toolbar"
|
|
58
|
-
}, [toolbar]) : null, actions ? createVNode("div", {
|
|
59
|
-
"class": "mh-panel__header-actions"
|
|
60
|
-
}, [actions]) : null])]);
|
|
48
|
+
}, [slots.title ? slots.title() : props.title]) : null, extra ? createVNode("div", {
|
|
49
|
+
"class": "mh-panel__header-extra"
|
|
50
|
+
}, [extra]) : null]);
|
|
61
51
|
};
|
|
62
52
|
}
|
|
63
53
|
});
|
|
@@ -130,13 +120,8 @@ const PanelRoot = /* @__PURE__ */ defineComponent({
|
|
|
130
120
|
type: String,
|
|
131
121
|
default: void 0
|
|
132
122
|
},
|
|
133
|
-
/**
|
|
134
|
-
|
|
135
|
-
type: [Function, Object, Array, String],
|
|
136
|
-
default: void 0
|
|
137
|
-
},
|
|
138
|
-
/** 简写操作位:等价于内建 `Panel.Header` 的 actions */
|
|
139
|
-
actions: {
|
|
123
|
+
/** 简写右端自由位:等价于内建 `Panel.Header` 的 extra */
|
|
124
|
+
extra: {
|
|
140
125
|
type: [Function, Object, Array, String],
|
|
141
126
|
default: void 0
|
|
142
127
|
},
|
|
@@ -160,12 +145,13 @@ const PanelRoot = /* @__PURE__ */ defineComponent({
|
|
|
160
145
|
footer,
|
|
161
146
|
rest
|
|
162
147
|
} = splitParts(children);
|
|
163
|
-
const hasBuiltinHeader = !!props.title || !slots.header && (props.
|
|
164
|
-
const headerNode = header.length > 0 ? header : hasBuiltinHeader ?
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
148
|
+
const hasBuiltinHeader = !!props.title || !slots.header && (props.extra !== void 0 || !!slots.extra);
|
|
149
|
+
const headerNode = header.length > 0 ? header : hasBuiltinHeader ? h(PanelHeader, {
|
|
150
|
+
title: props.title,
|
|
151
|
+
extra: props.extra
|
|
152
|
+
}, {
|
|
153
|
+
extra: slots.extra
|
|
154
|
+
}) : slots.header?.() ?? null;
|
|
169
155
|
const bodyNode = body.length > 0 ? body : rest.length > 0 ? h(PanelBody, null, {
|
|
170
156
|
default: () => rest
|
|
171
157
|
}) : null;
|