share.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. <template>
  2. <div class="share" :style="{ 'z-index': zIndex }">
  3. <!-- canvasImageUrl canvase 渲染成功后删除原始元素,避免当前页面元素太多出现卡顿 -->
  4. <div class="share-content" ref="shareContent">
  5. <!-- <div class="share-content" ref="shareContent" v-if="!canvasImageUrl"> -->
  6. <div class="header">
  7. <div class="left-icon">
  8. <img :src="require('@/assets/shareLeft.png')" />
  9. </div>
  10. <div class="right-icon">
  11. <img :src="require('@/assets/shareRight.png')" />
  12. </div>
  13. </div>
  14. <!-- 点评 -->
  15. <!-- <template v-for="item in reportTarget.reportRemarks"> -->
  16. <div
  17. class="comment summaryDay"
  18. v-if="
  19. reportRemarksIndex != -1 &&
  20. reportTarget.reportRemarks &&
  21. reportTarget.reportRemarks.length
  22. ">
  23. <div class="title-box">
  24. <div class="title">
  25. <div class="name">
  26. {{ reportTarget.reportRemarks[reportRemarksIndex].nickName }}点评
  27. </div>
  28. <div class="date">
  29. {{
  30. reportTarget.reportRemarks[reportRemarksIndex].createTime
  31. ? formatChineseDate(
  32. reportTarget.reportRemarks[reportRemarksIndex].createTime.split(' ')[0],
  33. )
  34. : ''
  35. }}
  36. </div>
  37. </div>
  38. </div>
  39. <div class="commentMessage">
  40. {{ reportTarget.reportRemarks[reportRemarksIndex].remarkContent }}
  41. </div>
  42. </div>
  43. <!-- </template> -->
  44. <!-- 内容 -->
  45. <div class="summaryDay">
  46. <div class="title-box">
  47. <div class="title">
  48. <div class="name">{{ reportTarget.nickName }}的日报</div>
  49. <div class="date">
  50. {{
  51. reportTarget.commitTime
  52. ? formatChineseDate(reportTarget.commitTime.split(' ')[0])
  53. : ''
  54. }}
  55. </div>
  56. </div>
  57. </div>
  58. <!-- 旧的日报内容 -->
  59. <template v-if="checkedPlan && reportContents && isHistory == '1'">
  60. <template v-for="value in reportContents">
  61. <div :class="['text']">{{ value.dictValue }}</div>
  62. <div class="content">{{ value.content }}</div>
  63. </template>
  64. </template>
  65. <!-- 日报指标 -->
  66. <template v-if="isTarget">
  67. <template v-if="reportTarget.targetType == '1'">
  68. <!--targetType 0-历史指标 1-动态指标,String类型 -->
  69. <shareCommonTarget
  70. :homePageIndicatorDate="reportTarget.homePageIndicatorList"></shareCommonTarget>
  71. </template>
  72. <template v-else>
  73. <!-- YFQuota:应用服务平台 不显示各项指标 -->
  74. <shareAtarget :reportInfo="reportTarget"></shareAtarget>
  75. <shareBtarget :reportInfo="reportTarget"></shareBtarget>
  76. </template>
  77. <!-- <shareAtarget :reportInfo="reportTarget"></shareAtarget>
  78. <shareBtarget :reportInfo="reportTarget"></shareBtarget> -->
  79. </template>
  80. <!-- 日报填写内容 -->
  81. <template v-if="isReportCustom">
  82. <shareReportCustom
  83. :disabled="true"
  84. :reportCustomData="reportTarget.customTaskList"></shareReportCustom>
  85. </template>
  86. <!-- 今日拜访照片 -->
  87. <template v-if="photosData && photosData.length">
  88. <div class="text">今日拜访照片</div>
  89. <div class="content-photos">
  90. <div class="imgBox" v-for="item in photosData">
  91. <img
  92. :src="'data:image/jpg;base64,' + item"
  93. crossorigin="anonymous"
  94. referrerpolicy="no-referrer"
  95. alt=""
  96. style="display: block" />
  97. </div>
  98. <!-- <template v-for="item in urlList">
  99. <img
  100. :src="item + '&' + new Date().getTime()"
  101. crossOrigin="anonymous"
  102. referrerpolicy="no-referrer"
  103. alt=""
  104. style="display: block" />
  105. </template> -->
  106. </div>
  107. </template>
  108. </div>
  109. <div class="footerShare">
  110. <div class="right-text">
  111. <div>长按识别二维码查看详情&点评</div>
  112. <!-- <div></div> -->
  113. </div>
  114. <vue-qr
  115. class="QRcodes"
  116. :callback="QRCallback"
  117. :text="vueQrText"
  118. :dotScale="0.8"
  119. :margin="8"
  120. :logoSrc="require('@/assets/logo1.png')"
  121. :logoMargin="2"></vue-qr>
  122. </div>
  123. <div class="footerTips">来自立邦好邦手</div>
  124. </div>
  125. <div
  126. class="share-mask"
  127. style="background: #000; position: fixed; top: 0; width: 100%; height: 100%"></div>
  128. <div class="html2canvasBox">
  129. <div id="html2canvas" ref="html2canvas">
  130. <div class="scroll-container">
  131. <div style="position: relative">
  132. <div class="shareHeader">
  133. <div class="shareTips">
  134. 长按图片可下载、收藏、转发
  135. <!-- <img :src="require('@/assets/shareTips.png')" alt="" /> -->
  136. </div>
  137. <!-- <div class="closeShare" @click="closeShare"><van-icon name="close" /></div> -->
  138. <div class="closeShare" @click="closeShare">返回</div>
  139. </div>
  140. <img :src="canvasImageUrl" width="100%" class="canvasImage" />
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </template>
  147. <script>
  148. import html2canvas from 'html2canvas';
  149. import { imgToBase64, shareReportMobile } from '@/api/index';
  150. import VueQr from 'vue-qr';
  151. import ShareAtarget from './shareAtarget.vue';
  152. import shareBtarget from './shareBtarget.vue';
  153. import shareReportCustom from './shareReportCustom.vue';
  154. import uploadAliOss from '@/utils/uploadAliOss';
  155. import shareCommonTarget from './shareCommonTarget.vue';
  156. export default {
  157. name: 'share',
  158. components: { VueQr, ShareAtarget, shareReportCustom, shareBtarget, shareCommonTarget },
  159. props: {
  160. // 日报数据
  161. reportTarget: {
  162. type: Object,
  163. default() {
  164. return {};
  165. },
  166. },
  167. //日报id
  168. reportId: {
  169. type: [String, Number],
  170. },
  171. // 点评数据
  172. reportRemarksIndex: {
  173. type: Number,
  174. default: -1,
  175. },
  176. // 图片转换列表
  177. urlList: {
  178. type: Array,
  179. default() {
  180. return [];
  181. },
  182. },
  183. // 是否显示 今日总结&明日规划
  184. checkedPlan: {
  185. type: Boolean,
  186. default: true,
  187. },
  188. reportContents: {
  189. type: Array,
  190. default() {
  191. return [];
  192. },
  193. },
  194. // 是否显示 指标
  195. isTarget: {
  196. type: Boolean,
  197. default: true,
  198. },
  199. // 是否显示 日报填写内容
  200. isReportCustom: {
  201. type: Boolean,
  202. default: true,
  203. },
  204. // 是否为历史汇报:0-新汇报 1-历史汇报
  205. isHistory: {
  206. type: String,
  207. default: '0',
  208. },
  209. },
  210. data() {
  211. return {
  212. canvasImageUrl: '',
  213. retryCount: 0,
  214. photosData: [],
  215. zIndex: -1,
  216. qrcode: null,
  217. vueQrText: '',
  218. heightFlag: 'start', //图片高度不足,居中显示
  219. shareDuration: 0, //分享时间
  220. shareInterval: null,
  221. };
  222. },
  223. created() {
  224. this.shareDuration = 0;
  225. this.shareInterval = setInterval(() => {
  226. this.shareDuration++;
  227. }, 1000);
  228. this.zIndex = -1;
  229. this.canvasImageUrl = '';
  230. let links = process.env.NODE_ENV == 'production' ? 'http://1.npz.cn/3/' : 'http://1.npz.cn/2/';
  231. this.vueQrText = links + this.reportId;
  232. this.toastLoading(0, '生成中...', true);
  233. },
  234. methods: {
  235. // 初始化会先执行二维码生成,成功后回调
  236. QRCallback() {
  237. // 二维码
  238. if (this.urlList.length) {
  239. imgToBase64({ urlList: this.urlList }).then((res) => {
  240. if (res.data && res.code == 200) {
  241. this.photosData = res.data;
  242. this.$nextTick(async () => {
  243. await this.htmlToCanvas();
  244. });
  245. } else {
  246. this.$toast(res.msg);
  247. this.$nextTick(async () => {
  248. await this.htmlToCanvas();
  249. });
  250. }
  251. });
  252. } else {
  253. this.$nextTick(async () => {
  254. await this.htmlToCanvas();
  255. });
  256. }
  257. },
  258. //异步执行
  259. imageUrlToBase64(imageUrl) {
  260. return new Promise((resolve, reject) => {
  261. //一定要设置为let,不然图片不显示
  262. let image = new Image();
  263. //解决跨域问题
  264. image.setAttribute('crossOrigin', 'anonymous');
  265. image.src = imageUrl;
  266. image.onload = () => {
  267. var canvas = document.createElement('canvas');
  268. canvas.width = image.width;
  269. canvas.height = image.height;
  270. var context = canvas.getContext('2d');
  271. context.drawImage(image, 0, 0, image.width, image.height);
  272. var quality = 1;
  273. //这里的dataurl就是base64类型
  274. let dataURL = canvas.toDataURL('image/png', quality); //使用toDataUrl将图片转换成jpeg的格式,不要把图片压缩成png,因为压缩成png后base64的字符串可能比不转换前的长!
  275. resolve(dataURL);
  276. };
  277. image.onerror = () => {
  278. reject(new Error('图像加载失败'));
  279. };
  280. });
  281. },
  282. filterText(index) {
  283. if (index == 0) {
  284. return '明日工作计划';
  285. } else {
  286. return '今日机会与挑战总结';
  287. }
  288. },
  289. htmlToCanvas() {
  290. html2canvas(this.$refs.shareContent, {
  291. scale: window.devicePixelRatio || 1,
  292. useCORS: true,
  293. allowTaint: false,
  294. backgroundColor: null,
  295. logging: false, // 关闭日志提升性能
  296. // onclone: (clonedDoc) => {
  297. // // 确保克隆的DOM保持原始样式
  298. // clonedDoc.getElementById('html2canvas').style.overflow = 'auto';
  299. // },
  300. // ignoreElements: (e) => {
  301. // if (
  302. // e.contains(element) ||
  303. // element.contains(e) ||
  304. // e.tagName === 'STYLE' ||
  305. // e.tagName === 'LINK' ||
  306. // e.getAttribute('data-html2canvas') != null // header里面的样式不能筛掉
  307. // ) {
  308. // console.log(e);
  309. // return false;
  310. // }
  311. // return true;
  312. // },
  313. })
  314. .then((canvas) => {
  315. this.toastLoading().clear();
  316. let imageUrl = canvas.toDataURL('image/png');
  317. this.canvasImageUrl = imageUrl;
  318. // 图片加载完成后设置滚动容器高度
  319. const img = new Image();
  320. img.onload = () => {
  321. const canvasImage = this.$refs.html2canvas.querySelector('.canvasImage');
  322. const scrollContainer = this.$refs.html2canvas.querySelector('.scroll-container');
  323. const shareHeader = this.$refs.html2canvas.querySelector('.shareHeader');
  324. console.log(scrollContainer.style);
  325. if (canvasImage.height < window.innerHeight) {
  326. scrollContainer.style.alignItems = 'center';
  327. shareHeader.style.position = 'absolute';
  328. } else {
  329. scrollContainer.style.alignItems = 'start';
  330. shareHeader.style.position = 'fixed';
  331. }
  332. this.$forceUpdate();
  333. // // 根据图片实际高度设置容器高度(增加20px缓冲)
  334. // // 根据设备像素比调整图片高度
  335. // // 使用实际渲染高度而非原始图片高度
  336. // const imgHeight = img.offsetHeight + 20;
  337. // // 设置容器最小高度保证内容显示,同时允许自动扩展
  338. // scrollContainer.style.minHeight = `${imgHeight}px`;
  339. // // 保持父容器为可见滚动
  340. // scrollContainer.parentElement.style.overflow = 'visible';
  341. // // 强制浏览器重排
  342. // scrollContainer.style.display = 'none';
  343. // scrollContainer.offsetHeight; // 触发重排
  344. // scrollContainer.style.display = 'block';
  345. // // 添加移动端滚动优化
  346. // requestAnimationFrame(() => {
  347. // scrollContainer.style.overflow = 'auto';
  348. // scrollContainer.style.overflowScrolling = 'touch';
  349. // scrollContainer.style.webkitOverflowScrolling = 'touch';
  350. // scrollContainer.style.overscrollBehavior = 'contain';
  351. // scrollContainer.style.touchAction = 'pan-y';
  352. // });
  353. };
  354. img.src = imageUrl;
  355. this.zIndex = 9;
  356. this.$emit('setShareImg', true);
  357. this.$emit('setDailyDetailsBox', false);
  358. // 上传阿里云oss
  359. // 图片名称:用户名-时间戳
  360. let username = this.reportTarget.nickName;
  361. let imgName = username + '-' + new Date().getTime();
  362. uploadAliOss(imageUrl, imgName).then((res) => {
  363. if (res.url && res.url.indexOf('http') != -1) {
  364. console.log(res.url);
  365. shareReportMobile({
  366. reportId: this.reportId, // long 汇报主键id
  367. imageUrl: res.url, // String 分享日报的图片的URL
  368. shareDuration: this.shareDuration, // long 分享用时(秒)
  369. }).then((res) => {
  370. if (this.shareInterval) clearInterval(this.shareInterval);
  371. });
  372. }
  373. });
  374. })
  375. .catch((error) => {
  376. this.toastLoading().clear();
  377. console.error('html2canvas error:', error);
  378. this.$toast('生成分享图失败,请稍后重试');
  379. });
  380. },
  381. closeShare() {
  382. this.canvasImageUrl = '';
  383. this.$emit('setShareImg', false);
  384. this.$emit('setDailyDetailsBox', true);
  385. },
  386. },
  387. beforeDestroy() {
  388. // 组件销毁时清除实例
  389. if (this.qrcode) {
  390. this.$refs.qrcode.innerHTML = '';
  391. }
  392. },
  393. };
  394. </script>
  395. <style lang="scss" scoped>
  396. .share {
  397. width: 100%;
  398. height: 100%;
  399. overflow: hidden;
  400. background: #fff;
  401. position: fixed;
  402. top: 0;
  403. .share-content {
  404. background: url('../assets/shareBack.webp') no-repeat center;
  405. background-size: 100% 100%;
  406. // background-attachment: local;
  407. width: 100%;
  408. // min-height: 100%;
  409. padding: vw(30);
  410. position: absolute;
  411. // padding-bottom: vw(30);
  412. top: 0;
  413. z-index: -10;
  414. }
  415. .header {
  416. display: flex;
  417. justify-content: space-between;
  418. padding-bottom: vw(40);
  419. .left-icon {
  420. width: vw(114);
  421. height: vw(71);
  422. }
  423. .right-icon {
  424. width: vw(230);
  425. height: vw(78);
  426. }
  427. img {
  428. width: 100%;
  429. height: 100%;
  430. }
  431. }
  432. .title-box {
  433. position: relative;
  434. width: 100%;
  435. height: auto;
  436. display: flex;
  437. justify-content: center;
  438. align-items: center;
  439. top: -6px;
  440. .title {
  441. // width: vw(262);
  442. // height: vw(115);
  443. display: flex;
  444. flex-direction: column;
  445. justify-content: center;
  446. align-items: center;
  447. color: #600d0e;
  448. font-weight: bold;
  449. text-align: center;
  450. // background: url('../assets/titleBack.png') no-repeat;
  451. // background-size: 100% 100%;
  452. padding: vw(20) vw(30);
  453. background-color: #ecdd9a;
  454. border-radius: 6px 6px 25px 25px;
  455. .name {
  456. font-size: vw(36);
  457. }
  458. .date {
  459. font-size: vw(28);
  460. }
  461. }
  462. }
  463. .summaryDay {
  464. background: url('../assets/summaryDay.png') no-repeat;
  465. background-size: 100%;
  466. padding: vw(24);
  467. position: relative;
  468. margin-top: vw(55);
  469. border-radius: 0 0 vw(35) vw(35);
  470. padding-top: 0;
  471. .text {
  472. background: url('../assets/textBack.png') no-repeat;
  473. width: 100%;
  474. height: vw(94);
  475. background-size: cover;
  476. color: #7d0207;
  477. font-size: vw(36);
  478. text-align: center;
  479. line-height: vw(94);
  480. // margin-top: vw(152);
  481. // margin-bottom: vw(45);
  482. margin: vw(35) 0 vw(20) 0;
  483. font-weight: bold;
  484. }
  485. .content {
  486. font-size: vw(28);
  487. font-weight: bold;
  488. color: #ffff;
  489. line-height: vw(63);
  490. white-space: pre-wrap;
  491. }
  492. .content-photos {
  493. display: flex;
  494. flex-wrap: wrap;
  495. // justify-content: space-between;
  496. .imgBox {
  497. width: 47.5%;
  498. margin-bottom: 15px;
  499. margin-right: 5%;
  500. background-color: rgb(0, 0, 0);
  501. height: 200px;
  502. display: flex;
  503. align-items: center;
  504. border-radius: 10px;
  505. overflow: hidden;
  506. &:nth-child(2n) {
  507. margin-right: 0;
  508. }
  509. }
  510. img {
  511. // width: 100%;
  512. // height: 42vw;
  513. // width: 30%;
  514. // height: vw(188);
  515. // margin-bottom: 15px;
  516. // margin-right: 5%;
  517. // background-color: rgba(255, 255, 255, 0.1);
  518. // &:nth-child(2n) {
  519. // margin-right: 0;
  520. // }
  521. width: 100%;
  522. // height: 100%;
  523. background-color: rgba(255, 255, 255, 0.1);
  524. max-height: 200px;
  525. // object-fit: contain;
  526. }
  527. }
  528. }
  529. .comment {
  530. .title {
  531. // background: url('../assets/comment.png') no-repeat;
  532. // background-size: 100% 100%;
  533. background-color: #032371;
  534. border-radius: 6px 6px 25px 25px;
  535. color: #e6cd78;
  536. }
  537. .commentMessage {
  538. padding: vw(60) 0;
  539. font-family: PingFang-SC-Medium;
  540. font-size: vw(28);
  541. font-weight: bold;
  542. color: #ffffff;
  543. }
  544. }
  545. .footerShare {
  546. // position: absolute;
  547. display: flex;
  548. flex-direction: column;
  549. align-items: center;
  550. // justify-content: flex-end;
  551. margin-top: vw(30);
  552. margin-right: 2px;
  553. .right-text {
  554. // margin-left: vw(12.5);
  555. display: flex;
  556. flex-direction: column;
  557. justify-content: space-between;
  558. // margin-right: vw(24);
  559. div {
  560. color: #ffffff;
  561. font-size: vw(26);
  562. // font-weight: bold;
  563. padding: 6px 0;
  564. }
  565. }
  566. // display: flex;
  567. // flex-direction: column;
  568. // justify-content: center;
  569. // align-items: center;
  570. // margin-top: vw(100);
  571. // .right-text {
  572. // // margin-left: vw(12.5);
  573. // display: flex;
  574. // // flex-direction: column;
  575. // // justify-content: space-between;
  576. // align-items: center;
  577. // justify-content: center;
  578. // padding: vw(10) 0;
  579. // div {
  580. // color: #ffffff;
  581. // font-size: vw(30);
  582. // font-weight: bold;
  583. // }
  584. // }
  585. }
  586. .footerTips {
  587. width: 100%;
  588. text-align: center;
  589. padding: 10px 0;
  590. color: rgba(255, 255, 255, 0.721);
  591. font-size: 14px;
  592. font-family: PingFang-SC-Medium;
  593. font-weight: 600;
  594. }
  595. .html2canvasBox {
  596. width: 100%;
  597. height: 100%;
  598. min-height: auto;
  599. min-height: 100vh;
  600. overflow: hidden !important;
  601. display: flex;
  602. flex-direction: column;
  603. -webkit-user-select: none; /* Safari */
  604. }
  605. #html2canvas {
  606. width: 100%;
  607. height: 100%;
  608. position: static; /* 改为静态定位 */
  609. .scroll-container {
  610. width: 100%;
  611. height: 100%;
  612. flex: 1;
  613. overflow-y: auto !important;
  614. -webkit-overflow-scrolling: touch;
  615. overscroll-behavior: contain;
  616. touch-action: pan-y;
  617. // padding: 20px 0;
  618. box-sizing: border-box;
  619. /* 修复iOS弹性滚动 */
  620. overflow-scrolling: touch;
  621. max-height: 100vh; /* 添加最大高度限制 */
  622. position: relative; /* 修复定位上下文 */
  623. display: flex;
  624. // align-items: start;
  625. img {
  626. width: 100%;
  627. display: block;
  628. }
  629. .shareHeader {
  630. position: absolute;
  631. z-index: 1;
  632. top: 10px;
  633. width: 100%;
  634. display: flex;
  635. align-items: center;
  636. padding: 0 vw(30);
  637. .closeShare {
  638. // position: absolute;
  639. // z-index: 1;
  640. // right: 10px;
  641. // top: 10px;
  642. color: #fff;
  643. font-size: vw(30);
  644. background: #a2819c;
  645. text-align: center;
  646. line-height: 28px;
  647. border-radius: 6px;
  648. padding: 0 7px;
  649. border: 2px solid #11224e;
  650. .van-icon {
  651. font-size: vw(40);
  652. }
  653. }
  654. .shareTips {
  655. display: flex;
  656. align-items: center;
  657. justify-content: center;
  658. color: #f8f8fa;
  659. width: 82%;
  660. // flex: 1;
  661. margin-right: 10px;
  662. background: rgba(157, 157, 188, 0.8);
  663. height: vw(60);
  664. font-weight: 600;
  665. font-size: vw(26);
  666. img {
  667. width: 100%;
  668. // height: vw(60);
  669. }
  670. }
  671. }
  672. }
  673. }
  674. }
  675. </style>
  676. <style lang="scss">
  677. .share {
  678. .QRcodes {
  679. // width: 45px; /* 固定像素尺寸 */
  680. // height: 45px;
  681. width: vw(280);
  682. height: vw(280);
  683. position: relative;
  684. background: #ffffff;
  685. image-rendering: crisp-edges;
  686. image-rendering: -webkit-optimize-contrast; /* 安卓浏览器兼容 */
  687. // padding: 2px;
  688. display: flex;
  689. align-items: center;
  690. justify-content: center;
  691. border-radius: 3px;
  692. .logo {
  693. position: absolute;
  694. top: 50%;
  695. left: 50%;
  696. transform: translate(-50%, -50%);
  697. width: 10px;
  698. height: 10px;
  699. img {
  700. object-fit: contain;
  701. }
  702. z-index: 3;
  703. }
  704. img {
  705. width: 100%;
  706. height: 100%;
  707. }
  708. }
  709. }
  710. </style>