|
@@ -5,6 +5,7 @@
|
|
|
title="试卷预览"
|
|
|
:can-resize="'can-resize2'"
|
|
|
:modal="false"
|
|
|
+ :width="'300px'"
|
|
|
class="preview-dialog"
|
|
|
>
|
|
|
<div class="preview-content" :class="{ 'is-big': isBig }">
|
|
@@ -24,32 +25,46 @@ const props = defineProps<{
|
|
|
}>()
|
|
|
const visible = useVModel(props)
|
|
|
</script>
|
|
|
-
|
|
|
+<style lang="scss">
|
|
|
+.preview-dialog {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .el-dialog__body {
|
|
|
+ flex: 1;
|
|
|
+ .preview-content {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
<style scoped lang="scss">
|
|
|
.preview-dialog {
|
|
|
- margin-left: 70%;
|
|
|
+ // margin-left: 70%;
|
|
|
.preview-content {
|
|
|
width: 100%;
|
|
|
- min-width: 250px;
|
|
|
+ // min-width: 250px;
|
|
|
// max-width: 400px;
|
|
|
text-align: center;
|
|
|
- min-height: 40vh;
|
|
|
+ // min-height: 40vh;
|
|
|
// max-height: 600px;
|
|
|
// max-height: calc(50vh - 50px);
|
|
|
+ // height: 50vh;
|
|
|
+ // width: 300px;
|
|
|
overflow: auto;
|
|
|
- &.is-big {
|
|
|
- max-width: 50vw;
|
|
|
- height: calc(100vh - 50px);
|
|
|
- img {
|
|
|
- width: auto;
|
|
|
- height: 99%;
|
|
|
- }
|
|
|
- }
|
|
|
+ // &.is-big {
|
|
|
+ // max-width: 50vw;
|
|
|
+ // height: calc(100vh - 50px);
|
|
|
+ // img {
|
|
|
+ // width: auto;
|
|
|
+ // height: 99%;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
img {
|
|
|
- // width: 100%;
|
|
|
- // height: 100%;
|
|
|
- height: calc(50vh - 50px);
|
|
|
- width: auto;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ // height: calc(50vh - 50px);
|
|
|
+ // width: auto;
|
|
|
object-fit: contain;
|
|
|
}
|
|
|
}
|