Commit f79ba104 authored by chenqikuai's avatar chenqikuai

fix

parent 5405e261
...@@ -827,9 +827,9 @@ ...@@ -827,9 +827,9 @@
} }
}, },
"cqk-sy-ui": { "cqk-sy-ui": {
"version": "1.2.33", "version": "1.2.34",
"resolved": "https://registry.npmjs.org/cqk-sy-ui/-/cqk-sy-ui-1.2.33.tgz", "resolved": "https://registry.npmjs.org/cqk-sy-ui/-/cqk-sy-ui-1.2.34.tgz",
"integrity": "sha512-E5DfevhB4BRf8/Ths7UOm1yxYDZGsVT+H/qMwLao0w2QnKTpogYCy2OHH42NP2ZnDZ81U2cZQHQ8s4XOlQBSZQ==", "integrity": "sha512-sml3m2NSYHMUbm/xUoDaJZsbwhmTe/brXJGq+5PW7SSZVN8zyYg9dZUauYEoG7u9Kjf3aIWPbDg53y5RH5/6YA==",
"requires": { "requires": {
"axios": "^0.26.1", "axios": "^0.26.1",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"dependencies": { "dependencies": {
"axios": "^0.26.1", "axios": "^0.26.1",
"comlink": "^4.3.1", "comlink": "^4.3.1",
"cqk-sy-ui": "^1.2.33", "cqk-sy-ui": "^1.2.34",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"element-plus": "^2.1.9", "element-plus": "^2.1.9",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
......
...@@ -40,7 +40,7 @@ export function useTableData({ ...@@ -40,7 +40,7 @@ export function useTableData({
tableState.page = 1; tableState.page = 1;
} }
tableState.loading = true; tableState.loading = true;
fetchData({ return fetchData({
page: tableState.page, page: tableState.page,
page_size: tableState.page_size, page_size: tableState.page_size,
}).then((ret) => { }).then((ret) => {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<span <span
v-if="props.pass_status === 3" v-if="props.pass_status === 3"
@click="__reIssue(props)" @click="__reIssue(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
></span> ></span>
</div> </div>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<span <span
v-if="props.transfer_status === 3" v-if="props.transfer_status === 3"
@click="__reTransfer(props)" @click="__reTransfer(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
> >
</span> </span>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<span <span
v-if="props.status === 3" v-if="props.status === 3"
@click="reIssue(props)" @click="reIssue(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
></span> ></span>
</div> </div>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<span <span
v-if="props.status === 3" v-if="props.status === 3"
@click="reIssue(props)" @click="reIssue(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
></span> ></span>
</div> </div>
......
...@@ -54,7 +54,10 @@ ...@@ -54,7 +54,10 @@
} }
" "
></AlbumList> ></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 class="tip" style="margin-top: 125px">
您还未创建专辑,先去创建吧~ 您还未创建专辑,先去创建吧~
</div> </div>
...@@ -67,6 +70,14 @@ ...@@ -67,6 +70,14 @@
>去创建</syButton >去创建</syButton
> >
</div> </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> </syScrollBar>
</div> </div>
</syCommonDialog> </syCommonDialog>
...@@ -81,6 +92,7 @@ import { useTableData } from "@/components/Table/hooks"; ...@@ -81,6 +92,7 @@ import { useTableData } from "@/components/Table/hooks";
import { debounce } from "lodash"; import { debounce } from "lodash";
import { $ajax } from "@/service"; import { $ajax } from "@/service";
import { URLS } from "@/service/URL"; import { URLS } from "@/service/URL";
import Empty from "@/components/Empty/index.vue";
defineProps<{ defineProps<{
visible: boolean; visible: boolean;
...@@ -89,6 +101,7 @@ const emit = defineEmits(["update:visible", "select"]); ...@@ -89,6 +101,7 @@ const emit = defineEmits(["update:visible", "select"]);
const elScrollBarRef = ref<InstanceType<typeof AlbumList>>(); const elScrollBarRef = ref<InstanceType<typeof AlbumList>>();
const searchInput = ref(""); const searchInput = ref("");
const debouncedSearchInput = ref("");
const { tableData, fetchNextPage, refetch, loading } = useTableData({ const { tableData, fetchNextPage, refetch, loading } = useTableData({
async fetchData({ page, page_size }: { page: number; page_size: number }) { async fetchData({ page, page_size }: { page: number; page_size: number }) {
...@@ -109,8 +122,9 @@ const { tableData, fetchNextPage, refetch, loading } = useTableData({ ...@@ -109,8 +122,9 @@ const { tableData, fetchNextPage, refetch, loading } = useTableData({
}, },
}); });
const debouncedSearch = debounce((newSearch) => { const debouncedSearch = debounce(async (newSearch) => {
refetch(); await refetch();
debouncedSearchInput.value = newSearch;
}, 1000); }, 1000);
watch(searchInput, (newSearch) => { watch(searchInput, (newSearch) => {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<span <span
v-if="props.status === 3" v-if="props.status === 3"
@click="reIssue(props)" @click="reIssue(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
></span> ></span>
</div> </div>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<span <span
v-if="props.status === 3" v-if="props.status === 3"
@click="__reTransfer(props)" @click="__reTransfer(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
></span> ></span>
</div> </div>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<span <span
v-if="props.status === 3" v-if="props.status === 3"
@click="reIssue(props)" @click="reIssue(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
></span> ></span>
</div> </div>
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<span <span
v-if="props.status === 3" v-if="props.status === 3"
@click="reIssue(props)" @click="reIssue(props)"
class="iconfont2 icon-re" class="iconfont2 icon-re cursor-pointer"
style="color: rgb(103, 169, 255); margin-left: 3px" style="color: rgb(103, 169, 255); margin-left: 3px"
></span> ></span>
</div> </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