@manohub/ui 1.2.4 → 1.2.6
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/components/code-block/index.d.ts +71 -5
- package/dist/components/code-block/index.js +19 -2
- package/dist/components/layout/index.d.ts +392 -0
- package/dist/components/layout/index.js +125 -8
- package/dist/components/part-padding.d.ts +18 -0
- package/dist/components/part-padding.js +25 -0
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/select-tree-filter.d.ts +3 -1
- package/dist/components/select/select-tree-filter.js +7 -4
- package/dist/components/select/select-tree.d.ts +2 -2
- package/dist/components/select/select-tree.js +1 -1
- package/dist/components/table/index.d.ts +4 -4
- package/dist/components/table/index.js +3 -3
- package/dist/components/text/index.d.ts +18 -0
- package/dist/components/text/index.js +6 -1
- package/dist/styles/components/code-block.css +228 -206
- package/dist/styles/components/layout.css +268 -181
- package/dist/styles/components/text.css +125 -102
- package/package.json +2 -2
|
@@ -13,6 +13,8 @@ export interface CodeViewProps {
|
|
|
13
13
|
copyable?: boolean;
|
|
14
14
|
/** 最大高度(数字按 px):超出后**块内滚动**,用于长日志 / 长配置 */
|
|
15
15
|
maxHeight?: string | number;
|
|
16
|
+
/** 撑满父容器(`true` 与 `'parent'` 等价);与 `Table.fill` 同口径 */
|
|
17
|
+
fill?: boolean;
|
|
16
18
|
/** 允许软换行(缺省保持 `pre` 的横向不换行 + 横向滚动) */
|
|
17
19
|
wrap?: boolean;
|
|
18
20
|
/** 复制结果回调:`true` = 真的写进剪贴板了 */
|
|
@@ -64,6 +66,11 @@ export declare const CodeView: import("vue").DefineComponent<import("vue").Extra
|
|
|
64
66
|
type: PropType<string | number>;
|
|
65
67
|
default: undefined;
|
|
66
68
|
};
|
|
69
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre` 吃满 */
|
|
70
|
+
fill: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
67
74
|
wrap: {
|
|
68
75
|
type: BooleanConstructor;
|
|
69
76
|
default: boolean;
|
|
@@ -97,6 +104,11 @@ export declare const CodeView: import("vue").DefineComponent<import("vue").Extra
|
|
|
97
104
|
type: PropType<string | number>;
|
|
98
105
|
default: undefined;
|
|
99
106
|
};
|
|
107
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre` 吃满 */
|
|
108
|
+
fill: {
|
|
109
|
+
type: BooleanConstructor;
|
|
110
|
+
default: boolean;
|
|
111
|
+
};
|
|
100
112
|
wrap: {
|
|
101
113
|
type: BooleanConstructor;
|
|
102
114
|
default: boolean;
|
|
@@ -106,6 +118,7 @@ export declare const CodeView: import("vue").DefineComponent<import("vue").Extra
|
|
|
106
118
|
default: undefined;
|
|
107
119
|
};
|
|
108
120
|
}>> & Readonly<{}>, {
|
|
121
|
+
fill: boolean;
|
|
109
122
|
inline: boolean;
|
|
110
123
|
wrap: boolean;
|
|
111
124
|
code: string;
|
|
@@ -136,6 +149,8 @@ export interface CodeEditorProps {
|
|
|
136
149
|
autoSize?: boolean | CodeEditorAutoSize;
|
|
137
150
|
/** 最大高度(数字按 px):超出后**框内滚动** */
|
|
138
151
|
maxHeight?: string | number;
|
|
152
|
+
/** 撑满父容器(`true` 与 `'parent'` 等价);与 `Table.fill` 同口径 */
|
|
153
|
+
fill?: boolean;
|
|
139
154
|
/** 只读态(原生 `readonly`:仍可选中、可滚动、可复制,只是不可改) */
|
|
140
155
|
readonly?: boolean;
|
|
141
156
|
/** 禁用态 */
|
|
@@ -190,6 +205,11 @@ export declare const CodeEditor: import("vue").DefineComponent<import("vue").Ext
|
|
|
190
205
|
type: PropType<string | number>;
|
|
191
206
|
default: undefined;
|
|
192
207
|
};
|
|
208
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
209
|
+
fill: {
|
|
210
|
+
type: BooleanConstructor;
|
|
211
|
+
default: boolean;
|
|
212
|
+
};
|
|
193
213
|
readonly: {
|
|
194
214
|
type: BooleanConstructor;
|
|
195
215
|
default: boolean;
|
|
@@ -233,6 +253,11 @@ export declare const CodeEditor: import("vue").DefineComponent<import("vue").Ext
|
|
|
233
253
|
type: PropType<string | number>;
|
|
234
254
|
default: undefined;
|
|
235
255
|
};
|
|
256
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
257
|
+
fill: {
|
|
258
|
+
type: BooleanConstructor;
|
|
259
|
+
default: boolean;
|
|
260
|
+
};
|
|
236
261
|
readonly: {
|
|
237
262
|
type: BooleanConstructor;
|
|
238
263
|
default: boolean;
|
|
@@ -252,15 +277,16 @@ export declare const CodeEditor: import("vue").DefineComponent<import("vue").Ext
|
|
|
252
277
|
}>> & Readonly<{
|
|
253
278
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
254
279
|
}>, {
|
|
280
|
+
fill: boolean;
|
|
255
281
|
disabled: boolean;
|
|
256
282
|
onChange: (v: string) => void;
|
|
257
283
|
defaultValue: string;
|
|
284
|
+
maxHeight: string | number;
|
|
258
285
|
placeholder: string;
|
|
259
286
|
rows: number;
|
|
260
287
|
modelValue: string;
|
|
261
288
|
readonly: boolean;
|
|
262
289
|
autoSize: boolean | CodeEditorAutoSize;
|
|
263
|
-
maxHeight: string | number;
|
|
264
290
|
language: string;
|
|
265
291
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
266
292
|
/** `CodeBlock` 的 props:**两形态的并集** + 切换开关(按 `editable` 分两组,见各条说明) */
|
|
@@ -348,11 +374,17 @@ export declare const CodeBlock: {
|
|
|
348
374
|
type: PropType<string | number>;
|
|
349
375
|
default: undefined;
|
|
350
376
|
};
|
|
377
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
378
|
+
fill: {
|
|
379
|
+
type: BooleanConstructor;
|
|
380
|
+
default: boolean;
|
|
381
|
+
};
|
|
351
382
|
}>> & Readonly<{
|
|
352
383
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
353
384
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
354
385
|
'update:modelValue': (v: string) => true;
|
|
355
386
|
}, import("vue").PublicProps, {
|
|
387
|
+
fill: boolean;
|
|
356
388
|
inline: boolean;
|
|
357
389
|
wrap: boolean;
|
|
358
390
|
disabled: boolean;
|
|
@@ -361,12 +393,12 @@ export declare const CodeBlock: {
|
|
|
361
393
|
onChange: (v: string) => void;
|
|
362
394
|
plain: boolean;
|
|
363
395
|
defaultValue: string;
|
|
396
|
+
maxHeight: string | number;
|
|
364
397
|
placeholder: string;
|
|
365
398
|
rows: number;
|
|
366
399
|
modelValue: string;
|
|
367
400
|
readonly: boolean;
|
|
368
401
|
autoSize: boolean | CodeEditorAutoSize;
|
|
369
|
-
maxHeight: string | number;
|
|
370
402
|
language: string;
|
|
371
403
|
copyable: boolean;
|
|
372
404
|
editable: boolean;
|
|
@@ -448,9 +480,15 @@ export declare const CodeBlock: {
|
|
|
448
480
|
type: PropType<string | number>;
|
|
449
481
|
default: undefined;
|
|
450
482
|
};
|
|
483
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
484
|
+
fill: {
|
|
485
|
+
type: BooleanConstructor;
|
|
486
|
+
default: boolean;
|
|
487
|
+
};
|
|
451
488
|
}>> & Readonly<{
|
|
452
489
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
453
490
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
491
|
+
fill: boolean;
|
|
454
492
|
inline: boolean;
|
|
455
493
|
wrap: boolean;
|
|
456
494
|
disabled: boolean;
|
|
@@ -459,12 +497,12 @@ export declare const CodeBlock: {
|
|
|
459
497
|
onChange: (v: string) => void;
|
|
460
498
|
plain: boolean;
|
|
461
499
|
defaultValue: string;
|
|
500
|
+
maxHeight: string | number;
|
|
462
501
|
placeholder: string;
|
|
463
502
|
rows: number;
|
|
464
503
|
modelValue: string;
|
|
465
504
|
readonly: boolean;
|
|
466
505
|
autoSize: boolean | CodeEditorAutoSize;
|
|
467
|
-
maxHeight: string | number;
|
|
468
506
|
language: string;
|
|
469
507
|
copyable: boolean;
|
|
470
508
|
editable: boolean;
|
|
@@ -541,11 +579,17 @@ export declare const CodeBlock: {
|
|
|
541
579
|
type: PropType<string | number>;
|
|
542
580
|
default: undefined;
|
|
543
581
|
};
|
|
582
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
583
|
+
fill: {
|
|
584
|
+
type: BooleanConstructor;
|
|
585
|
+
default: boolean;
|
|
586
|
+
};
|
|
544
587
|
}>> & Readonly<{
|
|
545
588
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
546
589
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
547
590
|
'update:modelValue': (v: string) => true;
|
|
548
591
|
}, string, {
|
|
592
|
+
fill: boolean;
|
|
549
593
|
inline: boolean;
|
|
550
594
|
wrap: boolean;
|
|
551
595
|
disabled: boolean;
|
|
@@ -554,12 +598,12 @@ export declare const CodeBlock: {
|
|
|
554
598
|
onChange: (v: string) => void;
|
|
555
599
|
plain: boolean;
|
|
556
600
|
defaultValue: string;
|
|
601
|
+
maxHeight: string | number;
|
|
557
602
|
placeholder: string;
|
|
558
603
|
rows: number;
|
|
559
604
|
modelValue: string;
|
|
560
605
|
readonly: boolean;
|
|
561
606
|
autoSize: boolean | CodeEditorAutoSize;
|
|
562
|
-
maxHeight: string | number;
|
|
563
607
|
language: string;
|
|
564
608
|
copyable: boolean;
|
|
565
609
|
editable: boolean;
|
|
@@ -591,6 +635,11 @@ export declare const CodeBlock: {
|
|
|
591
635
|
type: PropType<string | number>;
|
|
592
636
|
default: undefined;
|
|
593
637
|
};
|
|
638
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre` 吃满 */
|
|
639
|
+
fill: {
|
|
640
|
+
type: BooleanConstructor;
|
|
641
|
+
default: boolean;
|
|
642
|
+
};
|
|
594
643
|
wrap: {
|
|
595
644
|
type: BooleanConstructor;
|
|
596
645
|
default: boolean;
|
|
@@ -624,6 +673,11 @@ export declare const CodeBlock: {
|
|
|
624
673
|
type: PropType<string | number>;
|
|
625
674
|
default: undefined;
|
|
626
675
|
};
|
|
676
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre` 吃满 */
|
|
677
|
+
fill: {
|
|
678
|
+
type: BooleanConstructor;
|
|
679
|
+
default: boolean;
|
|
680
|
+
};
|
|
627
681
|
wrap: {
|
|
628
682
|
type: BooleanConstructor;
|
|
629
683
|
default: boolean;
|
|
@@ -633,6 +687,7 @@ export declare const CodeBlock: {
|
|
|
633
687
|
default: undefined;
|
|
634
688
|
};
|
|
635
689
|
}>> & Readonly<{}>, {
|
|
690
|
+
fill: boolean;
|
|
636
691
|
inline: boolean;
|
|
637
692
|
wrap: boolean;
|
|
638
693
|
code: string;
|
|
@@ -669,6 +724,11 @@ export declare const CodeBlock: {
|
|
|
669
724
|
type: PropType<string | number>;
|
|
670
725
|
default: undefined;
|
|
671
726
|
};
|
|
727
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
728
|
+
fill: {
|
|
729
|
+
type: BooleanConstructor;
|
|
730
|
+
default: boolean;
|
|
731
|
+
};
|
|
672
732
|
readonly: {
|
|
673
733
|
type: BooleanConstructor;
|
|
674
734
|
default: boolean;
|
|
@@ -712,6 +772,11 @@ export declare const CodeBlock: {
|
|
|
712
772
|
type: PropType<string | number>;
|
|
713
773
|
default: undefined;
|
|
714
774
|
};
|
|
775
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
776
|
+
fill: {
|
|
777
|
+
type: BooleanConstructor;
|
|
778
|
+
default: boolean;
|
|
779
|
+
};
|
|
715
780
|
readonly: {
|
|
716
781
|
type: BooleanConstructor;
|
|
717
782
|
default: boolean;
|
|
@@ -731,15 +796,16 @@ export declare const CodeBlock: {
|
|
|
731
796
|
}>> & Readonly<{
|
|
732
797
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
733
798
|
}>, {
|
|
799
|
+
fill: boolean;
|
|
734
800
|
disabled: boolean;
|
|
735
801
|
onChange: (v: string) => void;
|
|
736
802
|
defaultValue: string;
|
|
803
|
+
maxHeight: string | number;
|
|
737
804
|
placeholder: string;
|
|
738
805
|
rows: number;
|
|
739
806
|
modelValue: string;
|
|
740
807
|
readonly: boolean;
|
|
741
808
|
autoSize: boolean | CodeEditorAutoSize;
|
|
742
|
-
maxHeight: string | number;
|
|
743
809
|
language: string;
|
|
744
810
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
745
811
|
};
|
|
@@ -31,6 +31,11 @@ const CodeView = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
type: [String, Number],
|
|
32
32
|
default: void 0
|
|
33
33
|
},
|
|
34
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre` 吃满 */
|
|
35
|
+
fill: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
34
39
|
wrap: {
|
|
35
40
|
type: Boolean,
|
|
36
41
|
default: false
|
|
@@ -87,7 +92,7 @@ const CodeView = /* @__PURE__ */ defineComponent({
|
|
|
87
92
|
overflow: "auto"
|
|
88
93
|
};
|
|
89
94
|
return createVNode("div", {
|
|
90
|
-
"class": ["mh-code-block", props.wrap ? "mh-code-block--wrap" : "", extra].filter(Boolean).join(" "),
|
|
95
|
+
"class": ["mh-code-block", props.wrap ? "mh-code-block--wrap" : "", props.fill ? "mh-code-block--fill" : "", extra].filter(Boolean).join(" "),
|
|
91
96
|
"style": style
|
|
92
97
|
}, [createVNode("pre", {
|
|
93
98
|
"class": "mh-code-block__view",
|
|
@@ -136,6 +141,11 @@ const CodeEditor = /* @__PURE__ */ defineComponent({
|
|
|
136
141
|
type: [String, Number],
|
|
137
142
|
default: void 0
|
|
138
143
|
},
|
|
144
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
145
|
+
fill: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false
|
|
148
|
+
},
|
|
139
149
|
readonly: {
|
|
140
150
|
type: Boolean,
|
|
141
151
|
default: false
|
|
@@ -188,7 +198,7 @@ const CodeEditor = /* @__PURE__ */ defineComponent({
|
|
|
188
198
|
});
|
|
189
199
|
};
|
|
190
200
|
return () => createVNode("div", {
|
|
191
|
-
"class": ["mh-code-block", "mh-code-block--editable", attrs.class].filter(Boolean).join(" "),
|
|
201
|
+
"class": ["mh-code-block", "mh-code-block--editable", props.fill ? "mh-code-block--fill" : "", attrs.class].filter(Boolean).join(" "),
|
|
192
202
|
"style": attrs.style
|
|
193
203
|
}, [createVNode("textarea", {
|
|
194
204
|
"class": "mh-code-block__editor",
|
|
@@ -281,6 +291,11 @@ const CodeBlockBase = /* @__PURE__ */ defineComponent({
|
|
|
281
291
|
maxHeight: {
|
|
282
292
|
type: [String, Number],
|
|
283
293
|
default: void 0
|
|
294
|
+
},
|
|
295
|
+
/** 撑满父容器:根 `height:100%` + 内层 `pre`/`textarea` 吃满 */
|
|
296
|
+
fill: {
|
|
297
|
+
type: Boolean,
|
|
298
|
+
default: false
|
|
284
299
|
}
|
|
285
300
|
},
|
|
286
301
|
emits: {
|
|
@@ -297,6 +312,8 @@ const CodeBlockBase = /* @__PURE__ */ defineComponent({
|
|
|
297
312
|
const shared = {
|
|
298
313
|
language: props.language,
|
|
299
314
|
maxHeight: props.maxHeight,
|
|
315
|
+
/* ⚠️ `fill` 必须在这儿透传:本件是薄壳,props 不透传给成员件;漏一条就是「`<CodeBlock fill>` 静默无效」。 */
|
|
316
|
+
fill: props.fill,
|
|
300
317
|
class: attrs.class,
|
|
301
318
|
style: attrs.style
|
|
302
319
|
};
|