Browse Source

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

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

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

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

Loading…
Cancel
Save