Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Jan 7, 2024
1 parent 05afab0 commit e9122b7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"preview": "vite preview",
"preview:build": "pnpm build && vite preview",
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
"svgo": "svgo -f src/assets/svg",
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
"clean:cache": "rimraf .eslintcache && rimraf pnpm-lock.yaml && rimraf node_modules && pnpm store prune && pnpm install",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
Expand Down
2 changes: 2 additions & 0 deletions src/views/welcome/components/table/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ref, onMounted, reactive } from "vue";
import type { PaginationProps } from "@pureadmin/table";
import ThumbUp from "@iconify-icons/ri/thumb-up-line";
import Hearts from "@iconify-icons/ri/hearts-line";
import Empty from "./empty.svg?component";

export function useColumns() {
const dataList = ref([]);
Expand Down Expand Up @@ -93,6 +94,7 @@ export function useColumns() {
});

return {
Empty,
loading,
columns,
dataList,
Expand Down
1 change: 1 addition & 0 deletions src/views/welcome/components/table/empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion src/views/welcome/components/table/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useColumns } from "./columns";
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
const { loading, columns, dataList, pagination, onCurrentChange } =
const { loading, columns, dataList, pagination, Empty, onCurrentChange } =
useColumns();
</script>

Expand All @@ -23,6 +23,13 @@ const { loading, columns, dataList, pagination, onCurrentChange } =
:pagination="pagination"
@page-current-change="onCurrentChange"
>
<template #empty>
<el-empty description="暂无数据" :image-size="60">
<template #image>
<Empty />
</template>
</el-empty>
</template>
<template #operation="{ row }">
<el-button
plain
Expand Down Expand Up @@ -53,6 +60,10 @@ const { loading, columns, dataList, pagination, onCurrentChange } =
--el-table-border: none;
--el-table-border-color: transparent;

.el-empty__description {
margin: 0;
}

.el-scrollbar__bar {
display: none;
}
Expand Down

0 comments on commit e9122b7

Please sign in to comment.