giime 0.0.20 → 0.0.22
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 +1 -0
- package/dist/index.css +102 -32
- package/es/components/index.mjs +13 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/src/composite/dialogForm/DialogForm.vue.d.ts +550 -0
- package/es/components/src/composite/dialogForm/DialogForm.vue.mjs +7 -0
- package/es/components/src/composite/dialogForm/DialogForm.vue.mjs.map +1 -0
- package/es/components/src/composite/dialogForm/DialogForm.vue2.mjs +171 -0
- package/es/components/src/composite/dialogForm/DialogForm.vue2.mjs.map +1 -0
- package/es/components/src/composite/dialogForm/dialogForm.d.ts +99 -0
- package/es/components/src/composite/dialogForm/dialogForm.mjs +39 -0
- package/es/components/src/composite/dialogForm/dialogForm.mjs.map +1 -0
- package/es/components/src/composite/dialogForm/index.d.ts +1452 -0
- package/es/components/src/composite/dialogForm/index.mjs +9 -0
- package/es/components/src/composite/dialogForm/index.mjs.map +1 -0
- package/es/components/src/composite/drawerForm/DrawerForm.vue.d.ts +596 -0
- package/es/components/src/composite/drawerForm/DrawerForm.vue.mjs +7 -0
- package/es/components/src/composite/drawerForm/DrawerForm.vue.mjs.map +1 -0
- package/es/components/src/composite/drawerForm/DrawerForm.vue2.mjs +175 -0
- package/es/components/src/composite/drawerForm/DrawerForm.vue2.mjs.map +1 -0
- package/es/components/src/composite/drawerForm/drawerForm.d.ts +106 -0
- package/es/components/src/composite/drawerForm/drawerForm.mjs +41 -0
- package/es/components/src/composite/drawerForm/drawerForm.mjs.map +1 -0
- package/es/components/src/composite/drawerForm/index.d.ts +1576 -0
- package/es/components/src/composite/drawerForm/index.mjs +9 -0
- package/es/components/src/composite/drawerForm/index.mjs.map +1 -0
- package/es/components/src/composite/formItemModule/FormItemModule.vue.d.ts +64 -0
- package/es/components/src/composite/formItemModule/FormItemModule.vue.mjs +7 -0
- package/es/components/src/composite/formItemModule/FormItemModule.vue.mjs.map +1 -0
- package/es/components/src/composite/formItemModule/FormItemModule.vue2.mjs +100 -0
- package/es/components/src/composite/formItemModule/FormItemModule.vue2.mjs.map +1 -0
- package/es/components/src/composite/formItemModule/formItemModule.d.ts +33 -0
- package/es/components/src/composite/formItemModule/formItemModule.mjs +11 -0
- package/es/components/src/composite/formItemModule/formItemModule.mjs.map +1 -0
- package/es/components/src/composite/formItemModule/index.d.ts +64 -0
- package/es/components/src/composite/formItemModule/index.mjs +8 -0
- package/es/components/src/composite/formItemModule/index.mjs.map +1 -0
- package/es/components/src/composite/index.d.ts +5 -0
- package/es/components/src/composite/index.mjs +13 -0
- package/es/components/src/composite/index.mjs.map +1 -1
- package/es/components/src/composite/numberInterval/NumberInterval.vue.d.ts +97 -0
- package/es/components/src/composite/numberInterval/NumberInterval.vue.mjs +7 -0
- package/es/components/src/composite/numberInterval/NumberInterval.vue.mjs.map +1 -0
- package/es/components/src/composite/numberInterval/NumberInterval.vue2.mjs +161 -0
- package/es/components/src/composite/numberInterval/NumberInterval.vue2.mjs.map +1 -0
- package/es/components/src/composite/numberInterval/index.d.ts +100 -0
- package/es/components/src/composite/numberInterval/index.mjs +9 -0
- package/es/components/src/composite/numberInterval/index.mjs.map +1 -0
- package/es/components/src/composite/numberInterval/numberInterval.d.ts +44 -0
- package/es/components/src/composite/numberInterval/numberInterval.mjs +56 -0
- package/es/components/src/composite/numberInterval/numberInterval.mjs.map +1 -0
- package/es/components/src/composite/selectOptions/SelectOptions.vue.d.ts +213 -0
- package/es/components/src/composite/selectOptions/SelectOptions.vue.mjs +7 -0
- package/es/components/src/composite/selectOptions/SelectOptions.vue.mjs.map +1 -0
- package/es/components/src/composite/selectOptions/SelectOptions.vue2.mjs +50 -0
- package/es/components/src/composite/selectOptions/SelectOptions.vue2.mjs.map +1 -0
- package/es/components/src/composite/selectOptions/index.d.ts +216 -0
- package/es/components/src/composite/selectOptions/index.mjs +9 -0
- package/es/components/src/composite/selectOptions/index.mjs.map +1 -0
- package/es/components/src/composite/selectOptions/selectOptions.d.ts +95 -0
- package/es/components/src/composite/selectOptions/selectOptions.mjs +32 -0
- package/es/components/src/composite/selectOptions/selectOptions.mjs.map +1 -0
- package/es/components/src/composite/tablePro/TableColumnVNodeRenderer.mjs +2 -1
- package/es/components/src/composite/tablePro/TableColumnVNodeRenderer.mjs.map +1 -1
- package/es/components/src/composite/tablePro/TablePro.vue.d.ts +21 -4
- package/es/components/src/composite/tablePro/TablePro.vue.mjs +1 -1
- package/es/components/src/composite/tablePro/TablePro.vue2.mjs +33 -10
- package/es/components/src/composite/tablePro/TablePro.vue2.mjs.map +1 -1
- package/es/components/src/composite/tablePro/index.d.ts +55 -10
- package/es/components/src/composite/tablePro/index.mjs +4 -0
- package/es/components/src/composite/tablePro/index.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +28 -12
- package/es/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue2.mjs +21 -26
- package/es/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue2.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tableColumnPro/index.d.ts +58 -24
- package/es/components/src/composite/tablePro/tableColumnPro/tableColumnPro.d.ts +16 -6
- package/es/components/src/composite/tablePro/tableColumnPro/tableColumnPro.mjs +15 -0
- package/es/components/src/composite/tablePro/tableColumnPro/tableColumnPro.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tableHeaderForm/TableHeaderForm.vue2.mjs +88 -4
- package/es/components/src/composite/tablePro/tableHeaderForm/TableHeaderForm.vue2.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +93 -0
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue.mjs +8 -0
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue2.mjs +69 -0
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue2.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue3.mjs +4 -0
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue3.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tablePagination/index.d.ts +96 -0
- package/es/components/src/composite/tablePro/tablePagination/index.mjs +9 -0
- package/es/components/src/composite/tablePro/tablePagination/index.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tablePagination/tablePagination.d.ts +40 -0
- package/es/components/src/composite/tablePro/tablePagination/tablePagination.mjs +44 -0
- package/es/components/src/composite/tablePro/tablePagination/tablePagination.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tablePro.d.ts +1 -1
- package/es/components/src/composite/tablePro/tablePro.mjs +1 -1
- package/es/components/src/composite/tablePro/tablePro.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.d.ts +37 -0
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.mjs +7 -0
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.mjs +290 -0
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tableToolbar/index.d.ts +85 -0
- package/es/components/src/composite/tablePro/tableToolbar/index.mjs +9 -0
- package/es/components/src/composite/tablePro/tableToolbar/index.mjs.map +1 -0
- package/es/components/src/composite/tablePro/tableToolbar/tableToolbar.d.ts +11 -0
- package/es/components/src/composite/tablePro/tableToolbar/tableToolbar.mjs +13 -0
- package/es/components/src/composite/tablePro/tableToolbar/tableToolbar.mjs.map +1 -0
- package/es/giime/component.mjs +14 -0
- package/es/giime/component.mjs.map +1 -1
- package/es/giime/index.mjs +13 -0
- package/es/giime/index.mjs.map +1 -1
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/hooks/base/useDownload/index.mjs +41 -29
- package/es/hooks/base/useDownload/index.mjs.map +1 -1
- package/es/index.css +102 -32
- package/global.d.ts +7 -0
- package/lib/components/index.js +51 -20
- package/lib/components/index.js.map +1 -1
- package/lib/components/src/composite/dialogForm/DialogForm.vue.d.ts +550 -0
- package/lib/components/src/composite/dialogForm/DialogForm.vue.js +11 -0
- package/lib/components/src/composite/dialogForm/DialogForm.vue.js.map +1 -0
- package/lib/components/src/composite/dialogForm/DialogForm.vue2.js +175 -0
- package/lib/components/src/composite/dialogForm/DialogForm.vue2.js.map +1 -0
- package/lib/components/src/composite/dialogForm/dialogForm.d.ts +99 -0
- package/lib/components/src/composite/dialogForm/dialogForm.js +42 -0
- package/lib/components/src/composite/dialogForm/dialogForm.js.map +1 -0
- package/lib/components/src/composite/dialogForm/index.d.ts +1452 -0
- package/lib/components/src/composite/dialogForm/index.js +16 -0
- package/lib/components/src/composite/dialogForm/index.js.map +1 -0
- package/lib/components/src/composite/drawerForm/DrawerForm.vue.d.ts +596 -0
- package/lib/components/src/composite/drawerForm/DrawerForm.vue.js +11 -0
- package/lib/components/src/composite/drawerForm/DrawerForm.vue.js.map +1 -0
- package/lib/components/src/composite/drawerForm/DrawerForm.vue2.js +179 -0
- package/lib/components/src/composite/drawerForm/DrawerForm.vue2.js.map +1 -0
- package/lib/components/src/composite/drawerForm/drawerForm.d.ts +106 -0
- package/lib/components/src/composite/drawerForm/drawerForm.js +44 -0
- package/lib/components/src/composite/drawerForm/drawerForm.js.map +1 -0
- package/lib/components/src/composite/drawerForm/index.d.ts +1576 -0
- package/lib/components/src/composite/drawerForm/index.js +16 -0
- package/lib/components/src/composite/drawerForm/index.js.map +1 -0
- package/lib/components/src/composite/formItemModule/FormItemModule.vue.d.ts +64 -0
- package/lib/components/src/composite/formItemModule/FormItemModule.vue.js +11 -0
- package/lib/components/src/composite/formItemModule/FormItemModule.vue.js.map +1 -0
- package/lib/components/src/composite/formItemModule/FormItemModule.vue2.js +104 -0
- package/lib/components/src/composite/formItemModule/FormItemModule.vue2.js.map +1 -0
- package/lib/components/src/composite/formItemModule/formItemModule.d.ts +33 -0
- package/lib/components/src/composite/formItemModule/formItemModule.js +13 -0
- package/lib/components/src/composite/formItemModule/formItemModule.js.map +1 -0
- package/lib/components/src/composite/formItemModule/index.d.ts +64 -0
- package/lib/components/src/composite/formItemModule/index.js +13 -0
- package/lib/components/src/composite/formItemModule/index.js.map +1 -0
- package/lib/components/src/composite/index.d.ts +5 -0
- package/lib/components/src/composite/index.js +41 -10
- package/lib/components/src/composite/index.js.map +1 -1
- package/lib/components/src/composite/numberInterval/NumberInterval.vue.d.ts +97 -0
- package/lib/components/src/composite/numberInterval/NumberInterval.vue.js +11 -0
- package/lib/components/src/composite/numberInterval/NumberInterval.vue.js.map +1 -0
- package/lib/components/src/composite/numberInterval/NumberInterval.vue2.js +165 -0
- package/lib/components/src/composite/numberInterval/NumberInterval.vue2.js.map +1 -0
- package/lib/components/src/composite/numberInterval/index.d.ts +100 -0
- package/lib/components/src/composite/numberInterval/index.js +16 -0
- package/lib/components/src/composite/numberInterval/index.js.map +1 -0
- package/lib/components/src/composite/numberInterval/numberInterval.d.ts +44 -0
- package/lib/components/src/composite/numberInterval/numberInterval.js +59 -0
- package/lib/components/src/composite/numberInterval/numberInterval.js.map +1 -0
- package/lib/components/src/composite/selectOptions/SelectOptions.vue.d.ts +213 -0
- package/lib/components/src/composite/selectOptions/SelectOptions.vue.js +11 -0
- package/lib/components/src/composite/selectOptions/SelectOptions.vue.js.map +1 -0
- package/lib/components/src/composite/selectOptions/SelectOptions.vue2.js +54 -0
- package/lib/components/src/composite/selectOptions/SelectOptions.vue2.js.map +1 -0
- package/lib/components/src/composite/selectOptions/index.d.ts +216 -0
- package/lib/components/src/composite/selectOptions/index.js +16 -0
- package/lib/components/src/composite/selectOptions/index.js.map +1 -0
- package/lib/components/src/composite/selectOptions/selectOptions.d.ts +95 -0
- package/lib/components/src/composite/selectOptions/selectOptions.js +35 -0
- package/lib/components/src/composite/selectOptions/selectOptions.js.map +1 -0
- package/lib/components/src/composite/tablePro/TableColumnVNodeRenderer.js +2 -1
- package/lib/components/src/composite/tablePro/TableColumnVNodeRenderer.js.map +1 -1
- package/lib/components/src/composite/tablePro/TablePro.vue.d.ts +21 -4
- package/lib/components/src/composite/tablePro/TablePro.vue.js +1 -1
- package/lib/components/src/composite/tablePro/TablePro.vue2.js +32 -9
- package/lib/components/src/composite/tablePro/TablePro.vue2.js.map +1 -1
- package/lib/components/src/composite/tablePro/index.d.ts +55 -10
- package/lib/components/src/composite/tablePro/index.js +9 -0
- package/lib/components/src/composite/tablePro/index.js.map +1 -1
- package/lib/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +28 -12
- package/lib/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue2.js +20 -25
- package/lib/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue2.js.map +1 -1
- package/lib/components/src/composite/tablePro/tableColumnPro/index.d.ts +58 -24
- package/lib/components/src/composite/tablePro/tableColumnPro/tableColumnPro.d.ts +16 -6
- package/lib/components/src/composite/tablePro/tableColumnPro/tableColumnPro.js +15 -0
- package/lib/components/src/composite/tablePro/tableColumnPro/tableColumnPro.js.map +1 -1
- package/lib/components/src/composite/tablePro/tableHeaderForm/TableHeaderForm.vue2.js +86 -2
- package/lib/components/src/composite/tablePro/tableHeaderForm/TableHeaderForm.vue2.js.map +1 -1
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +93 -0
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue.js +12 -0
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue.js.map +1 -0
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue2.js +73 -0
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue2.js.map +1 -0
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue3.js +8 -0
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue3.js.map +1 -0
- package/lib/components/src/composite/tablePro/tablePagination/index.d.ts +96 -0
- package/lib/components/src/composite/tablePro/tablePagination/index.js +15 -0
- package/lib/components/src/composite/tablePro/tablePagination/index.js.map +1 -0
- package/lib/components/src/composite/tablePro/tablePagination/tablePagination.d.ts +40 -0
- package/lib/components/src/composite/tablePro/tablePagination/tablePagination.js +46 -0
- package/lib/components/src/composite/tablePro/tablePagination/tablePagination.js.map +1 -0
- package/lib/components/src/composite/tablePro/tablePro.d.ts +1 -1
- package/lib/components/src/composite/tablePro/tablePro.js +1 -1
- package/lib/components/src/composite/tablePro/tablePro.js.map +1 -1
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.d.ts +37 -0
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.js +11 -0
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.js.map +1 -0
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.js +294 -0
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.js.map +1 -0
- package/lib/components/src/composite/tablePro/tableToolbar/index.d.ts +85 -0
- package/lib/components/src/composite/tablePro/tableToolbar/index.js +16 -0
- package/lib/components/src/composite/tablePro/tableToolbar/index.js.map +1 -0
- package/lib/components/src/composite/tablePro/tableToolbar/tableToolbar.d.ts +11 -0
- package/lib/components/src/composite/tablePro/tableToolbar/tableToolbar.js +16 -0
- package/lib/components/src/composite/tablePro/tableToolbar/tableToolbar.js.map +1 -0
- package/lib/giime/component.js +28 -14
- package/lib/giime/component.js.map +1 -1
- package/lib/giime/index.js +79 -48
- package/lib/giime/index.js.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/hooks/base/useDownload/index.js +41 -29
- package/lib/hooks/base/useDownload/index.js.map +1 -1
- package/lib/index.css +102 -32
- package/package.json +2 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode } from 'vue';
|
|
2
|
+
import { tablePaginationProps } from './tablePagination.mjs';
|
|
3
|
+
|
|
4
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
...{
|
|
6
|
+
name: "GmTablePagination"
|
|
7
|
+
},
|
|
8
|
+
__name: "TablePagination",
|
|
9
|
+
props: tablePaginationProps,
|
|
10
|
+
emits: ["update:page", "update:limit", "pagination"],
|
|
11
|
+
setup(__props, { emit: __emit }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const emit = __emit;
|
|
14
|
+
const currentPage = computed({
|
|
15
|
+
get() {
|
|
16
|
+
return props.page;
|
|
17
|
+
},
|
|
18
|
+
set(val) {
|
|
19
|
+
emit("update:page", val);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const pageSize = computed({
|
|
23
|
+
get() {
|
|
24
|
+
return props.limit;
|
|
25
|
+
},
|
|
26
|
+
set(val) {
|
|
27
|
+
emit("update:limit", val);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
function handleSizeChange(val) {
|
|
31
|
+
if (currentPage.value * val > props.total) {
|
|
32
|
+
currentPage.value = 1;
|
|
33
|
+
}
|
|
34
|
+
emit("pagination", { page: currentPage.value, limit: val });
|
|
35
|
+
}
|
|
36
|
+
function handleCurrentChange(val) {
|
|
37
|
+
emit("pagination", { page: val, limit: pageSize.value });
|
|
38
|
+
}
|
|
39
|
+
return (_ctx, _cache) => {
|
|
40
|
+
const _component_gm_pagination = resolveComponent("gm-pagination");
|
|
41
|
+
return openBlock(), createElementBlock(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
class: normalizeClass([{ hidden: _ctx.hidden }, "pagination-container"])
|
|
45
|
+
},
|
|
46
|
+
[
|
|
47
|
+
createVNode(_component_gm_pagination, {
|
|
48
|
+
"current-page": currentPage.value,
|
|
49
|
+
"onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => currentPage.value = $event),
|
|
50
|
+
"page-size": pageSize.value,
|
|
51
|
+
"onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => pageSize.value = $event),
|
|
52
|
+
background: _ctx.background,
|
|
53
|
+
layout: _ctx.layout,
|
|
54
|
+
"page-sizes": _ctx.pageSizes,
|
|
55
|
+
"pager-count": _ctx.pagerCount,
|
|
56
|
+
total: _ctx.total,
|
|
57
|
+
onSizeChange: handleSizeChange,
|
|
58
|
+
onCurrentChange: handleCurrentChange
|
|
59
|
+
}, null, 8, ["current-page", "page-size", "background", "layout", "page-sizes", "pager-count", "total"])
|
|
60
|
+
],
|
|
61
|
+
2
|
|
62
|
+
/* CLASS */
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export { _sfc_main as default };
|
|
69
|
+
//# sourceMappingURL=TablePagination.vue2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePagination.vue2.mjs","sources":["../../../../../../../../packages/components/src/composite/tablePro/tablePagination/TablePagination.vue"],"sourcesContent":["<template>\r\n <div :class=\"{ hidden: hidden }\" class=\"pagination-container\">\r\n <gm-pagination\r\n v-model:current-page=\"currentPage\"\r\n v-model:page-size=\"pageSize\"\r\n :background=\"background\"\r\n :layout=\"layout\"\r\n :page-sizes=\"pageSizes\"\r\n :pager-count=\"pagerCount\"\r\n :total=\"total\"\r\n @sizeChange=\"handleSizeChange\"\r\n @currentChange=\"handleCurrentChange\"\r\n />\r\n </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport { tablePaginationProps } from './tablePagination';\r\n\r\ndefineOptions({\r\n name: 'GmTablePagination',\r\n});\r\nconst props = defineProps(tablePaginationProps);\r\n\r\nconst emit = defineEmits(['update:page', 'update:limit', 'pagination']);\r\nconst currentPage = computed<number>({\r\n get() {\r\n return props.page;\r\n },\r\n set(val) {\r\n emit('update:page', val);\r\n },\r\n});\r\nconst pageSize = computed({\r\n get() {\r\n return props.limit;\r\n },\r\n set(val) {\r\n emit('update:limit', val);\r\n },\r\n});\r\nfunction handleSizeChange(val: any) {\r\n if (currentPage.value * val > props.total) {\r\n currentPage.value = 1;\r\n }\r\n emit('pagination', { page: currentPage.value, limit: val });\r\n}\r\nfunction handleCurrentChange(val: any) {\r\n emit('pagination', { page: val, limit: pageSize.value });\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.pagination-container {\r\n background: #fff;\r\n padding: 32px 16px;\r\n}\r\n.pagination-container.hidden {\r\n display: none;\r\n}\r\n</style>\r\n"],"names":[],"mappings":";;;;;;;;;;;AAuBA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAA,MAAM,cAAc,QAAiB,CAAA;AAAA,MACnC,GAAM,GAAA;AACJ,QAAA,OAAO,KAAM,CAAA,IAAA,CAAA;AAAA,OACf;AAAA,MACA,IAAI,GAAK,EAAA;AACP,QAAA,IAAA,CAAK,eAAe,GAAG,CAAA,CAAA;AAAA,OACzB;AAAA,KACD,CAAA,CAAA;AACD,IAAA,MAAM,WAAW,QAAS,CAAA;AAAA,MACxB,GAAM,GAAA;AACJ,QAAA,OAAO,KAAM,CAAA,KAAA,CAAA;AAAA,OACf;AAAA,MACA,IAAI,GAAK,EAAA;AACP,QAAA,IAAA,CAAK,gBAAgB,GAAG,CAAA,CAAA;AAAA,OAC1B;AAAA,KACD,CAAA,CAAA;AACD,IAAA,SAAS,iBAAiB,GAAU,EAAA;AAClC,MAAA,IAAI,WAAY,CAAA,KAAA,GAAQ,GAAM,GAAA,KAAA,CAAM,KAAO,EAAA;AACzC,QAAA,WAAA,CAAY,KAAQ,GAAA,CAAA,CAAA;AAAA,OACtB;AACA,MAAA,IAAA,CAAK,cAAc,EAAE,IAAA,EAAM,YAAY,KAAO,EAAA,KAAA,EAAO,KAAK,CAAA,CAAA;AAAA,KAC5D;AACA,IAAA,SAAS,oBAAoB,GAAU,EAAA;AACrC,MAAA,IAAA,CAAK,cAAc,EAAE,IAAA,EAAM,KAAK,KAAO,EAAA,QAAA,CAAS,OAAO,CAAA,CAAA;AAAA,KACzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePagination.vue3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import TablePagination from './TablePagination.vue';
|
|
2
|
+
export declare const GmTablePagination: import("../../../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
3
|
+
total: {
|
|
4
|
+
required: true;
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
};
|
|
7
|
+
page: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: 1;
|
|
10
|
+
};
|
|
11
|
+
limit: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: 20;
|
|
14
|
+
};
|
|
15
|
+
pageSizes: {
|
|
16
|
+
type: import("vue").PropType<number[]>;
|
|
17
|
+
default(): readonly [10, 20, 30, 50];
|
|
18
|
+
};
|
|
19
|
+
pagerCount: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: () => 5 | 7;
|
|
22
|
+
};
|
|
23
|
+
layout: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: "total, sizes, prev, pager, next, jumper";
|
|
26
|
+
};
|
|
27
|
+
background: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: true;
|
|
30
|
+
};
|
|
31
|
+
autoScroll: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: true;
|
|
34
|
+
};
|
|
35
|
+
hidden: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: true;
|
|
38
|
+
};
|
|
39
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
+
"update:page": (...args: any[]) => void;
|
|
41
|
+
"update:limit": (...args: any[]) => void;
|
|
42
|
+
pagination: (...args: any[]) => void;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
+
total: {
|
|
45
|
+
required: true;
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
};
|
|
48
|
+
page: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
default: 1;
|
|
51
|
+
};
|
|
52
|
+
limit: {
|
|
53
|
+
type: NumberConstructor;
|
|
54
|
+
default: 20;
|
|
55
|
+
};
|
|
56
|
+
pageSizes: {
|
|
57
|
+
type: import("vue").PropType<number[]>;
|
|
58
|
+
default(): readonly [10, 20, 30, 50];
|
|
59
|
+
};
|
|
60
|
+
pagerCount: {
|
|
61
|
+
type: NumberConstructor;
|
|
62
|
+
default: () => 5 | 7;
|
|
63
|
+
};
|
|
64
|
+
layout: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: "total, sizes, prev, pager, next, jumper";
|
|
67
|
+
};
|
|
68
|
+
background: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: true;
|
|
71
|
+
};
|
|
72
|
+
autoScroll: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: true;
|
|
75
|
+
};
|
|
76
|
+
hidden: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
default: true;
|
|
79
|
+
};
|
|
80
|
+
}>> & {
|
|
81
|
+
"onUpdate:page"?: ((...args: any[]) => any) | undefined;
|
|
82
|
+
"onUpdate:limit"?: ((...args: any[]) => any) | undefined;
|
|
83
|
+
onPagination?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
hidden: boolean;
|
|
86
|
+
pagerCount: number;
|
|
87
|
+
layout: string;
|
|
88
|
+
pageSizes: number[];
|
|
89
|
+
background: boolean;
|
|
90
|
+
limit: number;
|
|
91
|
+
page: number;
|
|
92
|
+
autoScroll: boolean;
|
|
93
|
+
}, {}>> & Record<string, any>;
|
|
94
|
+
export type TablePaginationInstance = InstanceType<typeof TablePagination>;
|
|
95
|
+
export * from './tablePagination';
|
|
96
|
+
export default GmTablePagination;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../../../../utils/index.mjs';
|
|
2
|
+
import TablePagination from './TablePagination.vue.mjs';
|
|
3
|
+
export { tablePaginationProps } from './tablePagination.mjs';
|
|
4
|
+
import { withInstall } from '../../../../../utils/src/vue/install.mjs';
|
|
5
|
+
|
|
6
|
+
const GmTablePagination = withInstall(TablePagination);
|
|
7
|
+
|
|
8
|
+
export { GmTablePagination, GmTablePagination as default };
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../../packages/components/src/composite/tablePro/tablePagination/index.ts"],"sourcesContent":["import { withInstall } from '@giime/utils';\r\nimport TablePagination from './TablePagination.vue';\r\n\r\nexport const GmTablePagination = withInstall(TablePagination);\r\nexport type TablePaginationInstance = InstanceType<typeof TablePagination>;\r\nexport * from './tablePagination';\r\nexport default GmTablePagination;\r\n"],"names":[],"mappings":";;;;;AAGa,MAAA,iBAAA,GAAoB,YAAY,eAAe;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const tablePaginationProps: {
|
|
3
|
+
total: {
|
|
4
|
+
required: true;
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
};
|
|
7
|
+
page: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: 1;
|
|
10
|
+
};
|
|
11
|
+
limit: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: 20;
|
|
14
|
+
};
|
|
15
|
+
pageSizes: {
|
|
16
|
+
type: PropType<number[]>;
|
|
17
|
+
default(): readonly [10, 20, 30, 50];
|
|
18
|
+
};
|
|
19
|
+
pagerCount: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: () => 5 | 7;
|
|
22
|
+
};
|
|
23
|
+
layout: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: "total, sizes, prev, pager, next, jumper";
|
|
26
|
+
};
|
|
27
|
+
background: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: true;
|
|
30
|
+
};
|
|
31
|
+
autoScroll: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: true;
|
|
34
|
+
};
|
|
35
|
+
hidden: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: true;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type TablePaginationProps = ExtractPropTypes<typeof tablePaginationProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const tablePaginationProps = {
|
|
2
|
+
total: {
|
|
3
|
+
required: true,
|
|
4
|
+
type: Number
|
|
5
|
+
},
|
|
6
|
+
page: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 1
|
|
9
|
+
},
|
|
10
|
+
limit: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 20
|
|
13
|
+
},
|
|
14
|
+
pageSizes: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default() {
|
|
17
|
+
return [10, 20, 30, 50];
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
// 移动端页码按钮的数量端默认值5
|
|
21
|
+
pagerCount: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: () => document.body.clientWidth < 992 ? 5 : 7
|
|
24
|
+
},
|
|
25
|
+
layout: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "total, sizes, prev, pager, next, jumper"
|
|
28
|
+
},
|
|
29
|
+
background: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
autoScroll: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
},
|
|
37
|
+
hidden: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { tablePaginationProps };
|
|
44
|
+
//# sourceMappingURL=tablePagination.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tablePagination.mjs","sources":["../../../../../../../../packages/components/src/composite/tablePro/tablePagination/tablePagination.ts"],"sourcesContent":["// import type { ExtractPropTypes } from 'vue';\r\nimport type { ExtractPropTypes, PropType } from 'vue';\r\n\r\nexport const tablePaginationProps = {\r\n total: {\r\n required: true as const,\r\n type: Number,\r\n },\r\n page: {\r\n type: Number,\r\n default: 1 as const,\r\n },\r\n limit: {\r\n type: Number,\r\n default: 20 as const,\r\n },\r\n pageSizes: {\r\n type: Array as PropType<number[]>,\r\n default() {\r\n return [10, 20, 30, 50] as const;\r\n },\r\n },\r\n // 移动端页码按钮的数量端默认值5\r\n pagerCount: {\r\n type: Number,\r\n default: () => (document.body.clientWidth < 992 ? 5 : 7),\r\n },\r\n layout: {\r\n type: String,\r\n default: 'total, sizes, prev, pager, next, jumper' as const,\r\n },\r\n background: {\r\n type: Boolean,\r\n default: true as const,\r\n },\r\n autoScroll: {\r\n type: Boolean,\r\n default: true as const,\r\n },\r\n hidden: {\r\n type: Boolean,\r\n default: true as const,\r\n },\r\n};\r\nexport type TablePaginationProps = ExtractPropTypes<typeof tablePaginationProps>;\r\n"],"names":[],"mappings":"AAGO,MAAM,oBAAuB,GAAA;AAAA,EAClC,KAAO,EAAA;AAAA,IACL,QAAU,EAAA,IAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,KAAA;AAAA,IACN,OAAU,GAAA;AACR,MAAA,OAAO,CAAC,EAAA,EAAI,EAAI,EAAA,EAAA,EAAI,EAAE,CAAA,CAAA;AAAA,KACxB;AAAA,GACF;AAAA;AAAA,EAEA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,MAAO,QAAA,CAAS,IAAK,CAAA,WAAA,GAAc,MAAM,CAAI,GAAA,CAAA;AAAA,GACxD;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,yCAAA;AAAA,GACX;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AACF;;;;"}
|
|
@@ -33,7 +33,7 @@ export declare const tableProProps: {
|
|
|
33
33
|
};
|
|
34
34
|
page: {
|
|
35
35
|
type: StringConstructor;
|
|
36
|
-
|
|
36
|
+
required: true;
|
|
37
37
|
};
|
|
38
38
|
size: {
|
|
39
39
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tablePro.mjs","sources":["../../../../../../../packages/components/src/composite/tablePro/tablePro.ts"],"sourcesContent":["import { tableProps } from '@giime/components/src/base';\r\nimport type { Sort } from 'element-plus';\r\n\r\nexport const tableProProps = {\r\n ...tableProps,\r\n\r\n headerCellStyle: {\r\n type: Object,\r\n default: () => ({ background: '#F5F7FA', color: '#333' }),\r\n },\r\n data: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n selection: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n customHeader: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n customOperate: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n operateWidth: {\r\n type: Number,\r\n default: 120,\r\n },\r\n operateFixed: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n page: {\r\n type: String,\r\n
|
|
1
|
+
{"version":3,"file":"tablePro.mjs","sources":["../../../../../../../packages/components/src/composite/tablePro/tablePro.ts"],"sourcesContent":["import { tableProps } from '@giime/components/src/base';\r\nimport type { Sort } from 'element-plus';\r\n\r\nexport const tableProProps = {\r\n ...tableProps,\r\n\r\n headerCellStyle: {\r\n type: Object,\r\n default: () => ({ background: '#F5F7FA', color: '#333' }),\r\n },\r\n data: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n selection: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n customHeader: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n customOperate: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n operateWidth: {\r\n type: Number,\r\n default: 120,\r\n },\r\n operateFixed: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n page: {\r\n type: String,\r\n required: true as const,\r\n },\r\n};\r\n\r\nexport const tableProEmits = {\r\n tableOperate: (btn: Record<string, any>, row: Record<string, any>) => btn && row,\r\n selectionChange: (value: Record<string, any>[]) => value,\r\n sortChange: (value: Sort) => value,\r\n};\r\n"],"names":[],"mappings":";;;AAGO,MAAM,aAAgB,GAAA;AAAA,EAC3B,GAAG,UAAA;AAAA,EAEH,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,OAAO,EAAE,UAAY,EAAA,SAAA,EAAW,OAAO,MAAO,EAAA,CAAA;AAAA,GACzD;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AACF,EAAA;AAEO,MAAM,aAAgB,GAAA;AAAA,EAC3B,YAAc,EAAA,CAAC,GAA0B,EAAA,GAAA,KAA6B,GAAO,IAAA,GAAA;AAAA,EAC7E,eAAA,EAAiB,CAAC,KAAiC,KAAA,KAAA;AAAA,EACnD,UAAA,EAAY,CAAC,KAAgB,KAAA,KAAA;AAC/B;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
showSearch: {
|
|
3
|
+
required: true;
|
|
4
|
+
type: import("vue").PropType<boolean>;
|
|
5
|
+
};
|
|
6
|
+
queryParams: import("vue").PropType<any>;
|
|
7
|
+
tableId: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:showSearch": (showSearch: boolean) => void;
|
|
13
|
+
"update:queryParams": (queryParams: any) => void;
|
|
14
|
+
getList: () => void;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
showSearch: {
|
|
17
|
+
required: true;
|
|
18
|
+
type: import("vue").PropType<boolean>;
|
|
19
|
+
};
|
|
20
|
+
queryParams: import("vue").PropType<any>;
|
|
21
|
+
tableId: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>> & {
|
|
26
|
+
"onUpdate:showSearch"?: ((showSearch: boolean) => any) | undefined;
|
|
27
|
+
"onUpdate:queryParams"?: ((queryParams: any) => any) | undefined;
|
|
28
|
+
onGetList?: (() => any) | undefined;
|
|
29
|
+
}, {}, {}>, {
|
|
30
|
+
default?(_: {}): any;
|
|
31
|
+
}>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from './TableToolbar.vue2.mjs';
|
|
2
|
+
import _export_sfc from '../../../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
3
|
+
|
|
4
|
+
var TableToolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "TableToolbar.vue"]]);
|
|
5
|
+
|
|
6
|
+
export { TableToolbar as default };
|
|
7
|
+
//# sourceMappingURL=TableToolbar.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableToolbar.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, ref, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, createCommentVNode, createElementVNode, withModifiers, createTextVNode, Fragment, renderList, createBlock, toDisplayString, unref } from 'vue';
|
|
2
|
+
import { v4 } from 'uuid';
|
|
3
|
+
import { useCustomSettingsStore } from '../../../../../hooks/store/useCustomSettings/index.mjs';
|
|
4
|
+
import { hasOwn } from '../../../../../utils/src/objects.mjs';
|
|
5
|
+
import { remove } from '../../../../../utils/src/general.mjs';
|
|
6
|
+
import { Delete, ArrowDown, Search, Refresh } from '@element-plus/icons-vue';
|
|
7
|
+
import { tableToolbarProps, tableToolbarEmits } from './tableToolbar.mjs';
|
|
8
|
+
|
|
9
|
+
const _hoisted_1 = { class: "gm-ml-auto" };
|
|
10
|
+
const _hoisted_2 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "gm-my-5 gm-text-center gm-text-base gm-font-bold gm-text-gray-700"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_3 = { class: "gm-m-2" };
|
|
15
|
+
const customSettingType = "quickQueryList";
|
|
16
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...{
|
|
18
|
+
name: "GmTableToolbar"
|
|
19
|
+
},
|
|
20
|
+
__name: "TableToolbar",
|
|
21
|
+
props: /* @__PURE__ */ mergeModels(tableToolbarProps, {
|
|
22
|
+
"showSearch": { type: Boolean, ...{ required: true } },
|
|
23
|
+
"showSearchModifiers": {},
|
|
24
|
+
"queryParams": {},
|
|
25
|
+
"queryParamsModifiers": {}
|
|
26
|
+
}),
|
|
27
|
+
emits: /* @__PURE__ */ mergeModels(tableToolbarEmits, ["update:showSearch", "update:queryParams"]),
|
|
28
|
+
setup(__props, { emit: __emit }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const emit = __emit;
|
|
31
|
+
const showSearch = useModel(__props, "showSearch");
|
|
32
|
+
const queryParams = useModel(__props, "queryParams");
|
|
33
|
+
const customSettingsStore = useCustomSettingsStore();
|
|
34
|
+
const customSettingsValue = computed(() => customSettingsStore.customSettings[props.tableId]?.[customSettingType] || []);
|
|
35
|
+
const saveSearchVisible = ref(false);
|
|
36
|
+
const searchform = ref({
|
|
37
|
+
name: ""
|
|
38
|
+
});
|
|
39
|
+
const rules = {
|
|
40
|
+
name: [{ required: true, message: "\u67E5\u8BE2\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A", trigger: "blur" }]
|
|
41
|
+
};
|
|
42
|
+
const openSaveSearchDialog = () => {
|
|
43
|
+
saveSearchVisible.value = true;
|
|
44
|
+
searchform.value.name = "";
|
|
45
|
+
};
|
|
46
|
+
const applySettings = (item) => {
|
|
47
|
+
for (const key in item.value) {
|
|
48
|
+
if (hasOwn(item.value, key) && hasOwn(queryParams.value, key)) {
|
|
49
|
+
queryParams.value[key] = item.value[key];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
emit("getList");
|
|
53
|
+
};
|
|
54
|
+
const submitLoading = ref(false);
|
|
55
|
+
const addSettings = () => {
|
|
56
|
+
const params = JSON.stringify([{ uuid: v4(), name: searchform.value.name, value: queryParams.value }, ...customSettingsValue.value]);
|
|
57
|
+
return submitSettings(params);
|
|
58
|
+
};
|
|
59
|
+
const deleteSettins = (item) => {
|
|
60
|
+
remove(customSettingsValue.value, item);
|
|
61
|
+
return submitSettings(JSON.stringify(customSettingsValue.value));
|
|
62
|
+
};
|
|
63
|
+
const syncLoading = ref(false);
|
|
64
|
+
const onSyncRemote = async () => {
|
|
65
|
+
try {
|
|
66
|
+
syncLoading.value = true;
|
|
67
|
+
await customSettingsStore.syncRemoteSetting({
|
|
68
|
+
key_word: props.tableId,
|
|
69
|
+
type: customSettingType
|
|
70
|
+
});
|
|
71
|
+
syncLoading.value = false;
|
|
72
|
+
GmMessage.success("\u540C\u6B65\u6210\u529F");
|
|
73
|
+
} catch (e) {
|
|
74
|
+
console.error(e);
|
|
75
|
+
syncLoading.value = false;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const submitSettings = async (value) => {
|
|
79
|
+
try {
|
|
80
|
+
submitLoading.value = true;
|
|
81
|
+
const { data } = await customSettingsStore.addCustomSettings({
|
|
82
|
+
key_word: props.tableId,
|
|
83
|
+
value,
|
|
84
|
+
type: customSettingType
|
|
85
|
+
});
|
|
86
|
+
submitLoading.value = false;
|
|
87
|
+
if (data.code !== 0) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
GmMessage.success("\u64CD\u4F5C\u6210\u529F");
|
|
91
|
+
saveSearchVisible.value = false;
|
|
92
|
+
} catch (e) {
|
|
93
|
+
console.error(e);
|
|
94
|
+
submitLoading.value = false;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
function toggleSearch() {
|
|
98
|
+
showSearch.value = !showSearch.value;
|
|
99
|
+
}
|
|
100
|
+
function refresh() {
|
|
101
|
+
emit("getList");
|
|
102
|
+
}
|
|
103
|
+
onMounted(async () => {
|
|
104
|
+
await customSettingsStore.getCustomSettings({ key_word: props.tableId, type: customSettingType }, { defaultValue: [] });
|
|
105
|
+
});
|
|
106
|
+
return (_ctx, _cache) => {
|
|
107
|
+
const _component_gm_button = resolveComponent("gm-button");
|
|
108
|
+
const _component_gm_icon = resolveComponent("gm-icon");
|
|
109
|
+
const _component_gm_dropdown_item = resolveComponent("gm-dropdown-item");
|
|
110
|
+
const _component_gm_dropdown_menu = resolveComponent("gm-dropdown-menu");
|
|
111
|
+
const _component_gm_dropdown = resolveComponent("gm-dropdown");
|
|
112
|
+
const _component_gm_tooltip = resolveComponent("gm-tooltip");
|
|
113
|
+
const _component_gm_row = resolveComponent("gm-row");
|
|
114
|
+
const _component_gm_form_item_module = resolveComponent("gm-form-item-module");
|
|
115
|
+
const _component_GmDialogForm = resolveComponent("GmDialogForm");
|
|
116
|
+
return openBlock(), createElementBlock("div", null, [
|
|
117
|
+
createVNode(_component_gm_row, { gutter: 10 }, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
renderSlot(_ctx.$slots, "default"),
|
|
120
|
+
createCommentVNode(` <right-toolbar v-model:showSearch="showSearch" @queryTable="emits('getList')" /> `),
|
|
121
|
+
createElementVNode("div", _hoisted_1, [
|
|
122
|
+
createVNode(_component_gm_row, null, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
createVNode(_component_gm_button, {
|
|
125
|
+
type: "",
|
|
126
|
+
class: "gm-mr-2 gm-block",
|
|
127
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => openSaveSearchDialog(), ["stop"]))
|
|
128
|
+
}, {
|
|
129
|
+
default: withCtx(() => [
|
|
130
|
+
createTextVNode("\u4FDD\u5B58\u67E5\u8BE2")
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
/* STABLE */
|
|
134
|
+
}),
|
|
135
|
+
createVNode(_component_gm_dropdown, {
|
|
136
|
+
trigger: "click",
|
|
137
|
+
class: "gm-mr-3 hover:gm-outline-none"
|
|
138
|
+
}, {
|
|
139
|
+
dropdown: withCtx(() => [
|
|
140
|
+
createVNode(_component_gm_dropdown_menu, { class: "gm-min-w-[200px]" }, {
|
|
141
|
+
default: withCtx(() => [
|
|
142
|
+
customSettingsValue.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true),
|
|
143
|
+
(openBlock(true), createElementBlock(
|
|
144
|
+
Fragment,
|
|
145
|
+
null,
|
|
146
|
+
renderList(customSettingsValue.value, (item) => {
|
|
147
|
+
return openBlock(), createBlock(_component_gm_dropdown_item, {
|
|
148
|
+
key: item.uuid,
|
|
149
|
+
class: "gm-group gm-flex gm-justify-between",
|
|
150
|
+
onClick: ($event) => applySettings(item)
|
|
151
|
+
}, {
|
|
152
|
+
default: withCtx(() => [
|
|
153
|
+
createElementVNode(
|
|
154
|
+
"span",
|
|
155
|
+
null,
|
|
156
|
+
toDisplayString(item.name),
|
|
157
|
+
1
|
|
158
|
+
/* TEXT */
|
|
159
|
+
),
|
|
160
|
+
createVNode(_component_gm_icon, {
|
|
161
|
+
class: "gm-hidden hover:gm-text-red-500 group-hover:gm-block",
|
|
162
|
+
onClick: withModifiers(($event) => deleteSettins(item), ["stop"])
|
|
163
|
+
}, {
|
|
164
|
+
default: withCtx(() => [
|
|
165
|
+
createVNode(unref(Delete))
|
|
166
|
+
]),
|
|
167
|
+
_: 2
|
|
168
|
+
/* DYNAMIC */
|
|
169
|
+
}, 1032, ["onClick"])
|
|
170
|
+
]),
|
|
171
|
+
_: 2
|
|
172
|
+
/* DYNAMIC */
|
|
173
|
+
}, 1032, ["onClick"]);
|
|
174
|
+
}),
|
|
175
|
+
128
|
|
176
|
+
/* KEYED_FRAGMENT */
|
|
177
|
+
)),
|
|
178
|
+
createElementVNode("div", _hoisted_3, [
|
|
179
|
+
createCommentVNode(' <gm-button :loading="submitLoading" size="small" type="" @click="onClear">\u6E05\u7A7A</gm-button> '),
|
|
180
|
+
createVNode(_component_gm_button, {
|
|
181
|
+
loading: syncLoading.value,
|
|
182
|
+
size: "small",
|
|
183
|
+
type: "success",
|
|
184
|
+
onClick: onSyncRemote
|
|
185
|
+
}, {
|
|
186
|
+
default: withCtx(() => [
|
|
187
|
+
createTextVNode("\u540C\u6B65")
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
/* STABLE */
|
|
191
|
+
}, 8, ["loading"])
|
|
192
|
+
])
|
|
193
|
+
]),
|
|
194
|
+
_: 1
|
|
195
|
+
/* STABLE */
|
|
196
|
+
})
|
|
197
|
+
]),
|
|
198
|
+
default: withCtx(() => [
|
|
199
|
+
createVNode(_component_gm_button, {
|
|
200
|
+
plain: "",
|
|
201
|
+
type: ""
|
|
202
|
+
}, {
|
|
203
|
+
default: withCtx(() => [
|
|
204
|
+
createTextVNode(" \u5FEB\u6377\u67E5\u8BE2"),
|
|
205
|
+
createVNode(_component_gm_icon, { class: "el-icon--right" }, {
|
|
206
|
+
default: withCtx(() => [
|
|
207
|
+
createVNode(unref(ArrowDown))
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
/* STABLE */
|
|
211
|
+
})
|
|
212
|
+
]),
|
|
213
|
+
_: 1
|
|
214
|
+
/* STABLE */
|
|
215
|
+
})
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
/* STABLE */
|
|
219
|
+
}),
|
|
220
|
+
createVNode(_component_gm_tooltip, {
|
|
221
|
+
class: "item",
|
|
222
|
+
effect: "dark",
|
|
223
|
+
content: showSearch.value ? "\u9690\u85CF\u641C\u7D22" : "\u663E\u793A\u641C\u7D22",
|
|
224
|
+
placement: "top"
|
|
225
|
+
}, {
|
|
226
|
+
default: withCtx(() => [
|
|
227
|
+
createVNode(_component_gm_button, {
|
|
228
|
+
circle: "",
|
|
229
|
+
icon: unref(Search),
|
|
230
|
+
onClick: _cache[1] || (_cache[1] = ($event) => toggleSearch())
|
|
231
|
+
}, null, 8, ["icon"])
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
/* STABLE */
|
|
235
|
+
}, 8, ["content"]),
|
|
236
|
+
createVNode(_component_gm_tooltip, {
|
|
237
|
+
class: "item",
|
|
238
|
+
effect: "dark",
|
|
239
|
+
content: "\u5237\u65B0",
|
|
240
|
+
placement: "top"
|
|
241
|
+
}, {
|
|
242
|
+
default: withCtx(() => [
|
|
243
|
+
createVNode(_component_gm_button, {
|
|
244
|
+
circle: "",
|
|
245
|
+
icon: unref(Refresh),
|
|
246
|
+
onClick: _cache[2] || (_cache[2] = ($event) => refresh())
|
|
247
|
+
}, null, 8, ["icon"])
|
|
248
|
+
]),
|
|
249
|
+
_: 1
|
|
250
|
+
/* STABLE */
|
|
251
|
+
})
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
/* STABLE */
|
|
255
|
+
}),
|
|
256
|
+
createVNode(_component_GmDialogForm, {
|
|
257
|
+
modelValue: saveSearchVisible.value,
|
|
258
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => saveSearchVisible.value = $event),
|
|
259
|
+
formData: searchform.value,
|
|
260
|
+
loading: submitLoading.value,
|
|
261
|
+
rules,
|
|
262
|
+
title: "\u4FDD\u5B58\u5F53\u524D\u67E5\u8BE2",
|
|
263
|
+
labelWidth: "auto",
|
|
264
|
+
onSubmit: addSettings
|
|
265
|
+
}, {
|
|
266
|
+
default: withCtx(() => [
|
|
267
|
+
createVNode(_component_gm_form_item_module, {
|
|
268
|
+
modelValue: searchform.value.name,
|
|
269
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => searchform.value.name = $event),
|
|
270
|
+
field: "name",
|
|
271
|
+
label: "\u67E5\u8BE2\u540D\u79F0",
|
|
272
|
+
type: "GmInput",
|
|
273
|
+
props: { placeholder: "\u8BF7\u8F93\u5165", maxlength: "15", showWordLimit: true }
|
|
274
|
+
}, null, 8, ["modelValue"])
|
|
275
|
+
]),
|
|
276
|
+
_: 1
|
|
277
|
+
/* STABLE */
|
|
278
|
+
}, 8, ["modelValue", "formData", "loading"])
|
|
279
|
+
])
|
|
280
|
+
]),
|
|
281
|
+
_: 3
|
|
282
|
+
/* FORWARDED */
|
|
283
|
+
})
|
|
284
|
+
]);
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
export { _sfc_main as default };
|
|
290
|
+
//# sourceMappingURL=TableToolbar.vue2.mjs.map
|