mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-02 19:08:12 +00:00
优化预览图片
This commit is contained in:
parent
4cbc5040a2
commit
eaf1a59e89
@ -16,7 +16,8 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
srcValue() {
|
srcValue() {
|
||||||
const {src} = this;
|
const {src} = this;
|
||||||
if (src.substring(0, 2) === "//" ||
|
if (src.substring(0, 10) === "data:image" ||
|
||||||
|
src.substring(0, 2) === "//" ||
|
||||||
src.substring(0, 7) === "http://" ||
|
src.substring(0, 7) === "http://" ||
|
||||||
src.substring(0, 8) === "https://" ||
|
src.substring(0, 8) === "https://" ||
|
||||||
src.substring(0, 6) === "ftp://" ||
|
src.substring(0, 6) === "ftp://" ||
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<Modal
|
<Modal
|
||||||
:value="previewImageList.length > 0"
|
:value="previewImageList.length > 0"
|
||||||
|
:mask="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:footer-hide="true"
|
:footer-hide="true"
|
||||||
:transition-names="['fade', 'fade']"
|
:transition-names="['', '']"
|
||||||
fullscreen
|
fullscreen
|
||||||
@on-visible-change="visibleChange"
|
@on-visible-change="visibleChange"
|
||||||
class-name="common-preview-image">
|
class-name="common-preview-image">
|
||||||
@ -55,15 +56,6 @@ import {mapState} from "vuex";
|
|||||||
export default {
|
export default {
|
||||||
name: 'PreviewImage',
|
name: 'PreviewImage',
|
||||||
components: {PreviewImageView},
|
components: {PreviewImageView},
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'previewImageIndex',
|
'previewImageIndex',
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="view" class="common-preview-view">
|
<div ref="view" class="common-preview-view no-dark-mode">
|
||||||
<template v-if="!isSingle">
|
<template v-if="!isSingle">
|
||||||
<div class="preview-view-prev" :class="{ 'is-disabled': !infinite && isFirst }">
|
<div class="preview-view-prev" :class="{ 'is-disabled': !infinite && isFirst }" @click="prev">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="preview-view-next" :class="{ 'is-disabled': !infinite && isLast }">
|
<div class="preview-view-next" :class="{ 'is-disabled': !infinite && isLast }" @click="next">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<i class="taskfont" @click="handleActions('clocelise')"></i>
|
<i class="taskfont" @click="handleActions('clocelise')"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="preview-view-canvas">
|
<div class="preview-view-canvas no-dark-mode">
|
||||||
<img
|
<img
|
||||||
v-for="(url, i) in urlList"
|
v-for="(url, i) in urlList"
|
||||||
v-if="i === index"
|
v-if="i === index"
|
||||||
@ -42,6 +42,8 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
background: rgba(0, 0, 0, .8);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
|
||||||
.preview-view-prev,
|
.preview-view-prev,
|
||||||
.preview-view-next {
|
.preview-view-next {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user