| | |
| | | import asyncElementComponent from '@/utils/asyncComponent' |
| | | import { getMark } from '@/utils/utils.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import LostPng from '@/assets/img/lost.png' |
| | | import Encrypts from '@/components/encrypts' |
| | | import './index.scss' |
| | | |
| | |
| | | const QrCode = asyncElementComponent(() => import('@/components/qrcode')) |
| | | const MkProgress = asyncElementComponent(() => import('@/components/mkProgress')) |
| | | const Video = asyncComponent(() => import('@/components/video')) |
| | | const MkPicture = asyncComponent(() => import('@/components/mkPicture')) |
| | | const PicRadio = { |
| | | '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%', |
| | | '5:1': '20%', '6:1': '16.67%', '7:1': '14.29%', '8:1': '12.5%', '9:1': '11.11%', |
| | |
| | | } |
| | | |
| | | let scale = url && card.scale === 'true' |
| | | let urls = url ? url.split(',').filter(Boolean) : [LostPng] |
| | | |
| | | if (!url) { |
| | | _imagestyle = {backgroundSize: 'contain'} |
| | | } |
| | | let urls = url ? url.split(',').filter(Boolean) : [''] |
| | | |
| | | urls.forEach((u, i) => { |
| | | contents.push(<Col key={card.uuid + i} span={card.width}> |
| | | <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> |
| | | <div |
| | | className={'ant-mk-picture' + (scale ? ' scale' : '')} |
| | | onClick={(e) => { |
| | | if (!scale) return |
| | | |
| | | e.stopPropagation() |
| | | |
| | | MKEmitter.emit('mkImageScale', url, urls) |
| | | }} |
| | | style={{..._imagestyle, backgroundImage: `url('${u}')`}} |
| | | ></div> |
| | | <MkPicture style={_imagestyle} scale={scale} url={u} urls={urls}/> |
| | | </div> |
| | | </Col>) |
| | | }) |