Browse Source

bug:WMS、SCP中所有弹出页最大化后,宽度和高度都要展示到显示器的最大宽度和高度

master_hella_20240701
wangyufei 4 months ago
parent
commit
b303726d65
  1. 7
      src/components/BasicForm/src/BasicForm.vue
  2. 5
      src/components/Dialog/src/Dialog.vue

7
src/components/BasicForm/src/BasicForm.vue

@ -5,10 +5,11 @@
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
@updateFullscreen="updateFullscreen"
>
<div
style="max-height: 60vh;overflow-y: auto;">
style="overflow-y: auto;" :style="{'height':formHeight}">
<Form
ref="formRef"
:rules="rules"
@ -329,6 +330,10 @@ if (props.basicFormWidth) {
} else {
dialogWidth.value = props.isBusiness ? '60%' : '40%'
}
const formHeight = ref('60vh')
const updateFullscreen = (isFullscreen)=>{
formHeight.value = isFullscreen?'auto':'60vh'
}
const dialogVisible = ref(false) //
const dialogTitle = ref('') //

5
src/components/Dialog/src/Dialog.vue

@ -3,6 +3,10 @@ import { propTypes } from '@/utils/propTypes'
import { isNumber } from '@/utils/is'
defineOptions({ name: 'Dialog' })
//
const emit = defineEmits([
'updateFullscreen'
])
const slots = useSlots()
const props = defineProps({
@ -32,6 +36,7 @@ const isFullscreen = ref(false)
const toggleFull = () => {
isFullscreen.value = !unref(isFullscreen)
emit('updateFullscreen',isFullscreen.value)
}
const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)

Loading…
Cancel
Save