vue-export-table 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -10
- package/dist/DownloadTable.vue.d.ts +11 -5
- package/dist/index.d.ts +5 -1
- package/dist/locale/en-US.d.ts +3 -0
- package/dist/locale/index.d.ts +43 -0
- package/dist/locale/mn-MN.d.ts +3 -0
- package/dist/locale/types.d.ts +36 -0
- package/dist/locale/zh-CN.d.ts +3 -0
- package/dist/types.d.ts +5 -4
- package/dist/useAutoRefresh.d.ts +2 -4
- package/dist/useTable.d.ts +2 -3
- package/dist/vue-export-table.cjs +1 -1
- package/dist/vue-export-table.css +1 -1
- package/dist/vue-export-table.js +312 -273
- package/dist/vue-export-table.umd.js +1 -1
- package/dist/vue-export-table.vue2.cjs +1 -1
- package/dist/vue-export-table.vue2.js +300 -259
- package/dist/vue-export-table.vue2.umd.js +1 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -27,32 +27,50 @@ npm run build
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
构建完成后,`dist` 目录会生成:
|
|
30
|
+
|
|
30
31
|
- `vue-export-table.js` - Vue 3 ESM 版本
|
|
31
32
|
- `vue-export-table.cjs` - Vue 3 CJS 版本
|
|
32
33
|
- `vue-export-table.vue2.js` - Vue 2 ESM 版本
|
|
33
34
|
- `vue-export-table.vue2.cjs` - Vue 2 CJS 版本
|
|
35
|
+
- `vue-export-table.css` - 样式文件
|
|
36
|
+
- `locale/zh-CN.js` - 中文语言包
|
|
37
|
+
- `locale/en-US.js` - 英文语言包
|
|
38
|
+
- `locale/mn-MN.js` - 蒙文语言包
|
|
34
39
|
|
|
40
|
+
## 目录结构
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
这是一个基于 Ant Design Vue 的表格组件库,使用 vue-demi 实现 Vue 2/Vue 3 双版本兼容,支持查询、分页、操作列下载和自动刷新功能。
|
|
39
|
-
|
|
40
|
-
### 目录结构
|
|
41
|
-
|
|
42
|
-
component-management-new/
|
|
42
|
+
```
|
|
43
|
+
vue-export-table/
|
|
43
44
|
├── src/
|
|
44
45
|
│ ├── index.ts # Vue 3 入口
|
|
45
46
|
│ ├── index.v2.ts # Vue 2 入口
|
|
46
|
-
│ ├── types.ts #
|
|
47
|
+
│ ├── types.ts # 类型定义
|
|
47
48
|
│ ├── DownloadTable.vue # Vue 3 组件(<script setup>)
|
|
48
49
|
│ ├── DownloadTable.v2.vue # Vue 2 组件(defineComponent)
|
|
49
50
|
│ ├── useTable.ts # 核心编排 composable
|
|
50
51
|
│ ├── useQuery.ts # 查询表单 composable
|
|
51
52
|
│ ├── usePagination.ts # 分页 composable
|
|
52
|
-
│
|
|
53
|
+
│ ├── useAutoRefresh.ts # 自动刷新 composable
|
|
54
|
+
│ └── locale/ # 多语言文件
|
|
55
|
+
│ ├── types.ts # 语言包类型定义
|
|
56
|
+
│ ├── index.ts # 语言管理(setLocale / useLocale)
|
|
57
|
+
│ ├── zh-CN.ts # 中文
|
|
58
|
+
│ ├── en-US.ts # 英文
|
|
59
|
+
│ └── mn-MN.ts # 蒙文
|
|
53
60
|
├── examples/
|
|
54
61
|
│ ├── vue3-demo/ # Vue 3 示例
|
|
55
62
|
│ └── vue2-demo/ # Vue 2 示例
|
|
56
63
|
├── vite.config.ts # Vite 构建配置(库模式)
|
|
57
64
|
├── tsconfig.json # TypeScript 配置
|
|
58
|
-
└── package.json
|
|
65
|
+
└── package.json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## 相关文档
|
|
69
|
+
|
|
70
|
+
- [使用文档](./README-USE.md) - 详细 API 和使用示例
|
|
71
|
+
- [发布指南](./README-PUSH.md) - npm 发布流程
|
|
72
|
+
- [更新日志](./CHANGELOG.md) - 版本变更记录
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT
|
|
@@ -7,29 +7,35 @@ declare var __VLS_1: {
|
|
|
7
7
|
}, __VLS_55: {
|
|
8
8
|
loading: boolean;
|
|
9
9
|
refresh: () => Promise<void>;
|
|
10
|
-
},
|
|
10
|
+
}, __VLS_61: {
|
|
11
11
|
record: any;
|
|
12
12
|
index: any;
|
|
13
|
-
},
|
|
13
|
+
}, __VLS_63: {
|
|
14
|
+
record: any;
|
|
15
|
+
index: any;
|
|
16
|
+
}, __VLS_70: any, __VLS_71: {
|
|
14
17
|
record: any;
|
|
15
18
|
index: any;
|
|
16
19
|
text: any;
|
|
17
20
|
};
|
|
18
21
|
type __VLS_Slots = {} & {
|
|
19
|
-
[K in NonNullable<typeof
|
|
22
|
+
[K in NonNullable<typeof __VLS_70>]?: (props: typeof __VLS_71) => any;
|
|
20
23
|
} & {
|
|
21
24
|
'query-form'?: (props: typeof __VLS_1) => any;
|
|
22
25
|
} & {
|
|
23
26
|
toolbar?: (props: typeof __VLS_55) => any;
|
|
24
27
|
} & {
|
|
25
|
-
action?: (props: typeof
|
|
28
|
+
action?: (props: typeof __VLS_61) => any;
|
|
29
|
+
} & {
|
|
30
|
+
status?: (props: typeof __VLS_63) => any;
|
|
26
31
|
};
|
|
27
32
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
28
33
|
pageSize: number;
|
|
34
|
+
columns: import("./types").DownloadTableColumn[];
|
|
35
|
+
queryFields: import("./types").QueryField[];
|
|
29
36
|
download: import("./types").DownloadHandlerConfig<any>;
|
|
30
37
|
rowKey: string | ((record: any) => string | number);
|
|
31
38
|
bordered: boolean;
|
|
32
|
-
showIndex: boolean;
|
|
33
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
40
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
35
41
|
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,12 @@ export { useTable } from './useTable';
|
|
|
4
4
|
export { useQuery } from './useQuery';
|
|
5
5
|
export { usePagination } from './usePagination';
|
|
6
6
|
export { useAutoRefresh } from './useAutoRefresh';
|
|
7
|
+
import { setLocale, useLocale } from './locale';
|
|
8
|
+
export { setLocale, useLocale };
|
|
7
9
|
export type { DownloadTableProps, DownloadTableColumn, QueryField, FetchParams, FetchResult, DownloadHandlerConfig, AutoRefreshConfig, } from './types';
|
|
8
10
|
export declare const VueExportTable: {
|
|
9
|
-
install(app: any
|
|
11
|
+
install(app: any, options?: {
|
|
12
|
+
locale?: any;
|
|
13
|
+
}): void;
|
|
10
14
|
};
|
|
11
15
|
export default VueExportTable;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Locale } from './types';
|
|
2
|
+
import zhCN from './zh-CN';
|
|
3
|
+
export type { Locale };
|
|
4
|
+
export declare function setLocale(locale: Locale): void;
|
|
5
|
+
export declare function useLocale(): {
|
|
6
|
+
placeholder: {
|
|
7
|
+
input: (label: string) => string;
|
|
8
|
+
select: (label: string) => string;
|
|
9
|
+
startDate: string;
|
|
10
|
+
endDate: string;
|
|
11
|
+
};
|
|
12
|
+
button: {
|
|
13
|
+
search: string;
|
|
14
|
+
reset: string;
|
|
15
|
+
download: string;
|
|
16
|
+
};
|
|
17
|
+
pagination: {
|
|
18
|
+
itemsPerPage: string;
|
|
19
|
+
showTotal: (total: number) => string;
|
|
20
|
+
};
|
|
21
|
+
status: {
|
|
22
|
+
running: string;
|
|
23
|
+
failed: string;
|
|
24
|
+
completed: string;
|
|
25
|
+
};
|
|
26
|
+
columns: {
|
|
27
|
+
moduleName: string;
|
|
28
|
+
fileName: string;
|
|
29
|
+
operateTime: string;
|
|
30
|
+
completeTime: string;
|
|
31
|
+
status: string;
|
|
32
|
+
remark: string;
|
|
33
|
+
username: string;
|
|
34
|
+
action: string;
|
|
35
|
+
};
|
|
36
|
+
queryFields: {
|
|
37
|
+
fileName: string;
|
|
38
|
+
fileNamePlaceholder: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export { zhCN };
|
|
42
|
+
export { default as enUS } from './en-US';
|
|
43
|
+
export { default as mnMN } from './mn-MN';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface Locale {
|
|
2
|
+
placeholder: {
|
|
3
|
+
input: (label: string) => string;
|
|
4
|
+
select: (label: string) => string;
|
|
5
|
+
startDate: string;
|
|
6
|
+
endDate: string;
|
|
7
|
+
};
|
|
8
|
+
button: {
|
|
9
|
+
search: string;
|
|
10
|
+
reset: string;
|
|
11
|
+
download: string;
|
|
12
|
+
};
|
|
13
|
+
pagination: {
|
|
14
|
+
itemsPerPage: string;
|
|
15
|
+
showTotal: (total: number) => string;
|
|
16
|
+
};
|
|
17
|
+
status: {
|
|
18
|
+
running: string;
|
|
19
|
+
failed: string;
|
|
20
|
+
completed: string;
|
|
21
|
+
};
|
|
22
|
+
columns: {
|
|
23
|
+
moduleName: string;
|
|
24
|
+
fileName: string;
|
|
25
|
+
operateTime: string;
|
|
26
|
+
completeTime: string;
|
|
27
|
+
status: string;
|
|
28
|
+
remark: string;
|
|
29
|
+
username: string;
|
|
30
|
+
action: string;
|
|
31
|
+
};
|
|
32
|
+
queryFields: {
|
|
33
|
+
fileName: string;
|
|
34
|
+
fileNamePlaceholder: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -50,11 +50,13 @@ export interface DownloadHandlerConfig<T = any> {
|
|
|
50
50
|
}
|
|
51
51
|
export interface AutoRefreshConfig {
|
|
52
52
|
interval: number;
|
|
53
|
-
enabled?: boolean;
|
|
54
|
-
pauseOnHidden?: boolean;
|
|
55
53
|
}
|
|
54
|
+
export declare const STATUS_COLOR_MAP: Record<string, string>;
|
|
55
|
+
export declare function getStatusLabelMap(locale: any): Record<string, string>;
|
|
56
|
+
export declare function getDefaultColumns(locale: any): DownloadTableColumn[];
|
|
57
|
+
export declare function getDefaultQueryFields(locale: any): QueryField[];
|
|
56
58
|
export interface DownloadTableProps<T = any> {
|
|
57
|
-
columns
|
|
59
|
+
columns?: DownloadTableColumn[];
|
|
58
60
|
queryFields?: QueryField[];
|
|
59
61
|
fetchData: (params: FetchParams) => Promise<FetchResult<T>>;
|
|
60
62
|
download?: DownloadHandlerConfig<T>;
|
|
@@ -63,5 +65,4 @@ export interface DownloadTableProps<T = any> {
|
|
|
63
65
|
title?: string;
|
|
64
66
|
bordered?: boolean;
|
|
65
67
|
pageSize?: number;
|
|
66
|
-
showIndex?: boolean;
|
|
67
68
|
}
|
package/dist/useAutoRefresh.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { AutoRefreshConfig } from './types';
|
|
2
2
|
export declare function useAutoRefresh(config: AutoRefreshConfig, onRefresh: () => void): {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
toggle: (val?: boolean) => void;
|
|
6
|
-
resetCountdown: () => void;
|
|
3
|
+
stopTimer: () => void;
|
|
4
|
+
startTimer: () => void;
|
|
7
5
|
};
|
package/dist/useTable.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export declare function useTable<T = any>(options: UseTableOptions<T>): {
|
|
|
23
23
|
setFilter: (key: string, value: any) => void;
|
|
24
24
|
handlePageChange: (page: number, size: number) => void;
|
|
25
25
|
refresh: () => Promise<void>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
toggleAutoRefresh: (val?: boolean) => void;
|
|
26
|
+
stopAutoRefresh: () => void;
|
|
27
|
+
startAutoRefresh: () => void;
|
|
29
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-demi");function z(t){const n=c.reactive({});function o(){t.forEach(r=>{r.defaultValue!==void 0?n[r.name]=r.defaultValue:n[r.name]=r.type==="rangePicker"?[]:void 0})}o();function p(){const r={};return Object.keys(n).forEach(l=>{const d=n[l];if(d!=null&&d!==""){if(Array.isArray(d)&&d.length===0)return;r[l]=d}}),r}function i(){o()}function f(r,l){n[r]=l}return{filters:n,onSearch:p,onReset:i,setFilter:f}}function R(t=10){const n=c.ref(1),o=c.ref(t),p=c.computed(()=>({current:n.value,pageSize:o.value}));function i(r,l){n.value=r,l!==o.value&&(o.value=l,n.value=1)}function f(){n.value=1}return{currentPage:n,pageSize:o,pagination:p,onPageChange:i,resetPage:f}}function E(t,n){let o=null;function p(){i(),!(t.interval<=0)&&(o=setInterval(()=>{n()},t.interval*1e3))}function i(){o&&(clearInterval(o),o=null)}function f(){document.hidden?i():p()}return c.onMounted(()=>{t.interval>0&&(p(),document.addEventListener("visibilitychange",f))}),c.onUnmounted(()=>{i(),document.removeEventListener("visibilitychange",f)}),{stopTimer:i,startTimer:p}}function F(t){const n=c.ref(!1),o=c.ref([]),p=c.ref(0),{filters:i,onSearch:f,onReset:r,setFilter:l}=z(t.queryFields??[]),{currentPage:d,pageSize:g,pagination:_,onPageChange:b,resetPage:y}=R(t.pageSize??10),S=t.autoRefresh??{interval:30},{stopTimer:C,startTimer:w}=E(S,()=>{v()});async function v(){n.value=!0;try{const m={page:d.value,pageSize:g.value,filters:f()},h=await t.fetchData(m);o.value=h.list,p.value=h.total}catch(m){console.error("[VueExportTable] fetch error:",m)}finally{n.value=!1}}function N(){y(),v()}function T(){r(),y(),v()}function s(m,h){b(m,h),v()}return c.onMounted(()=>{t.immediate!==!1&&v()}),{loading:n,data:o,total:p,filters:i,pagination:_,currentPage:d,pageSize:g,handleSearch:N,handleReset:T,setFilter:l,handlePageChange:s,refresh:v,stopAutoRefresh:C,startAutoRefresh:w}}const H={placeholder:{input:t=>`请输入${t}`,select:t=>`请选择${t}`,startDate:"开始日期",endDate:"结束日期"},button:{search:"查询",reset:"重置",download:"下载"},pagination:{itemsPerPage:"条/页",showTotal:t=>`共 ${t} 条`},status:{running:"运行中",failed:"失败",completed:"已完成"},columns:{moduleName:"功能模块",fileName:"文件名称",operateTime:"操作时间",completeTime:"完成时间",status:"状态",remark:"备注",username:"用户名",action:"操作"},queryFields:{fileName:"文件名称",fileNamePlaceholder:"请输入文件名称"}},U=c.reactive({...H});function I(t){Object.assign(U,t)}function q(){return U}const J={running:"blue",failed:"red",completed:"green"};function X(t){return{running:t.status.running,failed:t.status.failed,completed:t.status.completed}}function Y(t){return[{title:t.columns.moduleName,dataIndex:"moduleName",width:150},{title:t.columns.fileName,dataIndex:"fileName",width:200},{title:t.columns.operateTime,dataIndex:"operateTime",width:180},{title:t.columns.completeTime,dataIndex:"completeTime",width:180},{title:t.columns.status,dataIndex:"status",width:100},{title:t.columns.remark,dataIndex:"remark",width:200},{title:t.columns.username,dataIndex:"username",width:120},{title:t.columns.action,dataIndex:"action",width:100,fixed:"right"}]}function x(t){return[{name:"fileName",label:t.queryFields.fileName,type:"input",placeholder:t.queryFields.fileNamePlaceholder}]}const Z={class:"vet-download-table-wrapper"},ee={key:0,class:"vet-query-form-wrapper"},te={key:1,class:"vet-toolbar-wrapper"},ne={class:"vet-toolbar-left"},ae={class:"vet-table-title"},oe=["onClick"],le={key:2,class:"vet-pagination-wrapper"},L=e.defineComponent({__name:"DownloadTable",props:{columns:{default:void 0},queryFields:{default:void 0},fetchData:{},download:{default:void 0},autoRefresh:{},rowKey:{type:[String,Function],default:"id"},title:{},bordered:{type:Boolean,default:!0},pageSize:{default:10}},setup(t){const n=q(),o=t,p=s=>o.download?o.download.canDownload?o.download.canDownload(s):s.status==="completed":!1,{loading:i,data:f,total:r,filters:l,currentPage:d,pageSize:g,handleSearch:_,handleReset:b,handlePageChange:y,refresh:S}=F({fetchData:o.fetchData,queryFields:o.queryFields??x(n),pageSize:o.pageSize,autoRefresh:o.autoRefresh,immediate:!0}),C=c.computed(()=>o.columns&&o.columns.length>0?o.columns:Y(n)),w=c.computed(()=>o.queryFields??x(n)),v=c.computed(()=>{const s=C.value.reduce((m,h)=>{const B=typeof h.width=="number"?h.width:0;return m+B},0);return s>0?{x:s}:void 0}),N=J,T=c.computed(()=>X(n));return(s,m)=>{const h=e.resolveComponent("a-input"),B=e.resolveComponent("a-input-number"),A=e.resolveComponent("a-select"),M=e.resolveComponent("a-date-picker"),O=e.resolveComponent("a-range-picker"),V=e.resolveComponent("a-form-item"),P=e.resolveComponent("a-button"),K=e.resolveComponent("a-space"),Q=e.resolveComponent("a-form"),j=e.resolveComponent("a-tag"),W=e.resolveComponent("a-table"),G=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Z,[e.unref(w)&&e.unref(w).length>0?(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(s.$slots,"query-form",{filters:e.unref(l),handleSearch:e.unref(_),handleReset:e.unref(b)},()=>[e.createVNode(Q,{layout:"inline",model:e.unref(l)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),a=>(e.openBlock(),e.createBlock(V,{key:a.name,label:a.label},{default:e.withCtx(()=>[a.type==="input"?(e.openBlock(),e.createBlock(h,{key:0,value:e.unref(l)[a.name],"onUpdate:value":u=>e.unref(l)[a.name]=u,placeholder:a.placeholder||e.unref(n).placeholder.input(a.label),"allow-clear":""},null,8,["value","onUpdate:value","placeholder"])):a.type==="number"?(e.openBlock(),e.createBlock(B,{key:1,value:e.unref(l)[a.name],"onUpdate:value":u=>e.unref(l)[a.name]=u,placeholder:a.placeholder||e.unref(n).placeholder.input(a.label),style:{width:"180px"}},null,8,["value","onUpdate:value","placeholder"])):a.type==="select"?(e.openBlock(),e.createBlock(A,{key:2,value:e.unref(l)[a.name],"onUpdate:value":u=>e.unref(l)[a.name]=u,placeholder:a.placeholder||e.unref(n).placeholder.select(a.label),options:a.options,"allow-clear":"",style:{"min-width":"150px"}},null,8,["value","onUpdate:value","placeholder","options"])):a.type==="datePicker"?(e.openBlock(),e.createBlock(M,{key:3,value:e.unref(l)[a.name],"onUpdate:value":u=>e.unref(l)[a.name]=u,placeholder:a.placeholder||e.unref(n).placeholder.select(a.label),style:{width:"180px"}},null,8,["value","onUpdate:value","placeholder"])):a.type==="rangePicker"?(e.openBlock(),e.createBlock(O,{key:4,value:e.unref(l)[a.name],"onUpdate:value":u=>e.unref(l)[a.name]=u,placeholder:[a.placeholder||e.unref(n).placeholder.startDate,a.placeholder||e.unref(n).placeholder.endDate],style:{width:"240px"}},null,8,["value","onUpdate:value","placeholder"])):e.createCommentVNode("",!0)]),_:2},1032,["label"]))),128)),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(K,null,{default:e.withCtx(()=>[e.createVNode(P,{type:"primary",onClick:e.unref(_)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).button.search),1)]),_:1},8,["onClick"]),e.createVNode(P,{onClick:e.unref(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).button.reset),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["model"])])])):e.createCommentVNode("",!0),t.title?(e.openBlock(),e.createElementBlock("div",te,[e.renderSlot(s.$slots,"toolbar",{loading:e.unref(i),refresh:e.unref(S)},()=>[e.createElementVNode("div",ne,[e.createElementVNode("span",ae,e.toDisplayString(t.title),1)])])])):e.createCommentVNode("",!0),e.createVNode(W,e.mergeProps({dataSource:e.unref(f),columns:e.unref(C),loading:e.unref(i),pagination:!1,rowKey:t.rowKey,bordered:t.bordered,scroll:e.unref(v)},s.$attrs),{bodyCell:e.withCtx(({column:a,record:u,index:D,text:k})=>[a.dataIndex==="action"?e.renderSlot(s.$slots,"action",{key:0,record:u,index:D},()=>[t.download&&p(u)?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:re=>t.download.handleDownload(u)},e.toDisplayString(e.unref(n).button.download),9,oe)):e.createCommentVNode("",!0)]):a.dataIndex==="status"?e.renderSlot(s.$slots,"status",{key:1,record:u,index:D},()=>[e.createVNode(j,{color:e.unref(N)[k]||"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)[k]||k),1)]),_:2},1032,["color"])]):e.renderSlot(s.$slots,a.dataIndex,{key:2,record:u,index:D,text:k},()=>[e.createTextVNode(e.toDisplayString(k),1)])]),_:3},16,["dataSource","columns","loading","rowKey","bordered","scroll"]),e.unref(r)>0?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(G,{current:e.unref(d),"onUpdate:current":m[0]||(m[0]=a=>e.isRef(d)?d.value=a:null),pageSize:e.unref(g),"onUpdate:pageSize":m[1]||(m[1]=a=>e.isRef(g)?g.value=a:null),total:e.unref(r),"show-size-changer":!0,"page-size-options":["10","20","50"],locale:{items_per_page:e.unref(n).pagination.itemsPerPage},"show-total":e.unref(n).pagination.showTotal,onChange:e.unref(y),onShowSizeChange:e.unref(y)},null,8,["current","pageSize","total","locale","show-total","onChange","onShowSizeChange"])])):e.createCommentVNode("",!0)])}}}),$={install(t,n){t.component("DownloadTable",L),n!=null&&n.locale&&I(n.locale)}};exports.DownloadTable=L;exports.VueExportTable=$;exports.default=$;exports.setLocale=I;exports.useAutoRefresh=E;exports.useLocale=q;exports.usePagination=R;exports.useQuery=z;exports.useTable=F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vet-download-table-wrapper{padding:16px;background:#fff;border-radius:4px}.vet-query-form-wrapper{margin-bottom:16px;padding:16px;
|
|
1
|
+
.vet-download-table-wrapper{padding:16px;background:#fff;border-radius:4px}.vet-query-form-wrapper{margin-bottom:16px;padding:16px;border-radius:4px}.vet-toolbar-wrapper{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.vet-toolbar-left{display:flex;align-items:center}.vet-table-title{font-size:16px;font-weight:600;color:#333}.vet-pagination-wrapper{margin-top:16px;text-align:right}
|