giime 0.0.13 → 0.0.14
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/dist/index.css +84 -78
- package/es/api/gatewayApi/request.d.ts +0 -1
- package/es/api/gatewayApi/request.mjs +1 -44
- package/es/api/gatewayApi/request.mjs.map +1 -1
- package/es/components/src/base/tour/Tour.vue.d.ts +2 -2
- package/es/components/src/base/tour/index.d.ts +6 -6
- package/es/components/src/business/customOperations/CustomOperations.vue.d.ts +21 -23
- package/es/components/src/business/customOperations/CustomOperations.vue2.mjs +77 -317
- package/es/components/src/business/customOperations/CustomOperations.vue2.mjs.map +1 -1
- package/es/components/src/business/customOperations/customOperations.d.ts +1 -9
- package/es/components/src/business/customOperations/customOperations.mjs +1 -9
- package/es/components/src/business/customOperations/customOperations.mjs.map +1 -1
- package/es/components/src/business/customOperations/index.d.ts +21 -23
- package/es/components/src/business/tableBody/TableBody.vue.mjs +1 -1
- package/es/components/src/business/tableBody/TableBody.vue2.mjs +29 -27
- package/es/components/src/business/tableBody/TableBody.vue2.mjs.map +1 -1
- package/es/components/src/business/tableBody/TableVNodeRenderer.mjs +13 -5
- package/es/components/src/business/tableBody/TableVNodeRenderer.mjs.map +1 -1
- package/es/components/src/business/tableBody/tableBodyItem/tableBodyOperates/TableBodyOperateButton.vue2.mjs +18 -16
- package/es/components/src/business/tableBody/tableBodyItem/tableBodyOperates/TableBodyOperateButton.vue2.mjs.map +1 -1
- package/es/components/src/business/tableBody/tableHelper.d.ts +1 -0
- package/es/components/src/business/tableBody/tableHelper.mjs +23 -0
- package/es/components/src/business/tableBody/tableHelper.mjs.map +1 -0
- package/es/components/src/composite/searchForm/composables/useWatchModelChange.mjs +3 -0
- package/es/components/src/composite/searchForm/composables/useWatchModelChange.mjs.map +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.mjs +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.mjs.map +1 -1
- package/es/giime/index.mjs +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/store/useCustomSettings/index.d.ts +8 -5
- package/es/hooks/store/useCustomSettings/index.mjs +54 -46
- package/es/hooks/store/useCustomSettings/index.mjs.map +1 -1
- package/es/hooks/store/useCustomSettings/index2.d.ts +29 -0
- package/es/hooks/store/useCustomSettings/index2.mjs +62 -0
- package/es/hooks/store/useCustomSettings/index2.mjs.map +1 -0
- package/es/index.css +84 -78
- package/es/utils/index.mjs +1 -1
- package/es/utils/src/general.d.ts +4 -0
- package/es/utils/src/general.mjs +9 -0
- package/es/utils/src/general.mjs.map +1 -0
- package/es/utils/src/objects.d.ts +1 -0
- package/es/utils/src/objects.mjs +3 -1
- package/es/utils/src/objects.mjs.map +1 -1
- package/lib/api/gatewayApi/request.d.ts +0 -1
- package/lib/api/gatewayApi/request.js +0 -44
- package/lib/api/gatewayApi/request.js.map +1 -1
- package/lib/components/src/base/tour/Tour.vue.d.ts +2 -2
- package/lib/components/src/base/tour/index.d.ts +6 -6
- package/lib/components/src/business/customOperations/CustomOperations.vue.d.ts +21 -23
- package/lib/components/src/business/customOperations/CustomOperations.vue2.js +76 -316
- package/lib/components/src/business/customOperations/CustomOperations.vue2.js.map +1 -1
- package/lib/components/src/business/customOperations/customOperations.d.ts +1 -9
- package/lib/components/src/business/customOperations/customOperations.js +1 -9
- package/lib/components/src/business/customOperations/customOperations.js.map +1 -1
- package/lib/components/src/business/customOperations/index.d.ts +21 -23
- package/lib/components/src/business/tableBody/TableBody.vue.js +1 -1
- package/lib/components/src/business/tableBody/TableBody.vue2.js +28 -26
- package/lib/components/src/business/tableBody/TableBody.vue2.js.map +1 -1
- package/lib/components/src/business/tableBody/TableVNodeRenderer.js +13 -5
- package/lib/components/src/business/tableBody/TableVNodeRenderer.js.map +1 -1
- package/lib/components/src/business/tableBody/tableBodyItem/tableBodyOperates/TableBodyOperateButton.vue2.js +17 -15
- package/lib/components/src/business/tableBody/tableBodyItem/tableBodyOperates/TableBodyOperateButton.vue2.js.map +1 -1
- package/lib/components/src/business/tableBody/tableHelper.d.ts +1 -0
- package/lib/components/src/business/tableBody/tableHelper.js +25 -0
- package/lib/components/src/business/tableBody/tableHelper.js.map +1 -0
- package/lib/components/src/composite/searchForm/composables/useWatchModelChange.js +3 -0
- package/lib/components/src/composite/searchForm/composables/useWatchModelChange.js.map +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.js +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.js.map +1 -1
- package/lib/giime/index.js +1 -0
- 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/store/useCustomSettings/index.d.ts +8 -5
- package/lib/hooks/store/useCustomSettings/index.js +54 -46
- package/lib/hooks/store/useCustomSettings/index.js.map +1 -1
- package/lib/hooks/store/useCustomSettings/index2.d.ts +29 -0
- package/lib/hooks/store/useCustomSettings/index2.js +64 -0
- package/lib/hooks/store/useCustomSettings/index2.js.map +1 -0
- package/lib/index.css +84 -78
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/src/general.d.ts +4 -0
- package/lib/utils/src/general.js +11 -0
- package/lib/utils/src/general.js.map +1 -0
- package/lib/utils/src/objects.d.ts +1 -0
- package/lib/utils/src/objects.js +3 -0
- package/lib/utils/src/objects.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,49 +1,47 @@
|
|
|
1
1
|
import CustomOperations from './CustomOperations.vue';
|
|
2
2
|
export declare const GmCustomOperations: import("../../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
isShowDrawer: {
|
|
4
|
+
required: true;
|
|
5
|
+
type: import("vue").PropType<boolean>;
|
|
6
|
+
};
|
|
7
|
+
customBtnList: {
|
|
8
|
+
required: true;
|
|
9
|
+
type: import("vue").PropType<import("../index.js").TableBodyOperateButtonProps[]>;
|
|
6
10
|
};
|
|
7
11
|
page: {
|
|
8
12
|
type: StringConstructor;
|
|
9
13
|
default: string;
|
|
10
14
|
};
|
|
11
|
-
|
|
12
|
-
type: import("vue").PropType<import("../index.js").TableBodyOperateButtonProps[]>;
|
|
13
|
-
default: () => never[];
|
|
14
|
-
};
|
|
15
|
-
customBtnList: {
|
|
15
|
+
customDefaultPropsList: {
|
|
16
16
|
type: import("vue").PropType<import("../index.js").TableBodyOperateButtonProps[]>;
|
|
17
17
|
default: () => never[];
|
|
18
18
|
};
|
|
19
19
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
-
"update:
|
|
21
|
-
"update:customBtnList": (
|
|
20
|
+
"update:isShowDrawer": (isShowDrawer: boolean) => void;
|
|
21
|
+
"update:customBtnList": (customBtnList: import("../index.js").TableBodyOperateButtonProps[]) => void;
|
|
22
22
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
isShowDrawer: {
|
|
24
|
+
required: true;
|
|
25
|
+
type: import("vue").PropType<boolean>;
|
|
26
|
+
};
|
|
27
|
+
customBtnList: {
|
|
28
|
+
required: true;
|
|
29
|
+
type: import("vue").PropType<import("../index.js").TableBodyOperateButtonProps[]>;
|
|
26
30
|
};
|
|
27
31
|
page: {
|
|
28
32
|
type: StringConstructor;
|
|
29
33
|
default: string;
|
|
30
34
|
};
|
|
31
|
-
|
|
32
|
-
type: import("vue").PropType<import("../index.js").TableBodyOperateButtonProps[]>;
|
|
33
|
-
default: () => never[];
|
|
34
|
-
};
|
|
35
|
-
customBtnList: {
|
|
35
|
+
customDefaultPropsList: {
|
|
36
36
|
type: import("vue").PropType<import("../index.js").TableBodyOperateButtonProps[]>;
|
|
37
37
|
default: () => never[];
|
|
38
38
|
};
|
|
39
39
|
}>> & {
|
|
40
|
-
"onUpdate:
|
|
41
|
-
"onUpdate:customBtnList"?: ((
|
|
40
|
+
"onUpdate:isShowDrawer"?: ((isShowDrawer: boolean) => any) | undefined;
|
|
41
|
+
"onUpdate:customBtnList"?: ((customBtnList: import("../index.js").TableBodyOperateButtonProps[]) => any) | undefined;
|
|
42
42
|
}, {
|
|
43
|
-
operateList: import("../index.js").TableBodyOperateButtonProps[];
|
|
44
43
|
page: string;
|
|
45
|
-
|
|
46
|
-
customBtnList: import("../index.js").TableBodyOperateButtonProps[];
|
|
44
|
+
customDefaultPropsList: import("../index.js").TableBodyOperateButtonProps[];
|
|
47
45
|
}, {}>> & Record<string, any>;
|
|
48
46
|
export type CustomOperationsInstance = InstanceType<typeof CustomOperations>;
|
|
49
47
|
export * from './customOperations';
|
|
@@ -2,7 +2,7 @@ import _sfc_main from './TableBody.vue2.mjs';
|
|
|
2
2
|
import './TableBody.vue3.mjs';
|
|
3
3
|
import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
var TableBody = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
var TableBody = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f1eed8aa"], ["__file", "TableBody.vue"]]);
|
|
6
6
|
|
|
7
7
|
export { TableBody as default };
|
|
8
8
|
//# sourceMappingURL=TableBody.vue.mjs.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { pushScopeId, popScopeId, defineComponent, ref, computed, useSlots,
|
|
1
|
+
import { pushScopeId, popScopeId, defineComponent, ref, computed, useSlots, watch, nextTick, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, createBlock, createCommentVNode, unref, createTextVNode } from 'vue';
|
|
2
2
|
import { useElementBounding, useWindowSize } from '@vueuse/core';
|
|
3
|
+
import { hasOwn } from '../../../../utils/src/objects.mjs';
|
|
3
4
|
import VNodeRenderer from '../../common/VNodeRenderer.mjs';
|
|
4
5
|
import TableVNodeRenderer from './TableVNodeRenderer.mjs';
|
|
5
6
|
import { tableBodyProps, tableBodyEmits } from './tableBody.mjs';
|
|
6
7
|
import { tableBodyOperateButtonProps } from './tableBodyItem/tableBodyOperates/tableBodyOperateButton.mjs';
|
|
8
|
+
import { getVnodesByGmName } from './tableHelper.mjs';
|
|
7
9
|
|
|
8
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
10
|
+
const _withScopeId = (n) => (pushScopeId("data-v-f1eed8aa"), n = n(), popScopeId(), n);
|
|
9
11
|
const _hoisted_1 = {
|
|
10
12
|
key: 0,
|
|
11
13
|
id: "table-page"
|
|
@@ -18,9 +20,11 @@ const _hoisted_3 = {
|
|
|
18
20
|
key: 1,
|
|
19
21
|
class: "operate-wrap"
|
|
20
22
|
};
|
|
21
|
-
const _hoisted_4 = {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
const _hoisted_4 = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "gm-flex gm-flex-wrap gm-justify-center"
|
|
26
|
+
};
|
|
27
|
+
const _hoisted_5 = {
|
|
24
28
|
key: 0,
|
|
25
29
|
class: "gm-mt-2 gm-flex gm-justify-end"
|
|
26
30
|
};
|
|
@@ -62,16 +66,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
66
|
const nodes = vNodes.find((vNode) => vNode.props && vNode.props.prop === "tableOperate");
|
|
63
67
|
return nodes;
|
|
64
68
|
});
|
|
65
|
-
const
|
|
66
|
-
const
|
|
69
|
+
const customDefaultPropsList = computed(() => {
|
|
70
|
+
const defaultVnodes = tableOperateVnode.value?.children?.default?.(tableOperateVnode.value?.ctx.scope);
|
|
71
|
+
const children = getVnodesByGmName(defaultVnodes, "TableBodyOperateButton");
|
|
72
|
+
const btnProps = children.map((vNode) => vNode.props) ?? [];
|
|
67
73
|
btnProps.forEach((it) => {
|
|
68
74
|
for (const key in tableBodyOperateButtonProps) {
|
|
69
|
-
if (
|
|
75
|
+
if (hasOwn(it, key)) {
|
|
70
76
|
continue;
|
|
71
77
|
}
|
|
72
|
-
if (
|
|
78
|
+
if (hasOwn(tableBodyOperateButtonProps, key)) {
|
|
73
79
|
const element = tableBodyOperateButtonProps[key];
|
|
74
|
-
if (
|
|
80
|
+
if (hasOwn(element, "default")) {
|
|
75
81
|
Reflect.set(it, key, Reflect.get(element, "default"));
|
|
76
82
|
}
|
|
77
83
|
}
|
|
@@ -79,9 +85,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
85
|
});
|
|
80
86
|
return btnProps;
|
|
81
87
|
});
|
|
82
|
-
const customBtnList = ref(
|
|
83
|
-
onMounted(() => {
|
|
84
|
-
});
|
|
88
|
+
const customBtnList = ref(customDefaultPropsList.value);
|
|
85
89
|
const customVNodes = computed(() => {
|
|
86
90
|
const result = [];
|
|
87
91
|
return result;
|
|
@@ -181,15 +185,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
181
185
|
]))
|
|
182
186
|
]),
|
|
183
187
|
default: withCtx((slotValue) => [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
])) : createCommentVNode("v-if", true)
|
|
192
|
-
])
|
|
188
|
+
createCommentVNode(' <VNodeRenderer :vnode="customVNodes" /> '),
|
|
189
|
+
tableOperateVnode.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
190
|
+
createVNode(unref(TableVNodeRenderer), {
|
|
191
|
+
vnode: tableOperateVnode.value.children.default(slotValue),
|
|
192
|
+
customPropsList: customBtnList.value
|
|
193
|
+
}, null, 8, ["vnode", "customPropsList"])
|
|
194
|
+
])) : createCommentVNode("v-if", true)
|
|
193
195
|
]),
|
|
194
196
|
_: 1
|
|
195
197
|
/* STABLE */
|
|
@@ -199,7 +201,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
199
201
|
/* STABLE */
|
|
200
202
|
}, 8, ["data", "height", "header-cell-style", "border", "row-style", "row-class-name", "selection"]),
|
|
201
203
|
createCommentVNode(" \u5206\u9875 "),
|
|
202
|
-
props.pagination ? (openBlock(), createElementBlock("div",
|
|
204
|
+
props.pagination ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
203
205
|
createVNode(_component_gm_pagination, {
|
|
204
206
|
"page-size": props.pageSize,
|
|
205
207
|
"current-page": props.currentPage,
|
|
@@ -223,13 +225,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
223
225
|
}, null, 8, ["drawer", "columnList", "headerList", "page"])) : createCommentVNode("v-if", true),
|
|
224
226
|
props.customOperate ? (openBlock(), createBlock(_component_gm_custom_operations, {
|
|
225
227
|
key: 2,
|
|
226
|
-
|
|
227
|
-
"onUpdate:
|
|
228
|
+
isShowDrawer: drawerOperateVisible.value,
|
|
229
|
+
"onUpdate:isShowDrawer": _cache[8] || (_cache[8] = ($event) => drawerOperateVisible.value = $event),
|
|
228
230
|
customBtnList: customBtnList.value,
|
|
229
231
|
"onUpdate:customBtnList": _cache[9] || (_cache[9] = ($event) => customBtnList.value = $event),
|
|
230
|
-
|
|
232
|
+
customDefaultPropsList: customDefaultPropsList.value,
|
|
231
233
|
page: props.page
|
|
232
|
-
}, null, 8, ["
|
|
234
|
+
}, null, 8, ["isShowDrawer", "customBtnList", "customDefaultPropsList", "page"])) : createCommentVNode("v-if", true)
|
|
233
235
|
],
|
|
234
236
|
64
|
|
235
237
|
/* STABLE_FRAGMENT */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.vue2.mjs","sources":["../../../../../../../packages/components/src/business/tableBody/TableBody.vue"],"sourcesContent":["<template>\r\n <div v-if=\"showTable\" id=\"table-page\">\r\n <gm-table\r\n ref=\"GmTbaleRef\"\r\n :data=\"props.data\"\r\n :height=\"tableMaxHeight\"\r\n :header-cell-style=\"props.headerCellStyle\"\r\n :border=\"props.border\"\r\n :row-style=\"props.rowStyle\"\r\n :row-class-name=\"props.rowClassName\"\r\n :selection=\"props.selection\"\r\n @selection-change=\"(value: HeaderListItem[]) => $emit('selectionChange', value)\"\r\n @sort-change=\"(sort: Sort) => $emit('sortChange', sort)\"\r\n >\r\n <template v-if=\"props.selection\">\r\n <gm-table-column :key=\"999999\" type=\"selection\" width=\"50\" />\r\n </template>\r\n\r\n <!-- 渲染数据 -->\r\n <VNodeRenderer :vnode=\"columnVNodes\" />\r\n\r\n <!-- 操作 -->\r\n <gm-table-column :width=\"operateWidth\" :fixed=\"operateFixed ? 'right' : false\">\r\n <template #header>\r\n <template v-if=\"!customHeader && !customOperate\">\r\n <div class=\"text-center\">操作</div>\r\n </template>\r\n <template v-else>\r\n <div class=\"operate-wrap\">\r\n <gm-button v-if=\"customHeader\" type=\"primary\" link size=\"small\" @click=\"setTable('header')\"> 表头 </gm-button>\r\n <gm-button v-if=\"customOperate\" type=\"primary\" link size=\"small\" @click=\"setTable('operate')\"> 操作 </gm-button>\r\n </div>\r\n </template>\r\n </template>\r\n <template #default=\"slotValue\">\r\n <div class=\"operate-wrap\">\r\n <!-- <VNodeRenderer :vnode=\"customVNodes\" /> -->\r\n <div v-if=\"tableOperateVnode\">\r\n <TableVNodeRenderer :vnode=\"tableOperateVnode.children.default(slotValue)\" :customPropsList=\"customBtnList\" />\r\n </div>\r\n </div>\r\n </template>\r\n </gm-table-column>\r\n </gm-table>\r\n\r\n <!-- 分页 -->\r\n <template v-if=\"props.pagination\">\r\n <div class=\"gm-mt-2 gm-flex gm-justify-end\">\r\n <gm-pagination\r\n :page-size=\"props.pageSize\"\r\n :current-page=\"props.currentPage\"\r\n :page-sizes=\"props.pageSizes\"\r\n :layout=\"props.layout\"\r\n :total=\"props.total\"\r\n :small=\"props.small\"\r\n @size-change=\"(value: number) => $emit('sizeChange', value)\"\r\n @current-change=\"(value: number) => $emit('currentChange', value)\"\r\n />\r\n </div>\r\n </template>\r\n </div>\r\n\r\n <template v-if=\"props.customHeader\">\r\n <gm-table-header v-model:drawer=\"drawerHeaderVisible\" v-model:columnList=\"columnList\" :headerList=\"columnDefault\" :page=\"props.page\" />\r\n </template>\r\n\r\n <template v-if=\"props.customOperate\">\r\n <gm-custom-operations\r\n v-model:drawer=\"drawerOperateVisible\"\r\n v-model:customBtnList=\"customBtnList\"\r\n :operateList=\"customDefault\"\r\n :page=\"props.page\"\r\n />\r\n </template>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { type ComputedRef, computed, nextTick, onMounted, ref, watch } from 'vue';\r\nimport { useElementBounding, useWindowSize } from '@vueuse/core';\r\nimport VNodeRenderer from '../../common/VNodeRenderer';\r\nimport { type HeaderListItem } from '../tableHeader';\r\nimport TableVNodeRenderer from './TableVNodeRenderer';\r\nimport { tableBodyEmits, tableBodyProps } from './tableBody';\r\nimport { tableBodyOperateButtonProps } from './tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport type { TableBodyOperateButtonProps } from './tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport type { Sort, TableInstance } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmTableBody',\r\n});\r\nconst GmTbaleRef = ref<TableInstance>();\r\ndefineEmits(tableBodyEmits);\r\nconst props = defineProps(tableBodyProps);\r\n\r\n// 表格高度\r\nconst { top } = useElementBounding(GmTbaleRef as any);\r\nconst { height } = useWindowSize();\r\nconst tableMaxHeight = computed(() => height.value - top.value - props.offsetBottom);\r\n\r\nconst slots = defineSlots<{\r\n default(data?: any): HeaderListItem[];\r\n}>();\r\n\r\n// 默认表头\r\nconst columnDefault: ComputedRef<HeaderListItem[]> = computed(() => {\r\n const vNodes: HeaderListItem[] = slots.default?.() || [];\r\n const result = vNodes.filter(vNode => vNode.props && vNode.props.prop !== 'tableOperate');\r\n return result.map(vNode => vNode.props);\r\n});\r\n// 已选中表头\r\nconst columnList = ref<HeaderListItem[]>(columnDefault.value);\r\n// 获取选中插槽内容\r\nconst columnVNodes = computed(() => {\r\n const vNodes: HeaderListItem[] = slots.default?.(props.data) || [];\r\n const result: any = [];\r\n columnList.value.forEach(vNode => {\r\n const { prop, width } = vNode;\r\n const node = vNodes.find(item => item.props.prop === prop);\r\n if (node) {\r\n node.props.width = width;\r\n result.push(node);\r\n }\r\n });\r\n // console.log({ result: result[0].children.default });\r\n return result;\r\n});\r\n// 操作按钮组 当前原始vnode\r\nconst tableOperateVnode = computed(() => {\r\n const vNodes = slots.default?.() || [];\r\n const nodes = vNodes.find(vNode => vNode.props && vNode.props.prop === 'tableOperate');\r\n return nodes;\r\n});\r\n\r\n// 操作按钮\r\n// const customElement = computed(() => {\r\n// const vNodes = slots.default?.(props.data) || [];\r\n// const nodes = vNodes.find(vNode => vNode.props && vNode.props.prop === 'tableOperate');\r\n// const btnNodes = nodes?.children.default?.(nodes.ctx.scope);\r\n// return btnNodes;\r\n// });\r\nconst customDefault = computed(() => {\r\n const btnProps =\r\n tableOperateVnode.value?.children?.default?.(tableOperateVnode.value?.ctx.scope)?.map((vNode: { props: any }) => vNode.props) ?? [];\r\n // 循环插入props所需的默认值\r\n btnProps.forEach((it: TableBodyOperateButtonProps) => {\r\n for (const key in tableBodyOperateButtonProps) {\r\n // 如果当前props含有默认值\r\n if (Object.prototype.hasOwnProperty.call(it, key)) {\r\n continue;\r\n }\r\n if (Object.prototype.hasOwnProperty.call(tableBodyOperateButtonProps, key)) {\r\n const element = tableBodyOperateButtonProps[key as keyof TableBodyOperateButtonProps];\r\n // 如果btn 定义中含有默认值 则赋值给props\r\n if (Object.prototype.hasOwnProperty.call(element, 'default')) {\r\n Reflect.set(it, key, Reflect.get(element, 'default'));\r\n }\r\n }\r\n }\r\n });\r\n return btnProps;\r\n});\r\n// console.log(customDefault.value[0]);\r\nconst customBtnList = ref<TableBodyOperateButtonProps[]>(customDefault.value);\r\n\r\nonMounted(() => {\r\n // const vNodes = slots.default?.() || [];\r\n // const nodes = vNodes.find(vNode => vNode.props && vNode.props.prop === 'tableOperate');\r\n // tableOperateVnode.value = nodes;\r\n // customBtnList.value = nodes?.children?.default?.(nodes.ctx.scope)?.map((it: any) => it.props) ?? [];\r\n});\r\n\r\nconst customVNodes = computed(() => {\r\n const result: any = [];\r\n // customBtnList.value.forEach((vNode: any) => {\r\n // if (!vNode) {\r\n // return;\r\n // }\r\n // const { prop, type } = vNode;\r\n\r\n // // const node = customElement.value.find((item: { props: { prop: any } }) => item?.props?.prop === prop);\r\n // const node = null;\r\n\r\n // if (node) {\r\n // node.props.type = type;\r\n // result.push(node);\r\n // }\r\n // });\r\n return result;\r\n});\r\n\r\n// 表格头部弹层\r\nconst drawerHeaderVisible = ref(false); // 表头设置弹层\r\nconst drawerOperateVisible = ref(true); // 按钮设置弹层\r\nconst setTable = (event: string) => {\r\n if (event === 'header') {\r\n drawerHeaderVisible.value = true;\r\n }\r\n if (event === 'operate') {\r\n drawerOperateVisible.value = true;\r\n }\r\n};\r\n\r\nconst showTable = ref(true);\r\n\r\nwatch(\r\n [columnVNodes, customVNodes],\r\n async () => {\r\n showTable.value = false;\r\n await nextTick();\r\n setTimeout(() => {\r\n showTable.value = true;\r\n }, 10);\r\n GmTbaleRef.value?.doLayout();\r\n },\r\n {\r\n immediate: true,\r\n deep: true,\r\n },\r\n);\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n#table-page {\r\n :deep(.cell) {\r\n white-space: pre-line !important;\r\n }\r\n :deep(.el-tooltip) {\r\n white-space: nowrap !important;\r\n }\r\n :deep(.el-scrollbar__bar.is-horizontal) {\r\n height: 12px;\r\n border-radius: 12px;\r\n }\r\n .operate-wrap {\r\n text-align: center;\r\n }\r\n .el-button {\r\n margin: 0 3px !important;\r\n }\r\n}\r\n</style>\r\n"],"names":["_useSlots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,IAAA,MAAM,aAAa,GAAmB,EAAA,CAAA;AAEtC,IAAA,MAAM,KAAQ,GAAA,OAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"TableBody.vue2.mjs","sources":["../../../../../../../packages/components/src/business/tableBody/TableBody.vue"],"sourcesContent":["<template>\r\n <div v-if=\"showTable\" id=\"table-page\">\r\n <gm-table\r\n ref=\"GmTbaleRef\"\r\n :data=\"props.data\"\r\n :height=\"tableMaxHeight\"\r\n :header-cell-style=\"props.headerCellStyle\"\r\n :border=\"props.border\"\r\n :row-style=\"props.rowStyle\"\r\n :row-class-name=\"props.rowClassName\"\r\n :selection=\"props.selection\"\r\n @selection-change=\"(value: HeaderListItem[]) => $emit('selectionChange', value)\"\r\n @sort-change=\"(sort: Sort) => $emit('sortChange', sort)\"\r\n >\r\n <template v-if=\"props.selection\">\r\n <gm-table-column :key=\"999999\" type=\"selection\" width=\"50\" />\r\n </template>\r\n\r\n <!-- 渲染数据 -->\r\n <VNodeRenderer :vnode=\"columnVNodes\" />\r\n <!-- 操作 -->\r\n <gm-table-column :width=\"operateWidth\" :fixed=\"operateFixed ? 'right' : false\">\r\n <template #header>\r\n <template v-if=\"!customHeader && !customOperate\">\r\n <div class=\"text-center\">操作</div>\r\n </template>\r\n <template v-else>\r\n <div class=\"operate-wrap\">\r\n <gm-button v-if=\"customHeader\" type=\"primary\" link size=\"small\" @click=\"setTable('header')\"> 表头 </gm-button>\r\n <gm-button v-if=\"customOperate\" type=\"primary\" link size=\"small\" @click=\"setTable('operate')\"> 操作 </gm-button>\r\n </div>\r\n </template>\r\n </template>\r\n <template #default=\"slotValue\">\r\n <!-- <VNodeRenderer :vnode=\"customVNodes\" /> -->\r\n <div v-if=\"tableOperateVnode\" class=\"gm-flex gm-flex-wrap gm-justify-center\">\r\n <TableVNodeRenderer :vnode=\"tableOperateVnode.children.default(slotValue)\" :customPropsList=\"customBtnList\" />\r\n </div>\r\n </template>\r\n </gm-table-column>\r\n </gm-table>\r\n\r\n <!-- 分页 -->\r\n <template v-if=\"props.pagination\">\r\n <div class=\"gm-mt-2 gm-flex gm-justify-end\">\r\n <gm-pagination\r\n :page-size=\"props.pageSize\"\r\n :current-page=\"props.currentPage\"\r\n :page-sizes=\"props.pageSizes\"\r\n :layout=\"props.layout\"\r\n :total=\"props.total\"\r\n :small=\"props.small\"\r\n @size-change=\"(value: number) => $emit('sizeChange', value)\"\r\n @current-change=\"(value: number) => $emit('currentChange', value)\"\r\n />\r\n </div>\r\n </template>\r\n </div>\r\n\r\n <template v-if=\"props.customHeader\">\r\n <gm-table-header v-model:drawer=\"drawerHeaderVisible\" v-model:columnList=\"columnList\" :headerList=\"columnDefault\" :page=\"props.page\" />\r\n </template>\r\n\r\n <template v-if=\"props.customOperate\">\r\n <gm-custom-operations\r\n v-model:isShowDrawer=\"drawerOperateVisible\"\r\n v-model:customBtnList=\"customBtnList\"\r\n :customDefaultPropsList=\"customDefaultPropsList\"\r\n :page=\"props.page\"\r\n />\r\n </template>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { type ComputedRef, computed, nextTick, ref, watch } from 'vue';\r\nimport { useElementBounding, useWindowSize } from '@vueuse/core';\r\nimport { hasOwn } from '@giime/utils/src/objects';\r\n// import { cloneDeep } from 'lodash-es';\r\nimport VNodeRenderer from '../../common/VNodeRenderer';\r\nimport { type HeaderListItem } from '../tableHeader';\r\nimport TableVNodeRenderer from './TableVNodeRenderer';\r\nimport { tableBodyEmits, tableBodyProps } from './tableBody';\r\nimport { tableBodyOperateButtonProps } from './tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport { getVnodesByGmName } from './tableHelper';\r\nimport type { TableBodyOperateButtonProps } from './tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport type { Sort, TableInstance } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmTableBody',\r\n});\r\nconst GmTbaleRef = ref<TableInstance>();\r\ndefineEmits(tableBodyEmits);\r\nconst props = defineProps(tableBodyProps);\r\n\r\n// 表格高度\r\nconst { top } = useElementBounding(GmTbaleRef as any);\r\nconst { height } = useWindowSize();\r\nconst tableMaxHeight = computed(() => height.value - top.value - props.offsetBottom);\r\n\r\nconst slots = defineSlots<{\r\n default(data?: any): HeaderListItem[];\r\n}>();\r\n\r\n// 默认表头\r\nconst columnDefault: ComputedRef<HeaderListItem[]> = computed(() => {\r\n const vNodes: HeaderListItem[] = slots.default?.() || [];\r\n const result = vNodes.filter(vNode => vNode.props && vNode.props.prop !== 'tableOperate');\r\n return result.map(vNode => vNode.props);\r\n});\r\n// 已选中表头\r\nconst columnList = ref<HeaderListItem[]>(columnDefault.value);\r\n// 获取选中插槽内容\r\nconst columnVNodes = computed(() => {\r\n const vNodes: HeaderListItem[] = slots.default?.(props.data) || [];\r\n const result: any = [];\r\n columnList.value.forEach(vNode => {\r\n const { prop, width } = vNode;\r\n const node = vNodes.find(item => item.props.prop === prop);\r\n if (node) {\r\n node.props.width = width;\r\n result.push(node);\r\n }\r\n });\r\n // console.log({ result: result[0].children.default });\r\n return result;\r\n});\r\n// 操作按钮组 当前原始vnode\r\nconst tableOperateVnode = computed(() => {\r\n const vNodes = slots.default?.() || [];\r\n const nodes = vNodes.find(vNode => vNode.props && vNode.props.prop === 'tableOperate');\r\n return nodes;\r\n});\r\n\r\n// 操作按钮\r\n// const customElement = computed(() => {\r\n// const vNodes = slots.default?.(props.data) || [];\r\n// const nodes = vNodes.find(vNode => vNode.props && vNode.props.prop === 'tableOperate');\r\n// const btnNodes = nodes?.children.default?.(nodes.ctx.scope);\r\n// return btnNodes;\r\n// });\r\nconst customDefaultPropsList = computed(() => {\r\n const defaultVnodes = tableOperateVnode.value?.children?.default?.(tableOperateVnode.value?.ctx.scope);\r\n const children = getVnodesByGmName(defaultVnodes, 'TableBodyOperateButton');\r\n\r\n const btnProps: TableBodyOperateButtonProps[] = children.map((vNode: { props: any }) => vNode.props) ?? [];\r\n // 循环插入props所需的默认值\r\n btnProps.forEach(it => {\r\n for (const key in tableBodyOperateButtonProps) {\r\n // 如果当前props含有默认值\r\n if (hasOwn(it, key)) {\r\n continue;\r\n }\r\n if (hasOwn(tableBodyOperateButtonProps, key)) {\r\n const element = tableBodyOperateButtonProps[key as keyof TableBodyOperateButtonProps];\r\n // 如果btn 定义中含有默认值 则赋值给props\r\n if (hasOwn(element, 'default')) {\r\n Reflect.set(it, key, Reflect.get(element, 'default'));\r\n }\r\n }\r\n }\r\n });\r\n return btnProps;\r\n});\r\nconst customBtnList = ref<TableBodyOperateButtonProps[]>(customDefaultPropsList.value);\r\n\r\nconst customVNodes = computed(() => {\r\n const result: any = [];\r\n // customBtnList.value.forEach((vNode: any) => {\r\n // if (!vNode) {\r\n // return;\r\n // }\r\n // const { prop, type } = vNode;\r\n\r\n // // const node = customElement.value.find((item: { props: { prop: any } }) => item?.props?.prop === prop);\r\n // const node = null;\r\n\r\n // if (node) {\r\n // node.props.type = type;\r\n // result.push(node);\r\n // }\r\n // });\r\n return result;\r\n});\r\n\r\n// 表格头部弹层\r\nconst drawerHeaderVisible = ref(false); // 表头设置弹层\r\nconst drawerOperateVisible = ref(true); // 按钮设置弹层\r\nconst setTable = (event: string) => {\r\n if (event === 'header') {\r\n drawerHeaderVisible.value = true;\r\n }\r\n if (event === 'operate') {\r\n drawerOperateVisible.value = true;\r\n }\r\n};\r\n\r\nconst showTable = ref(true);\r\n\r\nwatch(\r\n [columnVNodes, customVNodes],\r\n async () => {\r\n showTable.value = false;\r\n await nextTick();\r\n setTimeout(() => {\r\n showTable.value = true;\r\n }, 10);\r\n GmTbaleRef.value?.doLayout();\r\n },\r\n {\r\n immediate: true,\r\n deep: true,\r\n },\r\n);\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n#table-page {\r\n :deep(.cell) {\r\n white-space: pre-line !important;\r\n }\r\n :deep(.el-tooltip) {\r\n white-space: nowrap !important;\r\n }\r\n :deep(.el-scrollbar__bar.is-horizontal) {\r\n height: 12px;\r\n border-radius: 12px;\r\n }\r\n .operate-wrap {\r\n text-align: center;\r\n }\r\n .el-button {\r\n margin: 0 3px !important;\r\n }\r\n}\r\n</style>\r\n"],"names":["_useSlots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,IAAA,MAAM,aAAa,GAAmB,EAAA,CAAA;AAEtC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAGd,IAAA,MAAM,EAAE,GAAA,EAAQ,GAAA,kBAAA,CAAmB,UAAiB,CAAA,CAAA;AACpD,IAAM,MAAA,EAAE,MAAO,EAAA,GAAI,aAAc,EAAA,CAAA;AACjC,IAAM,MAAA,cAAA,GAAiB,SAAS,MAAM,MAAA,CAAO,QAAQ,GAAI,CAAA,KAAA,GAAQ,MAAM,YAAY,CAAA,CAAA;AAEnF,IAAA,MAAM,QAAQA,QAAA,EAAA,CAAA;AAKd,IAAM,MAAA,aAAA,GAA+C,SAAS,MAAM;AAClE,MAAA,MAAM,MAA2B,GAAA,KAAA,CAAM,OAAU,IAAA,IAAK,EAAC,CAAA;AACvD,MAAM,MAAA,MAAA,GAAS,OAAO,MAAO,CAAA,CAAA,KAAA,KAAS,MAAM,KAAS,IAAA,KAAA,CAAM,KAAM,CAAA,IAAA,KAAS,cAAc,CAAA,CAAA;AACxF,MAAA,OAAO,MAAO,CAAA,GAAA,CAAI,CAAS,KAAA,KAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAAA,KACvC,CAAA,CAAA;AAED,IAAM,MAAA,UAAA,GAAa,GAAsB,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AAE5D,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAA,MAAM,SAA2B,KAAM,CAAA,OAAA,GAAU,KAAM,CAAA,IAAI,KAAK,EAAC,CAAA;AACjE,MAAA,MAAM,SAAc,EAAC,CAAA;AACrB,MAAW,UAAA,CAAA,KAAA,C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,UAAA,CAAW,MAAM;AACf,UAAA,SAAA,CAAU,KAAQ,GAAA,IAAA,CAAA;AAAA,WACjB,EAAE,CAAA,CAAA;AACL,QAAA,UAAA,CAAW,OAAO,QAAS,EAAA,CAAA;AAAA,OAC7B;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,QACX,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, h } from 'vue';
|
|
2
|
+
import { getVnodesByGmName } from './tableHelper.mjs';
|
|
2
3
|
|
|
3
4
|
var TableVNodeRenderer = /* @__PURE__ */ defineComponent({
|
|
5
|
+
functional: true,
|
|
4
6
|
props: {
|
|
5
7
|
// 当前原始vnode
|
|
6
8
|
vnode: {
|
|
@@ -13,14 +15,20 @@ var TableVNodeRenderer = /* @__PURE__ */ defineComponent({
|
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
setup(props) {
|
|
16
|
-
const vnodes = computed(() => Array.isArray(props.vnode) ? props.vnode : [props.vnode]);
|
|
17
|
-
const res = computed(() => props.customPropsList.map((props2) => {
|
|
18
|
+
const vnodes = computed(() => getVnodesByGmName(Array.isArray(props.vnode) ? props.vnode : [props.vnode], "TableBodyOperateButton"));
|
|
19
|
+
const res = computed(() => props.customPropsList.filter((props2) => props2.isShow).map((props2) => {
|
|
18
20
|
const findVnode = vnodes.value.find((it) => it.props.prop === props2.prop);
|
|
19
|
-
findVnode.props
|
|
20
|
-
|
|
21
|
+
findVnode.props = {
|
|
22
|
+
...findVnode.props,
|
|
23
|
+
label: props2.label,
|
|
24
|
+
type: props2.type
|
|
25
|
+
};
|
|
21
26
|
return findVnode;
|
|
22
27
|
}));
|
|
23
|
-
|
|
28
|
+
const render = computed(() => {
|
|
29
|
+
return res.value.map((it) => h(it));
|
|
30
|
+
});
|
|
31
|
+
return () => render.value;
|
|
24
32
|
}
|
|
25
33
|
});
|
|
26
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableVNodeRenderer.mjs","sources":["../../../../../../../packages/components/src/business/tableBody/TableVNodeRenderer.tsx"],"sourcesContent":["// MyVNodeRenderer.js\r\nimport { computed, defineComponent, h } from 'vue';\r\nimport type { PropType } from 'vue';\r\nimport type { TableBodyOperateButtonProps } from './tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nexport default defineComponent({\r\n props: {\r\n // 当前原始vnode\r\n vnode: {\r\n type: [Object, Array],\r\n required: true,\r\n },\r\n customPropsList: {\r\n type: Array as PropType<TableBodyOperateButtonProps[]>,\r\n default: () => [],\r\n },\r\n },\r\n setup(props) {\r\n const vnodes = computed(() => (Array.isArray(props.vnode) ? props.vnode : [props.vnode]));\r\n const res = computed(() =>\r\n props.customPropsList.map(props => {\r\n
|
|
1
|
+
{"version":3,"file":"TableVNodeRenderer.mjs","sources":["../../../../../../../packages/components/src/business/tableBody/TableVNodeRenderer.tsx"],"sourcesContent":["// MyVNodeRenderer.js\r\nimport { computed, defineComponent, h } from 'vue';\r\nimport { getVnodesByGmName } from './tableHelper';\r\nimport type { PropType } from 'vue';\r\nimport type { TableBodyOperateButtonProps } from './tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nexport default defineComponent({\r\n functional: true,\r\n props: {\r\n // 当前原始vnode\r\n vnode: {\r\n type: [Object, Array],\r\n required: true,\r\n },\r\n customPropsList: {\r\n type: Array as PropType<TableBodyOperateButtonProps[]>,\r\n default: () => [],\r\n },\r\n },\r\n setup(props) {\r\n const vnodes = computed(() => getVnodesByGmName(Array.isArray(props.vnode) ? props.vnode : [props.vnode], 'TableBodyOperateButton'));\r\n const res = computed(() =>\r\n props.customPropsList\r\n .filter(props => props.isShow)\r\n .map(props => {\r\n const findVnode = vnodes.value.find(it => it.props.prop === props.prop);\r\n findVnode.props = {\r\n ...findVnode.props,\r\n label: props.label,\r\n type: props.type,\r\n };\r\n // findVnode.props.label = props.label;\r\n // findVnode.props.type = props.type;\r\n return findVnode;\r\n }),\r\n );\r\n const render = computed(() => {\r\n return res.value.map(it => h(it));\r\n });\r\n return () => render.value;\r\n },\r\n});\r\n"],"names":["functional","props","vnode","type","Object","Array","required","customPropsList","default","setup","vnodes","computed","getVnodesByGmName","isArray","res","filter","isShow","map","findVnode","value","find","it","prop","label","render","h"],"mappings":";;;AAKA,yCAA+B,eAAA,CAAA;AAAA,EAC7BA,UAAY,EAAA,IAAA;AAAA,EACZC,KAAO,EAAA;AAAA;AAAA,IAELC,KAAO,EAAA;AAAA,MACLC,IAAAA,EAAM,CAACC,MAAAA,EAAQC,KAAK,CAAA;AAAA,MACpBC,QAAU,EAAA,IAAA;AAAA,KACZ;AAAA,IACAC,eAAiB,EAAA;AAAA,MACfJ,IAAME,EAAAA,KAAAA;AAAAA,MACNG,OAAAA,EAASA,MAAM,EAAA;AAAA,KACjB;AAAA,GACF;AAAA,EACAC,MAAMR,KAAO,EAAA;AACX,IAAA,MAAMS,SAASC,QAAS,CAAA,MAAMC,iBAAkBP,CAAAA,KAAAA,CAAMQ,QAAQZ,KAAMC,CAAAA,KAAK,CAAID,GAAAA,KAAAA,CAAMC,QAAQ,CAACD,KAAAA,CAAMC,KAAK,CAAA,EAAG,wBAAwB,CAAC,CAAA,CAAA;AACnI,IAAA,MAAMY,GAAMH,GAAAA,QAAAA,CAAS,MACnBV,KAAAA,CAAMM,eACHQ,CAAAA,MAAAA,CAAOd,CAAAA,MAAAA,KAASA,MAAMe,CAAAA,MAAM,CAC5BC,CAAAA,GAAAA,CAAIhB,CAAAA,MAAS,KAAA;AACZ,MAAMiB,MAAAA,SAAAA,GAAYR,OAAOS,KAAMC,CAAAA,IAAAA,CAAKC,QAAMA,EAAGpB,CAAAA,KAAAA,CAAMqB,IAASrB,KAAAA,MAAAA,CAAMqB,IAAI,CAAA,CAAA;AACtEJ,MAAAA,SAAAA,CAAUjB,KAAQ,GAAA;AAAA,QAChB,GAAGiB,SAAUjB,CAAAA,KAAAA;AAAAA,QACbsB,OAAOtB,MAAMsB,CAAAA,KAAAA;AAAAA,QACbpB,MAAMF,MAAME,CAAAA,IAAAA;AAAAA,OACd,CAAA;AAGA,MAAOe,OAAAA,SAAAA,CAAAA;AAAAA,KACR,CACL,CAAA,CAAA;AACA,IAAMM,MAAAA,MAAAA,GAASb,SAAS,MAAM;AAC5B,MAAA,OAAOG,IAAIK,KAAMF,CAAAA,GAAAA,CAAII,CAAMI,EAAAA,KAAAA,CAAAA,CAAEJ,EAAE,CAAC,CAAA,CAAA;AAAA,KACjC,CAAA,CAAA;AACD,IAAA,OAAO,MAAMG,MAAOL,CAAAA,KAAAA,CAAAA;AAAAA,GACtB;AACF,CAAC,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, createVNode, withCtx, createTextVNode, toDisplayString } from 'vue';
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { tableBodyOperateButtonProps } from './tableBodyOperateButton.mjs';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -15,21 +15,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
null,
|
|
16
16
|
[
|
|
17
17
|
createCommentVNode(" \u64CD\u4F5C "),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
createElementVNode("div", null, [
|
|
19
|
+
createVNode(_component_gm_button, {
|
|
20
|
+
type: _ctx.type,
|
|
21
|
+
size: "small",
|
|
22
|
+
link: ""
|
|
23
|
+
}, {
|
|
24
|
+
default: withCtx(() => [
|
|
25
|
+
createTextVNode(
|
|
26
|
+
toDisplayString(_ctx.label),
|
|
27
|
+
1
|
|
28
|
+
/* TEXT */
|
|
29
|
+
)
|
|
30
|
+
]),
|
|
31
|
+
_: 1
|
|
32
|
+
/* STABLE */
|
|
33
|
+
}, 8, ["type"])
|
|
34
|
+
])
|
|
33
35
|
],
|
|
34
36
|
2112
|
|
35
37
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBodyOperateButton.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableBodyOperateButton.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getVnodesByGmName: (defaultVnodes: any[], name: string) => any[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Fragment } from 'vue';
|
|
2
|
+
import { isString } from '../../../../utils/src/is.mjs';
|
|
3
|
+
|
|
4
|
+
const getVnodesByGmName = (defaultVnodes, name) => {
|
|
5
|
+
const children = [];
|
|
6
|
+
if (Array.isArray(defaultVnodes)) {
|
|
7
|
+
for (const childNode of defaultVnodes) {
|
|
8
|
+
if (childNode.type?.name === name || childNode.shapeFlag & 2) {
|
|
9
|
+
children.push(childNode);
|
|
10
|
+
} else if (childNode.type === Fragment && Array.isArray(childNode.children)) {
|
|
11
|
+
childNode.children.forEach((vnode) => {
|
|
12
|
+
if (vnode?.patchFlag !== 1024 && !isString(vnode?.children)) {
|
|
13
|
+
children.push(vnode);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return children;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { getVnodesByGmName };
|
|
23
|
+
//# sourceMappingURL=tableHelper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableHelper.mjs","sources":["../../../../../../../packages/components/src/business/tableBody/tableHelper.ts"],"sourcesContent":["import { Fragment } from 'vue';\r\nimport { isString } from '@giime/utils/src/is';\r\nexport const getVnodesByGmName = (defaultVnodes: any[], name: string) => {\r\n const children = [];\r\n if (Array.isArray(defaultVnodes)) {\r\n for (const childNode of defaultVnodes) {\r\n if (childNode.type?.name === name || childNode.shapeFlag & 2) {\r\n children.push(childNode);\r\n } else if (childNode.type === Fragment && Array.isArray(childNode.children)) {\r\n childNode.children.forEach((vnode: any) => {\r\n // No rendering when vnode is dynamic slot or text\r\n if (vnode?.patchFlag !== 1024 && !isString(vnode?.children)) {\r\n children.push(vnode);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n return children;\r\n};\r\n"],"names":[],"mappings":";;;AAEa,MAAA,iBAAA,GAAoB,CAAC,aAAA,EAAsB,IAAiB,KAAA;AACvE,EAAA,MAAM,WAAW,EAAC,CAAA;AAClB,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,aAAa,CAAG,EAAA;AAChC,IAAA,KAAA,MAAW,aAAa,aAAe,EAAA;AACrC,MAAA,IAAI,UAAU,IAAM,EAAA,IAAA,KAAS,IAAQ,IAAA,SAAA,CAAU,YAAY,CAAG,EAAA;AAC5D,QAAA,QAAA,CAAS,KAAK,SAAS,CAAA,CAAA;AAAA,OACzB,MAAA,IAAW,UAAU,IAAS,KAAA,QAAA,IAAY,MAAM,OAAQ,CAAA,SAAA,CAAU,QAAQ,CAAG,EAAA;AAC3E,QAAU,SAAA,CAAA,QAAA,CAAS,OAAQ,CAAA,CAAC,KAAe,KAAA;AAEzC,UAAA,IAAI,OAAO,SAAc,KAAA,IAAA,IAAQ,CAAC,QAAS,CAAA,KAAA,EAAO,QAAQ,CAAG,EAAA;AAC3D,YAAA,QAAA,CAAS,KAAK,KAAK,CAAA,CAAA;AAAA,WACrB;AAAA,SACD,CAAA,CAAA;AAAA,OACH;AAAA,KACF;AAAA,GACF;AACA,EAAO,OAAA,QAAA,CAAA;AACT;;;;"}
|
|
@@ -3,6 +3,9 @@ import { queryParamsKey } from '../constants.mjs';
|
|
|
3
3
|
|
|
4
4
|
const useWatchModelChange = (modelValue, options) => {
|
|
5
5
|
const queryParams = inject(queryParamsKey);
|
|
6
|
+
if (queryParams) {
|
|
7
|
+
modelValue.value = queryParams.value[options.prop];
|
|
8
|
+
}
|
|
6
9
|
watch(modelValue, (newValue) => {
|
|
7
10
|
if (queryParams) {
|
|
8
11
|
queryParams.value[options.prop] = newValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWatchModelChange.mjs","sources":["../../../../../../../../packages/components/src/composite/searchForm/composables/useWatchModelChange.ts"],"sourcesContent":["import { inject, watch } from 'vue';\r\nimport { queryParamsKey } from '../constants';\r\nimport type { ModelRef } from 'vue';\r\n\r\n/**\r\n * 监听modelValue变化 赋值给queryParams\r\n * 用于search-form item 不传v-model\r\n * @param modelValue\r\n * @param options\r\n */\r\nexport const useWatchModelChange = <T>(modelValue: ModelRef<T>, options: { prop: string }) => {\r\n const queryParams = inject(queryParamsKey);\r\n watch(modelValue, newValue => {\r\n if (queryParams) {\r\n queryParams.value[options.prop] = newValue;\r\n }\r\n });\r\n watch(\r\n () => queryParams?.value?.[options.prop],\r\n newValue => {\r\n modelValue.value = newValue;\r\n },\r\n );\r\n};\r\n"],"names":[],"mappings":";;;AAUa,MAAA,mBAAA,GAAsB,CAAI,UAAA,EAAyB,OAA8B,KAAA;AAC5F,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA,CAAA;AACzC,EAAA,KAAA,CAAM,YAAY,CAAY,QAAA,KAAA;AAC5B,IAAA,IAAI,WAAa,EAAA;AACf,MAAY,WAAA,CAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAI,GAAA,QAAA,CAAA;AAAA,KACpC;AAAA,GACD,CAAA,CAAA;AACD,EAAA,KAAA;AAAA,IACE,MAAM,WAAA,EAAa,KAAQ,GAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,IACvC,CAAY,QAAA,KAAA;AACV,MAAA,UAAA,CAAW,KAAQ,GAAA,QAAA,CAAA;AAAA,KACrB;AAAA,GACF,CAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"useWatchModelChange.mjs","sources":["../../../../../../../../packages/components/src/composite/searchForm/composables/useWatchModelChange.ts"],"sourcesContent":["import { inject, watch } from 'vue';\r\nimport { queryParamsKey } from '../constants';\r\nimport type { ModelRef } from 'vue';\r\n\r\n/**\r\n * 监听modelValue变化 赋值给queryParams\r\n * 用于search-form item 不传v-model\r\n * @param modelValue\r\n * @param options\r\n */\r\nexport const useWatchModelChange = <T>(modelValue: ModelRef<T>, options: { prop: string }) => {\r\n const queryParams = inject(queryParamsKey);\r\n if (queryParams) {\r\n modelValue.value = queryParams.value[options.prop];\r\n }\r\n watch(modelValue, newValue => {\r\n if (queryParams) {\r\n queryParams.value[options.prop] = newValue;\r\n }\r\n });\r\n watch(\r\n () => queryParams?.value?.[options.prop],\r\n newValue => {\r\n modelValue.value = newValue;\r\n },\r\n );\r\n};\r\n"],"names":[],"mappings":";;;AAUa,MAAA,mBAAA,GAAsB,CAAI,UAAA,EAAyB,OAA8B,KAAA;AAC5F,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA,CAAA;AACzC,EAAA,IAAI,WAAa,EAAA;AACf,IAAA,UAAA,CAAW,KAAQ,GAAA,WAAA,CAAY,KAAM,CAAA,OAAA,CAAQ,IAAI,CAAA,CAAA;AAAA,GACnD;AACA,EAAA,KAAA,CAAM,YAAY,CAAY,QAAA,KAAA;AAC5B,IAAA,IAAI,WAAa,EAAA;AACf,MAAY,WAAA,CAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAI,GAAA,QAAA,CAAA;AAAA,KACpC;AAAA,GACD,CAAA,CAAA;AACD,EAAA,KAAA;AAAA,IACE,MAAM,WAAA,EAAa,KAAQ,GAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,IACvC,CAAY,QAAA,KAAA;AACV,MAAA,UAAA,CAAW,KAAQ,GAAA,QAAA,CAAA;AAAA,KACrB;AAAA,GACF,CAAA;AACF;;;;"}
|
package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.mjs
CHANGED
|
@@ -13,8 +13,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
}),
|
|
14
14
|
emits: /* @__PURE__ */ mergeModels(searchFormSelectEmits, ["update:modelValue"]),
|
|
15
15
|
setup(__props, { emit: __emit }) {
|
|
16
|
-
const modelValue = useModel(__props, "modelValue");
|
|
17
16
|
const props = __props;
|
|
17
|
+
const modelValue = useModel(__props, "modelValue");
|
|
18
18
|
const emit = __emit;
|
|
19
19
|
useWatchModelChange(modelValue, { prop: props.prop });
|
|
20
20
|
return (_ctx, _cache) => {
|
package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFormSelect.vue2.mjs","sources":["../../../../../../../../../packages/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue"],"sourcesContent":["<template>\r\n <gm-form-item :prop=\"prop\">\r\n <gm-select\r\n v-model=\"modelValue\"\r\n :placeholder=\"label\"\r\n :multiple=\"multiple\"\r\n filterable\r\n clearable\r\n collapse-tags\r\n collapse-tags-tooltip\r\n class=\"gm-w-[180px]\"\r\n @change=\"emit('change', $event)\"\r\n >\r\n <gm-option v-for=\"(item, index) in options\" :key=\"index\" :label=\"item.label\" :value=\"item.value\" />\r\n </gm-select>\r\n </gm-form-item>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { useWatchModelChange } from '../../composables/useWatchModelChange';\r\nimport { SearchFormSelectName, searchFormSelectEmits, searchFormSelectProps } from './searchFormSelect';\r\nimport type { SelectProps } from '@giime/components/src/base/select';\r\n\r\ndefineOptions({\r\n name: SearchFormSelectName,\r\n});\r\nconst modelValue = defineModel<SelectProps['modelValue'] | undefined>();\r\
|
|
1
|
+
{"version":3,"file":"SearchFormSelect.vue2.mjs","sources":["../../../../../../../../../packages/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue"],"sourcesContent":["<template>\r\n <gm-form-item :prop=\"prop\">\r\n <gm-select\r\n v-model=\"modelValue\"\r\n :placeholder=\"label\"\r\n :multiple=\"multiple\"\r\n filterable\r\n clearable\r\n collapse-tags\r\n collapse-tags-tooltip\r\n class=\"gm-w-[180px]\"\r\n @change=\"emit('change', $event)\"\r\n >\r\n <gm-option v-for=\"(item, index) in options\" :key=\"index\" :label=\"item.label\" :value=\"item.value\" />\r\n </gm-select>\r\n </gm-form-item>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { useWatchModelChange } from '../../composables/useWatchModelChange';\r\nimport { SearchFormSelectName, searchFormSelectEmits, searchFormSelectProps } from './searchFormSelect';\r\nimport type { SelectProps } from '@giime/components/src/base/select';\r\n\r\ndefineOptions({\r\n name: SearchFormSelectName,\r\n});\r\nconst props = defineProps(searchFormSelectProps);\r\nconst modelValue = defineModel<SelectProps['modelValue'] | undefined>();\r\n\r\nconst emit = defineEmits(searchFormSelectEmits);\r\nuseWatchModelChange(modelValue, { prop: props.prop });\r\n</script>\r\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAM,MAAA,UAAA,GAAaA,QAAmD,CAAA,OAAA,EAAA,YAAA,CAAA,CAAA;AAEtE,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAA,mBAAA,CAAoB,UAAY,EAAA,EAAE,IAAM,EAAA,KAAA,CAAM,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/giime/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ export { createAxios } from '../utils/src/http/createAxios.mjs';
|
|
|
12
12
|
export { errorMessage, responseErrorMessage } from '../utils/src/http/errorMessage.mjs';
|
|
13
13
|
export { req401Interceptors, res401Interceptors } from '../utils/src/http/interceptors.mjs';
|
|
14
14
|
export { giimeDevProxy } from '../utils/src/http/devProxy.mjs';
|
|
15
|
-
export { keysOf } from '../utils/src/objects.mjs';
|
|
15
|
+
export { hasOwn, keysOf } from '../utils/src/objects.mjs';
|
|
16
16
|
export { getDateShortcuts } from '../utils/src/date/dateShortcuts.mjs';
|
|
17
17
|
export { affixEmits, affixProps } from '../components/src/base/affix/affix.mjs';
|
|
18
18
|
export { GmAffix } from '../components/src/base/affix/index.mjs';
|
package/es/giime/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.14";
|
package/es/giime/version.mjs
CHANGED
package/es/giime/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.0.14';\n"],"names":[],"mappings":"AAAO,MAAM,OAAU,GAAA;;;;"}
|
|
@@ -2,25 +2,28 @@
|
|
|
2
2
|
import { type AddListCustomParams } from '../../../api';
|
|
3
3
|
import { type EventHookOn } from '@vueuse/core';
|
|
4
4
|
interface CustomSettings {
|
|
5
|
-
[
|
|
5
|
+
[key_word: string]: {
|
|
6
|
+
[type: string]: any;
|
|
7
|
+
};
|
|
6
8
|
}
|
|
7
9
|
interface CustomSettingsItem {
|
|
8
|
-
|
|
10
|
+
key_word: string;
|
|
11
|
+
type: string;
|
|
9
12
|
}
|
|
10
13
|
export declare const useCustomSettingsStore: import("pinia").StoreDefinition<"gmCustomSettings", import("pinia")._UnwrapAll<Pick<{
|
|
11
|
-
addListCustomInfo: (params: AddListCustomParams) => Promise<
|
|
14
|
+
addListCustomInfo: (params: AddListCustomParams) => Promise<any>;
|
|
12
15
|
getCustomPage: (key_word: string, type: string) => Promise<any>;
|
|
13
16
|
customSettings: import("vue").Ref<CustomSettings>;
|
|
14
17
|
/** 监听接口成功*/
|
|
15
18
|
onCustomResult: EventHookOn<CustomSettingsItem>;
|
|
16
19
|
}, "customSettings">>, Pick<{
|
|
17
|
-
addListCustomInfo: (params: AddListCustomParams) => Promise<
|
|
20
|
+
addListCustomInfo: (params: AddListCustomParams) => Promise<any>;
|
|
18
21
|
getCustomPage: (key_word: string, type: string) => Promise<any>;
|
|
19
22
|
customSettings: import("vue").Ref<CustomSettings>;
|
|
20
23
|
/** 监听接口成功*/
|
|
21
24
|
onCustomResult: EventHookOn<CustomSettingsItem>;
|
|
22
25
|
}, never>, Pick<{
|
|
23
|
-
addListCustomInfo: (params: AddListCustomParams) => Promise<
|
|
26
|
+
addListCustomInfo: (params: AddListCustomParams) => Promise<any>;
|
|
24
27
|
getCustomPage: (key_word: string, type: string) => Promise<any>;
|
|
25
28
|
customSettings: import("vue").Ref<CustomSettings>;
|
|
26
29
|
/** 监听接口成功*/
|