yc-design-vue 1.1.7 → 1.1.9
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/es/Affix/index.d.ts +1 -1
- package/es/Affix/index.vue.d.ts +2 -2
- package/es/Affix/index.vue.js +8 -3
- package/es/Drawer/Drawer.vue.js +1 -1
- package/es/Drawer/Drawer.vue2.js +2 -2
- package/es/Drawer/DrawerService.vue.d.ts +0 -1
- package/es/Drawer/DrawerService.vue.js +1 -1
- package/es/Drawer/type.d.ts +1 -1
- package/es/Modal/ModalService.vue.d.ts +0 -1
- package/es/Modal/ModalService.vue.js +1 -1
- package/es/Modal/type.d.ts +1 -1
- package/es/_shared/utils/dom.d.ts +1 -1
- package/es/_shared/utils/dom.js +4 -3
- package/es/style.css +1 -1
- package/lib/Affix/index.d.ts +1 -1
- package/lib/Affix/index.vue.d.ts +2 -2
- package/lib/Affix/index.vue.js +1 -1
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Drawer/Drawer.vue2.js +1 -1
- package/lib/Drawer/DrawerService.vue.d.ts +0 -1
- package/lib/Drawer/DrawerService.vue.js +1 -1
- package/lib/Drawer/type.d.ts +1 -1
- package/lib/Modal/ModalService.vue.d.ts +0 -1
- package/lib/Modal/ModalService.vue.js +1 -1
- package/lib/Modal/type.d.ts +1 -1
- package/lib/_shared/utils/dom.d.ts +1 -1
- package/lib/_shared/utils/dom.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +2 -3
package/es/Affix/index.d.ts
CHANGED
@@ -17,7 +17,7 @@ declare const Affix: {
|
|
17
17
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
18
18
|
wrapperRef: HTMLDivElement;
|
19
19
|
affixRef: HTMLDivElement;
|
20
|
-
},
|
20
|
+
}, any, import('vue').ComponentProvideOptions, {
|
21
21
|
P: {};
|
22
22
|
B: {};
|
23
23
|
D: {};
|
package/es/Affix/index.vue.d.ts
CHANGED
@@ -6,7 +6,7 @@ declare function __VLS_template(): {
|
|
6
6
|
wrapperRef: HTMLDivElement;
|
7
7
|
affixRef: HTMLDivElement;
|
8
8
|
};
|
9
|
-
rootEl:
|
9
|
+
rootEl: any;
|
10
10
|
};
|
11
11
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
12
12
|
declare const __VLS_component: import('vue').DefineComponent<AffixProps, {
|
@@ -23,7 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<AffixProps, {
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
24
24
|
wrapperRef: HTMLDivElement;
|
25
25
|
affixRef: HTMLDivElement;
|
26
|
-
},
|
26
|
+
}, any>;
|
27
27
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
28
28
|
export default _default;
|
29
29
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/es/Affix/index.vue.js
CHANGED
@@ -8,7 +8,8 @@ import "../Empty/index.js";
|
|
8
8
|
/* empty css */
|
9
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
10
|
...{
|
11
|
-
name: "Affix"
|
11
|
+
name: "Affix",
|
12
|
+
inheritAttrs: false
|
12
13
|
},
|
13
14
|
__name: "index",
|
14
15
|
props: {
|
@@ -90,9 +91,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
90
91
|
class: normalizeClass([
|
91
92
|
{
|
92
93
|
"yc-affix": isFixed.value
|
93
|
-
}
|
94
|
+
},
|
95
|
+
_ctx.$attrs.class
|
94
96
|
]),
|
95
|
-
style: normalizeStyle(
|
97
|
+
style: normalizeStyle({
|
98
|
+
...style.value,
|
99
|
+
..._ctx.$attrs.style || {}
|
100
|
+
}),
|
96
101
|
ref_key: "affixRef",
|
97
102
|
ref: affixRef
|
98
103
|
}, [
|
package/es/Drawer/Drawer.vue.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import _sfc_main from "./Drawer.vue2.js";
|
2
2
|
/* empty css */
|
3
3
|
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
4
|
-
const _Drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
4
|
+
const _Drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e4dc0e29"]]);
|
5
5
|
export {
|
6
6
|
_Drawer as default
|
7
7
|
};
|
package/es/Drawer/Drawer.vue2.js
CHANGED
@@ -80,8 +80,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
80
80
|
const { zIndex, popupContainer } = getGlobalConfig(props);
|
81
81
|
const drawerStyle = computed(() => {
|
82
82
|
return {
|
83
|
-
height: placement.value == "left" || placement.value == "right" ? "
|
84
|
-
width: placement.value == "left" || placement.value == "right" ? valueToPx(width.value) :
|
83
|
+
height: placement.value == "left" || placement.value == "right" ? "" : valueToPx(height.value),
|
84
|
+
width: placement.value == "left" || placement.value == "right" ? valueToPx(width.value) : "",
|
85
85
|
// 传入样式
|
86
86
|
..._drawerStyle.value
|
87
87
|
};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { DrawerServiceProps } from './type';
|
2
2
|
declare const _default: import('vue').DefineComponent<DrawerServiceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DrawerServiceProps> & Readonly<{}>, {
|
3
3
|
unmountOnClose: boolean;
|
4
|
-
popupContainer: import('..').PopupContainer;
|
5
4
|
renderToBody: boolean;
|
6
5
|
width: number | string;
|
7
6
|
height: number | string;
|
@@ -27,7 +27,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
27
|
unmountOnClose: { type: Boolean, default: false },
|
28
28
|
width: { default: 250 },
|
29
29
|
height: { default: 250 },
|
30
|
-
popupContainer: { default: "yc-overlay-drawer" },
|
31
30
|
drawerStyle: { default: () => {
|
32
31
|
return {};
|
33
32
|
} },
|
@@ -69,6 +68,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
69
68
|
style: {
|
70
69
|
position: "fixed"
|
71
70
|
},
|
71
|
+
"popup-container": ".yc-overlay-drawer",
|
72
72
|
onOk: _cache[1] || (_cache[1] = ($event) => {
|
73
73
|
var _a;
|
74
74
|
return (_a = _ctx.onOk) == null ? void 0 : _a.call(_ctx);
|
package/es/Drawer/type.d.ts
CHANGED
@@ -43,7 +43,7 @@ export interface DrawerEmits {
|
|
43
43
|
(e: 'before-close'): void;
|
44
44
|
(e: 'close'): void;
|
45
45
|
}
|
46
|
-
export type DrawerConfig = Omit<DrawerProps, 'visible' | 'defaultVisible'> & {
|
46
|
+
export type DrawerConfig = Omit<DrawerProps, 'visible' | 'defaultVisible' | 'popupContainer'> & {
|
47
47
|
content?: RenderContent;
|
48
48
|
title?: RenderContent;
|
49
49
|
onOk?: () => void | Promise<void>;
|
@@ -2,7 +2,6 @@ import { ModalServiceProps } from './type';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<ModalServiceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ModalServiceProps> & Readonly<{}>, {
|
3
3
|
top: number;
|
4
4
|
unmountOnClose: boolean;
|
5
|
-
popupContainer: import('..').PopupContainer;
|
6
5
|
renderToBody: boolean;
|
7
6
|
width: number | string;
|
8
7
|
content: import('../_shared/type').RenderContent;
|
@@ -37,7 +37,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
37
37
|
} },
|
38
38
|
footer: { type: Boolean, default: true },
|
39
39
|
renderToBody: { type: Boolean, default: true },
|
40
|
-
popupContainer: { default: ".yc-overlay-modal" },
|
41
40
|
maskStyle: { default: () => {
|
42
41
|
return {};
|
43
42
|
} },
|
@@ -87,6 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
87
86
|
return openBlock(), createBlock(_Modal, mergeProps(props, {
|
88
87
|
visible: visible.value,
|
89
88
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
89
|
+
"popup-container": ".yc-overlay-modal",
|
90
90
|
"modal-class": [
|
91
91
|
"yc-service-modal",
|
92
92
|
{
|
package/es/Modal/type.d.ts
CHANGED
@@ -53,7 +53,7 @@ export interface ModalSlots {
|
|
53
53
|
footer?: () => VNode[];
|
54
54
|
title?: () => VNode[];
|
55
55
|
}
|
56
|
-
export type ModalConfig = Omit<ModalProps, 'visible' | 'defaultVisible'> & {
|
56
|
+
export type ModalConfig = Omit<ModalProps, 'visible' | 'defaultVisible' | 'popupContainer'> & {
|
57
57
|
title?: RenderContent;
|
58
58
|
content?: RenderContent;
|
59
59
|
type?: ModalType;
|
@@ -6,7 +6,7 @@ export declare const getElement: (target: string | HTMLElement | undefined, cont
|
|
6
6
|
export declare const getDomText: (dom: Ref<HTMLElement | undefined>) => string;
|
7
7
|
export declare const getBreakpointValue: (breakpoint: BreakpointName, value: string | number | ResponsiveValue, defaultValue?: number | string) => number | string | undefined;
|
8
8
|
export declare const mediaQueryHandler: (onBreakpoint: (breakpoint: BreakpointName, order: Record<string, number>, index: number) => void, queries?: Record<string, string>) => void;
|
9
|
-
export declare const findFirstScrollableParent: (element?: HTMLElement) => HTMLElement | undefined;
|
9
|
+
export declare const findFirstScrollableParent: (element?: HTMLElement | null) => HTMLElement | undefined;
|
10
10
|
export declare const sleep: (ms: number) => Promise<unknown>;
|
11
11
|
export declare const throttleByRaf: (cb: (...args: any[]) => void) => {
|
12
12
|
(...args: any[]): void;
|
package/es/_shared/utils/dom.js
CHANGED
@@ -65,11 +65,11 @@ const mediaQueryHandler = (onBreakpoint, queries = MEDICA_QUERY_QUERUES) => {
|
|
65
65
|
);
|
66
66
|
};
|
67
67
|
const findFirstScrollableParent = (element) => {
|
68
|
-
if (!element
|
69
|
-
return;
|
68
|
+
if (!element) {
|
69
|
+
return void 0;
|
70
70
|
}
|
71
71
|
let currentElement = element.parentElement;
|
72
|
-
while (currentElement
|
72
|
+
while (currentElement) {
|
73
73
|
const style = getComputedStyle(currentElement);
|
74
74
|
const overflow = style.overflowY || style.overflow;
|
75
75
|
const isScrollable = ["auto", "scroll"].includes(overflow);
|
@@ -79,6 +79,7 @@ const findFirstScrollableParent = (element) => {
|
|
79
79
|
}
|
80
80
|
currentElement = currentElement.parentElement;
|
81
81
|
}
|
82
|
+
return void 0;
|
82
83
|
};
|
83
84
|
const sleep = (ms) => {
|
84
85
|
return new Promise((resolve) => {
|