yc-design-vue 1.0.1 → 1.0.3
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/type.d.ts +3 -2
- package/es/Alert/type.d.ts +6 -5
- package/es/Anchor/type.d.ts +4 -3
- package/es/AutoComplete/index.d.ts +65 -2
- package/es/AutoComplete/index.vue.d.ts +130 -4
- package/es/AutoComplete/type.d.ts +5 -4
- package/es/Avatar/AvatarGroup.vue.js +1 -1
- package/es/Avatar/AvatarGroup.vue2.js +2 -2
- package/es/Avatar/type.d.ts +4 -4
- package/es/BackTop/type.d.ts +2 -1
- package/es/Badge/index.vue.js +1 -1
- package/es/Badge/index.vue2.js +2 -2
- package/es/Badge/type.d.ts +3 -3
- package/es/Breadcrumb/type.d.ts +9 -8
- package/es/Button/Button.vue.js +1 -1
- package/es/Button/Button.vue2.js +2 -2
- package/es/Button/type.d.ts +4 -3
- package/es/Calendar/type.d.ts +5 -4
- package/es/Card/type.d.ts +10 -10
- package/es/Carousel/type.d.ts +3 -2
- package/es/Cascader/type.d.ts +10 -10
- package/es/Checkbox/hooks/useContext.d.ts +2 -5
- package/es/Checkbox/type.d.ts +9 -8
- package/es/Collapse/type.d.ts +9 -8
- package/es/Comment/type.d.ts +7 -6
- package/es/ConfigProvider/index.vue.js +2 -2
- package/es/ConfigProvider/type.d.ts +5 -4
- package/es/Descriptions/type.d.ts +9 -9
- package/es/Divider/type.d.ts +2 -1
- package/es/Drawer/Drawer.vue.js +1 -1
- package/es/Drawer/Drawer.vue2.js +6 -7
- package/es/Drawer/type.d.ts +5 -5
- package/es/Dropdown/Dsubmenu.vue.d.ts +130 -4
- package/es/Dropdown/Dsubmenu.vue.js +1 -1
- package/es/Dropdown/Dsubmenu.vue2.js +2 -2
- package/es/Dropdown/index.d.ts +65 -2
- package/es/Dropdown/type.d.ts +15 -14
- package/es/Empty/type.d.ts +2 -1
- package/es/Grid/type.d.ts +6 -5
- package/es/Icon/type.d.ts +2 -1
- package/es/Image/type.d.ts +11 -10
- package/es/Input/hooks/useCursor.d.ts +2 -1
- package/es/Input/hooks/useCursor.js +2 -2
- package/es/Input/type.d.ts +6 -5
- package/es/InputNumber/type.d.ts +8 -8
- package/es/InputTag/type.d.ts +5 -4
- package/es/Layout/Layout.vue.js +1 -1
- package/es/Layout/Layout.vue2.js +2 -2
- package/es/Layout/type.d.ts +8 -7
- package/es/Link/type.d.ts +3 -2
- package/es/List/List.vue.js +1 -1
- package/es/List/List.vue2.js +1 -1
- package/es/List/type.d.ts +15 -14
- package/es/Mention/index.d.ts +65 -2
- package/es/Mention/index.vue.d.ts +130 -4
- package/es/Mention/type.d.ts +3 -2
- package/es/Menu/type.d.ts +11 -10
- package/es/Message/type.d.ts +1 -1
- package/es/Modal/Modal.vue.js +1 -1
- package/es/Modal/Modal.vue2.js +4 -6
- package/es/Modal/hooks/useModalClose.d.ts +2 -1
- package/es/Modal/hooks/useModalClose.js +1 -6
- package/es/Modal/type.d.ts +5 -5
- package/es/Notification/type.d.ts +1 -1
- package/es/OverflowList/index.vue.js +1 -1
- package/es/OverflowList/index.vue2.js +4 -4
- package/es/OverflowList/type.d.ts +3 -2
- package/es/PageHeader/type.d.ts +7 -6
- package/es/Pagination/type.d.ts +8 -8
- package/es/Popconfirm/index.d.ts +65 -2
- package/es/Popconfirm/index.vue.d.ts +130 -4
- package/es/Popconfirm/type.d.ts +4 -4
- package/es/Popover/type.d.ts +4 -4
- package/es/Radio/hooks/useContext.d.ts +3 -6
- package/es/Radio/type.d.ts +9 -8
- package/es/Rate/type.d.ts +3 -2
- package/es/ResizeBox/type.d.ts +6 -5
- package/es/Result/type.d.ts +6 -5
- package/es/Scrollbar/Scrollbar.vue.js +1 -1
- package/es/Scrollbar/type.d.ts +2 -2
- package/es/Select/Select.vue.d.ts +130 -4
- package/es/Select/SelectView.vue.js +1 -1
- package/es/Select/SelectView.vue2.js +1 -1
- package/es/Select/index.d.ts +65 -2
- package/es/Select/type.d.ts +19 -18
- package/es/Skeleton/type.d.ts +3 -2
- package/es/Space/index.vue.js +1 -1
- package/es/Space/index.vue2.js +2 -2
- package/es/Space/type.d.ts +3 -2
- package/es/Spin/index.vue.js +1 -1
- package/es/Spin/index.vue2.js +1 -1
- package/es/Spin/type.d.ts +4 -3
- package/es/Split/type.d.ts +5 -4
- package/es/Statistic/type.d.ts +7 -7
- package/es/Steps/type.d.ts +8 -7
- package/es/Switch/index.vue.js +1 -1
- package/es/Switch/index.vue2.js +3 -3
- package/es/Switch/type.d.ts +5 -4
- package/es/Tabs/Tabs.vue.js +1 -1
- package/es/Tabs/Tabs.vue2.js +2 -2
- package/es/Tabs/type.d.ts +5 -4
- package/es/Tag/type.d.ts +4 -3
- package/es/TimePicker/type.d.ts +4 -3
- package/es/Timeline/type.d.ts +6 -5
- package/es/Tooltip/type.d.ts +3 -3
- package/es/Transfer/type.d.ts +13 -12
- package/es/Trigger/hooks/useContext.js +1 -1
- package/es/Trigger/hooks/useTriggerPosition.d.ts +2 -2
- package/es/Trigger/hooks/useTriggerPosition.js +12 -22
- package/es/Trigger/hooks/useTriggerVisible.js +1 -2
- package/es/Trigger/index.d.ts +63 -2
- package/es/Trigger/index.vue.d.ts +130 -3
- package/es/Trigger/index.vue.js +1 -1
- package/es/Trigger/index.vue2.js +2 -2
- package/es/Trigger/type.d.ts +3 -3
- package/es/Typography/type.d.ts +8 -7
- package/es/Watermark/type.d.ts +2 -1
- package/es/_shared/type/index.d.ts +1 -6
- package/es/_shared/utils/dom.d.ts +5 -5
- package/es/_shared/utils/dom.js +8 -9
- package/es/_shared/utils/fn.d.ts +3 -3
- package/es/_shared/utils/fn.js +6 -6
- package/es/_shared/utils/global-config.d.ts +4 -2
- package/es/_shared/utils/vue-utils.d.ts +1 -2
- package/es/_shared/utils/vue-utils.js +2 -7
- package/es/index.d.ts +66 -3
- package/es/style.css +1 -1
- package/lib/Affix/type.d.ts +3 -2
- package/lib/Alert/type.d.ts +6 -5
- package/lib/Anchor/type.d.ts +4 -3
- package/lib/AutoComplete/index.d.ts +65 -2
- package/lib/AutoComplete/index.vue.d.ts +130 -4
- package/lib/AutoComplete/type.d.ts +5 -4
- package/lib/Avatar/AvatarGroup.vue.js +1 -1
- package/lib/Avatar/AvatarGroup.vue2.js +1 -1
- package/lib/Avatar/type.d.ts +4 -4
- package/lib/BackTop/type.d.ts +2 -1
- package/lib/Badge/index.vue.js +1 -1
- package/lib/Badge/index.vue2.js +1 -1
- package/lib/Badge/type.d.ts +3 -3
- package/lib/Breadcrumb/type.d.ts +9 -8
- package/lib/Button/Button.vue.js +1 -1
- package/lib/Button/Button.vue2.js +1 -1
- package/lib/Button/type.d.ts +4 -3
- package/lib/Calendar/type.d.ts +5 -4
- package/lib/Card/type.d.ts +10 -10
- package/lib/Carousel/type.d.ts +3 -2
- package/lib/Cascader/type.d.ts +10 -10
- package/lib/Checkbox/hooks/useContext.d.ts +2 -5
- package/lib/Checkbox/type.d.ts +9 -8
- package/lib/Collapse/type.d.ts +9 -8
- package/lib/Comment/type.d.ts +7 -6
- package/lib/ConfigProvider/index.vue.js +1 -1
- package/lib/ConfigProvider/type.d.ts +5 -4
- package/lib/Descriptions/type.d.ts +9 -9
- package/lib/Divider/type.d.ts +2 -1
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Drawer/Drawer.vue2.js +1 -1
- package/lib/Drawer/type.d.ts +5 -5
- package/lib/Dropdown/Dsubmenu.vue.d.ts +130 -4
- package/lib/Dropdown/Dsubmenu.vue.js +1 -1
- package/lib/Dropdown/Dsubmenu.vue2.js +1 -1
- package/lib/Dropdown/index.d.ts +65 -2
- package/lib/Dropdown/type.d.ts +15 -14
- package/lib/Empty/type.d.ts +2 -1
- package/lib/Grid/type.d.ts +6 -5
- package/lib/Icon/type.d.ts +2 -1
- package/lib/Image/type.d.ts +11 -10
- package/lib/Input/hooks/useCursor.d.ts +2 -1
- package/lib/Input/hooks/useCursor.js +1 -1
- package/lib/Input/type.d.ts +6 -5
- package/lib/InputNumber/type.d.ts +8 -8
- package/lib/InputTag/type.d.ts +5 -4
- package/lib/Layout/Layout.vue.js +1 -1
- package/lib/Layout/Layout.vue2.js +1 -1
- package/lib/Layout/type.d.ts +8 -7
- package/lib/Link/type.d.ts +3 -2
- package/lib/List/List.vue.js +1 -1
- package/lib/List/List.vue2.js +1 -1
- package/lib/List/type.d.ts +15 -14
- package/lib/Mention/index.d.ts +65 -2
- package/lib/Mention/index.vue.d.ts +130 -4
- package/lib/Mention/type.d.ts +3 -2
- package/lib/Menu/type.d.ts +11 -10
- package/lib/Message/type.d.ts +1 -1
- package/lib/Modal/Modal.vue.js +1 -1
- package/lib/Modal/Modal.vue2.js +1 -1
- package/lib/Modal/hooks/useModalClose.d.ts +2 -1
- package/lib/Modal/hooks/useModalClose.js +1 -1
- package/lib/Modal/type.d.ts +5 -5
- package/lib/Notification/type.d.ts +1 -1
- package/lib/OverflowList/index.vue.js +1 -1
- package/lib/OverflowList/index.vue2.js +1 -1
- package/lib/OverflowList/type.d.ts +3 -2
- package/lib/PageHeader/type.d.ts +7 -6
- package/lib/Pagination/type.d.ts +8 -8
- package/lib/Popconfirm/index.d.ts +65 -2
- package/lib/Popconfirm/index.vue.d.ts +130 -4
- package/lib/Popconfirm/type.d.ts +4 -4
- package/lib/Popover/type.d.ts +4 -4
- package/lib/Radio/hooks/useContext.d.ts +3 -6
- package/lib/Radio/type.d.ts +9 -8
- package/lib/Rate/type.d.ts +3 -2
- package/lib/ResizeBox/type.d.ts +6 -5
- package/lib/Result/type.d.ts +6 -5
- package/lib/Scrollbar/Scrollbar.vue.js +1 -1
- package/lib/Scrollbar/type.d.ts +2 -2
- package/lib/Select/Select.vue.d.ts +130 -4
- package/lib/Select/SelectView.vue.js +1 -1
- package/lib/Select/SelectView.vue2.js +1 -1
- package/lib/Select/index.d.ts +65 -2
- package/lib/Select/type.d.ts +19 -18
- package/lib/Skeleton/type.d.ts +3 -2
- package/lib/Space/index.vue.js +1 -1
- package/lib/Space/index.vue2.js +1 -1
- package/lib/Space/type.d.ts +3 -2
- package/lib/Spin/index.vue.js +1 -1
- package/lib/Spin/index.vue2.js +1 -1
- package/lib/Spin/type.d.ts +4 -3
- package/lib/Split/type.d.ts +5 -4
- package/lib/Statistic/type.d.ts +7 -7
- package/lib/Steps/type.d.ts +8 -7
- package/lib/Switch/index.vue.js +1 -1
- package/lib/Switch/index.vue2.js +1 -1
- package/lib/Switch/type.d.ts +5 -4
- package/lib/Tabs/Tabs.vue.js +1 -1
- package/lib/Tabs/Tabs.vue2.js +1 -1
- package/lib/Tabs/type.d.ts +5 -4
- package/lib/Tag/type.d.ts +4 -3
- package/lib/TimePicker/type.d.ts +4 -3
- package/lib/Timeline/type.d.ts +6 -5
- package/lib/Tooltip/type.d.ts +3 -3
- package/lib/Transfer/type.d.ts +13 -12
- package/lib/Trigger/hooks/useContext.js +1 -1
- package/lib/Trigger/hooks/useTriggerPosition.d.ts +2 -2
- package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
- package/lib/Trigger/hooks/useTriggerVisible.js +1 -1
- package/lib/Trigger/index.d.ts +63 -2
- package/lib/Trigger/index.vue.d.ts +130 -3
- package/lib/Trigger/index.vue.js +1 -1
- package/lib/Trigger/index.vue2.js +1 -1
- package/lib/Trigger/type.d.ts +3 -3
- package/lib/Typography/type.d.ts +8 -7
- package/lib/Watermark/type.d.ts +2 -1
- package/lib/_shared/type/index.d.ts +1 -6
- package/lib/_shared/utils/dom.d.ts +5 -5
- package/lib/_shared/utils/dom.js +1 -1
- package/lib/_shared/utils/fn.d.ts +3 -3
- package/lib/_shared/utils/fn.js +1 -1
- package/lib/_shared/utils/global-config.d.ts +4 -2
- package/lib/_shared/utils/vue-utils.d.ts +1 -2
- package/lib/_shared/utils/vue-utils.js +1 -1
- package/lib/index.d.ts +66 -3
- package/lib/style.css +1 -1
- package/package.json +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Ref } from 'vue';
|
2
2
|
import { CheckboxValue, CheckboxGroupEmits } from '../type';
|
3
|
-
import { Props } from '../../_shared/type';
|
3
|
+
import { ObjectData, Props } from '../../_shared/type';
|
4
4
|
type CheckboxContext = {
|
5
5
|
computedValue: Ref<CheckboxValue[]>;
|
6
6
|
max: Ref<number>;
|
@@ -9,10 +9,7 @@ type CheckboxContext = {
|
|
9
9
|
};
|
10
10
|
declare const _default: () => {
|
11
11
|
provide: (props: Props, emits: CheckboxGroupEmits) => {
|
12
|
-
options: import('vue').ComputedRef<
|
13
|
-
label: CheckboxValue | import('..').CheckboxOption;
|
14
|
-
value: CheckboxValue | import('..').CheckboxOption;
|
15
|
-
})[]>;
|
12
|
+
options: import('vue').ComputedRef<ObjectData[]>;
|
16
13
|
};
|
17
14
|
inject: () => CheckboxContext;
|
18
15
|
};
|
package/lib/Checkbox/type.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Direction, ObjectData } from '../_shared/type';
|
2
|
+
import { VNode } from 'vue';
|
2
3
|
export interface CheckboxProps {
|
3
4
|
modelValue?: boolean;
|
4
5
|
defaultChecked?: boolean;
|
@@ -11,11 +12,11 @@ export interface CheckboxEmits {
|
|
11
12
|
(e: 'change', value: boolean, ev: Event): void;
|
12
13
|
}
|
13
14
|
export interface CheckboxSlots {
|
14
|
-
default()
|
15
|
-
checkbox(scope: {
|
15
|
+
default?: () => VNode[];
|
16
|
+
checkbox?: (scope: {
|
16
17
|
checked: boolean;
|
17
18
|
disabled: boolean;
|
18
|
-
})
|
19
|
+
}) => VNode[];
|
19
20
|
}
|
20
21
|
export interface CheckboxGroupProps {
|
21
22
|
modelValue?: CheckboxValue[];
|
@@ -30,14 +31,14 @@ export interface CheckboxGroupEmits {
|
|
30
31
|
(e: 'change', value: CheckboxValue[]): void;
|
31
32
|
}
|
32
33
|
export interface CheckboxGroupSlots {
|
33
|
-
default()
|
34
|
-
checkbox(scope: {
|
34
|
+
default?: () => void;
|
35
|
+
checkbox?: (scope: {
|
35
36
|
checked: boolean;
|
36
37
|
disabled: boolean;
|
37
|
-
})
|
38
|
-
label(scope: {
|
38
|
+
}) => void;
|
39
|
+
label?: (scope: {
|
39
40
|
data: ObjectData;
|
40
|
-
})
|
41
|
+
}) => void;
|
41
42
|
}
|
42
43
|
export type CheckboxOption = (CheckboxValue | {
|
43
44
|
label?: string;
|
package/lib/Collapse/type.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { VNode } from 'vue';
|
1
2
|
export interface CollapseProps {
|
2
3
|
activeKey?: CollapseValue[];
|
3
4
|
defaultActiveKey?: CollapseValue[];
|
@@ -12,12 +13,12 @@ export interface CollapseEmits {
|
|
12
13
|
(e: 'change', value: CollapseValue): void;
|
13
14
|
}
|
14
15
|
export interface CollapseSlots {
|
15
|
-
default()
|
16
|
-
|
16
|
+
default?: () => VNode[];
|
17
|
+
'expand-icon': (scope: {
|
17
18
|
active: boolean;
|
18
19
|
disabled: boolean;
|
19
20
|
position: 'left' | 'right';
|
20
|
-
})
|
21
|
+
}) => VNode[];
|
21
22
|
}
|
22
23
|
export interface CollapseItemProps {
|
23
24
|
path?: CollapseValue;
|
@@ -27,14 +28,14 @@ export interface CollapseItemProps {
|
|
27
28
|
destroyOnHide?: boolean;
|
28
29
|
}
|
29
30
|
export interface CollapseItemSlots {
|
30
|
-
default()
|
31
|
-
header()
|
32
|
-
extra()
|
33
|
-
['expand-icon'](scope: {
|
31
|
+
default?: () => VNode[];
|
32
|
+
header?: () => VNode[];
|
33
|
+
extra?: () => VNode[];
|
34
|
+
['expand-icon']?: (scope: {
|
34
35
|
active: boolean;
|
35
36
|
disabled: boolean;
|
36
37
|
position: 'left' | 'right';
|
37
|
-
})
|
38
|
+
}) => VNode[];
|
38
39
|
}
|
39
40
|
export type CollapseValue = string | number;
|
40
41
|
export type ExpandIconPosition = 'left' | 'right';
|
package/lib/Comment/type.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { VNode } from 'vue';
|
1
2
|
export interface CommentProps {
|
2
3
|
author?: string;
|
3
4
|
avatar?: string;
|
@@ -6,12 +7,12 @@ export interface CommentProps {
|
|
6
7
|
align?: CommentAlign;
|
7
8
|
}
|
8
9
|
export interface CommentSlots {
|
9
|
-
avatar()
|
10
|
-
author()
|
11
|
-
datetime()
|
12
|
-
content()
|
13
|
-
actions()
|
14
|
-
default()
|
10
|
+
avatar?: () => VNode[];
|
11
|
+
author?: () => VNode[];
|
12
|
+
datetime?: () => VNode[];
|
13
|
+
content?: () => VNode[];
|
14
|
+
actions?: () => VNode[];
|
15
|
+
default?: () => VNode[][];
|
15
16
|
}
|
16
17
|
export type CommentAlign = 'left' | 'right' | {
|
17
18
|
datetime?: 'left' | 'right';
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const o=require("../_shared/utils/global-config.js"),t=e.defineComponent({name:"ConfigProvider",__name:"index",props:{zIndex:{default:1001},size:{default:"medium"},popupContainer:{default:"body"},updateAtScroll:{type:Boolean,default:!0},scrollToClose:{type:Boolean,default:!1},exchangeTime:{type:Boolean,default:!0}},setup(t){const l=t,{zIndex:
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const o=require("../_shared/utils/global-config.js"),t=e.defineComponent({name:"ConfigProvider",__name:"index",props:{zIndex:{default:1001},size:{default:"medium"},popupContainer:{default:"body"},updateAtScroll:{type:Boolean,default:!0},scrollToClose:{type:Boolean,default:!1},exchangeTime:{type:Boolean,default:!0}},setup(t){const l=e.useSlots(),s=t,{zIndex:r,size:n,updateAtScroll:u,scrollToClose:i,exchangeTime:d,popupContainer:a}=e.toRefs(s);return e.provide(o.CONFIG_PROVIDER_PROVIDE_KEY,{slots:l,zIndex:r,size:n,updateAtScroll:u,scrollToClose:i,exchangeTime:d,popupContainer:a}),(o,t)=>e.renderSlot(o.$slots,"default")}});module.exports=t;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Size, PopupContainer } from '../_shared/type';
|
2
|
+
import { VNode } from 'vue';
|
2
3
|
export interface ConfigProviderProps {
|
3
4
|
zIndex?: number;
|
4
5
|
size?: Size;
|
@@ -8,10 +9,10 @@ export interface ConfigProviderProps {
|
|
8
9
|
exchangeTime?: boolean;
|
9
10
|
}
|
10
11
|
export interface ConfigconfigSlots {
|
11
|
-
default()
|
12
|
-
loading()
|
13
|
-
empty(scope: {
|
12
|
+
default?: () => VNode[];
|
13
|
+
loading?: () => VNode[];
|
14
|
+
empty?: (scope: {
|
14
15
|
component: EmptyComponent;
|
15
|
-
})
|
16
|
+
}) => VNode[];
|
16
17
|
}
|
17
18
|
export type EmptyComponent = 'Select' | 'List' | 'Transfer';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RenderContent, Size } from '../_shared/type';
|
2
2
|
import { ResponsiveValue } from '../Grid';
|
3
|
-
import { CSSProperties } from 'vue';
|
3
|
+
import { CSSProperties, VNode } from 'vue';
|
4
4
|
export interface DescriptionsProps {
|
5
5
|
data?: DescData[];
|
6
6
|
column?: DescriptionsColumn;
|
@@ -14,26 +14,26 @@ export interface DescriptionsProps {
|
|
14
14
|
tableLayout?: TableLayout;
|
15
15
|
}
|
16
16
|
export interface DescriptionsSlots {
|
17
|
-
default()
|
18
|
-
value(scope: {
|
17
|
+
default?: () => VNode[];
|
18
|
+
value?: (scope: {
|
19
19
|
value: string;
|
20
20
|
index: number;
|
21
21
|
data: DescData;
|
22
|
-
})
|
23
|
-
label(scope: {
|
22
|
+
}) => VNode[];
|
23
|
+
label?: (scope: {
|
24
24
|
label: string;
|
25
25
|
index: number;
|
26
26
|
data: DescData;
|
27
|
-
})
|
28
|
-
title()
|
27
|
+
}) => VNode[];
|
28
|
+
title?: () => VNode[];
|
29
29
|
}
|
30
30
|
export interface DescriptionsItemProps {
|
31
31
|
span?: number;
|
32
32
|
label?: string;
|
33
33
|
}
|
34
34
|
export interface DescriptionsItemSlots {
|
35
|
-
default()
|
36
|
-
label()
|
35
|
+
default?: () => VNode[];
|
36
|
+
label?: () => VNode[];
|
37
37
|
}
|
38
38
|
export interface DescData {
|
39
39
|
label?: string | RenderContent;
|
package/lib/Divider/type.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Direction } from '../_shared/type';
|
2
|
+
import { VNode } from 'vue';
|
2
3
|
export interface DividerProps {
|
3
4
|
direction?: Direction;
|
4
5
|
orientation?: Orientation;
|
@@ -7,7 +8,7 @@ export interface DividerProps {
|
|
7
8
|
margin?: number;
|
8
9
|
}
|
9
10
|
export interface DividerSlots {
|
10
|
-
default()
|
11
|
+
default?: () => VNode[];
|
11
12
|
}
|
12
13
|
export type Orientation = 'left' | 'center' | 'right';
|
13
14
|
export type DividerType = 'solid' | 'dashed' | 'dotted' | 'double';
|
package/lib/Drawer/Drawer.vue.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("./Drawer.vue2.js");;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-
|
1
|
+
"use strict";const e=require("./Drawer.vue2.js");;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-23a10cf6"]]);module.exports=r;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const o=require("../_shared/utils/fn.js");require("../_shared/utils/time.js");const t=require("../_shared/utils/global-config.js"),l=require("../Modal/hooks/useModalClose.js"),a=require("../Button/index.js"),r=require("../_shared/components/IconButton.vue.js");;/* empty css */const n={key:0,class:"yc-drawer-header"},s={class:"yc-drawer-title text-ellipsis"},i={class:"yc-drawer-body"},d={key:0,class:"yc-drawer-footer"},c=e.defineComponent({name:"Drawer",inheritAttrs:!1,__name:"Drawer",props:{visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:!1},placement:{default:"right"},title:{default:""},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},okText:{default:"确认"},cancelText:{default:"取消"},okLoading:{type:Boolean,default:!1},okButtonProps:{default:()=>({})},cancelButtonProps:{default:()=>({})},unmountOnClose:{type:Boolean,default:!1},width:{default:250},height:{default:250},popupContainer:{default:void 0},drawerStyle:{default:()=>({})},escToClose:{type:Boolean,default:!0},renderToBody:{type:Boolean,default:!0},header:{type:Boolean,default:!0},footer:{type:Boolean,default:!0},hideCancel:{type:Boolean,default:!1},onBeforeCancel:{type:Function,default:()=>!0},onBeforeOk:{type:Function,default:()=>!0}},emits:["update:visible","ok","cancel","before-open","open","before-close","close"],setup(c,{emit:u}){const f=c,
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const o=require("../_shared/utils/fn.js");require("../_shared/utils/time.js");const t=require("../_shared/utils/global-config.js"),l=require("../Modal/hooks/useModalClose.js"),a=require("../Button/index.js"),r=require("../_shared/components/IconButton.vue.js");;/* empty css */const n={key:0,class:"yc-drawer-header"},s={class:"yc-drawer-title text-ellipsis"},i={class:"yc-drawer-body"},d={key:0,class:"yc-drawer-footer"},c=e.defineComponent({name:"Drawer",inheritAttrs:!1,__name:"Drawer",props:{visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:!1},placement:{default:"right"},title:{default:""},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},okText:{default:"确认"},cancelText:{default:"取消"},okLoading:{type:Boolean,default:!1},okButtonProps:{default:()=>({})},cancelButtonProps:{default:()=>({})},unmountOnClose:{type:Boolean,default:!1},width:{default:250},height:{default:250},popupContainer:{default:void 0},drawerStyle:{default:()=>({})},escToClose:{type:Boolean,default:!0},renderToBody:{type:Boolean,default:!0},header:{type:Boolean,default:!0},footer:{type:Boolean,default:!0},hideCancel:{type:Boolean,default:!1},onBeforeCancel:{type:Function,default:()=>!0},onBeforeOk:{type:Function,default:()=>!0}},emits:["update:visible","ok","cancel","before-open","open","before-close","close"],setup(c,{emit:u}){const f=c,p=u,{visible:m,defaultVisible:y,width:B,height:k,placement:h,maskClosable:v,escToClose:C,drawerStyle:w,renderToBody:b}=e.toRefs(f),{onBeforeOk:g,onBeforeCancel:V}=f,{zIndex:x,popupContainer:T}=t.getGlobalConfig(f),N=e.computed(()=>({height:"left"==h.value||"right"==h.value?"100%":o.valueToPx(k.value),width:"left"==h.value||"right"==h.value?o.valueToPx(B.value):"100%",...w.value})),{outerVisible:S,innerVisible:_,asyncLoading:$,handleClose:q,handleAfterLeave:E}=l({visible:m,defaultVisible:y,escToClose:C,maskClosable:v,onBeforeCancel:V,onBeforeOk:g,emits:p});return(o,t)=>(e.openBlock(),e.createBlock(e.Teleport,{to:e.unref(T),disabled:!e.unref(b)},[!o.unmountOnClose||e.unref(S)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yc-drawer-wrapper",`yc-drawer-placement-${e.unref(h)}`,o.$attrs.class,{"yc-drawer-position-absolute":e.unref(T)||!e.unref(b)}]),style:e.normalizeStyle({zIndex:e.unref(x),...o.$attrs.style??{}})},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[o.mask?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-drawer-mask",onClick:t[0]||(t[0]=o=>e.unref(q)("mask",o))},null,512)),[[e.vShow,e.unref(_)]]):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:`slide-drawer-${e.unref(h)}`,onBeforeEnter:t[4]||(t[4]=e=>o.$emit("before-open")),onBeforeLeave:t[5]||(t[5]=e=>o.$emit("before-close")),onAfterEnter:t[6]||(t[6]=e=>o.$emit("open")),onAfterLeave:e.unref(E)},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"yc-drawer-container",style:e.normalizeStyle(N.value)},[e.renderSlot(o.$slots,"header",{},()=>[o.header?(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",s,[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)],!0)]),o.closable?(e.openBlock(),e.createBlock(e.unref(r),{key:0,class:"yc-modal-close-button",onClick:t[1]||(t[1]=o=>e.unref(q)("closeBtn",o))})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],!0),e.createElementVNode("div",i,[e.renderSlot(o.$slots,"default",{},void 0,!0)]),e.renderSlot(o.$slots,"footer",{},()=>[o.footer?(e.openBlock(),e.createElementBlock("div",d,[o.hideCancel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(a.default),e.mergeProps({key:0},o.cancelButtonProps,{onClick:t[2]||(t[2]=o=>e.unref(q)("cancelBtn",o))}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.cancelText),1)]),_:1},16)),e.createVNode(e.unref(a.default),e.mergeProps({type:"primary",loading:o.okLoading||e.unref($)},o.okButtonProps,{onClick:t[3]||(t[3]=o=>e.unref(q)("confirmBtn",o))}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.okText),1)]),_:1},16,["loading"])])):e.createCommentVNode("",!0)],!0)],4),[[e.vShow,e.unref(_)]])]),_:3},8,["name","onAfterLeave"])],6)),[[e.vShow,e.unref(S)]]):e.createCommentVNode("",!0)],8,["to","disabled"]))}});module.exports=c;
|
package/lib/Drawer/type.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CSSProperties } from 'vue';
|
1
|
+
import { CSSProperties, VNode } from 'vue';
|
2
2
|
import { ButtonProps } from '../Button';
|
3
3
|
import { OnBeforeCancel, OnBeforeOk } from '../Modal';
|
4
4
|
import { RenderContent, PopupContainer } from '../_shared/type';
|
@@ -29,10 +29,10 @@ export interface DrawerProps {
|
|
29
29
|
onBeforeOk?: OnBeforeOk;
|
30
30
|
}
|
31
31
|
export interface DrawerSlots {
|
32
|
-
default()
|
33
|
-
header()
|
34
|
-
footer()
|
35
|
-
title()
|
32
|
+
default?: () => VNode[];
|
33
|
+
header?: () => VNode[];
|
34
|
+
footer?: () => VNode[];
|
35
|
+
title?: () => VNode[];
|
36
36
|
}
|
37
37
|
export interface DrawerEmits {
|
38
38
|
(e: 'update:visible', value: boolean): void;
|
@@ -56,7 +56,70 @@ declare function __VLS_template(): {
|
|
56
56
|
$attrs: {
|
57
57
|
[x: string]: unknown;
|
58
58
|
};
|
59
|
-
$refs:
|
59
|
+
$refs: {
|
60
|
+
[x: string]: unknown;
|
61
|
+
} & {
|
62
|
+
triggerRef: unknown;
|
63
|
+
popupRef: ({
|
64
|
+
$: import('vue').ComponentInternalInstance;
|
65
|
+
$data: {};
|
66
|
+
$props: {
|
67
|
+
readonly preventFocus?: boolean | undefined;
|
68
|
+
readonly tag?: string | undefined;
|
69
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
70
|
+
$attrs: {
|
71
|
+
[x: string]: unknown;
|
72
|
+
};
|
73
|
+
$refs: {
|
74
|
+
[x: string]: unknown;
|
75
|
+
};
|
76
|
+
$slots: Readonly<{
|
77
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
78
|
+
}>;
|
79
|
+
$root: import('vue').ComponentPublicInstance | null;
|
80
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
81
|
+
$host: Element | null;
|
82
|
+
$emit: (event: string, ...args: any[]) => void;
|
83
|
+
$el: any;
|
84
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
85
|
+
preventFocus?: boolean;
|
86
|
+
tag?: string;
|
87
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
88
|
+
preventFocus: boolean;
|
89
|
+
tag: string;
|
90
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
91
|
+
beforeCreate?: (() => void) | (() => void)[];
|
92
|
+
created?: (() => void) | (() => void)[];
|
93
|
+
beforeMount?: (() => void) | (() => void)[];
|
94
|
+
mounted?: (() => void) | (() => void)[];
|
95
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
96
|
+
updated?: (() => void) | (() => void)[];
|
97
|
+
activated?: (() => void) | (() => void)[];
|
98
|
+
deactivated?: (() => void) | (() => void)[];
|
99
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
100
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
101
|
+
destroyed?: (() => void) | (() => void)[];
|
102
|
+
unmounted?: (() => void) | (() => void)[];
|
103
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
104
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
105
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
106
|
+
};
|
107
|
+
$forceUpdate: () => void;
|
108
|
+
$nextTick: typeof nextTick;
|
109
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
110
|
+
} & Readonly<{
|
111
|
+
preventFocus: boolean;
|
112
|
+
tag: string;
|
113
|
+
}> & Omit<Readonly<{
|
114
|
+
preventFocus?: boolean;
|
115
|
+
tag?: string;
|
116
|
+
}> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
117
|
+
$slots: {
|
118
|
+
default?(_: {}): any;
|
119
|
+
};
|
120
|
+
}) | null;
|
121
|
+
arrowRef: HTMLDivElement;
|
122
|
+
};
|
60
123
|
$slots: Readonly<{
|
61
124
|
[name: string]: import('vue').Slot<any> | undefined;
|
62
125
|
}>;
|
@@ -177,7 +240,7 @@ declare function __VLS_template(): {
|
|
177
240
|
show(): void;
|
178
241
|
updatePosition(x: number, y: number): void;
|
179
242
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
180
|
-
$slots:
|
243
|
+
$slots: Readonly<import('../Trigger').TriggerSlots> & import('../Trigger').TriggerSlots;
|
181
244
|
}) | null;
|
182
245
|
optionRef: ({
|
183
246
|
$: import('vue').ComponentInternalInstance;
|
@@ -314,7 +377,70 @@ declare const __VLS_component: import('vue').DefineComponent<DsubmenuProps, {
|
|
314
377
|
$attrs: {
|
315
378
|
[x: string]: unknown;
|
316
379
|
};
|
317
|
-
$refs:
|
380
|
+
$refs: {
|
381
|
+
[x: string]: unknown;
|
382
|
+
} & {
|
383
|
+
triggerRef: unknown;
|
384
|
+
popupRef: ({
|
385
|
+
$: import('vue').ComponentInternalInstance;
|
386
|
+
$data: {};
|
387
|
+
$props: {
|
388
|
+
readonly preventFocus?: boolean | undefined;
|
389
|
+
readonly tag?: string | undefined;
|
390
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
391
|
+
$attrs: {
|
392
|
+
[x: string]: unknown;
|
393
|
+
};
|
394
|
+
$refs: {
|
395
|
+
[x: string]: unknown;
|
396
|
+
};
|
397
|
+
$slots: Readonly<{
|
398
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
399
|
+
}>;
|
400
|
+
$root: import('vue').ComponentPublicInstance | null;
|
401
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
402
|
+
$host: Element | null;
|
403
|
+
$emit: (event: string, ...args: any[]) => void;
|
404
|
+
$el: any;
|
405
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
406
|
+
preventFocus?: boolean;
|
407
|
+
tag?: string;
|
408
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
409
|
+
preventFocus: boolean;
|
410
|
+
tag: string;
|
411
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
412
|
+
beforeCreate?: (() => void) | (() => void)[];
|
413
|
+
created?: (() => void) | (() => void)[];
|
414
|
+
beforeMount?: (() => void) | (() => void)[];
|
415
|
+
mounted?: (() => void) | (() => void)[];
|
416
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
417
|
+
updated?: (() => void) | (() => void)[];
|
418
|
+
activated?: (() => void) | (() => void)[];
|
419
|
+
deactivated?: (() => void) | (() => void)[];
|
420
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
421
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
422
|
+
destroyed?: (() => void) | (() => void)[];
|
423
|
+
unmounted?: (() => void) | (() => void)[];
|
424
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
425
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
426
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
427
|
+
};
|
428
|
+
$forceUpdate: () => void;
|
429
|
+
$nextTick: typeof nextTick;
|
430
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
431
|
+
} & Readonly<{
|
432
|
+
preventFocus: boolean;
|
433
|
+
tag: string;
|
434
|
+
}> & Omit<Readonly<{
|
435
|
+
preventFocus?: boolean;
|
436
|
+
tag?: string;
|
437
|
+
}> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
438
|
+
$slots: {
|
439
|
+
default?(_: {}): any;
|
440
|
+
};
|
441
|
+
}) | null;
|
442
|
+
arrowRef: HTMLDivElement;
|
443
|
+
};
|
318
444
|
$slots: Readonly<{
|
319
445
|
[name: string]: import('vue').Slot<any> | undefined;
|
320
446
|
}>;
|
@@ -435,7 +561,7 @@ declare const __VLS_component: import('vue').DefineComponent<DsubmenuProps, {
|
|
435
561
|
show(): void;
|
436
562
|
updatePosition(x: number, y: number): void;
|
437
563
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
438
|
-
$slots:
|
564
|
+
$slots: Readonly<import('../Trigger').TriggerSlots> & import('../Trigger').TriggerSlots;
|
439
565
|
}) | null;
|
440
566
|
optionRef: ({
|
441
567
|
$: import('vue').ComponentInternalInstance;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("./Dsubmenu.vue2.js");;/* empty css */const u=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-
|
1
|
+
"use strict";const e=require("./Dsubmenu.vue2.js");;/* empty css */const u=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-7a40c502"]]);module.exports=u;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const
|
1
|
+
"use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const o=require("../_shared/utils/fn.js"),i=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const r=require("../_shared/icons/IconArrowRight.vue.js"),s=require("../_shared/utils/control.js"),l=require("./hooks/useContext.js");require("./index.js");const u=require("../Trigger/index.js"),n=require("../Scrollbar/index.js"),a=require("./Doption.vue.js"),d={class:"yc-dropdown-list"},p={key:0,class:"yc-dropdown-footer"},c=e.defineComponent({name:"Dsubmenu",__name:"Dsubmenu",props:{disabled:{type:Boolean,default:!1},trigger:{default:"click"},position:{default:"rt"},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},triggerProps:{default:()=>({})},popupMaxHeight:{default:200}},emits:["update:popupVisible","popup-visible-change"],setup(c,{expose:f,emit:m}){const v=c,g=m,{defaultPopupVisible:h,popupVisible:y,trigger:b,position:x,popupMaxHeight:_}=e.toRefs(v),{theme:j}=l().inject(),q=s(y,h.value,e=>{g("update:popupVisible",e),g("popup-visible-change",e)}),w=e.ref(),V=e.ref(),k=e.computed(()=>["rt","lt"].includes(x.value)?x.value:"rt"),C=e.computed(()=>["hover","click"].includes(b.value)?b.value:"hover"),B=e.computed(()=>i.isBoolean(_.value)&&!_.value||i.isUndefined(_)?"":o.valueToPx(i.isBoolean(_.value)?200:_.value)),P=async()=>{var o;await e.nextTick();const i=t.unrefElement(w);if(!i)return;const{left:r,top:s,right:l,width:u}=i.getBoundingClientRect(),n="rt"==k.value?l:r-u,a=s-5;null==(o=V.value)||o.updatePosition(n,a)};return f({show(){q.value=!0},hide(){q.value=!1}}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(u),e.mergeProps({"popup-visible":e.unref(q),"onUpdate:popupVisible":o[0]||(o[0]=t=>e.isRef(q)?q.value=t:null),trigger:C.value,position:k.value,"popup-offset":4,disabled:t.disabled,"mouse-enter-delay":150,"mouse-leave-delay":150,"on-trigger-mouseenter":P,"on-trigger-mouseclick":P,"need-transform-origin":"","auto-set-position":"","auto-fit-popup-min-width":"",ref_key:"triggerRef",ref:V},t.triggerProps),{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["yc-dropdown",`yc-dropdown-theme-${e.unref(j)}`])},[e.createVNode(e.unref(n),{style:e.normalizeStyle({maxHeight:B.value})},{default:e.withCtx(()=>[e.createElementVNode("div",d,[e.renderSlot(t.$slots,"content",{},void 0,!0)])]),_:3},8,["style"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",p,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)]),default:e.withCtx(()=>[e.createVNode(e.unref(a),{disabled:t.disabled,theme:e.unref(j),class:e.normalizeClass(t.$attrs.class),style:e.normalizeStyle(t.$attrs.style),"is-submenu":"",ref_key:"optionRef",ref:w},{suffix:e.withCtx(()=>[e.createVNode(e.unref(r))]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["disabled","theme","class","style"])]),_:3},16,["popup-visible","trigger","position","disabled"]))}});module.exports=c;
|
package/lib/Dropdown/index.d.ts
CHANGED
@@ -278,7 +278,70 @@ declare const Dropdown: {
|
|
278
278
|
$attrs: {
|
279
279
|
[x: string]: unknown;
|
280
280
|
};
|
281
|
-
$refs:
|
281
|
+
$refs: {
|
282
|
+
[x: string]: unknown;
|
283
|
+
} & {
|
284
|
+
triggerRef: unknown;
|
285
|
+
popupRef: ({
|
286
|
+
$: import('vue').ComponentInternalInstance;
|
287
|
+
$data: {};
|
288
|
+
$props: {
|
289
|
+
readonly preventFocus?: boolean | undefined;
|
290
|
+
readonly tag?: string | undefined;
|
291
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
292
|
+
$attrs: {
|
293
|
+
[x: string]: unknown;
|
294
|
+
};
|
295
|
+
$refs: {
|
296
|
+
[x: string]: unknown;
|
297
|
+
};
|
298
|
+
$slots: Readonly<{
|
299
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
300
|
+
}>;
|
301
|
+
$root: import('vue').ComponentPublicInstance | null;
|
302
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
303
|
+
$host: Element | null;
|
304
|
+
$emit: (event: string, ...args: any[]) => void;
|
305
|
+
$el: any;
|
306
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
307
|
+
preventFocus?: boolean;
|
308
|
+
tag?: string;
|
309
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
310
|
+
preventFocus: boolean;
|
311
|
+
tag: string;
|
312
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
313
|
+
beforeCreate?: (() => void) | (() => void)[];
|
314
|
+
created?: (() => void) | (() => void)[];
|
315
|
+
beforeMount?: (() => void) | (() => void)[];
|
316
|
+
mounted?: (() => void) | (() => void)[];
|
317
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
318
|
+
updated?: (() => void) | (() => void)[];
|
319
|
+
activated?: (() => void) | (() => void)[];
|
320
|
+
deactivated?: (() => void) | (() => void)[];
|
321
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
322
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
323
|
+
destroyed?: (() => void) | (() => void)[];
|
324
|
+
unmounted?: (() => void) | (() => void)[];
|
325
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
326
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
327
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
328
|
+
};
|
329
|
+
$forceUpdate: () => void;
|
330
|
+
$nextTick: typeof import('vue').nextTick;
|
331
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
332
|
+
} & Readonly<{
|
333
|
+
preventFocus: boolean;
|
334
|
+
tag: string;
|
335
|
+
}> & Omit<Readonly<{
|
336
|
+
preventFocus?: boolean;
|
337
|
+
tag?: string;
|
338
|
+
}> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
339
|
+
$slots: {
|
340
|
+
default?(_: {}): any;
|
341
|
+
};
|
342
|
+
}) | null;
|
343
|
+
arrowRef: HTMLDivElement;
|
344
|
+
};
|
282
345
|
$slots: Readonly<{
|
283
346
|
[name: string]: import('vue').Slot<any> | undefined;
|
284
347
|
}>;
|
@@ -399,7 +462,7 @@ declare const Dropdown: {
|
|
399
462
|
show(): void;
|
400
463
|
updatePosition(x: number, y: number): void;
|
401
464
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
402
|
-
$slots:
|
465
|
+
$slots: Readonly<import('..').TriggerSlots> & import('..').TriggerSlots;
|
403
466
|
}) | null;
|
404
467
|
optionRef: ({
|
405
468
|
$: import('vue').ComponentInternalInstance;
|
package/lib/Dropdown/type.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ObjectData, PopupContainer, Theme, Size } from '../_shared/type';
|
2
2
|
import { TriggerProps, TriggerType } from '../Trigger';
|
3
3
|
import { ButtonProps, ButtonType } from '../Button';
|
4
|
+
import { VNode } from 'vue';
|
4
5
|
export interface DropdownProps {
|
5
6
|
popupVisible?: boolean;
|
6
7
|
defaultPopupVisible?: boolean;
|
@@ -19,9 +20,9 @@ export interface DropdownEmits {
|
|
19
20
|
(e: 'select', value: DoptionValue, ev: MouseEvent): void;
|
20
21
|
}
|
21
22
|
export interface DropdownSlots {
|
22
|
-
default()
|
23
|
-
content()
|
24
|
-
footer()
|
23
|
+
default?: () => VNode[];
|
24
|
+
content?: () => VNode[];
|
25
|
+
footer?: () => VNode[];
|
25
26
|
}
|
26
27
|
export interface DropdownExpose {
|
27
28
|
show(): void;
|
@@ -34,9 +35,9 @@ export interface DoptionProps {
|
|
34
35
|
isActive?: boolean;
|
35
36
|
}
|
36
37
|
export interface DoptionSlots {
|
37
|
-
default()
|
38
|
-
icon()
|
39
|
-
suffix()
|
38
|
+
default?: () => VNode[];
|
39
|
+
icon?: () => VNode[];
|
40
|
+
suffix?: () => VNode[];
|
40
41
|
}
|
41
42
|
export interface DsubmenuProps {
|
42
43
|
disabled?: boolean;
|
@@ -52,16 +53,16 @@ export interface DsubmenuEmits {
|
|
52
53
|
(e: 'popup-visible-change', value: boolean): void;
|
53
54
|
}
|
54
55
|
export interface DsubmenuSlots {
|
55
|
-
content()
|
56
|
-
default()
|
57
|
-
footer()
|
56
|
+
content?: () => VNode[];
|
57
|
+
default?: () => VNode[];
|
58
|
+
footer?: () => VNode[];
|
58
59
|
}
|
59
60
|
export interface DgroupProps {
|
60
61
|
title?: string;
|
61
62
|
}
|
62
63
|
export interface DgroupSlots {
|
63
|
-
title()
|
64
|
-
default()
|
64
|
+
title?: () => VNode[];
|
65
|
+
default?: () => VNode[];
|
65
66
|
}
|
66
67
|
export interface DropdownButtonProps {
|
67
68
|
popupVisible?: boolean;
|
@@ -76,9 +77,9 @@ export interface DropdownButtonProps {
|
|
76
77
|
hideOnSelect?: boolean;
|
77
78
|
}
|
78
79
|
export interface DropdownButtonSlots {
|
79
|
-
content()
|
80
|
-
default()
|
81
|
-
icon()
|
80
|
+
content?: () => VNode[];
|
81
|
+
default?: () => VNode[];
|
82
|
+
icon?: () => VNode[];
|
82
83
|
}
|
83
84
|
export type DoptionValue = string | number | boolean | ObjectData;
|
84
85
|
export type DropdownPosition = 'top' | 'tr' | 'tl' | 'bottom' | 'br' | 'bl';
|