Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite
This commit is contained in:
BIN
src/assets/images/icon/selected.png
Normal file
BIN
src/assets/images/icon/selected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 582 B |
@@ -56,9 +56,14 @@
|
||||
<span class="image-name">{{ item.name || "未命名" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-select" v-show="selectList.includes(item.url)">
|
||||
<!-- <div class="image-select" v-show="selectList.includes(item.url)">
|
||||
<i class="fi fi-sr-check-circle"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
<img
|
||||
src="@/assets/images/icon/selected.png"
|
||||
class="image-select"
|
||||
v-show="selectList.includes(item.url)"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -38,9 +38,10 @@
|
||||
<span class="image-name">{{ item.name || '未命名' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-select" v-show="selectList.includes(item.url)">
|
||||
<img class="selected-icon image-select" src="@/assets/images/icon/selected.png" v-show="selectList.includes(item.url)">
|
||||
<!-- <div class="" v-show="selectList.includes(item.url)">
|
||||
<i class="fi fi-sr-check-circle"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -242,8 +243,8 @@ const resetAndLoad = (category = selectedCategory.value) => {
|
||||
list.value = []
|
||||
hasMore.value = true
|
||||
currentPage.value = 0
|
||||
console.log('默认选择----',getDefaultCategory())
|
||||
selectedCategory.value = getDefaultCategory()
|
||||
// console.log('默认选择----',getDefaultCategory())
|
||||
selectedCategory.value =category || getDefaultCategory()
|
||||
fetchImages(1, category, true)
|
||||
|
||||
// 检查是否需要自动加载更多数据
|
||||
@@ -280,6 +281,7 @@ const handleImageClick = item => {
|
||||
|
||||
// 处理分类切换
|
||||
const handleChangeCategory = category => {
|
||||
// console.log('handleChangeCategory',category)
|
||||
selectedCategory.value = category
|
||||
|
||||
// 如果提供了API,则重新加载数据
|
||||
@@ -508,8 +510,9 @@ defineExpose({
|
||||
overflow-y: auto;
|
||||
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
|
||||
gap: 16px;
|
||||
min-height: 20rem;
|
||||
min-height: 22rem;
|
||||
max-height: 50rem;
|
||||
padding-bottom: 2rem;
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
|
||||
@@ -574,12 +577,16 @@ defineExpose({
|
||||
|
||||
.image-select {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
bottom: -1.25rem;
|
||||
right: -1.25rem;
|
||||
z-index: 2;
|
||||
transform: translate(50%, 50%);
|
||||
i {
|
||||
font-size: 2.5rem;
|
||||
// transform: translate(50%, 50%);
|
||||
// i {
|
||||
// font-size: 2.5rem;
|
||||
// }
|
||||
&.selected-icon{
|
||||
width:2.5rem;
|
||||
height: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="table_search_bar flex flex-justify-between flex-align-center">
|
||||
<div class="search_preset flex flex-1">
|
||||
<div class="table_search_bar flex flex-align-center flex-justify-between">
|
||||
<div class="search_preset flex ">
|
||||
<div
|
||||
class="preset_item gallery_btn white"
|
||||
v-for="item in buttonList"
|
||||
@@ -11,15 +11,15 @@
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="search_input flex flex-align-center">
|
||||
<div class="search_input flex flex-align-center" :style="{ width: inputWidth }">
|
||||
<input
|
||||
class="search_input_inner flex-1"
|
||||
class="search_input_inner"
|
||||
v-model="searchParams.searchText"
|
||||
:bordered="false"
|
||||
@keydown.enter="handleSearch"
|
||||
:placeholder="placeholder"
|
||||
/>
|
||||
<SearchOutlined @click="handleSearch" />
|
||||
<SearchOutlined class="search_input_icon" @click="handleSearch" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -36,6 +36,7 @@ interface ButtonItem {
|
||||
interface Props {
|
||||
buttonList: ButtonItem[]
|
||||
placeholder?: string
|
||||
inputWidth?: string
|
||||
}
|
||||
|
||||
interface SearchParams {
|
||||
@@ -91,11 +92,13 @@ const handleSearch = () => {
|
||||
line-height: 4rem;
|
||||
min-width: 10rem;
|
||||
font-weight: normal;
|
||||
border-width: 0.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.search_input {
|
||||
height: 4rem;
|
||||
width: 23rem; // 默认宽度
|
||||
background-color: #fff;
|
||||
border: 0.1rem solid #000;
|
||||
border-radius: 43rem;
|
||||
@@ -106,6 +109,10 @@ const handleSearch = () => {
|
||||
height: 100%;
|
||||
padding-left: 3rem;
|
||||
border-radius: 4rem;
|
||||
width: calc(100% - 2rem);
|
||||
}
|
||||
.search_input_icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,6 +403,10 @@ export default defineComponent({
|
||||
homeMainData.openType = Object.keys(query)[0]
|
||||
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
||||
}
|
||||
if(homeMainData.openType === 'history' && route.path !== '/home/history'){
|
||||
homeMainData.openTypeChild = ''
|
||||
homeMainData.openType = ''
|
||||
}
|
||||
if((query?.id || query?.history) && !await getIdExistToHistory()){
|
||||
router.push('/home')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user