Commit f79ba104 authored by chenqikuai's avatar chenqikuai

fix

parent 5405e261
......@@ -827,9 +827,9 @@
}
},
"cqk-sy-ui": {
"version": "1.2.33",
"resolved": "https://registry.npmjs.org/cqk-sy-ui/-/cqk-sy-ui-1.2.33.tgz",
"integrity": "sha512-E5DfevhB4BRf8/Ths7UOm1yxYDZGsVT+H/qMwLao0w2QnKTpogYCy2OHH42NP2ZnDZ81U2cZQHQ8s4XOlQBSZQ==",
"version": "1.2.34",
"resolved": "https://registry.npmjs.org/cqk-sy-ui/-/cqk-sy-ui-1.2.34.tgz",
"integrity": "sha512-sml3m2NSYHMUbm/xUoDaJZsbwhmTe/brXJGq+5PW7SSZVN8zyYg9dZUauYEoG7u9Kjf3aIWPbDg53y5RH5/6YA==",
"requires": {
"axios": "^0.26.1",
"crypto-js": "^4.1.1",
......
......@@ -10,7 +10,7 @@
"dependencies": {
"axios": "^0.26.1",
"comlink": "^4.3.1",
"cqk-sy-ui": "^1.2.33",
"cqk-sy-ui": "^1.2.34",
"crypto-js": "^4.1.1",
"element-plus": "^2.1.9",
"js-md5": "^0.7.3",
......
......@@ -40,7 +40,7 @@ export function useTableData({
tableState.page = 1;
}
tableState.loading = true;
fetchData({
return fetchData({
page: tableState.page,
page_size: tableState.page_size,
}).then((ret) => {
......
......@@ -24,7 +24,7 @@
<span
v-if="props.pass_status === 3"
@click="__reIssue(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
></span>
</div>
......@@ -52,7 +52,7 @@
<span
v-if="props.transfer_status === 3"
@click="__reTransfer(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
>
</span>
......
......@@ -26,7 +26,7 @@
<span
v-if="props.status === 3"
@click="reIssue(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
></span>
</div>
......
......@@ -46,7 +46,7 @@
<span
v-if="props.status === 3"
@click="reIssue(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
></span>
</div>
......
......@@ -54,7 +54,10 @@
}
"
></AlbumList>
<div v-if="tableData.length === 0" class="text-center">
<div
v-if="tableData.length === 0 && debouncedSearchInput === ''"
class="text-center"
>
<div class="tip" style="margin-top: 125px">
您还未创建专辑,先去创建吧~
</div>
......@@ -67,6 +70,14 @@
>去创建</syButton
>
</div>
<div v-if="tableData.length === 0 && debouncedSearchInput !== ''">
<Empty
v-show="!loading && tableData.length === 0"
class="absolute top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
>
没有找到匹配结果,尝试其他关键词搜索
</Empty>
</div>
</syScrollBar>
</div>
</syCommonDialog>
......@@ -81,6 +92,7 @@ import { useTableData } from "@/components/Table/hooks";
import { debounce } from "lodash";
import { $ajax } from "@/service";
import { URLS } from "@/service/URL";
import Empty from "@/components/Empty/index.vue";
defineProps<{
visible: boolean;
......@@ -89,6 +101,7 @@ const emit = defineEmits(["update:visible", "select"]);
const elScrollBarRef = ref<InstanceType<typeof AlbumList>>();
const searchInput = ref("");
const debouncedSearchInput = ref("");
const { tableData, fetchNextPage, refetch, loading } = useTableData({
async fetchData({ page, page_size }: { page: number; page_size: number }) {
......@@ -109,8 +122,9 @@ const { tableData, fetchNextPage, refetch, loading } = useTableData({
},
});
const debouncedSearch = debounce((newSearch) => {
refetch();
const debouncedSearch = debounce(async (newSearch) => {
await refetch();
debouncedSearchInput.value = newSearch;
}, 1000);
watch(searchInput, (newSearch) => {
......
......@@ -43,7 +43,7 @@
<span
v-if="props.status === 3"
@click="reIssue(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
></span>
</div>
......
......@@ -46,7 +46,7 @@
<span
v-if="props.status === 3"
@click="__reTransfer(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
></span>
</div>
......
......@@ -46,7 +46,7 @@
<span
v-if="props.status === 3"
@click="reIssue(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
></span>
</div>
......
......@@ -43,7 +43,7 @@
<span
v-if="props.status === 3"
@click="reIssue(props)"
class="iconfont2 icon-re"
class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px"
></span>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment