This repository was archived by the owner on Jan 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 16
16
:style =" styles"
17
17
>
18
18
<GDialogContent
19
- :width =" width"
20
19
:max-width =" maxWidth"
20
+ :width =" width"
21
+ :height =" height"
21
22
:scrollable =" scrollable"
22
23
:depressed =" depressed"
23
24
>
@@ -89,6 +90,11 @@ export default defineComponent({
89
90
default: ' auto' ,
90
91
},
91
92
93
+ height: {
94
+ type: [String , Number ],
95
+ default: ' auto' ,
96
+ },
97
+
92
98
scrollable: {
93
99
type: Boolean ,
94
100
default: false ,
Original file line number Diff line number Diff line change 6
6
7
7
<script lang="ts">
8
8
import { computed , defineComponent } from ' vue'
9
- import { useWidthStyle } from ' ../composable/widthStyle '
9
+ import { useSizeStyle } from ' ../composable/sizeStyle '
10
10
11
11
export default defineComponent ({
12
12
name: ' GDialogContent' ,
@@ -21,6 +21,11 @@ export default defineComponent({
21
21
default: ' auto' ,
22
22
},
23
23
24
+ height: {
25
+ type: [String , Number ],
26
+ default: ' auto' ,
27
+ },
28
+
24
29
scrollable: {
25
30
type: Boolean ,
26
31
default: false ,
@@ -36,7 +41,7 @@ export default defineComponent({
36
41
},
37
42
38
43
setup(props ) {
39
- const { widthStyles : styles } = useWidthStyle (props )
44
+ const { sizeStyles : styles } = useSizeStyle (props )
40
45
const classes = computed (() => [
41
46
' q-dialog-content' ,
42
47
{
Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ import { computed } from 'vue'
3
3
// helpers
4
4
import { convertToUnit } from '../helper'
5
5
6
- export interface WidthProps {
6
+ export interface SizeProps {
7
7
maxWidth ?: number | string
8
8
width ?: number | string
9
+ height ?: number | string
9
10
}
10
11
11
- export const useWidthStyle = ( props : WidthProps ) => {
12
- const widthStyles = computed ( ( ) => ( {
12
+ export const useSizeStyle = ( props : SizeProps ) => {
13
+ const sizeStyles = computed ( ( ) => ( {
13
14
maxWidth :
14
15
props . maxWidth === 'none'
15
16
? undefined
@@ -19,9 +20,14 @@ export const useWidthStyle = (props: WidthProps) => {
19
20
props . width === 'auto'
20
21
? undefined
21
22
: convertToUnit ( props . width ) ,
23
+
24
+ height :
25
+ props . height === 'auto'
26
+ ? undefined
27
+ : convertToUnit ( props . height ) ,
22
28
} ) )
23
29
24
30
return {
25
- widthStyles ,
31
+ sizeStyles ,
26
32
}
27
33
}
You can’t perform that action at this time.
0 commit comments