|
@@ -1,21 +1,20 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <transition
|
|
|
|
|
- name="fade"
|
|
|
|
|
- enter-active-class="ant-fade-enter ant-fade-enter-active"
|
|
|
|
|
- leave-active-class="ant-fade-leave ant-fade-leave-active"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <transition name="fade">
|
|
|
<div class="img-preview-wrapper" v-show="visible">
|
|
<div class="img-preview-wrapper" v-show="visible">
|
|
|
- <!-- 顶部信息栏 -->
|
|
|
|
|
|
|
+ <!-- 顶部信息栏 & 工具栏 -->
|
|
|
<div class="tip-wrapper" v-if="visible">
|
|
<div class="tip-wrapper" v-if="visible">
|
|
|
- <left-outlined
|
|
|
|
|
|
|
+ <span
|
|
|
class="fold-icon"
|
|
class="fold-icon"
|
|
|
- :class="{ 'no-fold': isShowMinImgList }"
|
|
|
|
|
|
|
+ :class="isShowMinImgList ? 'no-fold' : 'fold'"
|
|
|
:title="isShowMinImgList ? '折叠缩略图' : '展开缩略图'"
|
|
:title="isShowMinImgList ? '折叠缩略图' : '展开缩略图'"
|
|
|
@click="isShowMinImgList = !isShowMinImgList"
|
|
@click="isShowMinImgList = !isShowMinImgList"
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <div class="name" :title="activeImageName">{{ activeImageName }}</div>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <left-outlined v-if="isShowMinImgList" />
|
|
|
|
|
+ <right-outlined v-else />
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <div class="name" :title="activeImageName">
|
|
|
|
|
+ {{ activeImageName }}
|
|
|
|
|
+ </div>
|
|
|
<div class="opera-btn-group">
|
|
<div class="opera-btn-group">
|
|
|
<a-input-number
|
|
<a-input-number
|
|
|
v-model:value="inputActiveIndex"
|
|
v-model:value="inputActiveIndex"
|
|
@@ -26,22 +25,22 @@
|
|
|
/>
|
|
/>
|
|
|
<span class="split-line">/</span>{{ imgList.length }}
|
|
<span class="split-line">/</span>{{ imgList.length }}
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
<div class="tool-wrapper">
|
|
<div class="tool-wrapper">
|
|
|
- <rotate-right-outlined class="item" title="向右旋转" @click="handleRotateImg" />
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <span class="item" title="向右旋转" @click="handleRotateImg">
|
|
|
|
|
+ <redo-outlined />
|
|
|
|
|
+ </span>
|
|
|
<a class="item download-link" target="_blank" :href="activeDownloadLink" :download="activeImageName">
|
|
<a class="item download-link" target="_blank" :href="activeDownloadLink" :download="activeImageName">
|
|
|
<download-outlined title="保存到本地" />
|
|
<download-outlined title="保存到本地" />
|
|
|
</a>
|
|
</a>
|
|
|
-
|
|
|
|
|
<a-tooltip placement="bottom">
|
|
<a-tooltip placement="bottom">
|
|
|
<template #title>
|
|
<template #title>
|
|
|
<div style="line-height: 1.5">
|
|
<div style="line-height: 1.5">
|
|
|
1. 点击图片以外的区域可退出预览<br />
|
|
1. 点击图片以外的区域可退出预览<br />
|
|
|
2. 按 Escape 键可退出预览<br />
|
|
2. 按 Escape 键可退出预览<br />
|
|
|
- 3. 按左、右方向键可切换图片<br />
|
|
|
|
|
|
|
+ 3. 按左、右方向键可切换为上一张、下一张图片<br />
|
|
|
4. 鼠标滚轮可放大、缩小图片<br />
|
|
4. 鼠标滚轮可放大、缩小图片<br />
|
|
|
- 5. 点击左上角箭头图标可折叠、展开缩略图
|
|
|
|
|
|
|
+ 5. 点击左上角
|
|
|
|
|
+ <left-outlined /> 图标可折叠、展开缩略图<br />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<div class="item text-wrapper">
|
|
<div class="item text-wrapper">
|
|
@@ -49,12 +48,12 @@
|
|
|
<bulb-outlined />
|
|
<bulb-outlined />
|
|
|
</div>
|
|
</div>
|
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
|
-
|
|
|
|
|
- <close-outlined class="item close-icon" title="关闭预览" @click="handleCloseImgPreview" />
|
|
|
|
|
|
|
+ <span class="item close-icon" title="关闭预览" @click="handleCloseImgPreview">
|
|
|
|
|
+ <close-outlined />
|
|
|
|
|
+ </span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <!-- 缩略图列表 -->
|
|
|
|
|
|
|
+ <!-- 左侧缩略图 -->
|
|
|
<ul class="min-img-list" ref="minImgListRef" v-show="isShowMinImgList">
|
|
<ul class="min-img-list" ref="minImgListRef" v-show="isShowMinImgList">
|
|
|
<li
|
|
<li
|
|
|
class="min-img-item"
|
|
class="min-img-item"
|
|
@@ -68,8 +67,7 @@
|
|
|
<img class="min-img" :src="$file.setFileImg(item)" :alt="`${item.fileName} 缩略图`" />
|
|
<img class="min-img" :src="$file.setFileImg(item)" :alt="`${item.fileName} 缩略图`" />
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
-
|
|
|
|
|
- <!-- 预览区域 -->
|
|
|
|
|
|
|
+ <!-- 右侧预览区域 -->
|
|
|
<div
|
|
<div
|
|
|
class="img-wrapper"
|
|
class="img-wrapper"
|
|
|
:class="{ 'full-width': !isShowMinImgList }"
|
|
:class="{ 'full-width': !isShowMinImgList }"
|
|
@@ -86,27 +84,31 @@
|
|
|
v-show="index === activeIndex"
|
|
v-show="index === activeIndex"
|
|
|
/>
|
|
/>
|
|
|
<!-- 左右切换图标 -->
|
|
<!-- 左右切换图标 -->
|
|
|
- <i
|
|
|
|
|
- class="pre-icon el-icon-arrow-left"
|
|
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="pre-icon"
|
|
|
title="上一张"
|
|
title="上一张"
|
|
|
v-show="activeIndex > 0"
|
|
v-show="activeIndex > 0"
|
|
|
@click.stop="handleChangeActiveImg(activeIndex - 1)"
|
|
@click.stop="handleChangeActiveImg(activeIndex - 1)"
|
|
|
- ></i>
|
|
|
|
|
- <i
|
|
|
|
|
- class="next-icon el-icon-arrow-right"
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <left-outlined />
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="next-icon"
|
|
|
title="下一张"
|
|
title="下一张"
|
|
|
v-show="activeIndex < imgList.length - 1"
|
|
v-show="activeIndex < imgList.length - 1"
|
|
|
@click.stop="handleChangeActiveImg(activeIndex + 1)"
|
|
@click.stop="handleChangeActiveImg(activeIndex + 1)"
|
|
|
- ></i>
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <right-outlined />
|
|
|
|
|
+ </span>
|
|
|
<!-- 底部显示放大缩小比例 -->
|
|
<!-- 底部显示放大缩小比例 -->
|
|
|
<div class="zoom-bar">
|
|
<div class="zoom-bar">
|
|
|
- <el-slider
|
|
|
|
|
- v-model="imgZoom"
|
|
|
|
|
|
|
+ <a-slider
|
|
|
|
|
+ v-model:value="imgZoom"
|
|
|
:min="imgZoomMin"
|
|
:min="imgZoomMin"
|
|
|
:max="imgZoomMax"
|
|
:max="imgZoomMax"
|
|
|
- :format-tooltip="formatZoomSize"
|
|
|
|
|
- @input="handleZoomImg"
|
|
|
|
|
- ></el-slider>
|
|
|
|
|
|
|
+ :tip-formatter="formatZoomSize"
|
|
|
|
|
+ @update:value="handleZoomImg"
|
|
|
|
|
+ />
|
|
|
<div class="zoom-count">{{ imgZoom }}%</div>
|
|
<div class="zoom-count">{{ imgZoom }}%</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -115,71 +117,109 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
- import { ref, computed, watch, onMounted, onUnmounted } from 'vue'
|
|
|
|
|
|
|
+ import { ref, computed, watch, nextTick, getCurrentInstance } from 'vue'
|
|
|
|
|
+ import { useMyResourceStore } from '@/store/myResource'
|
|
|
import {
|
|
import {
|
|
|
LeftOutlined,
|
|
LeftOutlined,
|
|
|
RightOutlined,
|
|
RightOutlined,
|
|
|
- RotateRightOutlined,
|
|
|
|
|
|
|
+ RedoOutlined,
|
|
|
DownloadOutlined,
|
|
DownloadOutlined,
|
|
|
BulbOutlined,
|
|
BulbOutlined,
|
|
|
CloseOutlined
|
|
CloseOutlined
|
|
|
} from '@ant-design/icons-vue'
|
|
} from '@ant-design/icons-vue'
|
|
|
- import { useMyResourceStore } from '@/store/myResource'
|
|
|
|
|
|
|
|
|
|
- // Props & Emits
|
|
|
|
|
|
|
+ // 获取全局变量
|
|
|
|
|
+ const { proxy } = getCurrentInstance()
|
|
|
|
|
+
|
|
|
|
|
+ // 获取store
|
|
|
|
|
+ const myResourceStore = useMyResourceStore()
|
|
|
|
|
+
|
|
|
|
|
+ // 定义props
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
- imgList: Array,
|
|
|
|
|
- defaultIndex: Number,
|
|
|
|
|
- callback: Function
|
|
|
|
|
|
|
+ imgList: {
|
|
|
|
|
+ type: Array,
|
|
|
|
|
+ default: () => []
|
|
|
|
|
+ },
|
|
|
|
|
+ defaultIndex: {
|
|
|
|
|
+ type: Number,
|
|
|
|
|
+ default: 0
|
|
|
|
|
+ },
|
|
|
|
|
+ callback: {
|
|
|
|
|
+ type: Function,
|
|
|
|
|
+ default: () => {}
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- // Store & Utils
|
|
|
|
|
- const store = useMyResourceStore()
|
|
|
|
|
-
|
|
|
|
|
- // Refs
|
|
|
|
|
|
|
+ // 响应式数据
|
|
|
const visible = ref(false)
|
|
const visible = ref(false)
|
|
|
const inputActiveIndex = ref(1)
|
|
const inputActiveIndex = ref(1)
|
|
|
const rotate = ref(0)
|
|
const rotate = ref(0)
|
|
|
const activeIndex = ref(0)
|
|
const activeIndex = ref(0)
|
|
|
const imgZoom = ref(100)
|
|
const imgZoom = ref(100)
|
|
|
|
|
+ const imgZoomMin = ref(1)
|
|
|
|
|
+ const imgZoomMax = ref(200)
|
|
|
const isShowMinImgList = ref(true)
|
|
const isShowMinImgList = ref(true)
|
|
|
- const minImgListRef = ref(null)
|
|
|
|
|
- const minImgRef = ref([])
|
|
|
|
|
- const imgLarge = ref([])
|
|
|
|
|
-
|
|
|
|
|
- // Constants
|
|
|
|
|
- const IMG_ZOOM_MIN = 1
|
|
|
|
|
- const IMG_ZOOM_MAX = 200
|
|
|
|
|
|
|
|
|
|
- // Computed properties
|
|
|
|
|
- const activeImage = computed(() => {
|
|
|
|
|
- return props.imgList[activeIndex.value]
|
|
|
|
|
- })
|
|
|
|
|
- const activeImageName = computed(() => {
|
|
|
|
|
- return $file.getFileNameComplete(activeImage.value)
|
|
|
|
|
- })
|
|
|
|
|
- const imageHeight = computed(() => {
|
|
|
|
|
- return activeImage.value.imageHeight
|
|
|
|
|
- })
|
|
|
|
|
- const imageWidth = computed(() => {
|
|
|
|
|
- return activeImage.value.imageWidth
|
|
|
|
|
|
|
+ // DOM引用
|
|
|
|
|
+ const minImgListRef = ref(null)
|
|
|
|
|
+ const minImgRef = ref(null)
|
|
|
|
|
+ const imgLarge = ref(null)
|
|
|
|
|
+
|
|
|
|
|
+ // 计算属性
|
|
|
|
|
+ const activeImage = computed(() => props.imgList[activeIndex.value])
|
|
|
|
|
+ const activeImageName = computed(() => proxy.$file.getFileNameComplete(activeImage.value))
|
|
|
|
|
+ const imageHeight = computed(() => activeImage.value.imageHeight)
|
|
|
|
|
+ const imageWidth = computed(() => activeImage.value.imageWidth)
|
|
|
|
|
+ const activeDownloadLink = computed(() => activeImage.value.downloadLink)
|
|
|
|
|
+ const screenWidth = computed(() => myResourceStore.screenWidth)
|
|
|
|
|
+ // 监听器
|
|
|
|
|
+ watch(visible, (val) => {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ activeIndex.value = props.defaultIndex
|
|
|
|
|
+ document.addEventListener('keyup', handleAddKeyupEvent) // 添加键盘相关事件
|
|
|
|
|
+ // 获取用户是否显示缩略图的操作习惯设置
|
|
|
|
|
+ isShowMinImgList.value = localStorage.getItem('qiwen_file_img_preview_show_min') === 'false' ? false : true
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ handleCalculateImgZoom(activeIndex.value) // 确定图片缩放比例
|
|
|
|
|
+ handleScrollMinImg() // 将当前查看图片对应的缩略图滚动到视野中
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 移除键盘相关事件
|
|
|
|
|
+ document.removeEventListener('keyup', handleAddKeyupEvent)
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- // 当前显示的图片下载链接
|
|
|
|
|
- const activeDownloadLink = computed(() => {
|
|
|
|
|
- return activeImage.value.downloadLink
|
|
|
|
|
|
|
+
|
|
|
|
|
+ watch(activeIndex, (newValue) => {
|
|
|
|
|
+ rotate.value = 0
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ if (imgLarge.value[newValue].style.zoom) {
|
|
|
|
|
+ imgZoom.value = Number(imgLarge.value[newValue].style.zoom.split('%')[0])
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 确定图片缩放比例
|
|
|
|
|
+ handleCalculateImgZoom(newValue)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
- // 屏幕宽度
|
|
|
|
|
- const screenWidth = computed(() => {
|
|
|
|
|
- return store.state.common.screenWidth
|
|
|
|
|
|
|
+
|
|
|
|
|
+ watch(isShowMinImgList, (val) => {
|
|
|
|
|
+ localStorage.setItem('qiwen_file_img_preview_show_min', val)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- // Methods
|
|
|
|
|
- const handleChangeInputIndex = (value) => {
|
|
|
|
|
- activeIndex.value = value - 1
|
|
|
|
|
- handleChangeActiveImg(value - 1)
|
|
|
|
|
|
|
+ // 方法
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 顶部栏输入框绑定值被改变时触发
|
|
|
|
|
+ * @param {number} currentValue 当前值
|
|
|
|
|
+ */
|
|
|
|
|
+ const handleChangeInputIndex = (currentValue) => {
|
|
|
|
|
+ activeIndex.value = currentValue - 1
|
|
|
|
|
+ handleChangeActiveImg(currentValue - 1)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const handleKeyEvents = (event) => {
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * DOM 绑定 Esc 键、左方向键、右方向键的键盘按下事件
|
|
|
|
|
+ * @param {event} event 事件
|
|
|
|
|
+ */
|
|
|
|
|
+ const handleAddKeyupEvent = (event) => {
|
|
|
switch (event.key) {
|
|
switch (event.key) {
|
|
|
case 'Escape': {
|
|
case 'Escape': {
|
|
|
handleCloseImgPreview() // 关闭预览
|
|
handleCloseImgPreview() // 关闭预览
|
|
@@ -257,10 +297,10 @@
|
|
|
* 鼠标滚动事件
|
|
* 鼠标滚动事件
|
|
|
* @description 缩放图片
|
|
* @description 缩放图片
|
|
|
*/
|
|
*/
|
|
|
- const handleMouseWheel = () => {
|
|
|
|
|
|
|
+ const handleMouseWheel = (event) => {
|
|
|
let zoom = parseInt(imgLarge.value[activeIndex.value].style.zoom) || 100
|
|
let zoom = parseInt(imgLarge.value[activeIndex.value].style.zoom) || 100
|
|
|
zoom += event.wheelDelta / 12
|
|
zoom += event.wheelDelta / 12
|
|
|
- if (zoom >= IMG_ZOOM_MIN && zoom < IMG_ZOOM_MAX) {
|
|
|
|
|
|
|
+ if (zoom >= imgZoomMin.value && zoom < imgZoomMax.value) {
|
|
|
imgZoom.value = zoom
|
|
imgZoom.value = zoom
|
|
|
imgLarge.value[activeIndex.value].style.zoom = zoom + '%'
|
|
imgLarge.value[activeIndex.value].style.zoom = zoom + '%'
|
|
|
}
|
|
}
|
|
@@ -302,45 +342,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // Watchers
|
|
|
|
|
- watch(visible, (val) => {
|
|
|
|
|
- if (val) {
|
|
|
|
|
- activeIndex.value = props.defaultIndex
|
|
|
|
|
- document.addEventListener('keyup', handleKeyEvents)
|
|
|
|
|
- // 获取用户是否显示缩略图的操作习惯设置
|
|
|
|
|
- isShowMinImgList.value = localStorage.getItem('qiwen_file_img_preview_show_min') === 'false' ? false : true
|
|
|
|
|
- nextTick(() => {
|
|
|
|
|
- handleCalculateImgZoom(activeIndex.value) // 确定图片缩放比例
|
|
|
|
|
- handleScrollMinImg() // 将当前查看图片对应的缩略图滚动到视野中
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- document.removeEventListener('keyup', handleKeyEvents)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- watch(activeIndex, (newValue) => {
|
|
|
|
|
- rotate.value = 0
|
|
|
|
|
- nextTick(() => {
|
|
|
|
|
- if (imgLarge.value[newValue].style.zoom) {
|
|
|
|
|
- imgZoom.value = Number(imgLarge.value[newValue].style.zoom.split('%')[0])
|
|
|
|
|
- } else {
|
|
|
|
|
- // 确定图片缩放比例
|
|
|
|
|
- handleCalculateImgZoom(newValue)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- watch(isShowMinImgList, (val) => {
|
|
|
|
|
- localStorage.setItem('qiwen_file_img_preview_show_min', val)
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- // Lifecycle
|
|
|
|
|
- onMounted(() => {
|
|
|
|
|
- // 初始化逻辑
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- onUnmounted(() => {
|
|
|
|
|
- document.removeEventListener('keyup', handleKeyEvents)
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // 对外暴露方法
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
visible
|
|
visible
|
|
|
})
|
|
})
|
|
@@ -349,6 +351,7 @@
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
@import '@/style/myResource/varibles.less';
|
|
@import '@/style/myResource/varibles.less';
|
|
|
@import '@/style/myResource/mixins.less';
|
|
@import '@/style/myResource/mixins.less';
|
|
|
|
|
+
|
|
|
.img-preview-wrapper {
|
|
.img-preview-wrapper {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
top: 0;
|
|
top: 0;
|
|
@@ -362,13 +365,16 @@
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- animation: imgPreviewAnimation 0.3s forwards;
|
|
|
|
|
|
|
+ animation: imgPreviewAnimation 0.3s;
|
|
|
|
|
+ animation-iteration-count: 0.3;
|
|
|
|
|
+ animation-fill-mode: forwards;
|
|
|
|
|
|
|
|
@keyframes imgPreviewAnimation {
|
|
@keyframes imgPreviewAnimation {
|
|
|
- from {
|
|
|
|
|
|
|
+ 0% {
|
|
|
background: transparent;
|
|
background: transparent;
|
|
|
}
|
|
}
|
|
|
- to {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ 100% {
|
|
|
background: rgba(0, 0, 0, 0.8);
|
|
background: rgba(0, 0, 0, 0.8);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -388,6 +394,7 @@
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+
|
|
|
.fold-icon {
|
|
.fold-icon {
|
|
|
margin-right: 16px;
|
|
margin-right: 16px;
|
|
|
font-size: 24px;
|
|
font-size: 24px;
|
|
@@ -402,6 +409,7 @@
|
|
|
width: 64px;
|
|
width: 64px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.name {
|
|
.name {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
padding-right: 16px;
|
|
padding-right: 16px;
|
|
@@ -410,36 +418,61 @@
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.opera-btn-group {
|
|
.opera-btn-group {
|
|
|
width: 100px;
|
|
width: 100px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
+ :deep(.ant-input-number) {
|
|
|
|
|
+ width: 40px;
|
|
|
|
|
+
|
|
|
|
|
+ .ant-input-number-handler-wrap {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .ant-input-number-input {
|
|
|
|
|
+ margin-top: 14px;
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
|
|
+ height: 20px;
|
|
|
|
|
+ line-height: 20px;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.split-line {
|
|
.split-line {
|
|
|
margin: 0 8px;
|
|
margin: 0 8px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.tool-wrapper {
|
|
.tool-wrapper {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+
|
|
|
.item {
|
|
.item {
|
|
|
margin-left: 16px;
|
|
margin-left: 16px;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
+
|
|
|
&:hover {
|
|
&:hover {
|
|
|
opacity: 0.7;
|
|
opacity: 0.7;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .el-icon-refresh-right,
|
|
|
|
|
|
|
+
|
|
|
.close-icon,
|
|
.close-icon,
|
|
|
.download-link {
|
|
.download-link {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.download-link {
|
|
.download-link {
|
|
|
color: inherit;
|
|
color: inherit;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.text-wrapper {
|
|
.text-wrapper {
|
|
|
margin-left: 32px;
|
|
margin-left: 32px;
|
|
|
|
|
+
|
|
|
.text {
|
|
.text {
|
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
|
}
|
|
}
|
|
@@ -455,7 +488,14 @@
|
|
|
padding: 8px 16px;
|
|
padding: 8px 16px;
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
list-style: none;
|
|
list-style: none;
|
|
|
- .setScrollbar(8px, transparent, #C0C4CC);
|
|
|
|
|
|
|
+ &::-webkit-scrollbar {
|
|
|
|
|
+ width: 8px;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ }
|
|
|
|
|
+ &::-webkit-scrollbar-thumb {
|
|
|
|
|
+ background: #c0c4cc;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.min-img-item {
|
|
.min-img-item {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
margin-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
@@ -504,6 +544,7 @@
|
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
|
transition: transform 0.5s;
|
|
transition: transform 0.5s;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.pre-icon,
|
|
.pre-icon,
|
|
|
.next-icon {
|
|
.next-icon {
|
|
|
font-size: 60px;
|
|
font-size: 60px;
|
|
@@ -512,16 +553,20 @@
|
|
|
top: 50%;
|
|
top: 50%;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
z-index: 3;
|
|
z-index: 3;
|
|
|
|
|
+
|
|
|
&:hover {
|
|
&:hover {
|
|
|
opacity: 0.7;
|
|
opacity: 0.7;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.pre-icon {
|
|
.pre-icon {
|
|
|
left: 64px;
|
|
left: 64px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.next-icon {
|
|
.next-icon {
|
|
|
right: 64px;
|
|
right: 64px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.zoom-bar {
|
|
.zoom-bar {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
right: 0;
|
|
right: 0;
|
|
@@ -530,15 +575,19 @@
|
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
|
width: 600px;
|
|
width: 600px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- // >>> .el-slider {
|
|
|
|
|
- // flex: 1;
|
|
|
|
|
- // .el-slider__bar {
|
|
|
|
|
- // background: $PrimaryText;
|
|
|
|
|
- // }
|
|
|
|
|
- // .el-slider__button {
|
|
|
|
|
- // border-color: $PrimaryText;
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.ant-slider) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+
|
|
|
|
|
+ .ant-slider-track {
|
|
|
|
|
+ background: @primary-text;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .ant-slider-handle {
|
|
|
|
|
+ border-color: @primary-text;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.zoom-count {
|
|
.zoom-count {
|
|
|
width: 60px;
|
|
width: 60px;
|
|
|
height: 38px;
|
|
height: 38px;
|
|
@@ -549,4 +598,13 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .fade-enter-active,
|
|
|
|
|
+ .fade-leave-active {
|
|
|
|
|
+ transition: opacity 0.3s;
|
|
|
|
|
+ }
|
|
|
|
|
+ .fade-enter-from,
|
|
|
|
|
+ .fade-leave-to {
|
|
|
|
|
+ opacity: 0;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|