From 0cac9e63c68558909f7f99154c17f16f9bfc47fd Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期三, 20 十一月 2024 17:54:36 +0800 Subject: [PATCH] fixme 子组件初始化时机问题 --- src/views/fysp/check/components/CompDevicePhono.vue | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/views/fysp/check/components/CompDevicePhono.vue b/src/views/fysp/check/components/CompDevicePhono.vue index ee4f320..d1871fe 100644 --- a/src/views/fysp/check/components/CompDevicePhono.vue +++ b/src/views/fysp/check/components/CompDevicePhono.vue @@ -29,7 +29,7 @@ <el-tab-pane v-for="item in typeList" :label="item.label" :name="item.id"> </el-tab-pane> </el-tabs> <el-empty v-if="imgObjList.length == 0" description="鏆傛棤璁板綍" /> - <div class="imgs"> + <el-scrollbar v-else class="imgs"> <el-image v-for="(img, i) in imgObjList" :class="[Boolean(img.isSelect) ? 'selected' : 'noActive', 'image']" @@ -38,7 +38,7 @@ lazy @click="onSelect(img, i)" /> - </div> + </el-scrollbar> </div> </div> </template> @@ -90,9 +90,6 @@ } }, mounted() { - if (this.defaultFile == undefined || this.defaultFile == null) { - this.defaultFile = []; - } this.initImgUrlList(); }, methods: { @@ -139,11 +136,11 @@ if (this.readonly) { return; } - img.isSelect = !Boolean(img.isSelect); + img.isSelect = !img.isSelect; }, sendSelectedImg(isOk) { let result = []; - if (!Boolean(isOk)) { + if (!isOk) { this.$emit('selectPhonoEvent', result); } for (const item of this.imgPathsDataSourceCopy) { @@ -174,7 +171,7 @@ } .btns { - height: 10%; + /* height: 10%; */ } /* .img_types { @@ -189,7 +186,7 @@ } */ .imgs { - height: 370px; + height: 50vh; width: 90%; min-height: 100px !important; /* border-style:solid; @@ -258,7 +255,8 @@ padding: 5px; } -.el-dialog__body { +::v-deep .el-dialog__body { height: 60vh; + padding: 10px calc(var(--el-dialog-padding-primary) + 10px) !important; } </style> -- Gitblit v1.9.3