mrxy-yk 1.7.0-beta.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/auto-imports.d.ts +76 -0
- package/dist/components/a-map-canvas/AMapCanvas.d.ts +2 -3
- package/dist/components/adaptive-box/AdaptiveBox.d.ts +8 -18
- package/dist/components/adaptive-box/AdaptiveBox.vue.js +6 -170
- package/dist/components/adaptive-box/AdaptiveBox.vue.setup.js +166 -0
- package/dist/components/coordinate-pickup/CoordinatePickup.d.ts +3 -4
- package/dist/components/coordinate-pickup/CoordinatePickup.vue.js +6 -316
- package/dist/components/coordinate-pickup/CoordinatePickup.vue.setup.js +291 -0
- package/dist/components/drag-drop-box/DragDropBox.d.ts +8 -12
- package/dist/components/drag-drop-box/DragDropBox.vue.js +6 -59
- package/dist/components/drag-drop-box/DragDropBox.vue.setup.js +69 -0
- package/dist/components/drag-drop-container/DragDropContainer.d.ts +8 -18
- package/dist/components/drag-drop-container/DragDropContainer.vue.js +6 -114
- package/dist/components/drag-drop-container/DragDropContainer.vue.setup.js +110 -0
- package/dist/components/echarts-canvas/EChartsCanvas.d.ts +9 -17
- package/dist/components/echarts-canvas/EChartsCanvas.vue.js +6 -80
- package/dist/components/echarts-canvas/EChartsCanvas.vue.setup.js +73 -0
- package/dist/components/empty/Empty.d.ts +12 -15
- package/dist/components/empty/Empty.vue.js +6 -85
- package/dist/components/empty/Empty.vue.setup.js +73 -0
- package/dist/components/empty/config.js +24 -9
- package/dist/components/empty/hooks/index.js +25 -25
- package/dist/components/empty/index.js +6 -12
- package/dist/components/export-link/ExportLink.d.ts +8 -12
- package/dist/components/export-link/ExportLink.vue.js +5 -39
- package/dist/components/export-link/ExportLink.vue.setup.js +38 -0
- package/dist/components/export-link/index.js +6 -8
- package/dist/components/in-body/InBody.d.ts +7 -15
- package/dist/components/in-body/InBody.vue.js +5 -25
- package/dist/components/in-body/InBody.vue.setup.js +23 -0
- package/dist/components/index.js +50 -63
- package/dist/components/position-anchor/PositionAnchor.d.ts +8 -12
- package/dist/components/position-anchor/PositionAnchor.vue.js +6 -22
- package/dist/components/position-anchor/PositionAnchor.vue.setup.js +14 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +14 -15
- package/dist/components/progress-bar/ProgressBar.vue.js +6 -128
- package/dist/components/progress-bar/ProgressBar.vue.setup.js +100 -0
- package/dist/components/progress-ring/ProgressRing.d.ts +3 -2
- package/dist/components/progress-ring/ProgressRing.vue.js +6 -86
- package/dist/components/progress-ring/ProgressRing.vue.setup.js +91 -0
- package/dist/components/scroll-container/ScrollContainer.d.ts +15 -24
- package/dist/components/scroll-container/ScrollContainer.vue.js +6 -91
- package/dist/components/scroll-container/ScrollContainer.vue.setup.js +80 -0
- package/dist/components/show-log/ShowLog.d.ts +8 -12
- package/dist/components/show-log/ShowLog.vue.js +6 -62
- package/dist/components/show-log/ShowLog.vue.setup.js +45 -0
- package/dist/components/ys-video/YsVideo.d.ts +3 -4
- package/dist/components/ys-video/YsVideo.vue.js +6 -119
- package/dist/components/ys-video/YsVideo.vue.setup.js +112 -0
- package/dist/components/ys-video/components/BtnLineRec.d.ts +2 -1
- package/dist/components/ys-video/components/BtnLineRec.vue.js +6 -57
- package/dist/components/ys-video/components/BtnLineRec.vue.setup.js +51 -0
- package/dist/components/ys-video/images/btn-play.png.js +4 -4
- package/dist/components/ys-video/type.js +13 -19
- package/dist/components.d.ts +48 -0
- package/dist/config/index.js +38 -30
- package/dist/directives/index.js +6 -4
- package/dist/directives/ref-height/index.js +29 -45
- package/dist/element-plus/components/date-picker/DatePicker.d.ts +2 -1
- package/dist/element-plus/components/date-picker/DatePicker.vue.js +5 -108
- package/dist/element-plus/components/date-picker/DatePicker.vue.setup.js +122 -0
- package/dist/element-plus/components/date-picker/index.js +231 -241
- package/dist/element-plus/components/form-dialog/FormDialog.d.ts +11 -461
- package/dist/element-plus/components/form-dialog/FormDialog.vue.js +5 -141
- package/dist/element-plus/components/form-dialog/FormDialog.vue.setup.js +153 -0
- package/dist/element-plus/components/images/Images.d.ts +2 -1
- package/dist/element-plus/components/images/Images.vue.js +6 -93
- package/dist/element-plus/components/images/Images.vue.setup.js +85 -0
- package/dist/element-plus/components/images/index.js +4 -10
- package/dist/element-plus/components/pagination/Pagination.d.ts +3 -2
- package/dist/element-plus/components/pagination/Pagination.vue.js +6 -66
- package/dist/element-plus/components/pagination/Pagination.vue.setup.js +75 -0
- package/dist/element-plus/components/table-column/TableColumn.d.ts +13 -14
- package/dist/element-plus/components/table-column/TableColumn.vue.js +5 -62
- package/dist/element-plus/components/table-column/TableColumn.vue.setup.js +49 -0
- package/dist/element-plus/components/table-column/index.js +4 -10
- package/dist/element-plus/components/upload/accept/index.js +11 -11
- package/dist/element-plus/components/upload/index.js +15 -35
- package/dist/element-plus/components/upload/select-file/SelectFile.d.ts +9 -749
- package/dist/element-plus/components/upload/select-file/SelectFile.vue.js +6 -66
- package/dist/element-plus/components/upload/select-file/SelectFile.vue.setup.js +56 -0
- package/dist/element-plus/components/upload/upload-files/UploadFiles.d.ts +7 -13
- package/dist/element-plus/components/upload/upload-files/UploadFiles.vue.js +6 -221
- package/dist/element-plus/components/upload/upload-files/UploadFiles.vue.setup.js +208 -0
- package/dist/element-plus/components/upload/upload-images/UploadImages.d.ts +7 -13
- package/dist/element-plus/components/upload/upload-images/UploadImages.vue.js +6 -230
- package/dist/element-plus/components/upload/upload-images/UploadImages.vue.setup.js +215 -0
- package/dist/element-plus/hooks/dialog/index.js +35 -45
- package/dist/element-plus/hooks/form/index.js +37 -45
- package/dist/element-plus/hooks/form-dialog/index.js +46 -49
- package/dist/element-plus/hooks/table-sort/index.js +51 -27
- package/dist/element-plus/utils/form-rule/rule.js +53 -73
- package/dist/element-plus/utils/table-util/index.js +37 -54
- package/dist/entity/BigFloat.js +94 -101
- package/dist/entity/Pages.js +10 -10
- package/dist/entity/RejectError.js +39 -34
- package/dist/env.d.ts +7 -0
- package/dist/hooks/inject-events/index.js +27 -24
- package/dist/hooks/life-cycle/index.js +18 -12
- package/dist/hooks/setup-module/index.js +56 -29
- package/dist/hooks/table-search/index.js +61 -68
- package/dist/icons/images/Image.svg.js +6 -4
- package/dist/icons/images/ImageError.svg.js +6 -4
- package/dist/icons/index.js +10 -11
- package/dist/index.js +36 -112
- package/dist/resolver/index.js +22 -23
- package/dist/styles/index.css +2 -1
- package/dist/utils/amap/index.js +136 -113
- package/dist/utils/amap/type.d.ts +3 -0
- package/dist/utils/amap/utils/coordinates.js +63 -60
- package/dist/utils/amap/utils/index.js +43 -36
- package/dist/utils/echarts/hooks/index.js +80 -17
- package/dist/utils/echarts/index.js +11 -4
- package/dist/utils/echarts/modules/coordinate/basic.js +121 -138
- package/dist/utils/echarts/modules/coordinate/cartesian.js +69 -77
- package/dist/utils/echarts/modules/series/bar.js +40 -40
- package/dist/utils/echarts/modules/series/line.js +43 -44
- package/dist/utils/echarts/modules/series/pie.js +118 -136
- package/dist/utils/echarts/themes/dark.js +115 -194
- package/dist/utils/echarts/themes/default.js +291 -408
- package/dist/utils/echarts/themes/index.js +13 -14
- package/dist/utils/echarts/utils/assignOption.js +28 -37
- package/dist/utils/echarts/utils/index.js +83 -95
- package/dist/utils/fn-periodically/FnBatchPeriodically.js +54 -68
- package/dist/utils/fn-periodically/FnPeriodically.js +77 -89
- package/dist/utils/match-unit/dataset.js +324 -142
- package/dist/utils/match-unit/index.js +55 -52
- package/dist/utils/prototype/lib/ArrayUtil.js +114 -114
- package/dist/utils/prototype/lib/ComponentUtil.js +42 -44
- package/dist/utils/prototype/lib/FileUtil.js +40 -42
- package/dist/utils/prototype/lib/NumberUtil.js +16 -16
- package/dist/utils/prototype/lib/ObjectUtil.js +264 -276
- package/dist/utils/prototype/lib/PromiseUtil.js +17 -17
- package/dist/utils/storage/index.js +93 -138
- package/dist/utils/transition-fade/index.js +68 -78
- package/package.json +21 -21
- package/dist/components/adaptive-box/AdaptiveBox.vue3.js +0 -5
- package/dist/components/coordinate-pickup/CoordinatePickup.vue3.js +0 -5
- package/dist/components/drag-drop-box/DragDropBox.vue3.js +0 -5
- package/dist/components/drag-drop-container/DragDropContainer.vue3.js +0 -5
- package/dist/components/echarts-canvas/EChartsCanvas.vue3.js +0 -5
- package/dist/components/empty/Empty.vue3.js +0 -5
- package/dist/components/export-link/ExportLink.vue2.js +0 -4
- package/dist/components/in-body/InBody.vue2.js +0 -4
- package/dist/components/position-anchor/PositionAnchor.vue3.js +0 -5
- package/dist/components/progress-bar/ProgressBar.vue3.js +0 -5
- package/dist/components/progress-ring/ProgressRing.vue3.js +0 -5
- package/dist/components/scroll-container/ScrollContainer.vue3.js +0 -5
- package/dist/components/show-log/ShowLog.vue3.js +0 -5
- package/dist/components/ys-video/YsVideo.vue3.js +0 -5
- package/dist/components/ys-video/components/BtnLineRec.vue3.js +0 -5
- package/dist/element-plus/components/date-picker/DatePicker.vue2.js +0 -4
- package/dist/element-plus/components/form-dialog/FormDialog.vue2.js +0 -4
- package/dist/element-plus/components/images/Images.vue3.js +0 -5
- package/dist/element-plus/components/pagination/Pagination.vue3.js +0 -5
- package/dist/element-plus/components/table-column/TableColumn.vue2.js +0 -4
- package/dist/element-plus/components/upload/select-file/SelectFile.vue3.js +0 -5
- package/dist/element-plus/components/upload/upload-files/UploadFiles.vue3.js +0 -5
- package/dist/element-plus/components/upload/upload-images/UploadImages.vue3.js +0 -5
- package/dist/element-plus/index.js +0 -16
- /package/dist/styles/{plugins → src/styles/plugins}/colors/index.scss +0 -0
- /package/dist/styles/{plugins → src/styles/plugins}/colors/var.scss +0 -0
- /package/dist/styles/{plugins → src/styles/plugins}/template.scss +0 -0
- /package/dist/styles/tools/{dev.css → src/styles/tools/dev.css} +0 -0
- /package/dist/styles/tools/{dev.css.map → src/styles/tools/dev.css.map} +0 -0
- /package/dist/styles/tools/{index.css → src/styles/tools/index.css} +0 -0
- /package/dist/styles/tools/{index.css.map → src/styles/tools/index.css.map} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
// Generated by unplugin-auto-import
|
|
6
|
+
// biome-ignore lint: disable
|
|
7
|
+
export {}
|
|
8
|
+
declare global {
|
|
9
|
+
const EffectScope: typeof import('vue').EffectScope
|
|
10
|
+
const ElLoading: typeof import('element-plus/es').ElLoading
|
|
11
|
+
const computed: typeof import('vue').computed
|
|
12
|
+
const createApp: typeof import('vue').createApp
|
|
13
|
+
const customRef: typeof import('vue').customRef
|
|
14
|
+
const defineAsyncComponent: typeof import('vue').defineAsyncComponent
|
|
15
|
+
const defineComponent: typeof import('vue').defineComponent
|
|
16
|
+
const defineProps: typeof import('vue').defineProps
|
|
17
|
+
const effectScope: typeof import('vue').effectScope
|
|
18
|
+
const getCurrentInstance: typeof import('vue').getCurrentInstance
|
|
19
|
+
const getCurrentScope: typeof import('vue').getCurrentScope
|
|
20
|
+
const getCurrentWatcher: typeof import('vue').getCurrentWatcher
|
|
21
|
+
const h: typeof import('vue').h
|
|
22
|
+
const inject: typeof import('vue').inject
|
|
23
|
+
const isProxy: typeof import('vue').isProxy
|
|
24
|
+
const isReactive: typeof import('vue').isReactive
|
|
25
|
+
const isReadonly: typeof import('vue').isReadonly
|
|
26
|
+
const isRef: typeof import('vue').isRef
|
|
27
|
+
const isShallow: typeof import('vue').isShallow
|
|
28
|
+
const markRaw: typeof import('vue').markRaw
|
|
29
|
+
const nextTick: typeof import('vue').nextTick
|
|
30
|
+
const onActivated: typeof import('vue').onActivated
|
|
31
|
+
const onBeforeMount: typeof import('vue').onBeforeMount
|
|
32
|
+
const onBeforeUnmount: typeof import('vue').onBeforeUnmount
|
|
33
|
+
const onBeforeUpdate: typeof import('vue').onBeforeUpdate
|
|
34
|
+
const onDeactivated: typeof import('vue').onDeactivated
|
|
35
|
+
const onErrorCaptured: typeof import('vue').onErrorCaptured
|
|
36
|
+
const onMounted: typeof import('vue').onMounted
|
|
37
|
+
const onRenderTracked: typeof import('vue').onRenderTracked
|
|
38
|
+
const onRenderTriggered: typeof import('vue').onRenderTriggered
|
|
39
|
+
const onScopeDispose: typeof import('vue').onScopeDispose
|
|
40
|
+
const onServerPrefetch: typeof import('vue').onServerPrefetch
|
|
41
|
+
const onUnmounted: typeof import('vue').onUnmounted
|
|
42
|
+
const onUpdated: typeof import('vue').onUpdated
|
|
43
|
+
const onWatcherCleanup: typeof import('vue').onWatcherCleanup
|
|
44
|
+
const provide: typeof import('vue').provide
|
|
45
|
+
const reactive: typeof import('vue').reactive
|
|
46
|
+
const readonly: typeof import('vue').readonly
|
|
47
|
+
const ref: typeof import('vue').ref
|
|
48
|
+
const resolveComponent: typeof import('vue').resolveComponent
|
|
49
|
+
const shallowReactive: typeof import('vue').shallowReactive
|
|
50
|
+
const shallowReadonly: typeof import('vue').shallowReadonly
|
|
51
|
+
const shallowRef: typeof import('vue').shallowRef
|
|
52
|
+
const toRaw: typeof import('vue').toRaw
|
|
53
|
+
const toRef: typeof import('vue').toRef
|
|
54
|
+
const toRefs: typeof import('vue').toRefs
|
|
55
|
+
const toValue: typeof import('vue').toValue
|
|
56
|
+
const triggerRef: typeof import('vue').triggerRef
|
|
57
|
+
const unref: typeof import('vue').unref
|
|
58
|
+
const useAttrs: typeof import('vue').useAttrs
|
|
59
|
+
const useCssModule: typeof import('vue').useCssModule
|
|
60
|
+
const useCssVars: typeof import('vue').useCssVars
|
|
61
|
+
const useId: typeof import('vue').useId
|
|
62
|
+
const useModel: typeof import('vue').useModel
|
|
63
|
+
const useSlots: typeof import('vue').useSlots
|
|
64
|
+
const useTemplateRef: typeof import('vue').useTemplateRef
|
|
65
|
+
const watch: typeof import('vue').watch
|
|
66
|
+
const watchEffect: typeof import('vue').watchEffect
|
|
67
|
+
const watchPostEffect: typeof import('vue').watchPostEffect
|
|
68
|
+
const watchSyncEffect: typeof import('vue').watchSyncEffect
|
|
69
|
+
const withDefaults: typeof import('vue').withDefaults
|
|
70
|
+
}
|
|
71
|
+
// for type re-export
|
|
72
|
+
declare global {
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
|
75
|
+
import('vue')
|
|
76
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
}, HTMLDivElement>;
|
|
2
|
+
declare const __VLS_export: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
5
4
|
export default _default;
|
|
@@ -8,19 +8,11 @@ type __VLS_Props = {
|
|
|
8
8
|
mode?: 'equal-width' | 'contain' | 'full-height';
|
|
9
9
|
};
|
|
10
10
|
declare function resize(): void;
|
|
11
|
-
declare
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
default?(_: {}): any;
|
|
15
|
-
};
|
|
16
|
-
refs: {
|
|
17
|
-
adaptiveBoxRef: HTMLDivElement;
|
|
18
|
-
adaptiveContentRef: HTMLDivElement;
|
|
19
|
-
};
|
|
20
|
-
rootEl: HTMLDivElement;
|
|
11
|
+
declare var __VLS_1: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_1) => any;
|
|
21
14
|
};
|
|
22
|
-
|
|
23
|
-
declare const __VLS_component: DefineComponent<__VLS_Props, {
|
|
15
|
+
declare const __VLS_base: DefineComponent<__VLS_Props, {
|
|
24
16
|
resize: typeof resize;
|
|
25
17
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
18
|
reference: HTMLElement | Window;
|
|
@@ -29,13 +21,11 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {
|
|
|
29
21
|
updateWidth: boolean;
|
|
30
22
|
observeNodeUpdate: boolean;
|
|
31
23
|
mode: "equal-width" | "contain" | "full-height";
|
|
32
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, HTMLDivElement>;
|
|
36
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
37
27
|
export default _default;
|
|
38
|
-
type
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
29
|
new (): {
|
|
40
30
|
$slots: S;
|
|
41
31
|
};
|
|
@@ -1,170 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
props: {
|
|
8
|
-
reference: { default: void 0 },
|
|
9
|
-
minWidth: { default: -Infinity },
|
|
10
|
-
maxWidth: { default: Infinity },
|
|
11
|
-
updateWidth: { type: Boolean, default: false },
|
|
12
|
-
observeNodeUpdate: { type: Boolean, default: false },
|
|
13
|
-
mode: { default: "equal-width" }
|
|
14
|
-
},
|
|
15
|
-
setup(__props, { expose: __expose }) {
|
|
16
|
-
const props = __props;
|
|
17
|
-
onMounted(function() {
|
|
18
|
-
initReference();
|
|
19
|
-
resize();
|
|
20
|
-
initResizeMonitor();
|
|
21
|
-
});
|
|
22
|
-
onBeforeUnmount(function() {
|
|
23
|
-
removeResizeMonitor();
|
|
24
|
-
});
|
|
25
|
-
let _reference = null;
|
|
26
|
-
const adaptiveBoxRef = useTemplateRef("adaptiveBoxRef");
|
|
27
|
-
const adaptiveContentRef = useTemplateRef("adaptiveContentRef");
|
|
28
|
-
function initReference() {
|
|
29
|
-
_reference = props.reference ?? window;
|
|
30
|
-
resizeHandel = resizeType[props.mode];
|
|
31
|
-
}
|
|
32
|
-
const resizeType = {
|
|
33
|
-
"equal-width": resizeIsEqualWidth,
|
|
34
|
-
contain: resizeIsContain,
|
|
35
|
-
"full-height": resizeIsFullHeight
|
|
36
|
-
};
|
|
37
|
-
let resizeHandel = null;
|
|
38
|
-
function resize() {
|
|
39
|
-
if (resizeHandel) resizeHandel();
|
|
40
|
-
}
|
|
41
|
-
function resizeIsEqualWidth() {
|
|
42
|
-
const referenceWidth = isWindow(_reference) ? _reference.innerWidth : _reference.offsetWidth;
|
|
43
|
-
const $content = adaptiveContentRef.value;
|
|
44
|
-
let scale = referenceWidth / $content.offsetWidth;
|
|
45
|
-
let width = $content.offsetWidth * scale;
|
|
46
|
-
if (props.minWidth && width < props.minWidth) {
|
|
47
|
-
scale = props.minWidth / $content.scrollWidth;
|
|
48
|
-
width = props.minWidth;
|
|
49
|
-
}
|
|
50
|
-
if (props.maxWidth && width > props.maxWidth) {
|
|
51
|
-
scale = props.maxWidth / $content.scrollWidth;
|
|
52
|
-
width = props.maxWidth;
|
|
53
|
-
}
|
|
54
|
-
if (Math.abs(1 - scale) < errorValue) scale = 1;
|
|
55
|
-
$content.style.transform = `scale(${scale})`;
|
|
56
|
-
const height = $content.offsetHeight * scale;
|
|
57
|
-
adaptiveBoxRef.value.style.height = `${height}px`;
|
|
58
|
-
if (props.updateWidth) {
|
|
59
|
-
adaptiveBoxRef.value.style.width = `${width}px`;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function resizeIsContain() {
|
|
63
|
-
let referenceWidth;
|
|
64
|
-
let referenceHeight;
|
|
65
|
-
if (isWindow(_reference)) {
|
|
66
|
-
referenceWidth = _reference.innerWidth;
|
|
67
|
-
referenceHeight = _reference.innerHeight;
|
|
68
|
-
} else {
|
|
69
|
-
referenceWidth = _reference.offsetWidth;
|
|
70
|
-
referenceHeight = _reference.offsetHeight;
|
|
71
|
-
}
|
|
72
|
-
const $content = adaptiveContentRef.value;
|
|
73
|
-
let scale = referenceWidth / $content.offsetWidth;
|
|
74
|
-
let height = $content.offsetHeight * scale;
|
|
75
|
-
let width = $content.offsetWidth * scale;
|
|
76
|
-
if (height > referenceHeight) {
|
|
77
|
-
scale = referenceHeight / $content.offsetHeight;
|
|
78
|
-
height = $content.offsetHeight * scale;
|
|
79
|
-
width = $content.offsetWidth * scale;
|
|
80
|
-
}
|
|
81
|
-
if (Math.abs(1 - scale) < errorValue) scale = 1;
|
|
82
|
-
$content.style.transform = `scale(${scale})`;
|
|
83
|
-
adaptiveBoxRef.value.style.height = `${height}px`;
|
|
84
|
-
adaptiveBoxRef.value.style.width = `${width}px`;
|
|
85
|
-
}
|
|
86
|
-
const fullHeight = ref("");
|
|
87
|
-
function resizeIsFullHeight() {
|
|
88
|
-
let referenceWidth;
|
|
89
|
-
let referenceHeight;
|
|
90
|
-
if (isWindow(_reference)) {
|
|
91
|
-
referenceWidth = _reference.innerWidth;
|
|
92
|
-
referenceHeight = _reference.innerHeight;
|
|
93
|
-
} else {
|
|
94
|
-
referenceWidth = _reference.offsetWidth;
|
|
95
|
-
referenceHeight = _reference.offsetHeight;
|
|
96
|
-
}
|
|
97
|
-
const $content = adaptiveContentRef.value;
|
|
98
|
-
let scale = referenceWidth / $content.offsetWidth;
|
|
99
|
-
let width = $content.offsetWidth * scale;
|
|
100
|
-
if (props.minWidth && width < props.minWidth) {
|
|
101
|
-
scale = props.minWidth / $content.scrollWidth;
|
|
102
|
-
width = props.minWidth;
|
|
103
|
-
}
|
|
104
|
-
if (props.maxWidth && width > props.maxWidth) {
|
|
105
|
-
scale = props.maxWidth / $content.scrollWidth;
|
|
106
|
-
width = props.maxWidth;
|
|
107
|
-
}
|
|
108
|
-
if (Math.abs(1 - scale) < errorValue) scale = 1;
|
|
109
|
-
$content.style.transform = `scale(${scale})`;
|
|
110
|
-
const height = referenceHeight / scale;
|
|
111
|
-
adaptiveBoxRef.value.style.height = `${referenceHeight}px`;
|
|
112
|
-
adaptiveContentRef.value.style.height = fullHeight.value = `${height}px`;
|
|
113
|
-
if (props.updateWidth) {
|
|
114
|
-
adaptiveBoxRef.value.style.width = `${width}px`;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
function isWindow(obj) {
|
|
118
|
-
return obj === window;
|
|
119
|
-
}
|
|
120
|
-
function initResizeMonitor() {
|
|
121
|
-
if (isWindow(_reference)) window.addEventListener("resize", resize);
|
|
122
|
-
else loadResizeObserver();
|
|
123
|
-
if (props.observeNodeUpdate) observeNode();
|
|
124
|
-
}
|
|
125
|
-
function removeResizeMonitor() {
|
|
126
|
-
window.removeEventListener("resize", resize);
|
|
127
|
-
if (observer) observer.disconnect();
|
|
128
|
-
if (resizeObserver) resizeObserver.disconnect();
|
|
129
|
-
}
|
|
130
|
-
let resizeObserver = null;
|
|
131
|
-
function loadResizeObserver() {
|
|
132
|
-
if (!isWindow(_reference)) {
|
|
133
|
-
resizeObserver = new ResizeObserver(ObjectUtil.debounce(resize, 50));
|
|
134
|
-
resizeObserver.observe(_reference);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
let observer = null;
|
|
138
|
-
function observeNode() {
|
|
139
|
-
const config = {
|
|
140
|
-
attributes: true,
|
|
141
|
-
childList: true,
|
|
142
|
-
subtree: true
|
|
143
|
-
};
|
|
144
|
-
observer = new MutationObserver(resize);
|
|
145
|
-
observer.observe(adaptiveBoxRef.value, config);
|
|
146
|
-
}
|
|
147
|
-
__expose({ resize });
|
|
148
|
-
return (_ctx, _cache) => {
|
|
149
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
150
|
-
createElementVNode("div", {
|
|
151
|
-
ref_key: "adaptiveBoxRef",
|
|
152
|
-
ref: adaptiveBoxRef,
|
|
153
|
-
class: "adaptive-box__body"
|
|
154
|
-
}, [
|
|
155
|
-
createElementVNode("div", {
|
|
156
|
-
ref_key: "adaptiveContentRef",
|
|
157
|
-
ref: adaptiveContentRef,
|
|
158
|
-
class: "adaptive-box__content",
|
|
159
|
-
style: normalizeStyle({ "--adaptive-height": unref(fullHeight) })
|
|
160
|
-
}, [
|
|
161
|
-
renderSlot(_ctx.$slots, "default")
|
|
162
|
-
], 4)
|
|
163
|
-
], 512)
|
|
164
|
-
]);
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
export {
|
|
169
|
-
_sfc_main as default
|
|
170
|
-
};
|
|
1
|
+
import AdaptiveBox_vue_vue_type_script_setup_true_lang_default from "./AdaptiveBox.vue.setup.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
//#region src/components/adaptive-box/AdaptiveBox.vue
|
|
4
|
+
var AdaptiveBox_default = AdaptiveBox_vue_vue_type_script_setup_true_lang_default;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { AdaptiveBox_default as default };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { ObjectUtil } from "../../utils/prototype/lib/ObjectUtil.js";
|
|
2
|
+
import { createElementBlock, createElementVNode, defineComponent, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, unref, useTemplateRef } from "vue";
|
|
3
|
+
//#region src/components/adaptive-box/AdaptiveBox.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = { class: "yk-adaptive-box" };
|
|
5
|
+
var errorValue = .01;
|
|
6
|
+
var AdaptiveBox_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "AdaptiveBox",
|
|
8
|
+
props: {
|
|
9
|
+
reference: { default: void 0 },
|
|
10
|
+
minWidth: { default: -Infinity },
|
|
11
|
+
maxWidth: { default: Infinity },
|
|
12
|
+
updateWidth: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
observeNodeUpdate: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
mode: { default: "equal-width" }
|
|
21
|
+
},
|
|
22
|
+
setup(__props, { expose: __expose }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
onMounted(function() {
|
|
25
|
+
initReference();
|
|
26
|
+
resize();
|
|
27
|
+
initResizeMonitor();
|
|
28
|
+
});
|
|
29
|
+
onBeforeUnmount(function() {
|
|
30
|
+
removeResizeMonitor();
|
|
31
|
+
});
|
|
32
|
+
let _reference = null;
|
|
33
|
+
const adaptiveBoxRef = useTemplateRef("adaptiveBoxRef");
|
|
34
|
+
const adaptiveContentRef = useTemplateRef("adaptiveContentRef");
|
|
35
|
+
function initReference() {
|
|
36
|
+
_reference = props.reference ?? window;
|
|
37
|
+
resizeHandel = resizeType[props.mode];
|
|
38
|
+
}
|
|
39
|
+
const resizeType = {
|
|
40
|
+
"equal-width": resizeIsEqualWidth,
|
|
41
|
+
contain: resizeIsContain,
|
|
42
|
+
"full-height": resizeIsFullHeight
|
|
43
|
+
};
|
|
44
|
+
let resizeHandel = null;
|
|
45
|
+
function resize() {
|
|
46
|
+
if (resizeHandel) resizeHandel();
|
|
47
|
+
}
|
|
48
|
+
function resizeIsEqualWidth() {
|
|
49
|
+
const referenceWidth = isWindow(_reference) ? _reference.innerWidth : _reference.offsetWidth;
|
|
50
|
+
const $content = adaptiveContentRef.value;
|
|
51
|
+
let scale = referenceWidth / $content.offsetWidth;
|
|
52
|
+
let width = $content.offsetWidth * scale;
|
|
53
|
+
if (props.minWidth && width < props.minWidth) {
|
|
54
|
+
scale = props.minWidth / $content.scrollWidth;
|
|
55
|
+
width = props.minWidth;
|
|
56
|
+
}
|
|
57
|
+
if (props.maxWidth && width > props.maxWidth) {
|
|
58
|
+
scale = props.maxWidth / $content.scrollWidth;
|
|
59
|
+
width = props.maxWidth;
|
|
60
|
+
}
|
|
61
|
+
if (Math.abs(1 - scale) < errorValue) scale = 1;
|
|
62
|
+
$content.style.transform = `scale(${scale})`;
|
|
63
|
+
const height = $content.offsetHeight * scale;
|
|
64
|
+
adaptiveBoxRef.value.style.height = `${height}px`;
|
|
65
|
+
if (props.updateWidth) adaptiveBoxRef.value.style.width = `${width}px`;
|
|
66
|
+
}
|
|
67
|
+
function resizeIsContain() {
|
|
68
|
+
let referenceWidth;
|
|
69
|
+
let referenceHeight;
|
|
70
|
+
if (isWindow(_reference)) {
|
|
71
|
+
referenceWidth = _reference.innerWidth;
|
|
72
|
+
referenceHeight = _reference.innerHeight;
|
|
73
|
+
} else {
|
|
74
|
+
referenceWidth = _reference.offsetWidth;
|
|
75
|
+
referenceHeight = _reference.offsetHeight;
|
|
76
|
+
}
|
|
77
|
+
const $content = adaptiveContentRef.value;
|
|
78
|
+
let scale = referenceWidth / $content.offsetWidth;
|
|
79
|
+
let height = $content.offsetHeight * scale;
|
|
80
|
+
let width = $content.offsetWidth * scale;
|
|
81
|
+
if (height > referenceHeight) {
|
|
82
|
+
scale = referenceHeight / $content.offsetHeight;
|
|
83
|
+
height = $content.offsetHeight * scale;
|
|
84
|
+
width = $content.offsetWidth * scale;
|
|
85
|
+
}
|
|
86
|
+
if (Math.abs(1 - scale) < errorValue) scale = 1;
|
|
87
|
+
$content.style.transform = `scale(${scale})`;
|
|
88
|
+
adaptiveBoxRef.value.style.height = `${height}px`;
|
|
89
|
+
adaptiveBoxRef.value.style.width = `${width}px`;
|
|
90
|
+
}
|
|
91
|
+
const fullHeight = ref("");
|
|
92
|
+
function resizeIsFullHeight() {
|
|
93
|
+
let referenceWidth;
|
|
94
|
+
let referenceHeight;
|
|
95
|
+
if (isWindow(_reference)) {
|
|
96
|
+
referenceWidth = _reference.innerWidth;
|
|
97
|
+
referenceHeight = _reference.innerHeight;
|
|
98
|
+
} else {
|
|
99
|
+
referenceWidth = _reference.offsetWidth;
|
|
100
|
+
referenceHeight = _reference.offsetHeight;
|
|
101
|
+
}
|
|
102
|
+
const $content = adaptiveContentRef.value;
|
|
103
|
+
let scale = referenceWidth / $content.offsetWidth;
|
|
104
|
+
let width = $content.offsetWidth * scale;
|
|
105
|
+
if (props.minWidth && width < props.minWidth) {
|
|
106
|
+
scale = props.minWidth / $content.scrollWidth;
|
|
107
|
+
width = props.minWidth;
|
|
108
|
+
}
|
|
109
|
+
if (props.maxWidth && width > props.maxWidth) {
|
|
110
|
+
scale = props.maxWidth / $content.scrollWidth;
|
|
111
|
+
width = props.maxWidth;
|
|
112
|
+
}
|
|
113
|
+
if (Math.abs(1 - scale) < errorValue) scale = 1;
|
|
114
|
+
$content.style.transform = `scale(${scale})`;
|
|
115
|
+
const height = referenceHeight / scale;
|
|
116
|
+
adaptiveBoxRef.value.style.height = `${referenceHeight}px`;
|
|
117
|
+
adaptiveContentRef.value.style.height = fullHeight.value = `${height}px`;
|
|
118
|
+
if (props.updateWidth) adaptiveBoxRef.value.style.width = `${width}px`;
|
|
119
|
+
}
|
|
120
|
+
function isWindow(obj) {
|
|
121
|
+
return obj === window;
|
|
122
|
+
}
|
|
123
|
+
function initResizeMonitor() {
|
|
124
|
+
if (isWindow(_reference)) window.addEventListener("resize", resize);
|
|
125
|
+
else loadResizeObserver();
|
|
126
|
+
if (props.observeNodeUpdate) observeNode();
|
|
127
|
+
}
|
|
128
|
+
function removeResizeMonitor() {
|
|
129
|
+
window.removeEventListener("resize", resize);
|
|
130
|
+
if (observer) observer.disconnect();
|
|
131
|
+
if (resizeObserver) resizeObserver.disconnect();
|
|
132
|
+
}
|
|
133
|
+
let resizeObserver = null;
|
|
134
|
+
function loadResizeObserver() {
|
|
135
|
+
if (!isWindow(_reference)) {
|
|
136
|
+
resizeObserver = new ResizeObserver(ObjectUtil.debounce(resize, 50));
|
|
137
|
+
resizeObserver.observe(_reference);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
let observer = null;
|
|
141
|
+
function observeNode() {
|
|
142
|
+
const config = {
|
|
143
|
+
attributes: true,
|
|
144
|
+
childList: true,
|
|
145
|
+
subtree: true
|
|
146
|
+
};
|
|
147
|
+
observer = new MutationObserver(resize);
|
|
148
|
+
observer.observe(adaptiveBoxRef.value, config);
|
|
149
|
+
}
|
|
150
|
+
__expose({ resize });
|
|
151
|
+
return (_ctx, _cache) => {
|
|
152
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
|
|
153
|
+
ref_key: "adaptiveBoxRef",
|
|
154
|
+
ref: adaptiveBoxRef,
|
|
155
|
+
class: "adaptive-box__body"
|
|
156
|
+
}, [createElementVNode("div", {
|
|
157
|
+
ref_key: "adaptiveContentRef",
|
|
158
|
+
ref: adaptiveContentRef,
|
|
159
|
+
class: "adaptive-box__content",
|
|
160
|
+
style: normalizeStyle({ "--adaptive-height": unref(fullHeight) })
|
|
161
|
+
}, [renderSlot(_ctx.$slots, "default")], 4)], 512)]);
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
export { AdaptiveBox_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -9,7 +9,7 @@ type __VLS_Props = {
|
|
|
9
9
|
modal?: boolean;
|
|
10
10
|
mapStyle?: string | 'darkblue';
|
|
11
11
|
};
|
|
12
|
-
declare const
|
|
12
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
13
13
|
change: (...args: any[]) => void;
|
|
14
14
|
open: (...args: any[]) => void;
|
|
15
15
|
"update:modelValue": (...args: any[]) => void;
|
|
@@ -23,7 +23,6 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
23
23
|
"onUpdate:address"?: (...args: any[]) => any;
|
|
24
24
|
}>, {
|
|
25
25
|
regeocodeRequired: boolean;
|
|
26
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
27
|
-
|
|
28
|
-
}, any>;
|
|
26
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
29
28
|
export default _default;
|