@king-one/antdv 1.0.72 → 1.0.74
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/CHANGELOG.md +12 -0
- package/dist/es/components/base/style/index.mjs +0 -1
- package/dist/es/components/collapse-transtion/hooks/use-collapse-transtion.mjs +0 -1
- package/dist/es/components/collapse-transtion/index.mjs +0 -1
- package/dist/es/components/collapse-transtion/src/collapse-transtion.vue.mjs +0 -1
- package/dist/es/components/collapse-transtion/src/collapse-transtion.vue2.mjs +0 -1
- package/dist/es/components/collapse-transtion/src/types.mjs +0 -1
- package/dist/es/components/collapse-transtion/style/index.mjs +0 -1
- package/dist/es/components/form/component/form-item.vue.mjs +0 -1
- package/dist/es/components/form/component/form-item.vue2.mjs +0 -1
- package/dist/es/components/form/component/form.mjs +0 -1
- package/dist/es/components/form/component/form.vue.mjs +0 -1
- package/dist/es/components/form/component/form.vue2.mjs +0 -1
- package/dist/es/components/form/content/form-content.mjs +0 -1
- package/dist/es/components/form/index.mjs +0 -1
- package/dist/es/components/icon/index.mjs +0 -1
- package/dist/es/components/icon/src/icon.vue.mjs +0 -1
- package/dist/es/components/icon/src/icon.vue2.mjs +0 -1
- package/dist/es/components/icon/src/types.mjs +0 -1
- package/dist/es/components/icon/style/index.mjs +0 -1
- package/dist/es/components/index.mjs +0 -1
- package/dist/es/components/pro-area/apis/pro-area.api.mjs +0 -1
- package/dist/es/components/pro-area/hooks/use-pro-area.mjs +0 -1
- package/dist/es/components/pro-area/index.mjs +0 -1
- package/dist/es/components/pro-area/src/ProArea.vue.mjs +0 -1
- package/dist/es/components/pro-area/src/ProArea.vue2.mjs +0 -1
- package/dist/es/components/pro-area/src/types.mjs +0 -1
- package/dist/es/components/pro-area/style/index.mjs +0 -1
- package/dist/es/components/pro-modal/hooks/useProModal.mjs +0 -1
- package/dist/es/components/pro-modal/index.mjs +0 -1
- package/dist/es/components/pro-modal/src/ProModal.vue.mjs +0 -1
- package/dist/es/components/pro-modal/src/ProModal.vue2.mjs +0 -1
- package/dist/es/components/pro-modal/src/types.mjs +0 -1
- package/dist/es/components/pro-modal/style/index.mjs +0 -1
- package/dist/es/components/pro-picker/apis/pro-picker.api.mjs +0 -1
- package/dist/es/components/pro-picker/index.mjs +0 -1
- package/dist/es/components/pro-picker/src/ProPicker.vue.mjs +0 -1
- package/dist/es/components/pro-picker/src/ProPicker.vue2.mjs +0 -1
- package/dist/es/components/pro-picker/src/types.mjs +0 -1
- package/dist/es/components/pro-signature/index.mjs +0 -1
- package/dist/es/components/pro-signature/src/ProSignature.vue.mjs +0 -1
- package/dist/es/components/pro-signature/src/ProSignature.vue2.mjs +0 -1
- package/dist/es/components/pro-signature/src/types.mjs +0 -1
- package/dist/es/components/pro-tag/index.mjs +0 -1
- package/dist/es/components/pro-tag/src/ProTag.vue.mjs +0 -1
- package/dist/es/components/pro-tag/src/ProTag.vue2.mjs +0 -1
- package/dist/es/components/pro-tag/src/types.mjs +0 -1
- package/dist/es/components/pro-title/index.mjs +0 -1
- package/dist/es/components/pro-title/src/ProTitle.vue.mjs +0 -1
- package/dist/es/components/pro-title/src/ProTitle.vue2.mjs +0 -1
- package/dist/es/components/pro-title/src/types.mjs +0 -1
- package/dist/es/components/pro-title/style/index.mjs +0 -1
- package/dist/es/components/scale-virtual-list/component/scale-virtual-list.vue.mjs +0 -1
- package/dist/es/components/scale-virtual-list/component/scale-virtual-list.vue2.mjs +0 -1
- package/dist/es/components/scale-virtual-list/component/types.mjs +0 -1
- package/dist/es/components/scale-virtual-list/hooks/useVirtualList.mjs +34 -33
- package/dist/es/components/scale-virtual-list/index.mjs +0 -1
- package/dist/es/components/scale-virtual-list/style/index.mjs +0 -1
- package/dist/es/components/scroll-bar/index.mjs +0 -1
- package/dist/es/components/scroll-bar/src/scroll-bar.mjs +0 -1
- package/dist/es/components/scroll-bar/src/types.mjs +0 -1
- package/dist/es/components/scroll-bar/style/index.mjs +0 -1
- package/dist/es/components/utils/install.mjs +0 -1
- package/dist/es/hooks/index.mjs +0 -1
- package/dist/es/hooks/use-namespace/index.mjs +0 -1
- package/dist/es/hooks/useProForm.mjs +0 -1
- package/dist/es/index.mjs +0 -1
- package/dist/es/installer.mjs +0 -1
- package/dist/lib/components/base/style/index.js +0 -1
- package/dist/lib/components/collapse-transtion/hooks/use-collapse-transtion.js +0 -1
- package/dist/lib/components/collapse-transtion/index.js +0 -1
- package/dist/lib/components/collapse-transtion/src/collapse-transtion.vue.js +0 -1
- package/dist/lib/components/collapse-transtion/src/collapse-transtion.vue2.js +0 -1
- package/dist/lib/components/collapse-transtion/src/types.js +0 -1
- package/dist/lib/components/collapse-transtion/style/index.js +0 -1
- package/dist/lib/components/form/component/form-item.vue.js +0 -1
- package/dist/lib/components/form/component/form-item.vue2.js +0 -1
- package/dist/lib/components/form/component/form.js +0 -1
- package/dist/lib/components/form/component/form.vue.js +0 -1
- package/dist/lib/components/form/component/form.vue2.js +0 -1
- package/dist/lib/components/form/content/form-content.js +0 -1
- package/dist/lib/components/form/index.js +0 -1
- package/dist/lib/components/icon/index.js +0 -1
- package/dist/lib/components/icon/src/icon.vue.js +0 -1
- package/dist/lib/components/icon/src/icon.vue2.js +0 -1
- package/dist/lib/components/icon/src/types.js +0 -1
- package/dist/lib/components/icon/style/index.js +0 -1
- package/dist/lib/components/index.js +0 -1
- package/dist/lib/components/pro-area/apis/pro-area.api.js +0 -1
- package/dist/lib/components/pro-area/hooks/use-pro-area.js +0 -1
- package/dist/lib/components/pro-area/index.js +0 -1
- package/dist/lib/components/pro-area/src/ProArea.vue.js +0 -1
- package/dist/lib/components/pro-area/src/ProArea.vue2.js +0 -1
- package/dist/lib/components/pro-area/src/types.js +0 -1
- package/dist/lib/components/pro-area/style/index.js +0 -1
- package/dist/lib/components/pro-modal/hooks/useProModal.js +0 -1
- package/dist/lib/components/pro-modal/index.js +0 -1
- package/dist/lib/components/pro-modal/src/ProModal.vue.js +0 -1
- package/dist/lib/components/pro-modal/src/ProModal.vue2.js +0 -1
- package/dist/lib/components/pro-modal/src/types.js +0 -1
- package/dist/lib/components/pro-modal/style/index.js +0 -1
- package/dist/lib/components/pro-picker/apis/pro-picker.api.js +0 -1
- package/dist/lib/components/pro-picker/index.js +0 -1
- package/dist/lib/components/pro-picker/src/ProPicker.vue.js +0 -1
- package/dist/lib/components/pro-picker/src/ProPicker.vue2.js +0 -1
- package/dist/lib/components/pro-picker/src/types.js +0 -1
- package/dist/lib/components/pro-signature/index.js +0 -1
- package/dist/lib/components/pro-signature/src/ProSignature.vue.js +0 -1
- package/dist/lib/components/pro-signature/src/ProSignature.vue2.js +0 -1
- package/dist/lib/components/pro-signature/src/types.js +0 -1
- package/dist/lib/components/pro-tag/index.js +0 -1
- package/dist/lib/components/pro-tag/src/ProTag.vue.js +0 -1
- package/dist/lib/components/pro-tag/src/ProTag.vue2.js +0 -1
- package/dist/lib/components/pro-tag/src/types.js +0 -1
- package/dist/lib/components/pro-title/index.js +0 -1
- package/dist/lib/components/pro-title/src/ProTitle.vue.js +0 -1
- package/dist/lib/components/pro-title/src/ProTitle.vue2.js +0 -1
- package/dist/lib/components/pro-title/src/types.js +0 -1
- package/dist/lib/components/pro-title/style/index.js +0 -1
- package/dist/lib/components/scale-virtual-list/component/scale-virtual-list.vue.js +0 -1
- package/dist/lib/components/scale-virtual-list/component/scale-virtual-list.vue2.js +0 -1
- package/dist/lib/components/scale-virtual-list/component/types.js +0 -1
- package/dist/lib/components/scale-virtual-list/hooks/useVirtualList.js +1 -2
- package/dist/lib/components/scale-virtual-list/index.js +0 -1
- package/dist/lib/components/scale-virtual-list/style/index.js +0 -1
- package/dist/lib/components/scroll-bar/index.js +0 -1
- package/dist/lib/components/scroll-bar/src/scroll-bar.js +0 -1
- package/dist/lib/components/scroll-bar/src/types.js +0 -1
- package/dist/lib/components/scroll-bar/style/index.js +0 -1
- package/dist/lib/components/utils/install.js +0 -1
- package/dist/lib/hooks/index.js +0 -1
- package/dist/lib/hooks/use-namespace/index.js +0 -1
- package/dist/lib/hooks/useProForm.js +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/installer.js +0 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/package.json +1 -1
- package/dist/es/components/base/style/index.mjs.map +0 -1
- package/dist/es/components/collapse-transtion/hooks/use-collapse-transtion.mjs.map +0 -1
- package/dist/es/components/collapse-transtion/index.mjs.map +0 -1
- package/dist/es/components/collapse-transtion/src/collapse-transtion.vue.mjs.map +0 -1
- package/dist/es/components/collapse-transtion/src/collapse-transtion.vue2.mjs.map +0 -1
- package/dist/es/components/collapse-transtion/src/types.mjs.map +0 -1
- package/dist/es/components/collapse-transtion/style/index.mjs.map +0 -1
- package/dist/es/components/form/component/form-item.vue.mjs.map +0 -1
- package/dist/es/components/form/component/form-item.vue2.mjs.map +0 -1
- package/dist/es/components/form/component/form.mjs.map +0 -1
- package/dist/es/components/form/component/form.vue.mjs.map +0 -1
- package/dist/es/components/form/component/form.vue2.mjs.map +0 -1
- package/dist/es/components/form/content/form-content.mjs.map +0 -1
- package/dist/es/components/form/index.mjs.map +0 -1
- package/dist/es/components/icon/index.mjs.map +0 -1
- package/dist/es/components/icon/src/icon.vue.mjs.map +0 -1
- package/dist/es/components/icon/src/icon.vue2.mjs.map +0 -1
- package/dist/es/components/icon/src/types.mjs.map +0 -1
- package/dist/es/components/icon/style/index.mjs.map +0 -1
- package/dist/es/components/index.mjs.map +0 -1
- package/dist/es/components/pro-area/apis/pro-area.api.mjs.map +0 -1
- package/dist/es/components/pro-area/hooks/use-pro-area.mjs.map +0 -1
- package/dist/es/components/pro-area/index.mjs.map +0 -1
- package/dist/es/components/pro-area/src/ProArea.vue.mjs.map +0 -1
- package/dist/es/components/pro-area/src/ProArea.vue2.mjs.map +0 -1
- package/dist/es/components/pro-area/src/types.mjs.map +0 -1
- package/dist/es/components/pro-area/style/index.mjs.map +0 -1
- package/dist/es/components/pro-modal/hooks/useProModal.mjs.map +0 -1
- package/dist/es/components/pro-modal/index.mjs.map +0 -1
- package/dist/es/components/pro-modal/src/ProModal.vue.mjs.map +0 -1
- package/dist/es/components/pro-modal/src/ProModal.vue2.mjs.map +0 -1
- package/dist/es/components/pro-modal/src/types.mjs.map +0 -1
- package/dist/es/components/pro-modal/style/index.mjs.map +0 -1
- package/dist/es/components/pro-picker/apis/pro-picker.api.mjs.map +0 -1
- package/dist/es/components/pro-picker/index.mjs.map +0 -1
- package/dist/es/components/pro-picker/src/ProPicker.vue.mjs.map +0 -1
- package/dist/es/components/pro-picker/src/ProPicker.vue2.mjs.map +0 -1
- package/dist/es/components/pro-picker/src/types.mjs.map +0 -1
- package/dist/es/components/pro-signature/index.mjs.map +0 -1
- package/dist/es/components/pro-signature/src/ProSignature.vue.mjs.map +0 -1
- package/dist/es/components/pro-signature/src/ProSignature.vue2.mjs.map +0 -1
- package/dist/es/components/pro-signature/src/types.mjs.map +0 -1
- package/dist/es/components/pro-tag/index.mjs.map +0 -1
- package/dist/es/components/pro-tag/src/ProTag.vue.mjs.map +0 -1
- package/dist/es/components/pro-tag/src/ProTag.vue2.mjs.map +0 -1
- package/dist/es/components/pro-tag/src/types.mjs.map +0 -1
- package/dist/es/components/pro-title/index.mjs.map +0 -1
- package/dist/es/components/pro-title/src/ProTitle.vue.mjs.map +0 -1
- package/dist/es/components/pro-title/src/ProTitle.vue2.mjs.map +0 -1
- package/dist/es/components/pro-title/src/types.mjs.map +0 -1
- package/dist/es/components/pro-title/style/index.mjs.map +0 -1
- package/dist/es/components/scale-virtual-list/component/scale-virtual-list.vue.mjs.map +0 -1
- package/dist/es/components/scale-virtual-list/component/scale-virtual-list.vue2.mjs.map +0 -1
- package/dist/es/components/scale-virtual-list/component/types.mjs.map +0 -1
- package/dist/es/components/scale-virtual-list/hooks/useVirtualList.mjs.map +0 -1
- package/dist/es/components/scale-virtual-list/index.mjs.map +0 -1
- package/dist/es/components/scale-virtual-list/style/index.mjs.map +0 -1
- package/dist/es/components/scroll-bar/index.mjs.map +0 -1
- package/dist/es/components/scroll-bar/src/scroll-bar.mjs.map +0 -1
- package/dist/es/components/scroll-bar/src/types.mjs.map +0 -1
- package/dist/es/components/scroll-bar/style/index.mjs.map +0 -1
- package/dist/es/components/utils/install.mjs.map +0 -1
- package/dist/es/hooks/index.mjs.map +0 -1
- package/dist/es/hooks/use-namespace/index.mjs.map +0 -1
- package/dist/es/hooks/useProForm.mjs.map +0 -1
- package/dist/es/index.mjs.map +0 -1
- package/dist/es/installer.mjs.map +0 -1
- package/dist/lib/components/base/style/index.js.map +0 -1
- package/dist/lib/components/collapse-transtion/hooks/use-collapse-transtion.js.map +0 -1
- package/dist/lib/components/collapse-transtion/index.js.map +0 -1
- package/dist/lib/components/collapse-transtion/src/collapse-transtion.vue.js.map +0 -1
- package/dist/lib/components/collapse-transtion/src/collapse-transtion.vue2.js.map +0 -1
- package/dist/lib/components/collapse-transtion/src/types.js.map +0 -1
- package/dist/lib/components/collapse-transtion/style/index.js.map +0 -1
- package/dist/lib/components/form/component/form-item.vue.js.map +0 -1
- package/dist/lib/components/form/component/form-item.vue2.js.map +0 -1
- package/dist/lib/components/form/component/form.js.map +0 -1
- package/dist/lib/components/form/component/form.vue.js.map +0 -1
- package/dist/lib/components/form/component/form.vue2.js.map +0 -1
- package/dist/lib/components/form/content/form-content.js.map +0 -1
- package/dist/lib/components/form/index.js.map +0 -1
- package/dist/lib/components/icon/index.js.map +0 -1
- package/dist/lib/components/icon/src/icon.vue.js.map +0 -1
- package/dist/lib/components/icon/src/icon.vue2.js.map +0 -1
- package/dist/lib/components/icon/src/types.js.map +0 -1
- package/dist/lib/components/icon/style/index.js.map +0 -1
- package/dist/lib/components/index.js.map +0 -1
- package/dist/lib/components/pro-area/apis/pro-area.api.js.map +0 -1
- package/dist/lib/components/pro-area/hooks/use-pro-area.js.map +0 -1
- package/dist/lib/components/pro-area/index.js.map +0 -1
- package/dist/lib/components/pro-area/src/ProArea.vue.js.map +0 -1
- package/dist/lib/components/pro-area/src/ProArea.vue2.js.map +0 -1
- package/dist/lib/components/pro-area/src/types.js.map +0 -1
- package/dist/lib/components/pro-area/style/index.js.map +0 -1
- package/dist/lib/components/pro-modal/hooks/useProModal.js.map +0 -1
- package/dist/lib/components/pro-modal/index.js.map +0 -1
- package/dist/lib/components/pro-modal/src/ProModal.vue.js.map +0 -1
- package/dist/lib/components/pro-modal/src/ProModal.vue2.js.map +0 -1
- package/dist/lib/components/pro-modal/src/types.js.map +0 -1
- package/dist/lib/components/pro-modal/style/index.js.map +0 -1
- package/dist/lib/components/pro-picker/apis/pro-picker.api.js.map +0 -1
- package/dist/lib/components/pro-picker/index.js.map +0 -1
- package/dist/lib/components/pro-picker/src/ProPicker.vue.js.map +0 -1
- package/dist/lib/components/pro-picker/src/ProPicker.vue2.js.map +0 -1
- package/dist/lib/components/pro-picker/src/types.js.map +0 -1
- package/dist/lib/components/pro-signature/index.js.map +0 -1
- package/dist/lib/components/pro-signature/src/ProSignature.vue.js.map +0 -1
- package/dist/lib/components/pro-signature/src/ProSignature.vue2.js.map +0 -1
- package/dist/lib/components/pro-signature/src/types.js.map +0 -1
- package/dist/lib/components/pro-tag/index.js.map +0 -1
- package/dist/lib/components/pro-tag/src/ProTag.vue.js.map +0 -1
- package/dist/lib/components/pro-tag/src/ProTag.vue2.js.map +0 -1
- package/dist/lib/components/pro-tag/src/types.js.map +0 -1
- package/dist/lib/components/pro-title/index.js.map +0 -1
- package/dist/lib/components/pro-title/src/ProTitle.vue.js.map +0 -1
- package/dist/lib/components/pro-title/src/ProTitle.vue2.js.map +0 -1
- package/dist/lib/components/pro-title/src/types.js.map +0 -1
- package/dist/lib/components/pro-title/style/index.js.map +0 -1
- package/dist/lib/components/scale-virtual-list/component/scale-virtual-list.vue.js.map +0 -1
- package/dist/lib/components/scale-virtual-list/component/scale-virtual-list.vue2.js.map +0 -1
- package/dist/lib/components/scale-virtual-list/component/types.js.map +0 -1
- package/dist/lib/components/scale-virtual-list/hooks/useVirtualList.js.map +0 -1
- package/dist/lib/components/scale-virtual-list/index.js.map +0 -1
- package/dist/lib/components/scale-virtual-list/style/index.js.map +0 -1
- package/dist/lib/components/scroll-bar/index.js.map +0 -1
- package/dist/lib/components/scroll-bar/src/scroll-bar.js.map +0 -1
- package/dist/lib/components/scroll-bar/src/types.js.map +0 -1
- package/dist/lib/components/scroll-bar/style/index.js.map +0 -1
- package/dist/lib/components/utils/install.js.map +0 -1
- package/dist/lib/hooks/index.js.map +0 -1
- package/dist/lib/hooks/use-namespace/index.js.map +0 -1
- package/dist/lib/hooks/useProForm.js.map +0 -1
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/installer.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProModal.vue2.mjs","sources":["../../../../../components/pro-modal/src/ProModal.vue"],"sourcesContent":["<script setup lang='ts'>\nimport { Button, Modal } from 'ant-design-vue'\nimport { useNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport type { CSSProperties } from 'vue'\nimport { computed, ref, watch, watchEffect } from 'vue'\nimport { useDraggable } from '@vueuse/core'\nimport type { ProModalSlots } from './types'\nimport { ProModalProps } from './types'\n\ndefineOptions({\n name: 'ProModal'\n})\ndefineProps(ProModalProps)\nconst emit = defineEmits(['onConfirm', 'onCancel'])\ndefineSlots<ProModalSlots>()\nconst modalTitleRef = ref<HTMLElement | null>(null)\nconst open = defineModel({ required: true, type: Boolean })\n\nconst { b } = useNamespace('pro-modal')\nconst c = computed(() => {\n return b()\n})\n\nfunction handleClick() {\n emit('onConfirm')\n}\nfunction handleCancel() {\n emit('onCancel')\n}\n\nconst { x, y, isDragging } = useDraggable(modalTitleRef)\nconst startX = ref<number>(0)\nconst startY = ref<number>(0)\nconst startedDrag = ref(false)\nconst transformX = ref(0)\nconst transformY = ref(0)\nconst preTransformX = ref(0)\nconst preTransformY = ref(0)\nconst dragRect = ref({ left: 0, right: 0, top: 0, bottom: 0 })\nwatch([x, y], () => {\n if (!startedDrag.value && modalTitleRef.value) {\n startX.value = x.value\n startY.value = y.value\n const bodyRect = document.body.getBoundingClientRect()\n const titleRect = modalTitleRef.value.getBoundingClientRect()\n dragRect.value.right = bodyRect.width - titleRect.width\n dragRect.value.bottom = bodyRect.height - titleRect.height\n preTransformX.value = transformX.value\n preTransformY.value = transformY.value\n }\n startedDrag.value = true\n})\nwatch(isDragging, () => {\n if (!isDragging) {\n startedDrag.value = false\n }\n})\nwatchEffect(() => {\n if (startedDrag.value) {\n transformX.value\n = preTransformX.value\n + Math.min(Math.max(dragRect.value.left, x.value), dragRect.value.right)\n - startX.value\n transformY.value\n = preTransformY.value\n + Math.min(Math.max(dragRect.value.top, y.value), dragRect.value.bottom)\n - startY.value\n }\n})\nconst transformStyle = computed<CSSProperties>(() => {\n return {\n transform: `translate(${transformX.value}px, ${transformY.value}px)`\n }\n})\n</script>\n\n<template>\n <Modal\n v-model:open=\"open\" v-bind=\"(modalProps as any)\" :wrap-class-name=\"c\" @ok=\"handleClick\"\n @cancel=\"handleCancel\"\n >\n <template #title>\n <div ref=\"modalTitleRef\" class=\"pro-modal-title\">\n {{ title }}\n </div>\n </template>\n <slot />\n <template #modalRender=\"{ originVNode }\">\n <div :style=\"transformStyle\">\n <component :is=\"originVNode\" />\n </div>\n </template>\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </Modal>\n</template>\n"],"names":["emit","__emit","modalTitleRef","ref","open","_useModel","b","useNamespace","c","computed","handleClick","handleCancel","x","y","isDragging","useDraggable","startX","startY","startedDrag","transformX","transformY","preTransformX","preTransformY","dragRect","watch","bodyRect","titleRect","watchEffect","transformStyle"],"mappings":";;;;;;;;;;;;;;AAaA,UAAMA,IAAOC,GAEPC,IAAgBC,EAAwB,IAAI,GAC5CC,IAAOC,iBAA6C,GAEpD,EAAE,GAAAC,EAAA,IAAMC,EAAa,WAAW,GAChCC,IAAIC,EAAS,MACVH,EAAE,CACV;AAED,aAASI,IAAc;AACrB,MAAAV,EAAK,WAAW;AAAA,IAClB;AACA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,IAAiBnB,EAAwB,OACtC;AAAA,MACL,WAAW,aAAaU,EAAW,KAAK,OAAOC,EAAW,KAAK;AAAA,IAAA,EAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../components/pro-modal/src/types.ts"],"sourcesContent":["import type { ModalFuncProps, ModalProps } from 'ant-design-vue'\nimport type { PropType } from 'vue'\n\ntype ModalType = ModalFuncProps & {\n confirmLoading?: boolean\n}\nexport const ProModalProps = {\n modalProps: {\n type: Object as PropType<Omit<ModalType, 'open' | 'title'>>\n },\n modelValue: {\n type: Boolean,\n required: true\n },\n title: {\n type: String,\n required: true\n }\n} as const\n\n// import type { ModalFuncProps, ModalProps } from 'ant-design-vue'\n// import type { PropType } from 'vue'\n\n// type MPType = ModalProps\n// export const ProModalProps = {\n// modalProps: {\n// type: Object as PropType<Omit<MPType, 'open'>>\n// },\n// mProps: {\n// type: Object as PropType<{ name: string }>\n// }\n// } as const\n\nexport interface ProModalSlots {\n /**\n * 自定义标题\n */\n title?: () => any\n /**\n * 自定义页脚\n */\n footer?: () => any\n /**\n * 默认插槽\n */\n default?: () => any\n}\n"],"names":["ProModalProps"],"mappings":"AAMO,MAAMA,IAAgB;AAAA,EAC3B,YAAY;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,YAAY;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pro-picker.api.mjs","sources":["../../../../../components/pro-picker/apis/pro-picker.api.ts"],"sourcesContent":["import type { AxiosRequestConfig } from 'axios'\n\nexport const proPickerApi = {\n company: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(`/security/company/options`, config),\n flowApplication: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(`/flow/application/options`, config),\n user: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(`/security/user/options`, config),\n getOps: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(config.url, config)\n}\n"],"names":["proPickerApi","config"],"mappings":"AAEO,MAAMA,IAAe;AAAA,EAC1B,SAAS,CAACC,MACR,WAAW,MAAM,IAAI,6BAA6BA,CAAM;AAAA,EAC1D,iBAAiB,CAACA,MAChB,WAAW,MAAM,IAAI,6BAA6BA,CAAM;AAAA,EAC1D,MAAM,CAACA,MACL,WAAW,MAAM,IAAI,0BAA0BA,CAAM;AAAA,EACvD,QAAQ,CAACA,MACP,WAAW,MAAM,IAAIA,EAAO,KAAKA,CAAM;AAC3C;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../components/pro-picker/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ProPicker from './src/ProPicker.vue'\n\nexport * from './src/types'\nexport const KProPicker = withInstall(ProPicker)\nexport default KProPicker\n"],"names":["KProPicker","withInstall","ProPicker"],"mappings":";;;;AAIa,MAAAA,IAAaC,EAAYC,CAAS;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProPicker.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProPicker.vue2.mjs","sources":["../../../../../components/pro-picker/src/ProPicker.vue"],"sourcesContent":["<!-- eslint-disable no-console -->\n<script setup lang=\"ts\">\nimport { debounce } from 'lodash-es'\nimport { Select, Spin } from 'ant-design-vue'\nimport { reactive, watch } from 'vue'\nimport { proPickerApi } from '../apis/pro-picker.api'\nimport type { ProPickerEmits, ProPickerOption } from './types'\nimport { PickerApiEnum, ProPickerProps } from './types'\n\ndefineOptions({\n name: 'ProPicker'\n})\nconst props = defineProps(ProPickerProps)\nconst emit = defineEmits<ProPickerEmits>()\nconst value = defineModel<string | string[] | number | number[]>('value')\nconst state = reactive({\n data: [],\n fetching: false\n})\nwatch(\n value,\n (value: string | string[] | number | number[] | undefined) => {\n if (!value)\n return\n const type = state.data.some((item: any) => item.value === value)\n if (type)\n return\n\n const url = PickerApiEnum[props.type]\n\n if (typeof value === 'string' || typeof value === 'number') {\n proPickerApi\n .getOps({\n url,\n params: { value }\n })\n .then((res) => {\n state.data = res.data.options.map((item: any) => ({\n label: item.label,\n value: item.value\n }))\n })\n }\n else if (Array.isArray(value)) {\n proPickerApi\n .getOps({\n url,\n params: { value: value.join(',') }\n })\n .then((res) => {\n state.data = res.data.options.map((item: any) => ({\n label: item.label,\n value: item.value\n }))\n state.fetching = false\n })\n }\n },\n {\n immediate: true\n }\n)\n\nconst handleSearch = debounce((value: string) => {\n if (value) {\n state.fetching = true\n const url = PickerApiEnum[props.type]\n proPickerApi.getOps({ url, params: { label: value } })\n .then((res) => {\n state.data = res.data.options.map((item: any) => ({\n label: item.label,\n value: item.value\n }))\n state.fetching = false\n })\n }\n}, props.delay)\nfunction handleChange(_value, options) {\n emit('change', options)\n}\n</script>\n\n<template>\n <Select\n v-model:value=\"value\"\n :mode=\"mode\"\n show-search\n :placeholder=\"placeholder\"\n style=\"width: 100%\"\n :filter-option=\"false\"\n :not-found-content=\"state.fetching ? undefined : null\"\n :options=\"state.data\"\n @change=\"handleChange\"\n @search=\"handleSearch\"\n >\n <template v-if=\"state.fetching\" #notFoundContent>\n <Spin size=\"small\" />\n </template>\n </Select>\n</template>\n"],"names":["props","__props","emit","__emit","value","_useModel","state","reactive","watch","item","url","PickerApiEnum","proPickerApi","res","handleSearch","debounce","handleChange","_value","options"],"mappings":";;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GACRC,IAAOC,GACPC,IAAQC,EAAkDJ,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Q,IAAI,CAACJ,OAAe;AAAA,YAChD,OAAOA,EAAK;AAAA,YACZ,OAAOA,EAAK;AAAA,UACZ,EAAA,GACFH,EAAM,WAAW;AAAA,QAAA,CAClB;AAAA,MACL;AAAA,IAAA,GACCN,EAAM,KAAK;AACL,aAAAgB,EAAaC,GAAQC,GAAS;AACrC,MAAAhB,EAAK,UAAUgB,CAAO;AAAA,IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../components/pro-picker/src/types.ts"],"sourcesContent":["import type { PropType } from 'vue'\n\n// const ProPickers = ['company', 'user', 'department', 'flowApplication'] as const\n// export type ProPickerType = (typeof ProPickers)[number]\nexport enum PickerApiEnum {\n company = '/security/company/options',\n user = '/security/user/options',\n department = '/security/department/options',\n flowApplication = '/flow/application/options'\n}\nexport type ProPickerType = keyof typeof PickerApiEnum\nexport const ProPickerProps = {\n type: {\n type: String as PropType<ProPickerType>,\n default: 'company'\n },\n placeholder: {\n type: String,\n default: '请选择'\n },\n mode: {\n type: String as PropType< 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE'>\n },\n delay: {\n type: Number,\n default: 200\n }\n} as const\n\nexport interface ProPickerOption { label: string, value: string | number }\n\n// 修改 ProPickerEmits 的定义\nexport interface ProPickerEmits {\n (e: 'change', value?: ProPickerOption | ProPickerOption[]): void\n}\n"],"names":["PickerApiEnum","ProPickerProps"],"mappings":"AAIY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,6BACVA,EAAA,OAAO,0BACPA,EAAA,aAAa,gCACbA,EAAA,kBAAkB,6BAJRA,IAAAA,KAAA,CAAA,CAAA;AAOL,MAAMC,IAAiB;AAAA,EAC5B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../components/pro-signature/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ProSignature from './src/ProSignature.vue'\n\nexport * from './src/types'\nexport const KProSignature = withInstall(ProSignature)\nexport default KProSignature\n"],"names":["KProSignature","withInstall","ProSignature"],"mappings":";;;;AAIa,MAAAA,IAAgBC,EAAYC,CAAY;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProSignature.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProSignature.vue2.mjs","sources":["../../../../../components/pro-signature/src/ProSignature.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue'\nimport { ProSignatureProps } from './types'\n\n// const props = withDefaults(defineProps<signatureProps>(), {\n// width: 800,\n// height: 300,\n// lineWidth: 4,\n// lineColor: '#000000',\n// bgColor: '',\n// isCrop: false,\n// isClearBgColor: true,\n// format: 'image/png',\n// quality: 1\n// })\nconst props = defineProps(ProSignatureProps)\n\nconst emit = defineEmits(['update:bgColor'])\n\n// refs\nconst canvas = ref<HTMLCanvasElement | null>(null)\nconst canvasTxt = ref<CanvasRenderingContext2D | null>(null)\nconst hasDrew = ref(false)\nconst resultImg = ref('')\nconst points = ref<Array<{ x: number, y: number }>>([])\nconst startX = ref(0)\nconst startY = ref(0)\nconst isDrawing = ref(false)\nconst sratio = ref(1)\n\n// computed\nconst ratio = computed(() => props.height / props.width)\nconst myBg = computed(() => (props.bgColor ? props.bgColor : 'rgba(255, 255, 255, 0)'))\n\n// methods\nfunction resizeHandler() {\n if (!canvas.value || !canvasTxt.value)\n return\n\n const dpr = window.devicePixelRatio || 1\n canvas.value.style.width = `${props.width}px`\n const realw = Number.parseFloat(window.getComputedStyle(canvas.value).width)\n canvas.value.style.height = `${ratio.value * realw}px`\n\n canvas.value.width = realw * dpr\n canvas.value.height = ratio.value * realw * dpr\n\n canvasTxt.value.scale(dpr, dpr)\n sratio.value = realw / props.width\n}\n\nfunction drawStart(obj: { x: number, y: number }) {\n if (!canvasTxt.value)\n return\n\n startX.value = obj.x\n startY.value = obj.y\n canvasTxt.value.beginPath()\n canvasTxt.value.moveTo(startX.value, startY.value)\n canvasTxt.value.lineTo(obj.x, obj.y)\n canvasTxt.value.lineCap = 'round'\n canvasTxt.value.lineJoin = 'round'\n canvasTxt.value.lineWidth = props.lineWidth * sratio.value\n canvasTxt.value.stroke()\n canvasTxt.value.closePath()\n points.value.push(obj)\n}\n\nfunction drawMove(obj: { x: number, y: number }) {\n if (!canvasTxt.value)\n return\n\n canvasTxt.value.beginPath()\n canvasTxt.value.moveTo(startX.value, startY.value)\n canvasTxt.value.lineTo(obj.x, obj.y)\n canvasTxt.value.strokeStyle = props.lineColor\n canvasTxt.value.lineWidth = props.lineWidth * sratio.value\n canvasTxt.value.lineCap = 'round'\n canvasTxt.value.lineJoin = 'round'\n canvasTxt.value.stroke()\n canvasTxt.value.closePath()\n startY.value = obj.y\n startX.value = obj.x\n points.value.push(obj)\n}\n\nfunction drawEnd(obj: { x: number, y: number }) {\n if (!canvasTxt.value)\n return\n\n canvasTxt.value.beginPath()\n canvasTxt.value.moveTo(startX.value, startY.value)\n canvasTxt.value.lineTo(obj.x, obj.y)\n canvasTxt.value.lineCap = 'round'\n canvasTxt.value.lineJoin = 'round'\n canvasTxt.value.stroke()\n canvasTxt.value.closePath()\n points.value.push(obj)\n points.value.push({ x: -1, y: -1 })\n}\n\n// event handlers\nfunction mouseDown(e: MouseEvent) {\n e.preventDefault()\n isDrawing.value = true\n hasDrew.value = true\n drawStart({\n x: e.offsetX,\n y: e.offsetY\n })\n}\n\nfunction mouseMove(e: MouseEvent) {\n e.preventDefault()\n if (isDrawing.value) {\n drawMove({\n x: e.offsetX,\n y: e.offsetY\n })\n }\n}\n\nfunction mouseUp(e: MouseEvent) {\n e.preventDefault()\n drawEnd({\n x: e.offsetX,\n y: e.offsetY\n })\n isDrawing.value = false\n}\n\nfunction touchStart(e: TouchEvent) {\n hasDrew.value = true\n if (e.touches.length === 1 && canvas.value) {\n const rect = canvas.value.getBoundingClientRect()\n drawStart({\n x: e.targetTouches[0].clientX - rect.left,\n y: e.targetTouches[0].clientY - rect.top\n })\n }\n}\n\nfunction touchMove(e: TouchEvent) {\n e.preventDefault()\n if (e.touches.length === 1 && canvas.value) {\n const rect = canvas.value.getBoundingClientRect()\n drawMove({\n x: e.targetTouches[0].clientX - rect.left,\n y: e.targetTouches[0].clientY - rect.top\n })\n }\n}\n\nfunction touchEnd(e: TouchEvent) {\n e.preventDefault()\n if (e.touches.length === 1 && canvas.value) {\n const rect = canvas.value.getBoundingClientRect()\n drawEnd({\n x: e.targetTouches[0].clientX - rect.left,\n y: e.targetTouches[0].clientY - rect.top\n })\n }\n}\n\nfunction getCropArea(imgData: Uint8ClampedArray) {\n if (!canvas.value)\n return [0, 0, 0, 0]\n\n let topX = canvas.value.width\n let btmX = 0\n let topY = canvas.value.height\n let btnY = 0\n\n for (let i = 0; i < canvas.value.width; i++) {\n for (let j = 0; j < canvas.value.height; j++) {\n const pos = (i + canvas.value.width * j) * 4\n if (imgData[pos] > 0 || imgData[pos + 1] > 0 || imgData[pos + 2] || imgData[pos + 3] > 0) {\n btnY = Math.max(j, btnY)\n btmX = Math.max(i, btmX)\n topY = Math.min(j, topY)\n topX = Math.min(i, topX)\n }\n }\n }\n\n return [topX + 1, topY + 1, btmX + 1, btnY + 1]\n}\n\n// public methods\nfunction generate(options?: { format?: string, quality?: number }) {\n return new Promise<string>((resolve, reject) => {\n if (!hasDrew.value || !canvas.value || !canvasTxt.value) {\n reject('Warning: Not Signned!')\n return\n }\n\n const imgFormat = options?.format || props.format\n const imgQuality = options?.quality || props.quality\n\n const resImgData = canvasTxt.value.getImageData(0, 0, canvas.value.width, canvas.value.height)\n canvasTxt.value.globalCompositeOperation = 'destination-over'\n canvasTxt.value.fillStyle = myBg.value\n canvasTxt.value.fillRect(0, 0, canvas.value.width, canvas.value.height)\n\n resultImg.value = canvas.value.toDataURL(imgFormat, imgQuality)\n let finalImg = resultImg.value\n\n canvasTxt.value.clearRect(0, 0, canvas.value.width, canvas.value.height)\n canvasTxt.value.putImageData(resImgData, 0, 0)\n canvasTxt.value.globalCompositeOperation = 'source-over'\n\n if (props.isCrop) {\n const cropArea = getCropArea(resImgData.data)\n const cropCanvas = document.createElement('canvas')\n const cropCtx = cropCanvas.getContext('2d')\n\n if (cropCtx) {\n cropCanvas.width = cropArea[2] - cropArea[0]\n cropCanvas.height = cropArea[3] - cropArea[1]\n\n const cropImgData = canvasTxt.value.getImageData(cropArea[0], cropArea[1], cropArea[2] - cropArea[0], cropArea[3] - cropArea[1])\n cropCtx.globalCompositeOperation = 'destination-over'\n cropCtx.putImageData(cropImgData, 0, 0)\n cropCtx.fillStyle = myBg.value\n cropCtx.fillRect(0, 0, cropCanvas.width, cropCanvas.height)\n\n finalImg = cropCanvas.toDataURL(imgFormat, imgQuality)\n }\n }\n\n resolve(finalImg)\n })\n}\n\nfunction reset() {\n if (!canvas.value || !canvasTxt.value)\n return\n\n canvasTxt.value.clearRect(0, 0, canvas.value.width, canvas.value.height)\n if (props.isClearBgColor) {\n emit('update:bgColor', '')\n canvas.value.style.background = 'rgba(255, 255, 255, 0)'\n }\n points.value = []\n hasDrew.value = false\n resultImg.value = ''\n}\n\n// lifecycle\n// 添加对 props 宽高的监听\nwatch(\n () => [props.width, props.height],\n ([newWidth, newHeight]) => {\n if (!canvas.value || !canvasTxt.value)\n return\n\n canvas.value.width = newWidth\n canvas.value.height = newHeight\n canvas.value.style.background = myBg.value\n\n // 重新调整尺寸\n resizeHandler()\n }\n)\n\nonMounted(() => {\n if (!canvas.value)\n return\n\n canvas.value.height = props.height\n canvas.value.width = props.width\n canvas.value.style.background = myBg.value\n canvasTxt.value = canvas.value.getContext('2d')\n\n resizeHandler()\n window.addEventListener('resize', resizeHandler)\n document.addEventListener('mouseup', () => {\n isDrawing.value = false\n })\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('resize', resizeHandler)\n})\n\nconst canvasSty = reactive({\n width: `100%`,\n height: '100%'\n})\ndefineExpose({\n generate,\n reset\n})\n</script>\n\n<template>\n <canvas\n ref=\"canvas\" :style=\"canvasSty\" @mousedown=\"mouseDown\" @mousemove=\"mouseMove\" @mouseup=\"mouseUp\" @touchstart.passive=\"touchStart\" @touchmove.passive=\"touchMove\" @touchend.prevent=\"touchEnd\"\n />\n</template>\n"],"names":["props","__props","emit","__emit","canvas","ref","canvasTxt","hasDrew","resultImg","points","startX","startY","isDrawing","sratio","ratio","computed","myBg","resizeHandler","dpr","realw","drawStart","obj","drawMove","drawEnd","mouseDown","mouseMove","mouseUp","touchStart","rect","touchMove","touchEnd","getCropArea","imgData","topX","btmX","topY","btnY","j","pos","generate","options","resolve","reject","imgFormat","imgQuality","resImgData","finalImg","cropArea","cropCanvas","cropCtx","cropImgData","reset","watch","newWidth","newHeight","onMounted","onBeforeUnmount","canvasSty","reactive","__expose"],"mappings":";;;;;;;AAeA,UAAMA,IAAQC,GAERC,IAAOC,GAGPC,IAASC,EAA8B,IAAI,GAC3CC,IAAYD,EAAqC,IAAI,GACrDE,IAAUF,EAAI,EAAK,GACnBG,IAAYH,EAAI,EAAE,GAClBI,IAASJ,EAAqC,CAAA,CAAE,GAChDK,IAASL,EAAI,CAAC,GACdM,IAASN,EAAI,CAAC,GACdO,IAAYP,EAAI,EAAK,GACrBQ,IAASR,EAAI,CAAC,GAGdS,IAAQC,EAAS,MAAMf,EAAM,SAASA,EAAM,KAAK,GACjDgB,IAAOD,EAAS,MAAOf,EAAM,UAAUA,EAAM,UAAU,wBAAyB;AAGtF,aAASiB,IAAgB;AACvB,UAAI,C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AA,IAAA,CACnD;AAED,UAAMwC,IAAYC,EAAS;AAAA,MACzB,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA,CACT;AACY,WAAAC,EAAA;AAAA,MACX,UAAApB;AAAA,MACA,OAAAY;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../components/pro-signature/src/types.ts"],"sourcesContent":["import { definePropType } from '@king-one/antdv/components/utils/install'\n\nexport const ProSignatureProps = {\n width: {\n type: definePropType<number>(Number),\n default: 800\n },\n height: {\n type: Number,\n default: 300\n },\n lineWidth: {\n type: Number,\n default: 4\n },\n bgColor: {\n type: String,\n default: ''\n },\n lineColor: {\n type: String,\n default: '#000000'\n },\n isCrop: {\n type: Boolean\n },\n isClearBgColor: {\n type: Boolean\n },\n format: {\n type: String,\n default: 'image/png'\n },\n quality: {\n type: Number,\n default: 1\n }\n\n}\n"],"names":["ProSignatureProps","definePropType"],"mappings":";AAEO,MAAMA,IAAoB;AAAA,EAC/B,OAAO;AAAA,IACL,MAAMC,EAAuB,MAAM;AAAA,IACnC,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,EACR;AAAA,EACA,gBAAgB;AAAA,IACd,MAAM;AAAA,EACR;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAEF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../components/pro-tag/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ProTag from './src/ProTag.vue'\n\nexport * from './src/types'\nexport const KProTag = withInstall(ProTag)\nexport default KProTag\n"],"names":["KProTag","withInstall","ProTag"],"mappings":";;;;AAIa,MAAAA,IAAUC,EAAYC,CAAM;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProTag.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProTag.vue2.mjs","sources":["../../../../../components/pro-tag/src/ProTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Tag } from 'ant-design-vue'\nimport { proTagProps } from './types'\n\ndefineOptions({\n name: 'ProTag'\n})\nconst props = defineProps(proTagProps)\nconst tag = defineModel<string | number | boolean | undefined>('tag', {\n required: true\n})\nconst tagState = computed(() => {\n const data = props.options.find(item => item.value === tag.value)\n return data\n})\n</script>\n\n<template>\n <Tag :color=\"tagState?.color || 'default'\">\n {{ tagState?.label || '' }}\n </Tag>\n</template>\n"],"names":["props","__props","tag","_useModel","tagState","computed","item"],"mappings":";;;;;;;;;;;;AAQA,UAAMA,IAAQC,GACRC,IAAMC,EAAmDF,GAAA,KAE9D,GACKG,IAAWC,EAAS,MACXL,EAAM,QAAQ,KAAK,OAAQM,EAAK,UAAUJ,EAAI,KAAK,CAEjE;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../components/pro-tag/src/types.ts"],"sourcesContent":["import type { ExtractPublicPropTypes, PropType } from 'vue'\n\n// eslint-disable-next-line unused-imports/no-unused-vars\nconst colors = ['success', 'processing', 'error', 'warning', 'default'] as const\nexport type colorType = (typeof colors)[number]\nexport const proTagProps = {\n options: {\n type: Array as PropType<\n {\n value: string | number | boolean\n label: string\n color: colorType\n }[]\n >,\n required: true\n }\n} as const\nexport type TagProps = ExtractPublicPropTypes<typeof proTagProps>\n"],"names":["proTagProps"],"mappings":"AAKO,MAAMA,IAAc;AAAA,EACzB,SAAS;AAAA,IACP,MAAM;AAAA,IAON,UAAU;AAAA,EACZ;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../components/pro-title/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ProTitle from './src/ProTitle.vue'\nimport './style'\n\nexport * from './src/types'\nexport const KProTitle = withInstall(ProTitle)\nexport default KProTitle\n"],"names":["KProTitle","withInstall","ProTitle"],"mappings":";;;;;AAKa,MAAAA,IAAYC,EAAYC,CAAQ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProTitle.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProTitle.vue2.mjs","sources":["../../../../../components/pro-title/src/ProTitle.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { KIcon } from '../../icon'\nimport { TitleProps } from './types'\n\ndefineOptions({\n name: 'ProTitle'\n})\nconst props = defineProps(TitleProps)\nconst { b, m } = useNamespace('pro-title')\nconst c = computed(() => {\n if (props.unBorder) {\n return [b(), m('unborder')]\n }\n return [b()]\n})\n</script>\n\n<template>\n <div :class=\"c\">\n <KIcon name=\"title-icon\" class=\"icon\" :size=\"size\" :color=\"color\" />\n <span :style=\"{ fontSize: `${size}px`, color }\">{{ title }}</span>\n <slot />\n </div>\n</template>\n"],"names":["props","__props","b","m","useNamespace","c","computed"],"mappings":";;;;;;;;;AASA,UAAMA,IAAQC,GACR,EAAE,GAAAC,GAAG,GAAAC,EAAE,IAAIC,EAAa,WAAW,GACnCC,IAAIC,EAAS,MACbN,EAAM,WACD,CAACE,EAAK,GAAAC,EAAE,UAAU,CAAC,IAErB,CAACD,GAAG,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../components/pro-title/src/types.ts"],"sourcesContent":["import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const TitleProps = {\n unBorder: {\n type: Boolean,\n default: false\n },\n title: {\n type: String,\n required: true\n },\n color: {\n type: String,\n default: '#0e74ff'\n },\n size: {\n type: Number,\n default: 20\n }\n} as const\n\nexport type TitlePropsTypes = ExtractPropTypes<typeof TitleProps>\nexport type OutTitlePropsTypes = ExtractPublicPropTypes<typeof TitleProps>\n"],"names":["TitleProps"],"mappings":"AAEO,MAAMA,IAAa;AAAA,EACxB,UAAU;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scale-virtual-list.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scale-virtual-list.vue2.mjs","sources":["../../../../../components/scale-virtual-list/component/scale-virtual-list.vue"],"sourcesContent":["<script setup lang='ts'>\nimport { defaultNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { computed, ref, toRefs } from 'vue'\nimport { useElementBounding } from '@vueuse/core'\nimport { type UseVirtualListState, useVirtualList } from '../hooks/useVirtualList'\nimport type { VirtualListProps, VirtualListSlot } from './types'\n\nconst props = withDefaults(defineProps<VirtualListProps>(), {\n itemClassName: `${defaultNamespace}-scale-virtual-item`\n})\nconst emit = defineEmits<{\n 'update:state': [state: UseVirtualListState | null]\n}>()\n\ndefineSlots<VirtualListSlot>()\nconst wrapperRef = ref<HTMLElement | null>(null)\nconst { width } = useElementBounding(wrapperRef)\n\nconst containerSty = computed(() => {\n return {\n width: `${width.value}px`\n }\n})\nconst { list: Items } = toRefs(props)\nconst { list, containerProps, wrapperProps, scrollTo, scaleTo, state, onUpdate } = useVirtualList(Items, props.option)\ndefineExpose({\n scrollTo,\n scaleTo,\n state\n})\nonUpdate(value => emit('update:state', value))\n</script>\n\n<template>\n <div :class=\"`${defaultNamespace}-scale-virtual-list`\" v-bind=\"containerProps\">\n <div :class=\"`${defaultNamespace}-scale-virtual-list-container`\" :style=\"containerSty\">\n <div v-bind=\"wrapperProps\" ref=\"wrapperRef\" :class=\"`${defaultNamespace}-scale-vittual-wrapper`\">\n <div v-for=\"item in list\" :key=\"item.index\" :class=\"itemClassName\">\n <slot :item=\"item\" :index=\"item.index\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","wrapperRef","ref","width","useElementBounding","containerSty","computed","Items","toRefs","list","containerProps","wrapperProps","scrollTo","scaleTo","state","onUpdate","useVirtualList","__expose","value"],"mappings":";;;;;;;;;;;;;AAOA,UAAMA,IAAQC,GAGRC,IAAOC,GAKPC,IAAaC,EAAwB,IAAI,GACzC,EAAE,OAAAC,EAAA,IAAUC,EAAmBH,CAAU,GAEzCI,IAAeC,EAAS,OACrB;AAAA,MACL,OAAO,GAAGH,EAAM,KAAK;AAAA,IAAA,EAExB,GACK,EAAE,MAAMI,EAAM,IAAIC,EAAOX,CAAK,GAC9B,EAAE,MAAAY,GAAM,gBAAAC,GAAgB,cAAAC,GAAc,UAAAC,GAAU,SAAAC,GAAS,OAAAC,GAAO,UAAAC,EAAa,IAAAC,EAAeT,GAAOV,EAAM,MAAM;AACxG,WAAAoB,EAAA;AAAA,MACX,UAAAL;AAAA,MACA,SAAAC;AAAA,MACA,OAAAC;AAAA,IAAA,CACD,GACDC,EAAS,CAASG,MAAAnB,EAAK,gBAAgBmB,CAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useVirtualList.mjs","sources":["../../../../../components/scale-virtual-list/hooks/useVirtualList.ts"],"sourcesContent":["import { type EventHookOn, type MaybeRef, createEventHook } from '@vueuse/shared'\nimport type { ComputedRef, Ref, ShallowRef, StyleValue } from 'vue'\nimport { computed, ref, shallowRef, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\nexport interface UseVirtualListState { start: number, end: number, current: number, scale: number }\n\ntype RefState = Ref<UseVirtualListState>\ntype UseVirtualListItemSize = number | ((index: number) => number)\n\nexport interface UseHorizontalVirtualListOptions extends UseVirtualListOptionsBase {\n\n /**\n * item width, accept a pixel value or a function that returns the width\n *\n * @default 0\n */\n itemWidth: UseVirtualListItemSize\n\n}\n\nexport interface UseVerticalVirtualListOptions extends UseVirtualListOptionsBase {\n /**\n * item height, accept a pixel value or a function that returns the height\n *\n * @default 0\n */\n itemHeight: UseVirtualListItemSize\n}\n\nexport interface UseVirtualListOptionsBase {\n /**\n * the extra buffer items outside of the view area\n *\n * @default 5\n */\n overscan?: number\n}\n\nexport type UseVirtualListOptions = UseHorizontalVirtualListOptions | UseVerticalVirtualListOptions\n\nexport interface UseVirtualListItem<T> {\n data: T\n index: number\n}\n\nexport interface UseVirtualListReturn<T> {\n onUpdate: EventHookOn<UseVirtualListState | null>\n state: RefState\n list: Ref<UseVirtualListItem<T>[]>\n scrollTo: (index: number) => void\n scaleTo: (s: number) => void\n containerProps: {\n ref: Ref<HTMLElement | null>\n onScroll: () => void\n style: StyleValue\n }\n wrapperProps: ComputedRef<{\n style: {\n height: string\n marginTop: string\n transform: string\n transformOrigin: string\n } | {\n width: string\n height: string\n marginLeft: string\n display: string\n transform: string\n transformOrigin: string\n }\n }>\n}\n\n/**\n * Please consider using [`vue-virtual-scroller`](https://github.com/Akryum/vue-virtual-scroller) if you are looking for more features.\n */\nexport function useVirtualList<T = any>(list: MaybeRef<T[]>, options: UseVirtualListOptions): UseVirtualListReturn<T> {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef, scaleTo, state, onUpdate } = 'itemHeight' in options\n ? useVerticalVirtualList(options, list)\n : useHorizontalVirtualList(options, list)\n\n return {\n onUpdate,\n state,\n scaleTo,\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange()\n },\n style: containerStyle\n },\n wrapperProps\n }\n}\n\ntype UseVirtualListContainerRef = Ref<HTMLElement | null>\n\ninterface UseVirtualElementSizes {\n width: Ref<number>\n height: Ref<number>\n}\n\ntype UseVirtualListArray<T> = UseVirtualListItem<T>[]\ntype UseVirtualListRefArray<T> = Ref<UseVirtualListArray<T>>\n\ntype UseVirtualListSource<T> = Ref<T[]> | ShallowRef<T[]>\n\ninterface UseVirtualListResources<T> {\n state: RefState\n source: UseVirtualListSource<T>\n currentList: UseVirtualListRefArray<T>\n size: UseVirtualElementSizes\n containerRef: UseVirtualListContainerRef\n}\n\nfunction useVirtualListResources<T>(list: MaybeRef<T[]>): UseVirtualListResources<T> {\n const containerRef = ref<HTMLElement | null>(null)\n const size = useElementSize(containerRef)\n\n const currentList: Ref<UseVirtualListItem<T>[]> = ref([])\n const source = shallowRef(list)\n\n const state: Ref<UseVirtualListState> = ref({ start: 0, end: 10, current: 0, scale: 1 })\n\n return { state, source, currentList, size, containerRef }\n}\n\nfunction createGetViewCapacity<T>(state: UseVirtualListResources<T>['state'], source: UseVirtualListResources<T>['source'], itemSize: UseVirtualListItemSize) {\n return (containerSize: number) => {\n const { start = 0, scale = 1 } = state.value\n if (typeof itemSize === 'number')\n return Math.ceil(containerSize / (itemSize * scale))\n\n let sum = 0\n let capacity = 0\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i) * scale\n sum += size\n capacity = i\n if (sum > containerSize)\n break\n }\n return capacity - start\n }\n}\n// 根据滚动条获取索引\nfunction createGetOffset<T>(source: UseVirtualListResources<T>['source'], itemSize: UseVirtualListItemSize, state: UseVirtualListResources<T>['state']) {\n return (scrollDirection: number) => {\n const { scale = 1 } = state.value\n if (typeof itemSize === 'number')\n return Math.floor(scrollDirection / (itemSize * scale)) + 1\n\n let sum = 0\n let offset = 0\n\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i) * scale\n sum += size\n if (sum >= scrollDirection) {\n offset = i\n break\n }\n }\n return offset + 1\n }\n}\n\nfunction createCalculateRange<T>(type: 'horizontal' | 'vertical', overscan: number, getOffset: ReturnType<typeof createGetOffset>, getViewCapacity: ReturnType<typeof createGetViewCapacity>, { containerRef, state, currentList, source }: UseVirtualListResources<T>, updateTrigger) {\n return () => {\n const element = containerRef.value\n if (element) {\n const offset = getOffset(type === 'vertical' ? element.scrollTop : element.scrollLeft)\n const viewCapacity = getViewCapacity(type === 'vertical' ? element.clientHeight : element.clientWidth)\n\n const from = offset - overscan\n const to = offset + viewCapacity + overscan\n\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length\n ? source.value.length\n : to,\n current: offset,\n scale: state.value.scale\n }\n currentList.value = source.value\n .slice(state.value.start, state.value.end)\n .map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }))\n updateTrigger(state.value)\n }\n }\n}\n// 获取距离\nfunction createGetDistance<T>(itemSize: UseVirtualListItemSize, source: UseVirtualListResources<T>['source'], state: UseVirtualListResources<T>['state']) {\n return (index: number) => {\n const { scale = 1 } = state.value\n if (typeof itemSize === 'number') {\n const size = index * (itemSize * scale)\n return Math.ceil(size)\n }\n\n const size = source.value\n .slice(0, index)\n .reduce((sum, _, i) => sum + itemSize(i) * scale, 0)\n\n return Math.ceil(size)\n }\n}\n\nfunction useWatchForSizes<T>(size: UseVirtualElementSizes, list: MaybeRef<T[]>, containerRef: Ref<HTMLElement | null>, calculateRange: () => void) {\n watch([size.width, size.height, list, containerRef], () => {\n calculateRange()\n })\n}\n// 获取总高度\nfunction createComputedTotalSize<T>(itemSize: UseVirtualListItemSize, source: UseVirtualListResources<T>['source'], state: UseVirtualListResources<T>['state']) {\n return computed(() => {\n const { scale = 1 } = state.value\n if (typeof itemSize === 'number')\n return source.value.length * itemSize * scale\n\n return source.value.reduce((sum, _, index) => sum + itemSize(index) * scale, 0)\n })\n}\n\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: 'scrollLeft',\n vertical: 'scrollTop'\n} as const\n\nfunction createScrollTo<T>(type: 'horizontal' | 'vertical', calculateRange: () => void, getDistance: ReturnType<typeof createGetDistance>, containerRef: UseVirtualListResources<T>['containerRef']) {\n return (index: number) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index)\n calculateRange()\n }\n }\n}\n\nfunction useHorizontalVirtualList<T>(options: UseHorizontalVirtualListOptions, list: MaybeRef<T[]>) {\n const { on: onUpdate, trigger: updateTrigger } = createEventHook()\n const resources = useVirtualListResources(list)\n const { state, source, currentList, size, containerRef } = resources\n const containerStyle: StyleValue = { overflowX: 'auto' }\n\n const { itemWidth, overscan = 5 } = options\n\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth)\n\n const getOffset = createGetOffset(source, itemWidth, state)\n\n const calculateRange = createCalculateRange('horizontal', overscan, getOffset, getViewCapacity, resources, updateTrigger)\n\n const getDistanceLeft = createGetDistance(itemWidth, source, state)\n\n const offsetLeft = computed(() => getDistanceLeft(state.value.start))\n\n const totalWidth = createComputedTotalSize(itemWidth, source, state)\n\n useWatchForSizes(size, list, containerRef, calculateRange)\n\n const scrollTo = createScrollTo('horizontal', calculateRange, getDistanceLeft, containerRef)\n const scaleTo = (s: number) => {\n state.value.scale = s\n }\n const wrapperProps = computed(() => {\n return {\n style: {\n height: '100%',\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: 'flex',\n transform: `scale(${state.value.scale})`,\n transformOrigin: '0% 0%'\n // position: 'absolute',\n // left: '50%'\n }\n }\n })\n\n return {\n onUpdate,\n state,\n scaleTo,\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n }\n}\n\nfunction useVerticalVirtualList<T>(options: UseVerticalVirtualListOptions, list: MaybeRef<T[]>) {\n const { on: onUpdate, trigger: updateTrigger } = createEventHook()\n const resources = useVirtualListResources(list)\n\n const { state, source, currentList, size, containerRef } = resources\n\n const containerStyle: StyleValue = { overflowY: 'auto' }\n\n const { itemHeight, overscan = 5 } = options\n\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight)\n\n const getOffset = createGetOffset(source, itemHeight, state)\n\n const calculateRange = createCalculateRange('vertical', overscan, getOffset, getViewCapacity, resources, updateTrigger)\n\n const getDistanceTop = createGetDistance(itemHeight, source, state)\n\n const offsetTop = computed(() => getDistanceTop(state.value.start))\n\n const totalHeight = createComputedTotalSize(itemHeight, source, state)\n\n useWatchForSizes(size, list, containerRef, calculateRange)\n\n const scrollTo = createScrollTo('vertical', calculateRange, getDistanceTop, containerRef)\n const scaleTo = (s: number) => {\n // state.value.scale = s\n const element = containerRef.value\n if (element) {\n const { current } = state.value\n let offsetScroll = 0\n if (typeof itemHeight === 'number') {\n offsetScroll = current * (s * itemHeight - state.value.scale * itemHeight)\n }\n else {\n offsetScroll = source.value.slice(0, current).reduce((sum, _, i) => sum + s * itemHeight(i) - state.value.scale * itemHeight(i), 0)\n }\n element.scrollTop = element.scrollTop + offsetScroll >= 0 ? element.scrollTop + offsetScroll : 0\n state.value.scale = s\n }\n }\n const wrapperProps = computed(() => {\n return {\n style: {\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`,\n transform: `translateX(-50%) scale(${state.value.scale})`,\n transformOrigin: '50% 0%'\n }\n }\n })\n\n return {\n onUpdate,\n state,\n scaleTo,\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n }\n}\n"],"names":["useVirtualList","list","options","containerStyle","wrapperProps","scrollTo","calculateRange","currentList","containerRef","scaleTo","state","onUpdate","useVerticalVirtualList","useHorizontalVirtualList","useVirtualListResources","ref","size","useElementSize","source","shallowRef","createGetViewCapacity","itemSize","containerSize","start","scale","sum","capacity","i","createGetOffset","scrollDirection","offset","createCalculateRange","type","overscan","getOffset","getViewCapacity","updateTrigger","element","viewCapacity","from","to","ele","index","createGetDistance","_","useWatchForSizes","watch","createComputedTotalSize","computed","scrollToDictionaryForElementScrollKey","createScrollTo","getDistance","createEventHook","resources","itemWidth","getDistanceLeft","offsetLeft","totalWidth","s","itemHeight","getDistanceTop","offsetTop","totalHeight","current","offsetScroll"],"mappings":";;;AA6EgB,SAAAA,EAAwBC,GAAqBC,GAAyD;AACpH,QAAM,EAAE,gBAAAC,GAAgB,cAAAC,GAAc,UAAAC,GAAU,gBAAAC,GAAgB,aAAAC,GAAa,cAAAC,GAAc,SAAAC,GAAS,OAAAC,GAAO,UAAAC,EAAa,IAAA,gBAAgBT,IACpIU,EAAuBV,GAASD,CAAI,IACpCY,EAAyBX,GAASD,CAAI;AAEnC,SAAA;AAAA,IACL,UAAAU;AAAA,IACA,OAAAD;AAAA,IACA,SAAAD;AAAA,IACA,MAAMF;AAAA,IACN,UAAAF;AAAA,IACA,gBAAgB;AAAA,MACd,KAAKG;AAAA,MACL,UAAU,MAAM;AACC,QAAAF;MACjB;AAAA,MACA,OAAOH;AAAA,IACT;AAAA,IACA,cAAAC;AAAA,EAAA;AAEJ;AAsBA,SAASU,EAA2Bb,GAAiD;AAC7E,QAAAO,IAAeO,EAAwB,IAAI,GAC3CC,IAAOC,EAAeT,CAA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virtual-list/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport scaleVirtualList from './component/scale-virtual-list.vue'\n\nexport * from './style/index'\nexport * from './component/types'\nexport const KScaleVirtualList = withInstall(scaleVirtualList)\nexport default KScaleVirtualList\n"],"names":["KScaleVirtualList","withInstall","scaleVirtualList"],"mappings":";;;;;AAKa,MAAAA,IAAoBC,EAAYC,CAAgB;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../components/scroll-bar/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ScrollBar from './src/scroll-bar'\nimport './style'\n\nexport * from './src/types'\nexport const KScrollBar = withInstall(ScrollBar)\nexport default KScrollBar\n"],"names":["KScrollBar","withInstall","ScrollBar"],"mappings":";;;;AAKa,MAAAA,IAAaC,EAAYC,CAAS;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-bar.mjs","sources":["../../../../../components/scroll-bar/src/scroll-bar.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, ref } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { off, on } from 'evtd'\nimport { defaultNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { scrollbarProps } from './types'\n\nexport default defineComponent({\n name: 'KScrollbar',\n props: scrollbarProps,\n inheritAttrs: false,\n setup(props) {\n onMounted(() => {\n if (props.container)\n return\n sync()\n })\n const contentRef = ref<HTMLElement | null>(null)\n const containerRef = ref<HTMLElement | null>(null)\n const yRailRef = ref<HTMLElement | null>(null)\n const xRailRef = ref<HTMLElement | null>(null)\n const contentHeightRef = ref<Nullable<number>>(null)\n const contentWidthRef = ref<Nullable<number>>(null)\n const containerHeightRef = ref<Nullable<number>>(null)\n const containerWidthRef = ref<Nullable<number>>(null)\n const yRailSizeRef = ref<Nullable<number>>(null)\n const xRailSizeRef = ref<Nullable<number>>(null)\n const mergedContentRef = computed(() => props.content?.() || contentRef.value)\n const mergedContainerRef = computed(() => props.container?.() || containerRef.value)\n const containerScrollTopRef = ref(0)\n const containerScrollLeftRef = ref(0)\n\n useResizeObserver(contentRef, () => {\n sync()\n })\n useResizeObserver(containerRef, () => {\n sync()\n })\n /** 竖向滚动条相关逻辑 */\n const needYBarRef = computed(() => {\n const { value: containerHeight } = containerHeightRef\n const { value: contentHeight } = contentHeightRef\n return containerHeight !== null && contentHeight !== null && contentHeight > containerHeight\n })\n const isShowYBarRef = ref<boolean>(false)\n const showYBarRef = computed(() => {\n const { trigger } = props\n return trigger === 'none' || isShowYBarRef.value\n })\n /** 竖向滚动条的大小(高度) */\n const yBarSizeRef = computed(() => {\n const { value: containerHeight } = containerHeightRef\n const { value: contentHeight } = contentHeightRef\n const { value: yRailSize } = yRailSizeRef\n if (containerHeight === null || contentHeight === null || yRailSize === null) {\n return 0\n }\n else {\n return Math.min(containerHeight, (yRailSize * containerHeight) / contentHeight + 5 * 1.5)\n }\n })\n\n const yBarSizePxRef = computed(() => {\n return `${yBarSizeRef.value}px`\n })\n /** 竖向滚动条的top */\n const yBarTopRef = computed(() => {\n const { value: containerHeight } = containerHeightRef\n const { value: containerScrollTop } = containerScrollTopRef\n const { value: contentHeight } = contentHeightRef\n const { value: yRailSize } = yRailSizeRef\n if (containerHeight === null || contentHeight === null || yRailSize === null) {\n return 0\n }\n else {\n const heightDiff = contentHeight - containerHeight\n if (!heightDiff)\n return 0\n return (containerScrollTop / heightDiff) * (yRailSize - yBarSizeRef.value)\n }\n })\n const yBarTopPxRef = computed(() => {\n return `${yBarTopRef.value}px`\n })\n\n /** 竖向滚动条的拖拽 */\n let yBarPressed = false\n let memoYTop: number = 0\n let memoMouseY: number = 0\n let yBarVanishTimerId: number | undefined\n let xBarVanishTimerId: number | undefined\n const handleYScrollMouseMove = (e: MouseEvent) => {\n if (!yBarPressed)\n return\n\n if (xBarVanishTimerId !== undefined) {\n window.clearTimeout(xBarVanishTimerId)\n }\n if (yBarVanishTimerId !== undefined) {\n window.clearTimeout(yBarVanishTimerId)\n }\n const { value: containerHeight } = containerHeightRef\n const { value: contentHeight } = contentHeightRef\n const { value: yBarSize } = yBarSizeRef\n if (containerHeight === null || contentHeight === null)\n return\n const dY = e.clientY - memoMouseY\n const dScrollTop = (dY * (contentHeight - containerHeight)) / (containerHeight - yBarSize)\n const toScrollTopUpperBound = contentHeight - containerHeight\n let toScrollTop = memoYTop + dScrollTop\n toScrollTop = Math.min(toScrollTopUpperBound, toScrollTop)\n toScrollTop = Math.max(toScrollTop, 0)\n const { value: container } = mergedContainerRef\n if (container) {\n container.scrollTop = toScrollTop\n }\n }\n const handleYScrollMouseUp = (e: MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n off('mousemove', window, handleYScrollMouseMove, true)\n off('mouseup', window, handleYScrollMouseUp, true)\n yBarPressed = false\n isShowYBarRef.value = false\n sync()\n }\n const handleYScrollMouseDown = (e: MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n on('mousemove', window, handleYScrollMouseMove, true)\n on('mouseup', window, handleYScrollMouseUp, true)\n memoYTop = containerScrollTopRef.value\n memoMouseY = e.clientY\n yBarPressed = true\n isShowYBarRef.value = true\n }\n\n function handleScroll(e: Event): void {\n const { onScroll } = props\n if (onScroll)\n onScroll(e)\n syncScrollState()\n }\n /** =======================================华丽的分割线==================================== */\n\n const needXBarRef = computed(() => {\n const { value: containerWidth } = containerWidthRef\n const { value: contentWidth } = contentWidthRef\n return containerWidth !== null && contentWidth !== null && contentWidth > containerWidth\n })\n const isShowXBarRef = ref<boolean>(false)\n const showXBarRef = computed(() => {\n const { trigger } = props\n return trigger === 'none' || isShowXBarRef.value\n })\n // 横向滚动条的大小(width)\n const xBarSizeRef = computed(() => {\n const { value: containerWidth } = containerWidthRef\n const { value: contentWidth } = contentWidthRef\n const { value: xRailSize } = xRailSizeRef\n if (containerWidth === null || contentWidth === null || xRailSize === null) {\n return 0\n }\n else {\n return (xRailSize * containerWidth) / contentWidth + 5 * 1.5\n }\n })\n const xBarSizePxRef = computed(() => {\n return `${xBarSizeRef.value}px`\n })\n // 横向滚动条的Left\n const xBarLeftRef = computed(() => {\n const { value: containerWidth } = containerWidthRef\n const { value: containerScrollLeft } = containerScrollLeftRef\n const { value: contentWidth } = contentWidthRef\n const { value: xRailSize } = xRailSizeRef\n if (containerWidth === null || contentWidth === null || xRailSize === null) {\n return 0\n }\n else {\n const widthDiff = contentWidth - containerWidth\n if (!widthDiff)\n return 0\n return (containerScrollLeft / widthDiff) * (xRailSize - xBarSizeRef.value)\n }\n })\n const xBarLeftPxRef = computed(() => {\n return `${xBarLeftRef.value}px`\n })\n /** 竖向滚动条的拖拽 */\n let xBarPressed = false\n let memoXLeft: number = 0\n let memoMouseX: number = 0\n const handleXScrollMouseMove = (e: MouseEvent) => {\n if (!xBarPressed)\n return\n if (xBarVanishTimerId !== undefined) {\n window.clearTimeout(xBarVanishTimerId)\n }\n if (yBarVanishTimerId !== undefined) {\n window.clearTimeout(yBarVanishTimerId)\n }\n const { value: containerWidth } = containerWidthRef\n const { value: contentWidth } = contentWidthRef\n const { value: xBarSize } = xBarSizeRef\n if (containerWidth === null || contentWidth === null)\n return\n const dX = e.clientX - memoMouseX\n\n const dScrollLeft = (dX * (contentWidth - containerWidth)) / (containerWidth - xBarSize)\n const toScrollLeftUpperBound = contentWidth - containerWidth\n let toScrollLeft = memoXLeft + dScrollLeft\n toScrollLeft = Math.min(toScrollLeftUpperBound, toScrollLeft)\n toScrollLeft = Math.max(toScrollLeft, 0)\n const { value: container } = mergedContainerRef\n if (container) {\n container.scrollLeft = toScrollLeft\n }\n }\n const handleXScrollMouseUp = (e: MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n off('mousemove', window, handleXScrollMouseMove, true)\n off('mouseup', window, handleXScrollMouseUp, true)\n isShowXBarRef.value = false\n xBarPressed = false\n sync()\n }\n function handleXScrollMouseDown(e: MouseEvent): void {\n e.preventDefault()\n e.stopPropagation()\n xBarPressed = true\n isShowXBarRef.value = true\n on('mousemove', window, handleXScrollMouseMove, true)\n on('mouseup', window, handleXScrollMouseUp, true)\n memoXLeft = containerScrollLeftRef.value\n memoMouseX = e.clientX\n }\n\n /** */\n function syncScrollState(): void {\n // only collect scroll state, do not trigger any dom event\n const { value: container } = mergedContainerRef\n if (container) {\n containerScrollTopRef.value = container.scrollTop\n containerScrollLeftRef.value = container.scrollLeft\n }\n }\n const syncPositionState = () => {\n const { value: content } = mergedContentRef\n if (content) {\n const contentClient = content.getBoundingClientRect()\n contentHeightRef.value = contentClient.height\n contentWidthRef.value = contentClient.width\n }\n const { value: container } = mergedContainerRef\n if (container) {\n const containerClient = container.getBoundingClientRect()\n containerHeightRef.value = containerClient.height\n containerWidthRef.value = containerClient.width\n }\n const { value: yRailEl } = yRailRef\n if (yRailEl) {\n yRailSizeRef.value = yRailEl.offsetHeight\n }\n const { value: xRailEl } = xRailRef\n if (xRailEl) {\n xRailSizeRef.value = xRailEl.offsetWidth\n }\n }\n\n function sync(): void {\n syncPositionState()\n syncScrollState()\n }\n const handleMouseEnter = () => {\n isShowYBarRef.value = true\n isShowXBarRef.value = true\n }\n const handleMouseLeave = () => {\n if (!yBarPressed) {\n isShowYBarRef.value = false\n }\n if (!xBarPressed) {\n isShowXBarRef.value = false\n }\n }\n return {\n showYBarRef,\n showXBarRef,\n sync,\n handleMouseEnter,\n handleMouseLeave,\n // handleContentResize,\n // handleContainerResize,\n contentRef,\n yRailRef,\n xRailRef,\n containerRef,\n contentHeightRef,\n containerHeightRef,\n needYBarRef,\n needXBarRef,\n yBarSizePxRef,\n handleYScrollMouseDown,\n handleXScrollMouseDown,\n yBarTopPxRef,\n handleScroll,\n xBarSizePxRef,\n xBarLeftPxRef\n }\n },\n render() {\n const { $slots, xScrollable } = this\n const createXBar = () => {\n return (\n <div class={`${defaultNamespace}-scrollbar-rail ${defaultNamespace}-scrollbar-rail--horizontal`} ref=\"xRailRef\">\n {this.needXBarRef && this.showXBarRef && (\n <div\n class={`${defaultNamespace}-scrollbar-rail__scrollbar--horizontal`}\n style={{\n width: this.xBarSizePxRef,\n left: this.xBarLeftPxRef\n }}\n onMousedown={this.handleXScrollMouseDown}\n >\n </div>\n )}\n </div>\n )\n }\n const createYBar = () => {\n return (\n <div class={`${defaultNamespace}-scrollbar-rail ${defaultNamespace}-scrollbar-rail--vertical`} ref=\"yRailRef\">\n {this.needYBarRef && this.showYBarRef && (\n <div\n class={`${defaultNamespace}-scrollbar-rail__scrollbar--vertical`}\n style={{\n height: this.yBarSizePxRef,\n top: this.yBarTopPxRef\n }}\n onMousedown={this.handleYScrollMouseDown}\n >\n </div>\n )}\n </div>\n )\n }\n\n const createChildren = () => {\n return (\n <div class={`${defaultNamespace}-scrollbar`} {...this.$attrs} onMouseenter={this.handleMouseEnter} onMouseleave={this.handleMouseLeave}>\n {this.container\n ? (\n $slots.default?.()\n )\n : (\n <div class={`${defaultNamespace}-scrollbar-container`} onScroll={this.handleScroll} ref=\"containerRef\">\n\n <div ref=\"contentRef\" class={`${defaultNamespace}-scrollbar-content`}>\n {$slots.default?.()}\n </div>\n </div>\n )}\n\n {createYBar()}\n {xScrollable && createXBar()}\n </div>\n )\n }\n const createBarNode = createChildren()\n return createBarNode\n }\n})\n"],"names":["defineComponent","name","props","scrollbarProps","inheritAttrs","setup","onMounted","container","sync","contentRef","ref","containerRef","yRailRef","xRailRef","contentHeightRef","contentWidthRef","containerHeightRef","containerWidthRef","yRailSizeRef","xRailSizeRef","mergedContentRef","computed","content","value","mergedContainerRef","containerScrollTopRef","containerScrollLeftRef","useResizeObserver","needYBarRef","containerHeight","contentHeight","isShowYBarRef","showYBarRef","trigger","yBarSizeRef","yRailSize","Math","min","yBarSizePxRef","yBarTopRef","containerScrollTop","heightDiff","yBarTopPxRef","yBarPressed","memoYTop","memoMouseY","yBarVanishTimerId","xBarVanishTimerId","handleYScrollMouseMove","e","undefined","window","clearTimeout","yBarSize","dScrollTop","clientY","toScrollTopUpperBound","toScrollTop","max","scrollTop","handleYScrollMouseUp","preventDefault","stopPropagation","off","handleYScrollMouseDown","on","handleScroll","onScroll","syncScrollState","needXBarRef","containerWidth","contentWidth","isShowXBarRef","showXBarRef","xBarSizeRef","xRailSize","xBarSizePxRef","xBarLeftRef","containerScrollLeft","widthDiff","xBarLeftPxRef","xBarPressed","memoXLeft","memoMouseX","handleXScrollMouseMove","xBarSize","dScrollLeft","clientX","toScrollLeftUpperBound","toScrollLeft","scrollLeft","handleXScrollMouseUp","handleXScrollMouseDown","syncPositionState","contentClient","getBoundingClientRect","height","width","containerClient","yRailEl","offsetHeight","xRailEl","offsetWidth","handleMouseEnter","handleMouseLeave","render","$slots","xScrollable","createXBar","_createVNode","defaultNamespace","left","createYBar","top","createChildren","_mergeProps","$attrs","default"],"mappings":";;;;;AAMA,MAAeA,wBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,OAAOC;AAAAA,EACPC,cAAc;AAAA,EACdC,MAAMH,GAAO;AACXI,IAAAA,GAAU,MAAM;AACd,MAAIJ,EAAMK,aAEVC;IACF,CAAC;AACD,UAAMC,IAAaC,EAAwB,IAAI,GACzCC,IAAeD,EAAwB,IAAI,GAC3CE,IAAWF,EAAwB,IAAI,GACvCG,IAAWH,EAAwB,IAAI,GACvCI,IAAmBJ,EAAsB,IAAI,GAC7CK,IAAkBL,EAAsB,IAAI,GAC5CM,IAAqBN,EAAsB,IAAI,GAC/CO,IAAoBP,EAAsB,IAAI,GAC9CQ,IAAeR,EAAsB,IAAI,GACzCS,IAAeT,EAAsB,IAAI,GACzCU,IAAmBC,EAAS,MAAMnB;;AAAAA,eAAAA,IAAAA,EAAMoB,YAANpB,gBAAAA,EAAAA,KAAAA,OAAqBO,EAAWc;AAAAA,KAAK,GACvEC,IAAqBH,EAAS,MAAMnB;;AAAAA,eAAAA,IAAAA,EAAMK,cAANL,gBAAAA,EAAAA,KAAAA,OAAuBS,EAAa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A;AA2BP,YAtBuBkD,MAAM;;AAC3B,aAAAL,SAAAM,GAAA;AAAA,QAAA,OACc,GAAGL,CAAgB;AAAA,SAAkB,KAAKM,QAAM;AAAA,QAAA,cAAgB,KAAKb;AAAAA,QAAgB,cAAgB,KAAKC;AAAAA,OACnH,GAAA,CAAA,KAAKjG,aAEAmG,IAAAA,EAAOW,YAAPX,gBAAAA,EAAAA,KAAAA,KAAkBG,EAAA,OAAA;AAAA,QAAA,OAGN,GAAGC,CAAgB;AAAA,QAAsB,UAAY,KAAK5C;AAAAA,QAAY,KAAA;AAAA,MAAA,GAAA,CAAA2C,EAAA,OAAA;AAAA,QAAA,KAAA;AAAA,QAAA,OAEnD,GAAGC,CAAgB;AAAA,MAAoB,GAAA,EACjEJ,IAAAA,EAAOW,YAAPX,gBAAAA,EAAAA,KAAAA,EAAkB,GAGxB,GAAA,CAAA,GAAA,IAAA,CAAA,UAAA,CAAA,GAEJM,KACAL,KAAeC,GAAY,GAAA,IAAA,CAAA,gBAAA,cAAA,CAAA;AAAA;EAMpC;AACF,CAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../components/scroll-bar/src/types.ts"],"sourcesContent":["import type { PropType } from 'vue'\n\nexport const scrollbarProps = {\n container: Function as PropType<() => HTMLElement | null | undefined>,\n content: Function as PropType<() => HTMLElement | null | undefined>,\n onScroll: Function as PropType<(e: Event) => void>,\n xScrollable: Boolean,\n trigger: String as PropType<'none' | 'hover'>\n} as const\n"],"names":["scrollbarProps"],"mappings":"AAEO,MAAMA,IAAiB;AAAA,EAC5B,WAAW;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AACX;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.mjs","sources":["../../../../components/utils/install.ts"],"sourcesContent":["/*\n * @Description:\n * @Version: 2.0\n * @Autor: caohao\n * @Date: 2024-09-17 00:15:40\n * @LastEditors: yanfeixin\n * @LastEditTime: 2025-02-18 10:35:02\n */\nimport type { App, Directive, Plugin, PropType } from 'vue'\n\nexport type SFCWithInstall<T> = T & Plugin\n\nconst defaultNamePrefix: string = 'K'\nexport function withInstall<T>(main: T) {\n ;(main as SFCWithInstall<T>).install = (app): void => {\n const comp: Record<string, any> = main as Record<string, any>\n app.component(defaultNamePrefix + comp.name, comp)\n }\n return main as SFCWithInstall<T>\n}\n\n// 注册指令\nexport function withInstallDirectives<T extends Directive>(main: T, name: string) {\n return {\n install: (app: App): void => {\n app.directive(name, main)\n },\n directive: main\n }\n}\nexport const definePropType = <T>(val: any): PropType<T> => val\n"],"names":["defaultNamePrefix","withInstall","main","app","comp","withInstallDirectives","name","definePropType","val"],"mappings":"AAYA,MAAMA,IAA4B;AAC3B,SAASC,EAAeC,GAAS;AACpC,SAAAA,EAA2B,UAAU,CAACC,MAAc;AACpD,UAAMC,IAA4BF;AAClC,IAAAC,EAAI,UAAUH,IAAoBI,EAAK,MAAMA,CAAI;AAAA,EAAA,GAE5CF;AACT;AAGgB,SAAAG,EAA2CH,GAASI,GAAc;AACzE,SAAA;AAAA,IACL,SAAS,CAACH,MAAmB;AACvB,MAAAA,EAAA,UAAUG,GAAMJ,CAAI;AAAA,IAC1B;AAAA,IACA,WAAWA;AAAA,EAAA;AAEf;AACa,MAAAK,IAAiB,CAAIC,MAA0BA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, ref, unref } from 'vue'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nexport const defaultNamespace = 'king'\nconst statePrefix = 'is-'\n\nfunction _bem(namespace: string, block: string, blockSuffix: string, element: string, modifier: string) {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const namespaceContextKey: InjectionKey<Ref<string | undefined>> = Symbol('namespaceContextKey')\n\nexport function useGetDerivedNamespace(namespaceOverrides?: Ref<string | undefined>) {\n const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace))\n const namespace = computed(() => {\n return unref(derivedNamespace) || defaultNamespace\n })\n return namespace\n}\n\nexport function useNamespace(block: string, namespaceOverrides?: Ref<string | undefined>) {\n const namespace = useGetDerivedNamespace(namespaceOverrides)\n const b = (blockSuffix = '') => _bem(namespace.value, block, blockSuffix, '', '')\n const e = (element?: string) => (element ? _bem(namespace.value, block, '', element, '') : '')\n const m = (modifier?: string) => (modifier ? _bem(namespace.value, block, '', '', modifier) : '')\n const be = (blockSuffix?: string, element?: string) => (blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, '') : '')\n const em = (element?: string, modifier?: string) => (element && modifier ? _bem(namespace.value, block, '', element, modifier) : '')\n const bm = (blockSuffix?: string, modifier?: string) => (blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, '', modifier) : '')\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n\n // for css var\n // --el-xxx: value;\n const cssVar = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${key}`] = object[key]\n }\n }\n return styles\n }\n // with block\n const cssVarBlock = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\n }\n }\n return styles\n }\n\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\n const cssVarBlockName = (name: string) => `--${namespace.value}-${block}-${name}`\n\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n // css\n cssVar,\n cssVarName,\n cssVarBlock,\n cssVarBlockName\n }\n}\n\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\n"],"names":["defaultNamespace","statePrefix","_bem","namespace","block","blockSuffix","element","modifier","cls","namespaceContextKey","useGetDerivedNamespace","namespaceOverrides","derivedNamespace","getCurrentInstance","inject","ref","computed","unref","useNamespace","name","args","state","object","styles","key"],"mappings":";AAIO,MAAMA,IAAmB,QAC1BC,IAAc;AAEpB,SAASC,EAAKC,GAAmBC,GAAeC,GAAqBC,GAAiBC,GAAkB;AACtG,MAAIC,IAAM,GAAGL,CAAS,IAAIC,CAAK;AAC/B,SAAIC,MACFG,KAAO,IAAIH,CAAW,KAEpBC,MACFE,KAAO,KAAKF,CAAO,KAEjBC,MACFC,KAAO,KAAKD,CAAQ,KAEfC;AACT;AAEa,MAAAC,IAA6D,OAAO,qBAAqB;AAE/F,SAASC,EAAuBC,GAA8C;AAC7E,QAAAC,IAAmBD,MAAuBE,EAAA,IAAuBC,EAAOL,GAAqBM,EAAIf,CAAgB,CAAC,IAAIe,EAAIf,CAAgB;AAIzI,SAHWgB,EAAS,MAClBC,EAAML,CAAgB,KAAKZ,CACnC;AAEH;AAEgB,SAAAkB,EAAad,GAAeO,GAA8C;AAClF,QAAAR,IAAYO,EAAuBC,CAAkB;AA0CpD,SAAA;AAAA,IACL,WAAAR;AAAA,IACA,GA3CQ,CAACE,IAAc,OAAOH,EAAKC,EAAU,OAAOC,GAAOC,GAAa,IAAI,EAAE;AAAA,IA4C9E,GA3CQ,CAACC,MAAs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IAAIC,CAAK,IAAIoB,CAAG,EAAE,IAAIF,EAAOE,CAAG;AAGxD,aAAAD;AAAA,IAAA;AAAA,IAoBP,iBAhBsB,CAACJ,MAAiB,KAAKhB,EAAU,KAAK,IAAIC,CAAK,IAAIe,CAAI;AAAA,EAgB7E;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useProForm.mjs","sources":["../../../hooks/useProForm.ts"],"sourcesContent":["import type { FormInstance } from 'ant-design-vue'\nimport { cloneDeep } from 'lodash-es'\nimport { type Ref, getCurrentInstance, ref, unref } from 'vue'\n\nexport interface ModalMethods {\n setFormData: (data: object) => void\n}\nexport function useProForm<T>(init: T) {\n // const initialState = () => JSON.parse(JSON.stringify(init))\n const ruleForm = ref(init) as Ref<T>\n const formRef = ref<FormInstance>()\n const currentInstance = getCurrentInstance()\n const setFormData = (data: any) => {\n ruleForm.value = cloneDeep(data)\n }\n const resetForm = () => {\n // ruleForm.value = init\n ruleForm.value = init\n formRef.value?.resetFields()\n }\n const modalMethods = {\n setFormData\n }\n if (currentInstance) {\n currentInstance?.emit('initForm', modalMethods)\n }\n return {\n ruleForm,\n formRef,\n resetForm\n }\n}\n\nexport function useProFormInit(): [\n (methods: ModalMethods) => void,\n ModalMethods\n] {\n // const currentInstance = getCurrentInstance()\n const modalRef = ref<Nullable<ModalMethods>>(null)\n const getInstance = () => {\n const instance = unref(modalRef.value)\n if (!instance) {\n console.error('useModal instance is undefined!')\n }\n return instance\n }\n const initForm = (modalInstance: ModalMethods) => {\n modalRef.value = modalInstance\n }\n const methods: ModalMethods = {\n setFormData: data => getInstance()?.setFormData(data)\n }\n return [initForm, methods]\n}\n"],"names":["useProForm","init","ruleForm","ref","formRef","currentInstance","getCurrentInstance","setFormData","data","cloneDeep","resetForm","_a","modalMethods","useProFormInit","modalRef","getInstance","instance","unref","modalInstance"],"mappings":";;AAOO,SAASA,EAAcC,GAAS;AAE/B,QAAAC,IAAWC,EAAIF,CAAI,GACnBG,IAAUD,KACVE,IAAkBC,KAClBC,IAAc,CAACC,MAAc;AACxB,IAAAN,EAAA,QAAQO,EAAUD,CAAI;AAAA,EAAA,GAE3BE,IAAY,MAAM;;AAEtB,IAAAR,EAAS,QAAQD,IACjBU,IAAAP,EAAQ,UAAR,QAAAO,EAAe;AAAA,EAAY,GAEvBC,IAAe;AAAA,IACnB,aAAAL;AAAA,EAAA;AAEF,SAAIF,MACeA,KAAA,QAAAA,EAAA,KAAK,YAAYO,KAE7B;AAAA,IACL,UAAAV;AAAA,IACA,SAAAE;AAAA,IACA,WAAAM;AAAA,EAAA;AAEJ;AAEO,SAASG,IAGd;AAEM,QAAAC,IAAWX,EAA4B,IAAI,GAC3CY,IAAc,MAAM;AAClB,UAAAC,IAAWC,EAAMH,EAAS,KAAK;AACrC,WAAKE,KACH,QAAQ,MAAM,iCAAiC,GAE1CA;AAAA,EAAA;AAQF,SAAA,CANU,CAACE,MAAgC;AAChD,IAAAJ,EAAS,QAAQI;AAAA,EAAA,GAEW;AAAA,IAC5B,aAAa,CAAAV,MAAA;;AAAQ,cAAAG,IAAAI,EAAY,MAAZ,gBAAAJ,EAAe,YAAYH;AAAA;AAAA,EAAI,CAE7B;AAC3B;"}
|
package/dist/es/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"installer.mjs","sources":["../../installer.ts"],"sourcesContent":["/*\n * @Description:\n * @Version: 2.0\n * @Autor: caohao\n * @Date: 2024-09-16 23:00:22\n * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git\n * @LastEditTime: 2024-11-12 10:34:11\n */\nimport type { App, Plugin } from 'vue'\nimport { KForm } from './components'\n\nconst component = [KForm] as Plugin[]\nexport function install(app: App): any {\n component.forEach(i => app.use(i))\n}\nconst plugin = {\n install\n}\nexport default plugin\n"],"names":["component","KForm","install","app","i","plugin"],"mappings":";;AAWA,MAAMA,IAAY,CAACC,CAAK;AACjB,SAASC,EAAQC,GAAe;AACrC,EAAAH,EAAU,QAAQ,CAAAI,MAAKD,EAAI,IAAIC,CAAC,CAAC;AACnC;AACA,MAAMC,IAAS;AAAA,EACb,SAAAH;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-collapse-transtion.js","sources":["../../../../../components/collapse-transtion/hooks/use-collapse-transtion.ts"],"sourcesContent":["import type { RendererElement } from 'vue'\nimport type { ExtractProps } from '../src/types'\n\nfunction hreset(el: RendererElement) {\n el.style.maxHeight = ''\n el.style.overflow = el.dataset.oldOverflow\n el.style.paddingTop = el.dataset.oldPaddingTop\n el.style.paddingBottom = el.dataset.oldPaddingBottom\n}\nfunction wreset(el: RendererElement) {\n el.style.maxWidth = ''\n el.style.overflow = el.dataset.oldOverflow\n el.style.paddingLeft = el.dataset.oldPaddingLeft\n el.style.paddingRight = el.dataset.oldPaddingRight\n}\n\nconst onheight = {\n beforeEnter(el: RendererElement) {\n if (!el.dataset)\n el.dataset = {}\n\n el.dataset.oldPaddingTop = el.style.paddingTop\n el.dataset.oldPaddingBottom = el.style.paddingBottom\n if (el.style.height) {\n el.dataset.elExistsHeight = el.style.height\n }\n\n el.style.maxHeight = 0\n el.style.paddingTop = 0\n el.style.paddingBottom = 0\n },\n\n enter(el: RendererElement) {\n requestAnimationFrame(() => {\n el.dataset.oldOverflow = el.style.overflow\n if (el.dataset.elExistsHeight) {\n el.style.maxHeight = el.dataset.elExistsHeight\n }\n else if (el.scrollHeight !== 0) {\n el.style.maxHeight = `${el.scrollHeight}px`\n }\n else {\n el.style.maxHeight = 0\n }\n\n el.style.paddingTop = el.dataset.oldPaddingTop\n el.style.paddingBottom = el.dataset.oldPaddingBottom\n el.style.overflow = 'hidden'\n })\n },\n\n afterEnter(el: RendererElement) {\n el.style.maxHeight = ''\n el.style.overflow = el.dataset.oldOverflow\n },\n\n enterCancelled(el: RendererElement) {\n hreset(el)\n },\n\n beforeLeave(el: RendererElement) {\n if (!el.dataset)\n el.dataset = {}\n el.dataset.oldPaddingTop = el.style.paddingTop\n el.dataset.oldPaddingBottom = el.style.paddingBottom\n el.dataset.oldOverflow = el.style.overflow\n\n el.style.maxHeight = `${el.scrollHeight}px`\n el.style.overflow = 'hidden'\n },\n\n leave(el: RendererElement) {\n if (el.scrollHeight !== 0) {\n el.style.maxHeight = 0\n el.style.paddingTop = 0\n el.style.paddingBottom = 0\n }\n },\n\n afterLeave(el: RendererElement) {\n hreset(el)\n },\n\n leaveCancelled(el: RendererElement) {\n hreset(el)\n }\n}\nconst onwidth = {\n beforeEnter(el: RendererElement) {\n if (!el.dataset)\n el.dataset = {}\n\n el.dataset.oldPaddingLeft = el.style.paddingLeft\n el.dataset.oldPaddingRight = el.style.paddingRight\n if (el.style.width) {\n el.dataset.elExistsWidth = el.style.width\n }\n\n el.style.maxWidth = 0\n el.style.paddingLeft = 0\n el.style.paddingRight = 0\n },\n\n enter(el: RendererElement) {\n requestAnimationFrame(() => {\n el.dataset.oldOverflow = el.style.overflow\n if (el.dataset.elExistsWidth) {\n el.style.maxWidth = el.dataset.elExistsWidth\n }\n else if (el.scrollWidth !== 0) {\n el.style.maxWidth = `${el.scrollWidth}px`\n }\n else {\n el.style.maxWidth = 0\n }\n\n el.style.paddingLeft = el.dataset.oldPaddingLeft\n el.style.paddingRight = el.dataset.oldPaddingRight\n el.style.overflow = 'hidden'\n })\n },\n\n afterEnter(el: RendererElement) {\n el.style.maxWidth = ''\n el.style.overflow = el.dataset.oldOverflow\n },\n\n enterCancelled(el: RendererElement) {\n wreset(el)\n },\n\n beforeLeave(el: RendererElement) {\n if (!el.dataset)\n el.dataset = {}\n el.dataset.oldPaddingTop = el.style.paddingTop\n el.dataset.oldPaddingRight = el.style.paddingRight\n el.dataset.oldOverflow = el.style.overflow\n\n el.style.maxWidth = `${el.scrollWidth}px`\n el.style.overflow = 'hidden'\n },\n\n leave(el: RendererElement) {\n if (el.scrollWidth !== 0) {\n el.style.maxWidth = 0\n el.style.paddingTop = 0\n el.style.paddingRight = 0\n }\n },\n\n afterLeave(el: RendererElement) {\n wreset(el)\n },\n\n leaveCancelled(el: RendererElement) {\n wreset(el)\n }\n}\nexport function useCollapseTranstion(props: ExtractProps) {\n return props.mode === 'vertical' ? onheight : onwidth\n}\n"],"names":["hreset","el","wreset","onheight","onwidth","useCollapseTranstion","props"],"mappings":"gFAGA,SAASA,EAAOC,EAAqB,CACnCA,EAAG,MAAM,UAAY,GAClBA,EAAA,MAAM,SAAWA,EAAG,QAAQ,YAC5BA,EAAA,MAAM,WAAaA,EAAG,QAAQ,cAC9BA,EAAA,MAAM,cAAgBA,EAAG,QAAQ,gBACtC,CACA,SAASC,EAAOD,EAAqB,CACnCA,EAAG,MAAM,SAAW,GACjBA,EAAA,MAAM,SAAWA,EAAG,QAAQ,YAC5BA,EAAA,MAAM,YAAcA,EAAG,QAAQ,eAC/BA,EAAA,MAAM,aAAeA,EAAG,QAAQ,eACrC,CAEA,MAAME,EAAW,CACf,YAAYF,EAAqB,CAC1BA,EAAG,UACNA,EAAG,QAAU,IAEZA,EAAA,QAAQ,cAAgBA,EAAG,MAAM,WACjCA,EAAA,QAAQ,iBAAmBA,EAAG,MAAM,cACnCA,EAAG,MAAM,SACRA,EAAA,QAAQ,eAAiBA,EAAG,MAAM,QAGvCA,EAAG,MAAM,UAAY,EACrBA,EAAG,MAAM,WAAa,EACtBA,EAAG,MAAM,cAAgB,CAC3B,EAEA,MAAMA,EAAqB,CACzB,sBAAsB,IAAM,CACvBA,EAAA,QAAQ,YAAcA,EAAG,MAAM,SAC9BA,EAAG,QAAQ,eACVA,EAAA,MAAM,UAAYA,EAAG,QAAQ,eAEzBA,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,SAAWA,EAAG,QAAQ,cAExBA,EAAG,cAAgB,EAC1BA,EAAG,MAAM,SAAW,GAAGA,EAAG,WAAW,KAGrCA,EAAG,MAAM,SAAW,EAGnBA,EAAA,MAAM,YAAcA,EAAG,QAAQ,eAC/BA,EAAA,MAAM,aAAeA,EAAG,QAAQ,gBACnCA,EAAG,MAAM,SAAW,QAAA,CACrB,CACH,EAEA,WAAWA,EAAqB,CAC9BA,EAAG,MAAM,SAAW,GACjBA,EAAA,MAAM,SAAWA,EAAG,QAAQ,WACjC,EAEA,eAAeA,EAAqB,CAClCC,EAAOD,CAAE,CACX,EAEA,YAAYA,EAAqB,CAC1BA,EAAG,UACNA,EAAG,QAAU,IACZA,EAAA,QAAQ,cAAgBA,EAAG,MAAM,WACjCA,EAAA,QAAQ,gBAAkBA,EAAG,MAAM,aACnCA,EAAA,QAAQ,YAAcA,EAAG,MAAM,SAElCA,EAAG,MAAM,SAAW,GAAGA,EAAG,WAAW,KACrCA,EAAG,MAAM,SAAW,QACtB,EAEA,MAAMA,EAAqB,CACrBA,EAAG,cAAgB,IACrBA,EAAG,MAAM,SAAW,EACpBA,EAAG,MAAM,WAAa,EACtBA,EAAG,MAAM,aAAe,EAE5B,EAEA,WAAWA,EAAqB,CAC9BC,EAAOD,CAAE,CACX,EAEA,eAAeA,EAAqB,CAClCC,EAAOD,CAAE,CACX,CACF,EACO,SAASI,EAAqBC,EAAqB,CACjD,OAAAA,EAAM,OAAS,WAAaH,EAAWC,CAChD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../components/collapse-transtion/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport CollapseTranstion from './src/collapse-transtion.vue'\nimport './style'\n\nexport * from './src/types'\nexport const KCollapseTranstion = withInstall(CollapseTranstion)\nexport default KCollapseTranstion\n"],"names":["KCollapseTranstion","withInstall","CollapseTranstion"],"mappings":"0SAKaA,EAAqBC,cAAYC,EAAiB,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collapse-transtion.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collapse-transtion.vue2.js","sources":["../../../../../components/collapse-transtion/src/collapse-transtion.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { defaultNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { useCollapseTranstion } from '../hooks/use-collapse-transtion'\nimport { collapseProps } from './types'\n\ndefineOptions({\n name: 'CollapseTransition'\n})\n\nconst props = defineProps(collapseProps)\n\nconst on = useCollapseTranstion(props)\n</script>\n\n<template>\n <Transition :name=\"mode === 'horizontal' ? `${defaultNamespace}-horizontal-transition` : `${defaultNamespace}-vertical-transition`\" v-on=\"on\">\n <slot />\n </Transition>\n</template>\n"],"names":["props","__props","on","useCollapseTranstion"],"mappings":"wWASA,MAAMA,EAAQC,EAERC,EAAKC,uBAAqBH,CAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../../components/collapse-transtion/src/types.ts"],"sourcesContent":["import type { ExtractPropTypes, PropType } from 'vue'\n\nexport const collapseProps = {\n mode: {\n type: String as PropType<'horizontal' | 'vertical'>,\n required: true\n }\n} as const\nexport type ExtractProps = ExtractPropTypes<typeof collapseProps>\n"],"names":["collapseProps"],"mappings":"gFAEO,MAAMA,EAAgB,CAC3B,KAAM,CACJ,KAAM,OACN,SAAU,EACZ,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-item.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-item.vue2.js","sources":["../../../../../components/form/component/form-item.vue"],"sourcesContent":["<!-- eslint-disable no-console -->\n<script setup lang='ts'>\nimport { useNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { computed, ref, toRaw } from 'vue'\nimport { type FormItemContext, useProvideFormItem } from '../content/form-content'\nimport { formItemProps } from './form'\n\ndefineOptions({ name: 'KFormItem' })\nconst props = defineProps(formItemProps)\nconst { b, e } = useNamespace('form-item')\nconst c = computed(() => [b()])\n\nconst validate: FormItemContext['validate'] = async (trigger: string) => {\n console.log('trigger', trigger)\n}\n\n// 验证错误信息\nconst validateMessage = ref('请输入姓名')\nuseProvideFormItem({ ...toRaw(props), validate })\n</script>\n\n<template>\n <div :class=\"c\">\n <label :class=\"e('lable')\" />\n <div :class=\"e('content')\">\n <slot />\n <div :class=\"e('error')\">\n {{ validateMessage }}\n </div>\n </div>\n </div>\n</template>\n\n<style>\n\n</style>\n"],"names":["props","__props","b","e","useNamespace","c","computed","validate","trigger","validateMessage","ref","useProvideFormItem","toRaw"],"mappings":"6UAQA,MAAMA,EAAQC,EACR,CAAE,EAAAC,EAAG,EAAAC,CAAE,EAAIC,eAAa,WAAW,EACnCC,EAAIC,EAAS,SAAA,IAAM,CAACJ,EAAA,CAAG,CAAC,EAExBK,EAAwC,MAAOC,GAAoB,CAC/D,QAAA,IAAI,UAAWA,CAAO,CAAA,EAI1BC,EAAkBC,MAAI,OAAO,EACnCC,OAAAA,EAAA,mBAAmB,CAAE,GAAGC,EAAA,MAAMZ,CAAK,EAAG,SAAAO,CAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sources":["../../../../../components/form/component/form.ts"],"sourcesContent":["import type {\n RuleItem,\n ValidateError,\n ValidateFieldsError\n} from 'async-validator'\nimport type { ExtractPropTypes, PropType } from 'vue'\n\nexport type Arrayable<T> = T | T[]\n\nexport interface FormItemRule extends RuleItem {\n trigger?: Arrayable<string>\n}\n\nexport const definePropType = <T>(val: any): PropType<T> => val\nexport const formItemProps = {\n label: String,\n prop: String,\n rules: {\n // type: [Object, Array] as Arrayable<FormItemRule> // 优化前语法,即使类型不正确,也会被强行断言成正确的\n\n type: definePropType<Arrayable<FormItemRule>>([Object, Array]) // 优化后语法 根据返回类型,确保正确性\n }\n} as const\nexport type FormItemProps = ExtractPropTypes<typeof formItemProps> // 根据Props定义一个面向组件内部的值,面向内部表示Boolean和带有默认的props是一个被定义好的值\n"],"names":["definePropType","val","formItemProps"],"mappings":"gFAaa,MAAAA,EAAqBC,GAA0BA,EAC/CC,EAAgB,CAC3B,MAAO,OACP,KAAM,OACN,MAAO,CAGL,KAAMF,EAAwC,CAAC,OAAQ,KAAK,CAAC,CAC/D,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.vue2.js","sources":["../../../../../components/form/component/form.vue"],"sourcesContent":["<script setup lang='ts'>\nimport { useNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { computed } from 'vue'\n\ndefineOptions({ name: 'KForm' })\nconst { b } = useNamespace('form')\nconst c = computed(() => [b()])\n</script>\n\n<template>\n <form :class=\"c\">\n <slot />\n </form>\n</template>\n\n<style>\n\n</style>\n"],"names":["b","useNamespace","c","computed"],"mappings":"+OAKA,KAAM,CAAE,EAAAA,CAAA,EAAMC,EAAA,aAAa,MAAM,EAC3BC,EAAIC,EAAS,SAAA,IAAM,CAACH,EAAA,CAAG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-content.js","sources":["../../../../../components/form/content/form-content.ts"],"sourcesContent":["import { type InjectionKey, inject, provide } from 'vue'\nimport type { FormItemProps } from '../component/form'\n\nexport interface FormItemContext extends FormItemProps {\n validate: (trigger: string) => Promise<any>\n}\nexport const formItemContextKey: InjectionKey<FormItemContext>\n = Symbol('formItemContextKey')\n\nexport function useProvideFormItem(params: FormItemContext) {\n return provide(formItemContextKey, params)\n}\n\nexport function useInjectFormItem() {\n return inject(formItemContextKey)\n}\n"],"names":["formItemContextKey","useProvideFormItem","params","provide","useInjectFormItem","inject"],"mappings":"uGAMaA,EACP,OAAO,oBAAoB,EAE1B,SAASC,EAAmBC,EAAyB,CACnD,OAAAC,EAAA,QAAQH,EAAoBE,CAAM,CAC3C,CAEO,SAASE,GAAoB,CAClC,OAAOC,EAAAA,OAAOL,CAAkB,CAClC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../components/form/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport Form from './component/form.vue'\nimport FormItem from './component/form-item.vue'\n\nexport * from './component/form'\nexport const KForm = withInstall(Form) // 增加类型\nexport const KFormItem = withInstall(FormItem) // 增加类型\nexport default KForm\n"],"names":["KForm","withInstall","Form","KFormItem","FormItem"],"mappings":"sVAKaA,EAAQC,cAAYC,SAAI,EACxBC,EAAYF,cAAYG,EAAQ,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../components/icon/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport Icon from './src/icon.vue'\nimport './style'\n\nexport const KIcon = withInstall(Icon)\nexport default KIcon\n"],"names":["KIcon","withInstall","Icon"],"mappings":"kPAIaA,EAAQC,cAAYC,EAAI,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.vue2.js","sources":["../../../../../components/icon/src/icon.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { iconProps } from './types'\n\nconst props = defineProps(iconProps)\n\nconst { b } = useNamespace('icon')\nconst iconName = computed(() => `icon-king-${props.name}`)\nconst compStyle = computed(() => {\n return {\n fontSize: `${props.size}px`,\n color: props.color\n }\n})\nconst c = computed(() => {\n return [b(), iconName.value]\n})\n</script>\n\n<template>\n <i :class=\"c\" :style=\"compStyle\" />\n</template>\n"],"names":["props","__props","b","useNamespace","iconName","computed","compStyle","c"],"mappings":"4QAKA,MAAMA,EAAQC,EAER,CAAE,EAAAC,CAAA,EAAMC,EAAA,aAAa,MAAM,EAC3BC,EAAWC,EAAAA,SAAS,IAAM,aAAaL,EAAM,IAAI,EAAE,EACnDM,EAAYD,EAAAA,SAAS,KAClB,CACL,SAAU,GAAGL,EAAM,IAAI,KACvB,MAAOA,EAAM,KAAA,EAEhB,EACKO,EAAIF,EAAAA,SAAS,IACV,CAACH,EAAA,EAAKE,EAAS,KAAK,CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../../components/icon/src/types.ts"],"sourcesContent":["export const iconProps = {\n name: {\n type: String,\n required: true\n },\n size: {\n type: Number,\n default: 20\n },\n color: {\n type: String,\n default: '#333'\n }\n} as const\n"],"names":["iconProps"],"mappings":"gFAAO,MAAMA,EAAY,CACvB,KAAM,CACJ,KAAM,OACN,SAAU,EACZ,EACA,KAAM,CACJ,KAAM,OACN,QAAS,EACX,EACA,MAAO,CACL,KAAM,OACN,QAAS,MACX,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pro-area.api.js","sources":["../../../../../components/pro-area/apis/pro-area.api.ts"],"sourcesContent":["export const proAreaApis = {\n areaTree: (): Promise<any> =>\n globalThis.$http.get(`/basic/area/setting/tree`)\n}\n"],"names":["proAreaApis"],"mappings":"gFAAO,MAAMA,EAAc,CACzB,SAAU,IACR,WAAW,MAAM,IAAI,0BAA0B,CACnD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-pro-area.js","sources":["../../../../../components/pro-area/hooks/use-pro-area.ts"],"sourcesContent":["import { ref } from 'vue'\nimport { proAreaApis } from '../apis/pro-area.api'\n\nexport function useProArea() {\n const ops = ref<any>([])\n proAreaApis.areaTree().then((res) => {\n ops.value = res.data\n })\n return { ops }\n}\n"],"names":["useProArea","ops","ref","proAreaApis","res"],"mappings":"4IAGO,SAASA,GAAa,CACrB,MAAAC,EAAMC,MAAS,CAAA,CAAE,EACvBC,OAAAA,EAAAA,YAAY,SAAS,EAAE,KAAMC,GAAQ,CACnCH,EAAI,MAAQG,EAAI,IAAA,CACjB,EACM,CAAE,IAAAH,CAAI,CACf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../components/pro-area/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ProArea from './src/ProArea.vue'\nimport './style'\n\nexport * from './src/types'\nexport const KProArea = withInstall(ProArea)\nexport * from './hooks/use-pro-area'\nexport default KProArea\n"],"names":["KProArea","withInstall","ProArea"],"mappings":"yTAKaA,EAAWC,cAAYC,EAAO,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProArea.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProArea.vue2.js","sources":["../../../../../components/pro-area/src/ProArea.vue"],"sourcesContent":["<!-- eslint-disable unused-imports/no-unused-vars -->\n<script setup lang='ts'>\nimport { Col, Form, Row, Select } from 'ant-design-vue'\nimport { computed } from 'vue'\nimport { useNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport { type AreaOptions, type ArearModelsType, type FieldNames, ProAreaProps, type levelType } from './types'\n\ndefineOptions({\n name: 'ProArea'\n})\nconst props = defineProps(ProAreaProps)\nForm.useInjectFormItemContext()\nconst model = defineModel<ArearModelsType['modelValue']>({\n required: true\n})\nconst { b } = useNamespace('pro-area-select')\nconst placeholder = computed(() => {\n return (index: levelType) => {\n const title = index === 1 ? '请选择省份' : index === 2 ? '请选择城市' : '请选择区县'\n return `请选择${title}`\n }\n})\n\nconst ops = computed(() => {\n return (index: levelType) => {\n if (props.options.length > 0) {\n return getOps(index)\n }\n return []\n }\n})\nfunction getOps(level: levelType) {\n if (level === 1) {\n return props.options.map(item => (\n {\n value: getFieldValue(item, 'id'),\n label: getFieldValue(item, 'name')\n }\n ))\n }\n else if (level === 2) {\n const value = model.value.province\n return value\n ? findChildrenByvalue(props.options, value).map(item => ({\n value: getFieldValue(item, 'id'),\n label: getFieldValue(item, 'name')\n }))\n : []\n }\n else {\n const value = model.value?.city\n return value\n ? findChildrenByvalue(props.options, value).map(item => ({\n value: getFieldValue(item, 'id'),\n label: getFieldValue(item, 'name')\n }))\n : []\n }\n}\n\nfunction findChildrenByvalue(regions: AreaOptions[], value: string) {\n for (const item of regions) {\n if (getFieldValue(item, 'id') === value) {\n return getFieldValue(item, 'children') || []\n }\n if (getFieldValue(item, 'children')) {\n const result = findChildrenByvalue(getFieldValue(item, 'children'), value)\n if (result) {\n return result\n }\n }\n }\n return undefined\n}\nfunction getFieldValue(opt?: AreaOptions, key?: keyof FieldNames) {\n return opt && key ? opt[props?.fieldNames[key] || key] : undefined\n}\nconst levels = computed(() => {\n let IDX = props.level\n const arr: string[] = []\n while (IDX--) {\n arr.push(IDX === 2 ? 'province' : IDX === 1 ? 'city' : 'county')\n }\n return arr\n})\nconst c = computed(() => {\n return [b()]\n})\nfunction handleChange(index: levelType) {\n if (index === 1) {\n const list = levels.value.slice(index)\n list.forEach((item) => {\n model.value[item] = undefined\n })\n }\n else if (index === 2) {\n const list = levels.value.slice(index)\n list.forEach((item) => {\n model.value[item] = undefined\n })\n }\n}\n</script>\n\n<template>\n <Row :gutter=\"10\">\n <Col v-for=\"(item, index) in levels\" :key=\"item\" :span=\"24 / level\">\n <Select v-model:value=\"model[item]\" :placeholder=\"placeholder(index + 1 as levelType)\" :class=\"c\" :options=\"ops(index + 1 as levelType)\" @change=\"() => handleChange(index + 1 as levelType)\" />\n </Col>\n </Row>\n</template>\n"],"names":["props","__props","Form","model","_useModel","b","useNamespace","placeholder","computed","index","ops","getOps","level","item","getFieldValue","value","findChildrenByvalue","_a","regions","result","opt","key","levels","IDX","arr","c","handleChange"],"mappings":"qZAUA,MAAMA,EAAQC,EACdC,EAAA,KAAK,yBAAyB,EACxB,MAAAC,EAAQC,EAAAA,SAA0CH,EAAA,YAEvD,EACK,CAAE,EAAAI,CAAA,EAAMC,EAAA,aAAa,iBAAiB,EACtCC,EAAcC,EAAAA,SAAS,IACnBC,GAEC,MADOA,IAAU,EAAI,QAAUA,IAAU,EAAI,QAAU,OAC5C,EAErB,EAEKC,EAAMF,EAAAA,SAAS,IACXC,GACFT,EAAM,QAAQ,OAAS,EAClBW,EAAOF,CAAK,EAEd,EAEV,EACD,SAASE,EAAOC,EAAkB,OAChC,GAAIA,IAAU,EACL,OAAAZ,EAAM,QAAQ,IACnBa,IAAA,CACE,MAAOC,EAAcD,EAAM,IAAI,EAC/B,MAAOC,EAAcD,EAAM,MAAM,CAEpC,EAAA,EACH,GACSD,IAAU,EAAG,CACd,MAAAG,EAAQZ,EAAM,MAAM,SAC1B,OAAOY,EACHC,EAAoBhB,EAAM,QAASe,CAAK,EAAE,IAAaF,IAAA,CACvD,MAAOC,EAAcD,EAAM,IAAI,EAC/B,MAAOC,EAAcD,EAAM,MAAM,CAAA,EACjC,EACA,CAAA,CAAC,KAEF,CACG,MAAAE,GAAQE,EAAAd,EAAM,QAAN,YAAAc,EAAa,KAC3B,OAAOF,EACHC,EAAoBhB,EAAM,QAASe,CAAK,EAAE,IAAaF,IAAA,CACvD,MAAOC,EAAcD,EAAM,IAAI,EAC/B,MAAOC,EAAcD,EAAM,MAAM,CAAA,EACjC,EACA,CAAA,CACN,CACF,CAES,SAAAG,EAAoBE,EAAwBH,EAAe,CAClE,UAAWF,KAAQK,EAAS,CAC1B,GAAIJ,EAAcD,EAAM,IAAI,IAAME,EAChC,OAAOD,EAAcD,EAAM,UAAU,GAAK,CAAA,EAExC,GAAAC,EAAcD,EAAM,UAAU,EAAG,CACnC,MAAMM,EAASH,EAAoBF,EAAcD,EAAM,UAAU,EAAGE,CAAK,EACzE,GAAII,EACK,OAAAA,CAEX,CACF,CAEF,CACS,SAAAL,EAAcM,EAAmBC,EAAwB,CACzD,OAAAD,GAAOC,EAAMD,GAAIpB,GAAA,YAAAA,EAAO,WAAWqB,KAAQA,CAAG,EAAI,MAC3D,CACM,MAAAC,EAASd,EAAAA,SAAS,IAAM,CAC5B,IAAIe,EAAMvB,EAAM,MAChB,MAAMwB,EAAgB,CAAA,EACtB,KAAOD,KACLC,EAAI,KAAKD,IAAQ,EAAI,WAAaA,IAAQ,EAAI,OAAS,QAAQ,EAE1D,OAAAC,CAAA,CACR,EACKC,EAAIjB,EAAAA,SAAS,IACV,CAACH,GAAG,CACZ,EACD,SAASqB,EAAajB,EAAkB,CAClCA,IAAU,EACCa,EAAO,MAAM,MAAMb,CAAK,EAChC,QAASI,GAAS,CACfV,EAAA,MAAMU,CAAI,EAAI,MAAA,CACrB,EAEMJ,IAAU,GACJa,EAAO,MAAM,MAAMb,CAAK,EAChC,QAASI,GAAS,CACfV,EAAA,MAAMU,CAAI,EAAI,MAAA,CACrB,CAEL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../../components/pro-area/src/types.ts"],"sourcesContent":["/* eslint-disable unused-imports/no-unused-vars */\nimport type { PropType } from 'vue'\n\nexport type FieldNames = {\n [K in keyof Pick<AreaOptions, 'name' | 'id' | 'children'>]?: string;\n}\n\nconst level = [1, 2, 3] as const\nexport type levelType = (typeof level)[number]\nexport interface AreaOptions {\n /** 展示文本 */\n name?: string\n /** 值 */\n id?: string\n /** 子节点 */\n children?: AreaOptions[]\n [key: PropertyKey]: any\n}\n// Models\nexport interface ArearModelsType {\n /** 所选的值 */\n modelValue: {\n province?: string\n city?: string\n county?: string\n }\n}\n\nexport const ProAreaProps = {\n level: {\n type: Number as PropType<levelType>,\n default: 3\n },\n options: {\n type: Array as PropType<AreaOptions[]>,\n required: true\n },\n fieldNames: {\n type: Object as PropType<FieldNames>,\n default: () => ({\n name: 'name',\n id: 'id',\n children: 'children'\n })\n }\n} as const\n"],"names":["ProAreaProps"],"mappings":"gFA4BO,MAAMA,EAAe,CAC1B,MAAO,CACL,KAAM,OACN,QAAS,CACX,EACA,QAAS,CACP,KAAM,MACN,SAAU,EACZ,EACA,WAAY,CACV,KAAM,OACN,QAAS,KAAO,CACd,KAAM,OACN,GAAI,KACJ,SAAU,UAAA,EAEd,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useProModal.js","sources":["../../../../../components/pro-modal/hooks/useProModal.ts"],"sourcesContent":["import { getCurrentInstance, ref, unref } from 'vue'\n\nexport interface modalMethods {\n openModal: () => void\n closeModal: () => void\n // setFormInfo: (data: Record<string, unknown>) => void\n}\nexport function useProModal() {\n const modalVisible = ref<boolean>(false)\n const openModal = () => {\n modalVisible.value = true\n }\n const closeModal = () => {\n modalVisible.value = false\n }\n const modalMethods = {\n openModal,\n closeModal\n }\n const instance = getCurrentInstance()\n if (instance) {\n instance.emit('init', modalMethods)\n }\n return { modalVisible, openModal, closeModal }\n}\nexport function useProModalInit(): [\n (methods: modalMethods) => void,\n modalMethods\n] {\n // const currentInstance = getCurrentInstance()\n const modalRef = ref<Nullable<modalMethods>>(null)\n const getInstance = () => {\n const instance = unref(modalRef.value)\n if (!instance) {\n console.error('useModal instance is undefined!')\n }\n return instance\n }\n const initmodal = (modalInstance: modalMethods) => {\n // currentInstance?.emit('init-modal', modalInstance)\n modalRef.value = modalInstance\n }\n const methods: modalMethods = {\n openModal: () => {\n getInstance()?.openModal()\n },\n closeModal: () => getInstance()?.closeModal()\n }\n return [initmodal, methods]\n}\n"],"names":["useProModal","modalVisible","ref","openModal","closeModal","modalMethods","instance","getCurrentInstance","useProModalInit","modalRef","getInstance","unref","modalInstance","_a"],"mappings":"uGAOO,SAASA,GAAc,CACtB,MAAAC,EAAeC,MAAa,EAAK,EACjCC,EAAY,IAAM,CACtBF,EAAa,MAAQ,EAAA,EAEjBG,EAAa,IAAM,CACvBH,EAAa,MAAQ,EAAA,EAEjBI,EAAe,CACnB,UAAAF,EACA,WAAAC,CAAA,EAEIE,EAAWC,EAAAA,qBACjB,OAAID,GACOA,EAAA,KAAK,OAAQD,CAAY,EAE7B,CAAE,aAAAJ,EAAc,UAAAE,EAAW,WAAAC,EACpC,CACO,SAASI,GAGd,CAEM,MAAAC,EAAWP,MAA4B,IAAI,EAC3CQ,EAAc,IAAM,CAClB,MAAAJ,EAAWK,EAAAA,MAAMF,EAAS,KAAK,EACrC,OAAKH,GACH,QAAQ,MAAM,iCAAiC,EAE1CA,CAAA,EAYF,MAAA,CAVYM,GAAgC,CAEjDH,EAAS,MAAQG,CAAA,EAEW,CAC5B,UAAW,IAAM,QACfC,EAAAH,EAAA,IAAA,MAAAG,EAAe,WACjB,EACA,WAAY,IAAA,OAAM,OAAAA,EAAAH,EAAY,IAAZ,YAAAG,EAAe,aAAW,CAEpB,CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../components/pro-modal/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ProModal from './src/ProModal.vue'\nimport './style'\n\nexport * from './hooks/useProModal'\nexport const KProModal = withInstall(ProModal)\nexport default KProModal\n"],"names":["KProModal","withInstall","ProModal"],"mappings":"8RAKaA,EAAYC,cAAYC,EAAQ,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProModal.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProModal.vue2.js","sources":["../../../../../components/pro-modal/src/ProModal.vue"],"sourcesContent":["<script setup lang='ts'>\nimport { Button, Modal } from 'ant-design-vue'\nimport { useNamespace } from '@king-one/antdv/hooks/use-namespace'\nimport type { CSSProperties } from 'vue'\nimport { computed, ref, watch, watchEffect } from 'vue'\nimport { useDraggable } from '@vueuse/core'\nimport type { ProModalSlots } from './types'\nimport { ProModalProps } from './types'\n\ndefineOptions({\n name: 'ProModal'\n})\ndefineProps(ProModalProps)\nconst emit = defineEmits(['onConfirm', 'onCancel'])\ndefineSlots<ProModalSlots>()\nconst modalTitleRef = ref<HTMLElement | null>(null)\nconst open = defineModel({ required: true, type: Boolean })\n\nconst { b } = useNamespace('pro-modal')\nconst c = computed(() => {\n return b()\n})\n\nfunction handleClick() {\n emit('onConfirm')\n}\nfunction handleCancel() {\n emit('onCancel')\n}\n\nconst { x, y, isDragging } = useDraggable(modalTitleRef)\nconst startX = ref<number>(0)\nconst startY = ref<number>(0)\nconst startedDrag = ref(false)\nconst transformX = ref(0)\nconst transformY = ref(0)\nconst preTransformX = ref(0)\nconst preTransformY = ref(0)\nconst dragRect = ref({ left: 0, right: 0, top: 0, bottom: 0 })\nwatch([x, y], () => {\n if (!startedDrag.value && modalTitleRef.value) {\n startX.value = x.value\n startY.value = y.value\n const bodyRect = document.body.getBoundingClientRect()\n const titleRect = modalTitleRef.value.getBoundingClientRect()\n dragRect.value.right = bodyRect.width - titleRect.width\n dragRect.value.bottom = bodyRect.height - titleRect.height\n preTransformX.value = transformX.value\n preTransformY.value = transformY.value\n }\n startedDrag.value = true\n})\nwatch(isDragging, () => {\n if (!isDragging) {\n startedDrag.value = false\n }\n})\nwatchEffect(() => {\n if (startedDrag.value) {\n transformX.value\n = preTransformX.value\n + Math.min(Math.max(dragRect.value.left, x.value), dragRect.value.right)\n - startX.value\n transformY.value\n = preTransformY.value\n + Math.min(Math.max(dragRect.value.top, y.value), dragRect.value.bottom)\n - startY.value\n }\n})\nconst transformStyle = computed<CSSProperties>(() => {\n return {\n transform: `translate(${transformX.value}px, ${transformY.value}px)`\n }\n})\n</script>\n\n<template>\n <Modal\n v-model:open=\"open\" v-bind=\"(modalProps as any)\" :wrap-class-name=\"c\" @ok=\"handleClick\"\n @cancel=\"handleCancel\"\n >\n <template #title>\n <div ref=\"modalTitleRef\" class=\"pro-modal-title\">\n {{ title }}\n </div>\n </template>\n <slot />\n <template #modalRender=\"{ originVNode }\">\n <div :style=\"transformStyle\">\n <component :is=\"originVNode\" />\n </div>\n </template>\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </Modal>\n</template>\n"],"names":["emit","__emit","modalTitleRef","ref","open","_useModel","b","useNamespace","c","computed","handleClick","handleCancel","x","y","isDragging","useDraggable","startX","startY","startedDrag","transformX","transformY","preTransformX","preTransformY","dragRect","watch","bodyRect","titleRect","watchEffect","transformStyle"],"mappings":"gfAaA,MAAMA,EAAOC,EAEPC,EAAgBC,MAAwB,IAAI,EAC5CC,EAAOC,EAAAA,uBAA6C,EAEpD,CAAE,EAAAC,CAAA,EAAMC,EAAA,aAAa,WAAW,EAChCC,EAAIC,EAAAA,SAAS,IACVH,EAAE,CACV,EAED,SAASI,GAAc,CACrBV,EAAK,WAAW,CAClB,CACA,SAASW,GAAe,CACtBX,EAAK,UAAU,CACjB,CAEA,KAAM,CAAE,EAAAY,EAAG,EAAAC,EAAG,WAAAC,CAAW,EAAIC,EAAAA,aAAab,CAAa,EACjDc,EAASb,MAAY,CAAC,EACtBc,EAASd,MAAY,CAAC,EACtBe,EAAcf,MAAI,EAAK,EACvBgB,EAAahB,MAAI,CAAC,EAClBiB,EAAajB,MAAI,CAAC,EAClBkB,EAAgBlB,MAAI,CAAC,EACrBmB,EAAgBnB,MAAI,CAAC,EACrBoB,EAAWpB,EAAAA,IAAI,CAAE,KAAM,EAAG,MAAO,EAAG,IAAK,EAAG,OAAQ,CAAG,CAAA,EAC7DqB,EAAAA,MAAM,CAACZ,EAAGC,CAAC,EAAG,IAAM,CAClB,GAAI,CAACK,EAAY,OAAShB,EAAc,MAAO,CAC7Cc,EAAO,MAAQJ,EAAE,MACjBK,EAAO,MAAQJ,EAAE,MACX,MAAAY,EAAW,SAAS,KAAK,sBAAsB,EAC/CC,EAAYxB,EAAc,MAAM,sBAAsB,EAC5DqB,EAAS,MAAM,MAAQE,EAAS,MAAQC,EAAU,MAClDH,EAAS,MAAM,OAASE,EAAS,OAASC,EAAU,OACpDL,EAAc,MAAQF,EAAW,MACjCG,EAAc,MAAQF,EAAW,KACnC,CACAF,EAAY,MAAQ,EAAA,CACrB,EACDM,EAAA,MAAMV,EAAY,IAAM,CACjBA,IACHI,EAAY,MAAQ,GACtB,CACD,EACDS,EAAAA,YAAY,IAAM,CACZT,EAAY,QACdC,EAAW,MACPE,EAAc,MACd,KAAK,IAAI,KAAK,IAAIE,EAAS,MAAM,KAAMX,EAAE,KAAK,EAAGW,EAAS,MAAM,KAAK,EACrEP,EAAO,MACXI,EAAW,MACPE,EAAc,MACd,KAAK,IAAI,KAAK,IAAIC,EAAS,MAAM,IAAKV,EAAE,KAAK,EAAGU,EAAS,MAAM,MAAM,EACrEN,EAAO,MACb,CACD,EACK,MAAAW,EAAiBnB,EAAAA,SAAwB,KACtC,CACL,UAAW,aAAaU,EAAW,KAAK,OAAOC,EAAW,KAAK,KAAA,EAElE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../../components/pro-modal/src/types.ts"],"sourcesContent":["import type { ModalFuncProps, ModalProps } from 'ant-design-vue'\nimport type { PropType } from 'vue'\n\ntype ModalType = ModalFuncProps & {\n confirmLoading?: boolean\n}\nexport const ProModalProps = {\n modalProps: {\n type: Object as PropType<Omit<ModalType, 'open' | 'title'>>\n },\n modelValue: {\n type: Boolean,\n required: true\n },\n title: {\n type: String,\n required: true\n }\n} as const\n\n// import type { ModalFuncProps, ModalProps } from 'ant-design-vue'\n// import type { PropType } from 'vue'\n\n// type MPType = ModalProps\n// export const ProModalProps = {\n// modalProps: {\n// type: Object as PropType<Omit<MPType, 'open'>>\n// },\n// mProps: {\n// type: Object as PropType<{ name: string }>\n// }\n// } as const\n\nexport interface ProModalSlots {\n /**\n * 自定义标题\n */\n title?: () => any\n /**\n * 自定义页脚\n */\n footer?: () => any\n /**\n * 默认插槽\n */\n default?: () => any\n}\n"],"names":["ProModalProps"],"mappings":"gFAMO,MAAMA,EAAgB,CAC3B,WAAY,CACV,KAAM,MACR,EACA,WAAY,CACV,KAAM,QACN,SAAU,EACZ,EACA,MAAO,CACL,KAAM,OACN,SAAU,EACZ,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pro-picker.api.js","sources":["../../../../../components/pro-picker/apis/pro-picker.api.ts"],"sourcesContent":["import type { AxiosRequestConfig } from 'axios'\n\nexport const proPickerApi = {\n company: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(`/security/company/options`, config),\n flowApplication: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(`/flow/application/options`, config),\n user: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(`/security/user/options`, config),\n getOps: (config: AxiosRequestConfig): Promise<any> =>\n globalThis.$http.get(config.url, config)\n}\n"],"names":["proPickerApi","config"],"mappings":"gFAEO,MAAMA,EAAe,CAC1B,QAAUC,GACR,WAAW,MAAM,IAAI,4BAA6BA,CAAM,EAC1D,gBAAkBA,GAChB,WAAW,MAAM,IAAI,4BAA6BA,CAAM,EAC1D,KAAOA,GACL,WAAW,MAAM,IAAI,yBAA0BA,CAAM,EACvD,OAASA,GACP,WAAW,MAAM,IAAIA,EAAO,IAAKA,CAAM,CAC3C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../components/pro-picker/index.ts"],"sourcesContent":["import { withInstall } from '../utils/install'\nimport ProPicker from './src/ProPicker.vue'\n\nexport * from './src/types'\nexport const KProPicker = withInstall(ProPicker)\nexport default KProPicker\n"],"names":["KProPicker","withInstall","ProPicker"],"mappings":"4PAIaA,EAAaC,cAAYC,EAAS,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProPicker.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|