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 1616 :style =" styles"
1717 >
1818 <GDialogContent
19- :width =" width"
2019 :max-width =" maxWidth"
20+ :width =" width"
21+ :height =" height"
2122 :scrollable =" scrollable"
2223 :depressed =" depressed"
2324 >
@@ -89,6 +90,11 @@ export default defineComponent({
8990 default: ' auto' ,
9091 },
9192
93+ height: {
94+ type: [String , Number ],
95+ default: ' auto' ,
96+ },
97+
9298 scrollable: {
9399 type: Boolean ,
94100 default: false ,
Original file line number Diff line number Diff line change 66
77<script lang="ts">
88import { computed , defineComponent } from ' vue'
9- import { useWidthStyle } from ' ../composable/widthStyle '
9+ import { useSizeStyle } from ' ../composable/sizeStyle '
1010
1111export default defineComponent ({
1212 name: ' GDialogContent' ,
@@ -21,6 +21,11 @@ export default defineComponent({
2121 default: ' auto' ,
2222 },
2323
24+ height: {
25+ type: [String , Number ],
26+ default: ' auto' ,
27+ },
28+
2429 scrollable: {
2530 type: Boolean ,
2631 default: false ,
@@ -36,7 +41,7 @@ export default defineComponent({
3641 },
3742
3843 setup(props ) {
39- const { widthStyles : styles } = useWidthStyle (props )
44+ const { sizeStyles : styles } = useSizeStyle (props )
4045 const classes = computed (() => [
4146 ' q-dialog-content' ,
4247 {
Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ import { computed } from 'vue'
33// helpers
44import { convertToUnit } from '../helper'
55
6- export interface WidthProps {
6+ export interface SizeProps {
77 maxWidth ?: number | string
88 width ?: number | string
9+ height ?: number | string
910}
1011
11- export const useWidthStyle = ( props : WidthProps ) => {
12- const widthStyles = computed ( ( ) => ( {
12+ export const useSizeStyle = ( props : SizeProps ) => {
13+ const sizeStyles = computed ( ( ) => ( {
1314 maxWidth :
1415 props . maxWidth === 'none'
1516 ? undefined
@@ -19,9 +20,14 @@ export const useWidthStyle = (props: WidthProps) => {
1920 props . width === 'auto'
2021 ? undefined
2122 : convertToUnit ( props . width ) ,
23+
24+ height :
25+ props . height === 'auto'
26+ ? undefined
27+ : convertToUnit ( props . height ) ,
2228 } ) )
2329
2430 return {
25- widthStyles ,
31+ sizeStyles ,
2632 }
2733}
You can’t perform that action at this time.
0 commit comments