From 75fbfde507cd368ae3c88aa2fc434b1117bad616 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期日, 29 六月 2025 20:06:48 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- manager/src/views/kitchen/kitchenVideo.vue | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/manager/src/views/kitchen/kitchenVideo.vue b/manager/src/views/kitchen/kitchenVideo.vue index 40e7079..c6b2b7f 100644 --- a/manager/src/views/kitchen/kitchenVideo.vue +++ b/manager/src/views/kitchen/kitchenVideo.vue @@ -252,9 +252,12 @@ @on-selection-change="showSelect" > <template slot-scope="{ row, index }" slot="typeList"> - <div v-for="(tag, index) in row.typeList" :key="'tag' + index" style="margin-top: 5px"> - <Tag color="red">{{ tag.typeName }}</Tag> + <div style="display: flex;flex-wrap: wrap"> + <div v-for="(tag, index) in row.typeList" :key="'tag' + index" style="margin-top: 5px"> + <Tag color="red">{{ tag.typeName }}</Tag> + </div> </div> + </template> <template slot-scope="{ row, index }" slot="videoFileKey"> <div class="play-text" @click="playVideo(row.videoFileKey, row.title)">鐐瑰嚮鎾斁</div> @@ -394,7 +397,7 @@ checkKitchenType: [ { required: true, - message: '璇烽�夋嫨鍘ㄧ鏍囩', + message: '璇烽�夋嫨鍘ㄧ鏍囩涓斾笉鑳借秴杩�5涓�', trigger: 'blur', validator: (rule, value, callback) => { console.log('楠岃瘉鍊�:-------------->', value, '绫诲瀷:', typeof value); @@ -462,7 +465,7 @@ { title: "瑙嗛鍒嗙被", key: "typeList", - width: 180, + width: 310, slot: "typeList", }, { @@ -521,6 +524,7 @@ slot: "action", align: "center", width: 200, + fixed: "right", }, ], data: [], // 琛ㄥ崟鏁版嵁 @@ -581,6 +585,12 @@ this.$set(this.uploadVideoForm, 'showCoverUrl', ''); this.$set(this.uploadVideoForm, 'temp', new Date().getTime()); }, + calculateVideoFit(width, height) { + const videoRatio = width / height; + // 瑙勫垯2锛氱珫灞忚棰戯紙濡�9:16锛� + if (videoRatio < 0.8) return 'cover'; + return 'contain'; + }, //閲嶆柊涓婁紶瑙嗛 clearVideo() { this.clearCoverImage(); @@ -591,6 +601,12 @@ }, getVideoDuration(e){ const duration = this.$refs.healthVideoInfo.duration; + const videoWidth = this.$refs.healthVideoInfo.videoWidth; + const videoHeight = this.$refs.healthVideoInfo.videoHeight; + // 鏍规嵁瀹介珮姣旈�夋嫨瑙嗛濉厖妯″紡 + const fitType = this.calculateVideoFit(videoWidth, videoHeight) + this.uploadVideoForm.videoFit = fitType + console.log('------瑙嗛淇℃伅3------------>', videoWidth,videoHeight,fitType) this.uploadVideoForm.videoDuration = Math.floor(duration); }, // 瑙嗛涓婃灦 -- Gitblit v1.8.0