File tree Expand file tree Collapse file tree 2 files changed +35
-22
lines changed Expand file tree Collapse file tree 2 files changed +35
-22
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ directive is required.
132
132
| ` help-text ` | Command help | ` String ` | ` '' ` | No | Yes |
133
133
| ` help-timeout ` | Command help timeout | ` Number ` | ` 3000 ` | No | No |
134
134
| ` hide-bar ` | Hides the bar | ` Boolean ` | ` false ` | No | No |
135
+ | ` hide-buttons ` | Hides the buttons | ` Boolean ` | ` false ` | No | No |
135
136
| ` hide-prompt ` | Hides the prompt | ` Boolean ` | ` false ` | No | No |
136
137
| ` hide-title ` | Hides the title | ` Boolean ` | ` false ` | No | No |
137
138
| ` history ` | Terminal history | ` Array ` | ` [] ` | No | Yes |
@@ -201,7 +202,8 @@ classes. Example:
201
202
202
203
### Buttons
203
204
204
- Inside the bar, you can customize the buttons. Example:
205
+ Inside the bar, you can customize the buttons. If you use this slot,
206
+ ` hideButtons ` property has no effect. Example:
205
207
206
208
``` vue
207
209
<vue-command>
Original file line number Diff line number Diff line change 6
6
'vue-command--invert': invert
7
7
}" >
8
8
<!-- Bar -->
9
- <slot name =" bar" >
9
+ <slot
10
+ v-if =" !hideBar"
11
+ name =" bar" >
10
12
<div
11
- v-if =" !hideBar"
12
13
:class =" {
13
14
'vue-command__bar': !invert,
14
15
'vue-command__bar--invert': invert
15
16
}" >
16
17
<div >
17
- <slot name =" buttons" >
18
+ <slot
19
+ v-if =" !hideButtons"
20
+ name =" buttons" >
18
21
<span
19
22
:class =" {
20
23
'vue-command__bar__button': !invert,
42
45
</slot >
43
46
</div >
44
47
<div >
45
- <slot name =" title" >
48
+ <slot
49
+ v-if =" !hideTitle"
50
+ name =" title" >
46
51
<span
47
- v-if =" !hideTitle"
48
52
:class =" {
49
53
'vue-command__bar__title': !invert,
50
54
'vue-command__bar__title--invert': invert
51
55
}" >{{ title }}</span >
52
56
</slot >
53
57
</div >
54
- <div / >
58
+ <div > & #8203 ; </ div >
55
59
</div >
56
60
</slot >
57
61
@@ -179,6 +183,12 @@ const props = defineProps({
179
183
type: Boolean
180
184
},
181
185
186
+ hideButtons: {
187
+ default: false ,
188
+ required: false ,
189
+ type: Boolean
190
+ },
191
+
182
192
hidePrompt: {
183
193
default: false ,
184
194
required: false ,
@@ -583,20 +593,21 @@ defineExpose({
583
593
}
584
594
}
585
595
586
- overflow-y : hidden ;
587
596
overflow-x : hidden ;
597
+ overflow-y : hidden ;
588
598
589
599
.vue-command__bar ,
590
600
.vue-command__bar--invert {
591
601
@include clearfix ();
592
- position : inherit ;
602
+
603
+ display : flex ;
604
+ font-family : -apple-system , BlinkMacSystemFont, sans-serif ;
605
+ justify-content : space-between ;
606
+ padding-bottom : 10px ;
593
607
padding-left : 10px ;
594
608
padding-right : 10px ;
595
609
padding-top : 10px ;
596
- padding-bottom : 10px ;
597
- display : flex ;
598
- justify-content : space-between ;
599
- font-family : -apple-system , BlinkMacSystemFont, sans-serif ;
610
+ position : inherit ;
600
611
}
601
612
602
613
.vue-command__bar__button ,
@@ -618,32 +629,32 @@ defineExpose({
618
629
619
630
.vue-command__history--invert ,
620
631
.vue-command__history {
621
- overflow : auto ;
622
- word-break : break-all ;
623
632
display : block ;
624
- padding : 12px 12px 12px 12px ;
633
+ height : 100% ;
634
+ line-height : 1.33 ;
625
635
margin : 0 ;
636
+ overflow : auto ;
637
+ padding : 12px 12px 12px 12px ;
626
638
white-space : pre-line ;
627
- line-height : 1.33 ;
628
- height : 100% ;
639
+ word-break : break-all ;
629
640
630
641
/* Provide reasonable default values */
631
642
ul {
643
+ list-style-type : none ;
632
644
margin : 0 ;
633
645
padding : 0 ;
634
- list-style-type : none ;
635
646
}
636
647
637
648
input ,
638
649
textarea {
639
650
background : none ;
640
651
border : none ;
641
- outline : none ;
642
652
flex : 1 ;
643
653
font-size : 1rem ;
644
- width : 100% ;
645
- resize : none ;
654
+ outline : none ;
646
655
overflow : hidden ;
656
+ resize : none ;
657
+ width : 100% ;
647
658
}
648
659
}
649
660
You can’t perform that action at this time.
0 commit comments