【增加】AI image 增加图片详情,抽屉

This commit is contained in:
cherishsince 2024-05-26 20:59:42 +08:00
parent 131e071b2d
commit 9c8d10b70c
2 changed files with 68 additions and 3 deletions

View File

@ -0,0 +1,42 @@
<template>
<el-drawer
v-model="showDrawer"
title="图片详细"
@close="handlerDrawerClose"
>
<span>Hi, there!</span>
</el-drawer>
</template>
<script setup lang="ts">
const showDrawer = ref<boolean>(false) //
const props = defineProps({
show: {
type: Boolean,
require: true,
default: false
}
})
/**
* 抽屉 - close
*/
const handlerDrawerClose = async () => {
emits('handlerDrawerClose')
}
// watch
const { show } = toRefs(props)
watch(show, async (newValue, oldValue) => {
showDrawer.value = newValue as boolean
})
//
const emits = defineEmits(['handlerDrawerClose'])
</script>
<style scoped lang="scss">
</style>

View File

@ -11,19 +11,42 @@
<div> <div>
<el-button class="btn" text :icon="Download" /> <el-button class="btn" text :icon="Download" />
<el-button class="btn" text :icon="Delete" /> <el-button class="btn" text :icon="Delete" />
<el-button class="btn" text :icon="More" /> <el-button class="btn" text :icon="More" @click="handlerTaskDetail" />
</div> </div>
</div> </div>
<div class="image-wrapper"> <div class="image-wrapper">
<img class="image" src="https://img.bigpt8.com/uploads/thumbnail/20240509/b7802797e5f709f35a451a1591d4d495.png" /> <img class="image" src="https://img.bigpt8.com/uploads/thumbnail/20240509/b7802797e5f709f35a451a1591d4d495.png" />
</div> </div>
</el-card> </el-card>
</el-card> </el-card>
<!-- 图片 detail 抽屉 -->
<ImageDetailDrawer
:show="showTaskDetail"
@handler-drawer-close="handlerDrawerClose"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import ImageDetailDrawer from './ImageDetailDrawer.vue'
import {Delete, Download, More} from "@element-plus/icons-vue"; import {Delete, Download, More} from "@element-plus/icons-vue";
import {bool} from "vue-types";
const showTaskDetail = ref<bool>(false) // task
/**
* 图片人物 - detail
*/
const handlerTaskDetail = async () => {
showTaskDetail.value = !showTaskDetail.value
}
/**
* 抽屉 - 关闭
*/
const handlerDrawerClose = async () => {
showTaskDetail.value = false
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">