-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d85dbe9
commit b48e53a
Showing
151 changed files
with
12,401 additions
and
1,332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,10 @@ dist/ | |
package-lock.json | ||
|
||
.idea/ | ||
.idea | ||
.idea | ||
# 文件保留路径 | ||
static/ | ||
|
||
|
||
*Privide*.go | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<el-image-viewer | ||
v-if="data.show" | ||
:urlList="data.list" | ||
:z-index="data.zIndex" | ||
:initial-index="data.initialIndex" | ||
:infinite="data.infinite" | ||
:hideOnClickModal="data.hideOnClickModal" | ||
@close="data.show = false" | ||
></el-image-viewer> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import {onMounted, reactive, watch} from "vue"; | ||
const props = defineProps({ | ||
options: { | ||
type:Object, | ||
default: { | ||
list:Array, | ||
currentLink: String, | ||
show:Boolean, | ||
} | ||
}, | ||
remove: { | ||
type:Function, | ||
default: null, | ||
} | ||
}) | ||
const data = reactive({ | ||
show: false, | ||
list: [{link:''}], | ||
zIndex: 2000, | ||
initialIndex: 0, | ||
infinite: true, | ||
hideOnClickModal: false, | ||
}) | ||
onMounted(()=>{ | ||
data.list = props.options.list | ||
data.list.forEach((item,index)=>{ | ||
if (item == props.options.currentLink) { | ||
data.initialIndex = index | ||
} | ||
}) | ||
data.show = props.options?.show | ||
}) | ||
watch([data],()=>{ | ||
!data.show && props.remove() | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import ImageViewer from "./ImageViewer.vue"; | ||
import {createApp} from "vue"; | ||
|
||
const Preview = (options:any) =>{ | ||
// 默认创建 ImageViewer 组件时为显示状态 | ||
options.show = true | ||
// 创建节点用户挂载 | ||
const el = document.createElement("div") | ||
document.body.appendChild(el) | ||
const app = createApp(ImageViewer, { | ||
options, | ||
remove(){ | ||
app.unmount() | ||
document.body.removeChild(el) | ||
} | ||
}) | ||
return app.mount(el) | ||
} | ||
|
||
export {Preview} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.