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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomOperations.vue2.js","sources":["../../../../../../../packages/components/src/business/customOperations/CustomOperations.vue"],"sourcesContent":["<template>\r\n <gm-drawer\r\n title=\"自定义按钮\"\r\n :model-value=\"props.drawer\"\r\n :close-on-click-modal=\"false\"\r\n :close-on-press-escape=\"false\"\r\n direction=\"rtl\"\r\n size=\"500px\"\r\n append-to-body\r\n destroy-on-close\r\n >\r\n <div\r\n class=\"drawer-alert gm-my-4 gm-flex gm-items-center gm-justify-between gm-rounded gm-border gm-border-cyan-300 gm-bg-cyan-50 gm-px-4 gm-text-sm gm-leading-[40px] gm-text-[#777]\"\r\n >\r\n <div class=\"gm-flex gm-items-center\">\r\n <gm-icon><i-ep-info-filled /></gm-icon>\r\n <p class=\"gm-ml-2\">\r\n 已选中 <span class=\"gm-text-cyan-500\">{{ checkedNumber }}</span> 项\r\n </p>\r\n <b class=\"gm-ml-3 gm-text-orange-400\">点击按钮可修改当前按钮颜色!</b>\r\n </div>\r\n </div>\r\n {{ multipleSelection }}\r\n <gm-table ref=\"multipleTableRef\" :data=\"operates\" :header-cell-style=\"{ background: '#F5F7FA', color: '#333' }\" style=\"width: 100%\">\r\n <el-table-column align=\"left\" width=\"80\">\r\n <template #header>\r\n <gm-checkbox :model-value=\"checkedAll\" :indeterminate=\"isIndeterminate\" @change=\"handleCheckAllChange\" />\r\n </template>\r\n <template #default=\"scope\">\r\n <gm-checkbox v-model=\"scope.row.isShow\" />\r\n </template>\r\n </el-table-column>\r\n <gm-table-column label=\"按钮\">\r\n <template #default=\"{ row }\">\r\n <gm-popover placement=\"bottom\" :width=\"330\" trigger=\"click\">\r\n <template #reference>\r\n <gm-button :type=\"row.type || 'primary'\" link size=\"small\">\r\n {{ row.label }}\r\n </gm-button>\r\n </template>\r\n <div class=\"p-1\">\r\n <div class=\"text-[14px] gm-mb-2\">点击下列色块可修改按钮颜色</div>\r\n <gm-button type=\"primary\" size=\"small\" @click=\"setBtnType(row, 'primary')\"> 蓝色 </gm-button>\r\n <gm-button type=\"success\" size=\"small\" @click=\"setBtnType(row, 'success')\"> 绿色 </gm-button>\r\n <gm-button type=\"info\" size=\"small\" @click=\"setBtnType(row, 'info')\"> 灰色 </gm-button>\r\n <gm-button type=\"warning\" size=\"small\" @click=\"setBtnType(row, 'warning')\"> 橙色 </gm-button>\r\n <gm-button type=\"danger\" size=\"small\" @click=\"setBtnType(row, 'danger')\"> 红色 </gm-button>\r\n </div>\r\n </gm-popover>\r\n </template>\r\n </gm-table-column>\r\n <!-- <gm-table-column prop=\"address\" label=\"Address\" show-overflow-tooltip /> -->\r\n </gm-table>\r\n <div class=\"gm-border gm-text-center gm-text-sm\" :class=\"columnClass\">\r\n <ul class=\"gm-flex gm-items-center gm-bg-gray-100 gm-font-bold gm-leading-[43px] gm-text-gray-500\">\r\n <li class=\"gm-flex gm-w-24 gm-items-center gm-justify-center gm-border-r gm-border-white\">\r\n <gm-checkbox :model-value=\"checkedAll\" size=\"large\" @change=\"changeCheckbox\" />\r\n <p class=\"gm-ml-2\">全选</p>\r\n </li>\r\n <li class=\"gm-flex-1 gm-border-r gm-border-white\">按钮</li>\r\n <li class=\"gm-w-32\">拖动调整顺序</li>\r\n </ul>\r\n <div>\r\n <ul\r\n v-for=\"item in operates\"\r\n :key=\"item.prop\"\r\n class=\"gm-flex gm-items-center gm-border-t gm-border-gray-200 gm-leading-[40px] gm-text-gray-800\"\r\n :draggable=\"true\"\r\n @dragstart=\"dragstart(item)\"\r\n @dragenter=\"dragenter(item, $event)\"\r\n @dragend=\"dragend\"\r\n @dragover=\"dragover($event)\"\r\n >\r\n <li class=\"gm-flex gm-w-24 gm-items-center gm-justify-center gm-border-r gm-border-gray-200\">\r\n <div class=\"column-checked\">\r\n <gm-checkbox v-model=\"item.isShow\" size=\"large\" />\r\n </div>\r\n </li>\r\n <li class=\"gm-flex-1 gm-border-r gm-border-gray-200\">\r\n <gm-popover placement=\"bottom\" :width=\"330\" trigger=\"click\">\r\n <template #reference>\r\n <gm-button :type=\"item.type || 'primary'\" link size=\"small\">\r\n {{ item.label }}\r\n </gm-button>\r\n </template>\r\n <div class=\"p-1\">\r\n <div class=\"text-[14px] gm-mb-2\">点击下列色块可修改按钮颜色</div>\r\n <gm-button type=\"primary\" size=\"small\" @click=\"setBtnType(item, 'primary')\"> 蓝色 </gm-button>\r\n <gm-button type=\"success\" size=\"small\" @click=\"setBtnType(item, 'success')\"> 绿色 </gm-button>\r\n <gm-button type=\"info\" size=\"small\" @click=\"setBtnType(item, 'info')\"> 灰色 </gm-button>\r\n <gm-button type=\"warning\" size=\"small\" @click=\"setBtnType(item, 'warning')\"> 橙色 </gm-button>\r\n <gm-button type=\"danger\" size=\"small\" @click=\"setBtnType(item, 'danger')\"> 红色 </gm-button>\r\n </div>\r\n </gm-popover>\r\n </li>\r\n <li class=\"gm-w-32\">\r\n <gm-button type=\"primary\" link size=\"default\" :icon=\"Rank\" />\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <div class=\"drawer-footer-btn gm-flex gm-justify-between gm-border-t-2 gm-border-[#f2f2f2]\">\r\n <gm-button type=\"primary\" size=\"default\" @click=\"onReset\">重置</gm-button>\r\n <div>\r\n <gm-button size=\"default\" @click=\"$emit('update:drawer', false)\">取消</gm-button>\r\n <gm-button type=\"primary\" size=\"default\" @click=\"onSubmit\">保存</gm-button>\r\n </div>\r\n </div>\r\n </gm-drawer>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, onMounted, ref } from 'vue';\r\nimport { useCloned, useWindowSize } from '@vueuse/core';\r\nimport { useCustomSettingsStore } from '@giime/hooks';\r\nimport { ElMessage } from 'element-plus';\r\nimport { Rank } from '@element-plus/icons-vue';\r\nimport { customOperationsProps } from './customOperations';\r\nimport type { TableBodyOperateButtonProps } from '../tableBody/tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport type { TableInstance } from '@giime/components/src/base/table/index';\r\nimport type { CheckboxValueType } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmCustomOperations',\r\n});\r\nconst emit = defineEmits([\"update:drawer\", \"update:customBtnList\"]);\r\nconst props = defineProps(customOperationsProps);\r\n\r\nconst useCustom = useCustomSettingsStore();\r\nconst multipleTableRef = ref<TableInstance>();\r\nconst multipleSelection = ref<number[]>([]);\r\nconst operates = ref<TableBodyOperateButtonProps[]>([]);\r\n\r\nconst gmCustomkeyWord = computed(() => `gmCustom${props.page}`);\r\nconst gmCustomType = computed(() => `OperateList`);\r\n\r\nconst updateOperate = () => {\r\n const { cloned } = useCloned(operates.value);\r\n const result = cloned.value.filter(v => v.isShow);\r\n emit('update:customBtnList', result);\r\n};\r\n\r\nconst initOperate = async () => {\r\n const { cloned: clonedStore } = useCloned(useCustom.customSettings[gmCustomkeyWord.value][gmCustomType.value] || []);\r\n const { cloned: clonedProps } = useCloned(props.operateList);\r\n\r\n const column: TableBodyOperateButtonProps[] = [];\r\n clonedStore.value.forEach((v: TableBodyOperateButtonProps) => {\r\n const index = clonedProps.value.findIndex(h => h.prop === v.prop);\r\n if (index > -1) {\r\n const item = clonedProps.value.splice(index, 1)[0];\r\n const { label } = item;\r\n // 每次更新按钮名称\r\n column.push({ ...v, ...item, label });\r\n }\r\n });\r\n operates.value = [...column, ...clonedProps.value];\r\n\r\n if (!clonedStore.value.length) {\r\n operates.value.forEach(v => {\r\n v.isShow = true;\r\n });\r\n }\r\n\r\n updateOperate();\r\n};\r\n\r\n// 已选中条数\r\nconst checkedNumber = computed(() => {\r\n return operates.value.filter(v => v.isShow).length;\r\n});\r\n// 全选\r\nconst checkedAll = computed(() => operates.value.every(v => v.isShow));\r\n// 半选\r\nconst isIndeterminate = computed(() => !checkedAll.value && operates.value.some(v => v.isShow));\r\n// 切换全选\r\nconst handleCheckAllChange = (val: CheckboxValueType) => {\r\n operates.value.forEach(v => {\r\n v.isShow = Boolean(val);\r\n });\r\n};\r\nconst changeCheckbox = () => {\r\n if (!checkedAll.value) {\r\n operates.value.forEach(v => {\r\n v.isShow = true;\r\n });\r\n }\r\n};\r\n\r\nconst { height } = useWindowSize();\r\nconst columnClass = computed(() => {\r\n const h = props.operateList.length * 43;\r\n return h > height.value - 270 ? 'column-class' : '';\r\n});\r\n\r\nconst start = ref<TableBodyOperateButtonProps>();\r\nconst end = ref<TableBodyOperateButtonProps>();\r\n// 拖拽开始\r\nconst dragstart = (item: TableBodyOperateButtonProps) => {\r\n start.value = item;\r\n};\r\n// 拖拽过程\r\nconst dragenter = (item: TableBodyOperateButtonProps, e: DragEvent) => {\r\n end.value = item;\r\n e.preventDefault();\r\n};\r\n// 拖拽结束\r\nconst dragend = () => {\r\n if (start.value === end.value) return;\r\n if (start.value && end.value) {\r\n const oldIndex: number = operates.value.findIndex(v => v.prop === start.value?.prop);\r\n const newIndex: number = operates.value.findIndex(v => v.prop === end.value?.prop);\r\n const newItems = [...operates.value];\r\n\r\n // 删除老节点\r\n newItems.splice(oldIndex, 1);\r\n\r\n // 目标位置新增节点\r\n newItems.splice(newIndex, 0, start.value);\r\n operates.value = [...newItems];\r\n }\r\n};\r\n\r\n// 拖拽事件\r\nconst dragover = (e: DragEvent) => {\r\n e.preventDefault();\r\n};\r\n\r\n// 设置按钮颜色\r\nconst setBtnType = (item: TableBodyOperateButtonProps, type: TableBodyOperateButtonProps['type']) => {\r\n item.type = type;\r\n};\r\n\r\n// 保存\r\nconst onSubmit = () => {\r\n useCustom\r\n .addListCustomInfo({\r\n key_word: gmCustomkeyWord.value,\r\n value: JSON.stringify(operates.value),\r\n type: gmCustomType.value,\r\n })\r\n .then(() => {\r\n emit('update:drawer', false);\r\n updateOperate();\r\n ElMessage.success('保存成功');\r\n // if (res.code === 0) {\r\n // // GmMessage.success('保存成功');\r\n // }\r\n })\r\n .catch(() => {});\r\n emit('update:drawer', false);\r\n};\r\n\r\n// 重置\r\nconst onReset = () => {};\r\n\r\n// 监听接口请求完成\r\nuseCustom.onCustomResult(() => {\r\n initOperate();\r\n});\r\n\r\nonMounted(async () => {\r\n useCustom.getCustomPage(gmCustomkeyWord.value, gmCustomType.value);\r\n});\r\n</script>\r\n"],"names":["useCustomSettingsStore","ref","computed","useCloned","useWindowSize","ElMessage","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8HA,IAAA,MAAM,I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AIzB,CACA,CAAA,KAAA,CAAM,MAAM;AAAA,OAAE,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,iBAAiB,KAAK,CAAA,CAAA;AAAA,KAC7B,CAAA;AAGA,IAAA,MAAM,UAAU,MAAM;AAAA,KAAC,CAAA;AAGvB,IAAA,SAAA,CAAU,eAAe,MAAM;AAC7B,MAAY,WAAA,EAAA,CAAA;AAAA,KACb,CAAA,CAAA;AAED,IAAAC,aAAA,CAAU,YAAY;AACpB,MAAA,SAAA,CAAU,aAAc,CAAA,eAAA,CAAgB,KAAO,EAAA,YAAA,CAAa,KAAK,CAAA,CAAA;AAAA,KAClE,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CustomOperations.vue2.js","sources":["../../../../../../../packages/components/src/business/customOperations/CustomOperations.vue"],"sourcesContent":["<template>\r\n <gm-drawer v-model=\"isShowDrawer\" title=\"自定义按钮\" direction=\"rtl\" size=\"500px\" append-to-body destroy-on-close>\r\n <section\r\n class=\"drawer-alert gm-mb-4 gm-flex gm-items-center gm-justify-between gm-rounded gm-border gm-border-cyan-300 gm-bg-cyan-50 gm-px-4 gm-text-sm gm-leading-[40px] gm-text-[#777]\"\r\n >\r\n <div class=\"gm-flex gm-items-center\">\r\n <gm-icon><i-ep-info-filled /></gm-icon>\r\n <p class=\"gm-ml-2\">\r\n 已选中 <span class=\"gm-text-cyan-500\">{{ checkedNumber }}</span> 项\r\n </p>\r\n <b class=\"gm-ml-3 gm-text-orange-400\">点击按钮可修改当前按钮颜色!</b>\r\n </div>\r\n </section>\r\n <gm-table :data=\"clonedCustomBtnList\" :header-cell-style=\"{ background: '#F5F7FA', color: '#333' }\" style=\"width: 100%\">\r\n <el-table-column align=\"left\" width=\"80\">\r\n <template #header>\r\n <gm-checkbox :model-value=\"checkedAll\" :indeterminate=\"isIndeterminate\" @change=\"handleCheckAllChange\" />\r\n </template>\r\n <template #default=\"{ row }: { row: TableBodyOperateButtonProps }\">\r\n <gm-checkbox v-model=\"row.isShow\" />\r\n </template>\r\n </el-table-column>\r\n <gm-table-column label=\"按钮\">\r\n <template #default=\"{ row }: { row: TableBodyOperateButtonProps }\">\r\n <gm-popover placement=\"bottom\" :width=\"330\" trigger=\"click\">\r\n <template #reference>\r\n <gm-button :type=\"row.type || 'primary'\" link size=\"small\">\r\n {{ row.label }}\r\n </gm-button>\r\n </template>\r\n <div class=\"p-1\">\r\n <div class=\"text-[14px] gm-mb-2\">点击下列色块可修改按钮颜色</div>\r\n <gm-button type=\"primary\" size=\"small\" @click=\"setBtnType(row, 'primary')\"> 蓝色 </gm-button>\r\n <gm-button type=\"success\" size=\"small\" @click=\"setBtnType(row, 'success')\"> 绿色 </gm-button>\r\n <gm-button type=\"info\" size=\"small\" @click=\"setBtnType(row, 'info')\"> 灰色 </gm-button>\r\n <gm-button type=\"warning\" size=\"small\" @click=\"setBtnType(row, 'warning')\"> 橙色 </gm-button>\r\n <gm-button type=\"danger\" size=\"small\" @click=\"setBtnType(row, 'danger')\"> 红色 </gm-button>\r\n </div>\r\n </gm-popover>\r\n </template>\r\n </gm-table-column>\r\n <!-- <gm-table-column prop=\"address\" label=\"Address\" show-overflow-tooltip /> -->\r\n </gm-table>\r\n <template #footer>\r\n <div class=\"gm-flex gm-justify-between\">\r\n <gm-button type=\"primary\" size=\"default\" @click=\"onReset\">重置</gm-button>\r\n <div>\r\n <gm-button size=\"default\" @click=\"isShowDrawer = false\">取消</gm-button>\r\n <gm-button type=\"primary\" size=\"default\" @click=\"onSubmit\">保存</gm-button>\r\n </div>\r\n </div>\r\n </template>\r\n </gm-drawer>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, onMounted } from 'vue';\r\nimport { useCustomSettingsStore } from '@giime/hooks';\r\nimport { ElMessage } from 'element-plus';\r\nimport { cloneDeep } from 'lodash-es';\r\nimport { useCloned } from '@vueuse/core';\r\nimport { customOperationsProps } from './customOperations';\r\nimport type { TableBodyOperateButtonProps } from '../tableBody/tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport type { CheckboxValueType } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmCustomOperations',\r\n});\r\n/**\r\n * 抽屉显示\r\n */\r\nconst isShowDrawer = defineModel<boolean>('isShowDrawer', {\r\n required: true,\r\n});\r\n/**\r\n * 自定义按钮 props列表\r\n */\r\nconst customBtnList = defineModel<TableBodyOperateButtonProps[]>('customBtnList', {\r\n required: true,\r\n});\r\nconst { cloned: clonedCustomBtnList } = useCloned(customBtnList);\r\nconst props = defineProps(customOperationsProps);\r\n\r\nconst defaultPropsList = computed(() => cloneDeep(props.customDefaultPropsList));\r\n\r\nconst useCustom = useCustomSettingsStore();\r\n\r\nconst gmCustomkeyWord = computed(() => `gmCustom${props.page}`);\r\nconst gmCustomType = computed(() => `OperateList2`);\r\n\r\nconst updateOperate = () => {\r\n customBtnList.value = clonedCustomBtnList.value;\r\n};\r\n\r\nconst initOperate = async () => {\r\n // operates.value = defaultPropsList.value;\r\n // const { cloned: clonedStore } = useCloned(useCustom.customSettings[gmCustomkeyWord.value][gmCustomType.value] || []);\r\n // const { cloned: clonedProps } = useCloned(props.operateList);\r\n\r\n // const column: TableBodyOperateButtonProps[] = [];\r\n // clonedStore.value.forEach((v: TableBodyOperateButtonProps) => {\r\n // const index = clonedProps.value.findIndex(h => h.prop === v.prop);\r\n // if (index > -1) {\r\n // const item = clonedProps.value.splice(index, 1)[0];\r\n // const { label } = item;\r\n // // 每次更新按钮名称\r\n // column.push({ ...v, ...item, label });\r\n // }\r\n // });\r\n // operates.value = [...column, ...clonedProps.value];\r\n\r\n // if (!clonedStore.value.length) {\r\n // operates.value.forEach(v => {\r\n // v.isShow = true;\r\n // });\r\n // }\r\n\r\n updateOperate();\r\n};\r\n\r\n// 已选中条数\r\nconst checkedNumber = computed(() => {\r\n return clonedCustomBtnList.value.filter(v => v.isShow).length;\r\n});\r\n// 全选\r\nconst checkedAll = computed(() => clonedCustomBtnList.value.every(v => v.isShow));\r\n// 半选\r\nconst isIndeterminate = computed(() => !checkedAll.value && clonedCustomBtnList.value.some(v => v.isShow));\r\n// 切换全选\r\nconst handleCheckAllChange = (val: CheckboxValueType) => {\r\n clonedCustomBtnList.value.forEach(v => {\r\n v.isShow = Boolean(val);\r\n });\r\n};\r\n\r\n// 设置按钮颜色\r\nconst setBtnType = (item: TableBodyOperateButtonProps, type: TableBodyOperateButtonProps['type']) => {\r\n item.type = type;\r\n};\r\n\r\n// 保存\r\nconst onSubmit = () => {\r\n useCustom\r\n .addListCustomInfo({\r\n key_word: gmCustomkeyWord.value,\r\n value: JSON.stringify(clonedCustomBtnList.value),\r\n type: gmCustomType.value,\r\n })\r\n .then(() => {\r\n isShowDrawer.value = false;\r\n updateOperate();\r\n ElMessage.success('保存成功');\r\n // if (res.code === 0) {\r\n // // GmMessage.success('保存成功');\r\n // }\r\n })\r\n .catch(() => {});\r\n isShowDrawer.value = false;\r\n};\r\n\r\n// 重置\r\nconst onReset = () => {};\r\n\r\n// 监听接口请求完成\r\nuseCustom.onCustomResult(() => {\r\n initOperate();\r\n});\r\n\r\nonMounted(async () => {\r\n useCustom.getCustomPage(gmCustomkeyWord.value, gmCustomType.value);\r\n});\r\n</script>\r\n"],"names":["_useModel","useCloned","computed","cloneDeep","useCust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AAO,EAAA,YAAA,CAAa,KAAK,CAAA,CAAA;AAAA,KAClE,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,19 +8,11 @@ interface DecisionItem {
|
|
|
8
8
|
[key: string]: DecisionObj;
|
|
9
9
|
}
|
|
10
10
|
export declare const customOperationsProps: {
|
|
11
|
-
drawer: {
|
|
12
|
-
type: BooleanConstructor;
|
|
13
|
-
default: boolean;
|
|
14
|
-
};
|
|
15
11
|
page: {
|
|
16
12
|
type: StringConstructor;
|
|
17
13
|
default: string;
|
|
18
14
|
};
|
|
19
|
-
|
|
20
|
-
type: PropType<TableBodyOperateButtonProps[]>;
|
|
21
|
-
default: () => never[];
|
|
22
|
-
};
|
|
23
|
-
customBtnList: {
|
|
15
|
+
customDefaultPropsList: {
|
|
24
16
|
type: PropType<TableBodyOperateButtonProps[]>;
|
|
25
17
|
default: () => never[];
|
|
26
18
|
};
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const customOperationsProps = {
|
|
4
|
-
drawer: {
|
|
5
|
-
type: Boolean,
|
|
6
|
-
default: false
|
|
7
|
-
},
|
|
8
4
|
page: {
|
|
9
5
|
type: String,
|
|
10
6
|
default: "page"
|
|
11
7
|
},
|
|
12
|
-
|
|
13
|
-
type: Array,
|
|
14
|
-
default: () => []
|
|
15
|
-
},
|
|
16
|
-
customBtnList: {
|
|
8
|
+
customDefaultPropsList: {
|
|
17
9
|
type: Array,
|
|
18
10
|
default: () => []
|
|
19
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customOperations.js","sources":["../../../../../../../packages/components/src/business/customOperations/customOperations.ts"],"sourcesContent":["import type { TableBodyOperateButtonProps } from '../tableBody/tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport type { PropType } from 'vue';\r\n\r\ninterface DecisionObj {\r\n condition: any[] | string; // 判断条件\r\n extend: boolean; // 判断条件是否继承\r\n}\r\ninterface DecisionItem {\r\n [key: string]: DecisionObj; // 判断条件\r\n}\r\n\r\n// interface\" TableBodyOperateButtonProps {\r\n// label: string; // 操作名称\r\n// event: string; // 操作事件 && 唯一标识\r\n// // decision?: DecisionItem; // 按钮判断条件\r\n// [key: string]: any; // 其他属性\r\n// }\"\r\n\r\nexport const customOperationsProps = {\r\n
|
|
1
|
+
{"version":3,"file":"customOperations.js","sources":["../../../../../../../packages/components/src/business/customOperations/customOperations.ts"],"sourcesContent":["import type { TableBodyOperateButtonProps } from '../tableBody/tableBodyItem/tableBodyOperates/tableBodyOperateButton';\r\nimport type { PropType } from 'vue';\r\n\r\ninterface DecisionObj {\r\n condition: any[] | string; // 判断条件\r\n extend: boolean; // 判断条件是否继承\r\n}\r\ninterface DecisionItem {\r\n [key: string]: DecisionObj; // 判断条件\r\n}\r\n\r\n// interface\" TableBodyOperateButtonProps {\r\n// label: string; // 操作名称\r\n// event: string; // 操作事件 && 唯一标识\r\n// // decision?: DecisionItem; // 按钮判断条件\r\n// [key: string]: any; // 其他属性\r\n// }\"\r\n\r\nexport const customOperationsProps = {\r\n page: {\r\n type: String,\r\n default: 'page',\r\n },\r\n customDefaultPropsList: {\r\n type: Array as PropType<TableBodyOperateButtonProps[]>,\r\n default: () => [],\r\n },\r\n};\r\n\r\nexport type { DecisionObj, DecisionItem };\r\n"],"names":[],"mappings":";;AAkBO,MAAM,qBAAwB,GAAA;AAAA,EACnC,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EACA,sBAAwB,EAAA;AAAA,IACtB,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AACF;;;;"}
|
|
@@ -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';
|
|
@@ -6,7 +6,7 @@ var TableBody_vue_vue_type_script_setup_true_lang = require('./TableBody.vue2.js
|
|
|
6
6
|
require('./TableBody.vue3.js');
|
|
7
7
|
var _pluginVue_exportHelper = require('../../../../_virtual/_plugin-vue_export-helper.js');
|
|
8
8
|
|
|
9
|
-
var TableBody = /* @__PURE__ */ _pluginVue_exportHelper.default(TableBody_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-
|
|
9
|
+
var TableBody = /* @__PURE__ */ _pluginVue_exportHelper.default(TableBody_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-f1eed8aa"], ["__file", "TableBody.vue"]]);
|
|
10
10
|
|
|
11
11
|
exports.default = TableBody;
|
|
12
12
|
//# sourceMappingURL=TableBody.vue.js.map
|
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var core = require('@vueuse/core');
|
|
7
|
+
var objects = require('../../../../utils/src/objects.js');
|
|
7
8
|
var VNodeRenderer = require('../../common/VNodeRenderer.js');
|
|
8
9
|
var TableVNodeRenderer = require('./TableVNodeRenderer.js');
|
|
9
10
|
var tableBody = require('./tableBody.js');
|
|
10
11
|
var tableBodyOperateButton = require('./tableBodyItem/tableBodyOperates/tableBodyOperateButton.js');
|
|
12
|
+
var tableHelper = require('./tableHelper.js');
|
|
11
13
|
|
|
12
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
14
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-f1eed8aa"), n = n(), vue.popScopeId(), n);
|
|
13
15
|
const _hoisted_1 = {
|
|
14
16
|
key: 0,
|
|
15
17
|
id: "table-page"
|
|
@@ -22,9 +24,11 @@ const _hoisted_3 = {
|
|
|
22
24
|
key: 1,
|
|
23
25
|
class: "operate-wrap"
|
|
24
26
|
};
|
|
25
|
-
const _hoisted_4 = {
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
const _hoisted_4 = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "gm-flex gm-flex-wrap gm-justify-center"
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_5 = {
|
|
28
32
|
key: 0,
|
|
29
33
|
class: "gm-mt-2 gm-flex gm-justify-end"
|
|
30
34
|
};
|
|
@@ -66,16 +70,18 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
66
70
|
const nodes = vNodes.find((vNode) => vNode.props && vNode.props.prop === "tableOperate");
|
|
67
71
|
return nodes;
|
|
68
72
|
});
|
|
69
|
-
const
|
|
70
|
-
const
|
|
73
|
+
const customDefaultPropsList = vue.computed(() => {
|
|
74
|
+
const defaultVnodes = tableOperateVnode.value?.children?.default?.(tableOperateVnode.value?.ctx.scope);
|
|
75
|
+
const children = tableHelper.getVnodesByGmName(defaultVnodes, "TableBodyOperateButton");
|
|
76
|
+
const btnProps = children.map((vNode) => vNode.props) ?? [];
|
|
71
77
|
btnProps.forEach((it) => {
|
|
72
78
|
for (const key in tableBodyOperateButton.tableBodyOperateButtonProps) {
|
|
73
|
-
if (
|
|
79
|
+
if (objects.hasOwn(it, key)) {
|
|
74
80
|
continue;
|
|
75
81
|
}
|
|
76
|
-
if (
|
|
82
|
+
if (objects.hasOwn(tableBodyOperateButton.tableBodyOperateButtonProps, key)) {
|
|
77
83
|
const element = tableBodyOperateButton.tableBodyOperateButtonProps[key];
|
|
78
|
-
if (
|
|
84
|
+
if (objects.hasOwn(element, "default")) {
|
|
79
85
|
Reflect.set(it, key, Reflect.get(element, "default"));
|
|
80
86
|
}
|
|
81
87
|
}
|
|
@@ -83,9 +89,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
83
89
|
});
|
|
84
90
|
return btnProps;
|
|
85
91
|
});
|
|
86
|
-
const customBtnList = vue.ref(
|
|
87
|
-
vue.onMounted(() => {
|
|
88
|
-
});
|
|
92
|
+
const customBtnList = vue.ref(customDefaultPropsList.value);
|
|
89
93
|
const customVNodes = vue.computed(() => {
|
|
90
94
|
const result = [];
|
|
91
95
|
return result;
|
|
@@ -185,15 +189,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
185
189
|
]))
|
|
186
190
|
]),
|
|
187
191
|
default: vue.withCtx((slotValue) => [
|
|
188
|
-
vue.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
196
|
-
])
|
|
192
|
+
vue.createCommentVNode(' <VNodeRenderer :vnode="customVNodes" /> '),
|
|
193
|
+
tableOperateVnode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
194
|
+
vue.createVNode(vue.unref(TableVNodeRenderer.default), {
|
|
195
|
+
vnode: tableOperateVnode.value.children.default(slotValue),
|
|
196
|
+
customPropsList: customBtnList.value
|
|
197
|
+
}, null, 8, ["vnode", "customPropsList"])
|
|
198
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
197
199
|
]),
|
|
198
200
|
_: 1
|
|
199
201
|
/* STABLE */
|
|
@@ -203,7 +205,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
203
205
|
/* STABLE */
|
|
204
206
|
}, 8, ["data", "height", "header-cell-style", "border", "row-style", "row-class-name", "selection"]),
|
|
205
207
|
vue.createCommentVNode(" \u5206\u9875 "),
|
|
206
|
-
props.pagination ? (vue.openBlock(), vue.createElementBlock("div",
|
|
208
|
+
props.pagination ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
207
209
|
vue.createVNode(_component_gm_pagination, {
|
|
208
210
|
"page-size": props.pageSize,
|
|
209
211
|
"current-page": props.currentPage,
|
|
@@ -227,13 +229,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
227
229
|
}, null, 8, ["drawer", "columnList", "headerList", "page"])) : vue.createCommentVNode("v-if", true),
|
|
228
230
|
props.customOperate ? (vue.openBlock(), vue.createBlock(_component_gm_custom_operations, {
|
|
229
231
|
key: 2,
|
|
230
|
-
|
|
231
|
-
"onUpdate:
|
|
232
|
+
isShowDrawer: drawerOperateVisible.value,
|
|
233
|
+
"onUpdate:isShowDrawer": _cache[8] || (_cache[8] = ($event) => drawerOperateVisible.value = $event),
|
|
232
234
|
customBtnList: customBtnList.value,
|
|
233
235
|
"onUpdate:customBtnList": _cache[9] || (_cache[9] = ($event) => customBtnList.value = $event),
|
|
234
|
-
|
|
236
|
+
customDefaultPropsList: customDefaultPropsList.value,
|
|
235
237
|
page: props.page
|
|
236
|
-
}, null, 8, ["
|
|
238
|
+
}, null, 8, ["isShowDrawer", "customBtnList", "customDefaultPropsList", "page"])) : vue.createCommentVNode("v-if", true)
|
|
237
239
|
],
|
|
238
240
|
64
|
|
239
241
|
/* STABLE_FRAGMENT */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.vue2.js","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":["ref","useElementBounding","useWindowSize","computed","_useSlots","tableBodyOperateButtonProps","onMounted","watch","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,IAAA,MAAM,aAAaA,OAAmB,EAAA,CAAA;AAEtC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAGd,IAAA,MAAM,EAAE,GAAA,EAAQ,GAAAC,uBAAA,CAAmB,UAAiB,CAAA,CAAA;AACpD,IAAM,MAAA,EAAE,MAAO,EAAA,GAAIC,kBAAc,EAAA,CAAA;AACjC,IAAM,MAAA,cAAA,GAAiBC,aAAS,MAAM,MAAA,CAAO,QAAQ,GAAI,CAAA,KAAA,GAAQ,MAAM,YAAY,CAAA,CAAA;AAEnF,IAAA,MAAM,QAAQC,YAAA,EAAA,CAAA;AAKd,IAAM,MAAA,aAAA,GAA+CD,aAAS,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,GAAaH,OAAsB,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;A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AC/B;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,SAAA,GAAYA,QAAI,IAAI,CAAA,CAAA;AAE1B,IAAAO,SAAA;AAAA,MACE,CAAC,cAAc,YAAY,CAAA;AAAA,MAC3B,YAAY;AACV,QAAA,SAAA,CAAU,KAAQ,GAAA,KAAA,CAAA;AAClB,QAAA,MAAMC,YAAS,EAAA,CAAA;AACf,QAAA,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
|
+
{"version":3,"file":"TableBody.vue2.js","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":["ref","useElementBounding","useWindowSize","computed","_useSlots","getVnodesByGmName","tableBodyOperateButtonProps","hasOwn","watch","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,IAAA,MAAM,aAAaA,OAAmB,EAAA,CAAA;AAEtC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAGd,IAAA,MAAM,EAAE,GAAA,EAAQ,GAAAC,uBAAA,CAAmB,UAAiB,CAAA,CAAA;AACpD,IAAM,MAAA,EAAE,MAAO,EAAA,GAAIC,kBAAc,EAAA,CAAA;AACjC,IAAM,MAAA,cAAA,GAAiBC,aAAS,MAAM,MAAA,CAAO,QAAQ,GAAI,CAAA,KAAA,GAAQ,MAAM,YAAY,CAAA,CAAA;AAEnF,IAAA,MAAM,QAAQC,YAAA,EAAA,CAAA;AAKd,IAAM,MAAA,aAAA,GAA+CD,aAAS,MAAM;AAClE,MAA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AGD,IAAM,MAAA,mBAAA,GAAsBH,QAAI,KAAK,CAAA,CAAA;AACrC,IAAM,MAAA,oBAAA,GAAuBA,QAAI,IAAI,CAAA,CAAA;AACrC,IAAM,MAAA,QAAA,GAAW,CAAC,KAAkB,KAAA;AAClC,MAAA,IAAI,UAAU,QAAU,EAAA;AACtB,QAAA,mBAAA,CAAoB,KAAQ,GAAA,IAAA,CAAA;AAAA,OAC9B;AACA,MAAA,IAAI,UAAU,SAAW,EAAA;AACvB,QAAA,oBAAA,CAAqB,KAAQ,GAAA,IAAA,CAAA;AAAA,OAC/B;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,SAAA,GAAYA,QAAI,IAAI,CAAA,CAAA;AAE1B,IAAAQ,SAAA;AAAA,MACE,CAAC,cAAc,YAAY,CAAA;AAAA,MAC3B,YAAY;AACV,QAAA,SAAA,CAAU,KAAQ,GAAA,KAAA,CAAA;AAClB,QAAA,MAAMC,YAAS,EAAA,CAAA;AACf,QAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
var tableHelper = require('./tableHelper.js');
|
|
6
7
|
|
|
7
8
|
var TableVNodeRenderer = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
functional: true,
|
|
8
10
|
props: {
|
|
9
11
|
// 当前原始vnode
|
|
10
12
|
vnode: {
|
|
@@ -17,14 +19,20 @@ var TableVNodeRenderer = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
19
|
}
|
|
18
20
|
},
|
|
19
21
|
setup(props) {
|
|
20
|
-
const vnodes = vue.computed(() => Array.isArray(props.vnode) ? props.vnode : [props.vnode]);
|
|
21
|
-
const res = vue.computed(() => props.customPropsList.map((props2) => {
|
|
22
|
+
const vnodes = vue.computed(() => tableHelper.getVnodesByGmName(Array.isArray(props.vnode) ? props.vnode : [props.vnode], "TableBodyOperateButton"));
|
|
23
|
+
const res = vue.computed(() => props.customPropsList.filter((props2) => props2.isShow).map((props2) => {
|
|
22
24
|
const findVnode = vnodes.value.find((it) => it.props.prop === props2.prop);
|
|
23
|
-
findVnode.props
|
|
24
|
-
|
|
25
|
+
findVnode.props = {
|
|
26
|
+
...findVnode.props,
|
|
27
|
+
label: props2.label,
|
|
28
|
+
type: props2.type
|
|
29
|
+
};
|
|
25
30
|
return findVnode;
|
|
26
31
|
}));
|
|
27
|
-
|
|
32
|
+
const render = vue.computed(() => {
|
|
33
|
+
return res.value.map((it) => vue.h(it));
|
|
34
|
+
});
|
|
35
|
+
return () => render.value;
|
|
28
36
|
}
|
|
29
37
|
});
|
|
30
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableVNodeRenderer.js","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.js","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":["defineComponent","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+BA,mBAAA,CAAA;AAAA,EAC7BC,UAAY,EAAA,IAAA;AAAA,EACZC,KAAO,EAAA;AAAA;AAAA,IAELC,KAAO,EAAA;AAAA,MACLC,IAAAA,EAAM,CAACC,MAAAA,EAAQC,KAAK,CAAA;AAAA,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AAA;AAAAA,GACtB;AACF,CAAC,CAAA;;;;"}
|
|
@@ -19,21 +19,23 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
19
|
null,
|
|
20
20
|
[
|
|
21
21
|
vue.createCommentVNode(" \u64CD\u4F5C "),
|
|
22
|
-
vue.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
vue.
|
|
29
|
-
vue.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
vue.createElementVNode("div", null, [
|
|
23
|
+
vue.createVNode(_component_gm_button, {
|
|
24
|
+
type: _ctx.type,
|
|
25
|
+
size: "small",
|
|
26
|
+
link: ""
|
|
27
|
+
}, {
|
|
28
|
+
default: vue.withCtx(() => [
|
|
29
|
+
vue.createTextVNode(
|
|
30
|
+
vue.toDisplayString(_ctx.label),
|
|
31
|
+
1
|
|
32
|
+
/* TEXT */
|
|
33
|
+
)
|
|
34
|
+
]),
|
|
35
|
+
_: 1
|
|
36
|
+
/* STABLE */
|
|
37
|
+
}, 8, ["type"])
|
|
38
|
+
])
|
|
37
39
|
],
|
|
38
40
|
2112
|
|
39
41
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBodyOperateButton.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableBodyOperateButton.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getVnodesByGmName: (defaultVnodes: any[], name: string) => any[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var is = require('../../../../utils/src/is.js');
|
|
5
|
+
|
|
6
|
+
const getVnodesByGmName = (defaultVnodes, name) => {
|
|
7
|
+
const children = [];
|
|
8
|
+
if (Array.isArray(defaultVnodes)) {
|
|
9
|
+
for (const childNode of defaultVnodes) {
|
|
10
|
+
if (childNode.type?.name === name || childNode.shapeFlag & 2) {
|
|
11
|
+
children.push(childNode);
|
|
12
|
+
} else if (childNode.type === vue.Fragment && Array.isArray(childNode.children)) {
|
|
13
|
+
childNode.children.forEach((vnode) => {
|
|
14
|
+
if (vnode?.patchFlag !== 1024 && !is.isString(vnode?.children)) {
|
|
15
|
+
children.push(vnode);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return children;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.getVnodesByGmName = getVnodesByGmName;
|
|
25
|
+
//# sourceMappingURL=tableHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableHelper.js","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":["Fragment","isString"],"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,KAAAA,YAAA,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,CAACC,WAAS,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;;;;"}
|
|
@@ -5,6 +5,9 @@ var constants = require('../constants.js');
|
|
|
5
5
|
|
|
6
6
|
const useWatchModelChange = (modelValue, options) => {
|
|
7
7
|
const queryParams = vue.inject(constants.queryParamsKey);
|
|
8
|
+
if (queryParams) {
|
|
9
|
+
modelValue.value = queryParams.value[options.prop];
|
|
10
|
+
}
|
|
8
11
|
vue.watch(modelValue, (newValue) => {
|
|
9
12
|
if (queryParams) {
|
|
10
13
|
queryParams.value[options.prop] = newValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWatchModelChange.js","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":["inject","queryParamsKey","watch"],"mappings":";;;;;AAUa,MAAA,mBAAA,GAAsB,CAAI,UAAA,EAAyB,OAA8B,KAAA;AAC5F,EAAM,MAAA,WAAA,GAAcA,WAAOC,wBAAc,CAAA,CAAA;AACzC,EAAAC,SAAA,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,EAAAA,SAAA;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.js","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":["inject","queryParamsKey","watch"],"mappings":";;;;;AAUa,MAAA,mBAAA,GAAsB,CAAI,UAAA,EAAyB,OAA8B,KAAA;AAC5F,EAAM,MAAA,WAAA,GAAcA,WAAOC,wBAAc,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,EAAAC,SAAA,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,EAAAA,SAAA;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/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.js
CHANGED
|
@@ -17,8 +17,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
}),
|
|
18
18
|
emits: /* @__PURE__ */ vue.mergeModels(searchFormSelect.searchFormSelectEmits, ["update:modelValue"]),
|
|
19
19
|
setup(__props, { emit: __emit }) {
|
|
20
|
-
const modelValue = vue.useModel(__props, "modelValue");
|
|
21
20
|
const props = __props;
|
|
21
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
22
22
|
const emit = __emit;
|
|
23
23
|
useWatchModelChange.useWatchModelChange(modelValue, { prop: props.prop });
|
|
24
24
|
return (_ctx, _cache) => {
|
package/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFormSelect.vue2.js","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.js","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","useWatchModelChange"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAM,MAAA,UAAA,GAAaA,YAAmD,CAAA,OAAA,EAAA,YAAA,CAAA,CAAA;AAEtE,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAAC,uCAAA,CAAoB,UAAY,EAAA,EAAE,IAAM,EAAA,KAAA,CAAM,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/giime/index.js
CHANGED
|
@@ -302,6 +302,7 @@ exports.responseErrorMessage = errorMessage.responseErrorMessage;
|
|
|
302
302
|
exports.req401Interceptors = interceptors.req401Interceptors;
|
|
303
303
|
exports.res401Interceptors = interceptors.res401Interceptors;
|
|
304
304
|
exports.giimeDevProxy = devProxy.giimeDevProxy;
|
|
305
|
+
exports.hasOwn = objects.hasOwn;
|
|
305
306
|
exports.keysOf = objects.keysOf;
|
|
306
307
|
exports.getDateShortcuts = dateShortcuts.getDateShortcuts;
|
|
307
308
|
exports.affixEmits = affix.affixEmits;
|
package/lib/giime/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/giime/index.ts"],"sourcesContent":["import installer from './defaults';\r\nimport './tailwind.css';\r\nexport * from '@giime/utils';\r\nexport * from '@giime/components';\r\nexport * from '@giime/hooks';\r\n// export * from '@giime/api'; // 用户通过giime/es/api 导入类型\r\nexport const install = installer.install;\r\nexport const version = installer.version;\r\nexport default installer;\r\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,UAAUA,gBAAU,CAAA,QAAA;AAC1B,MAAM,UAAUA,gBAAU,CAAA
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../packages/giime/index.ts"],"sourcesContent":["import installer from './defaults';\r\nimport './tailwind.css';\r\nexport * from '@giime/utils';\r\nexport * from '@giime/components';\r\nexport * from '@giime/hooks';\r\n// export * from '@giime/api'; // 用户通过giime/es/api 导入类型\r\nexport const install = installer.install;\r\nexport const version = installer.version;\r\nexport default installer;\r\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,UAAUA,gBAAU,CAAA,QAAA;AAC1B,MAAM,UAAUA,gBAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/giime/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.14";
|