@king-design/vue 3.1.0-beta.2 → 3.1.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/__tests__/__snapshots__/Vue Next Demos.md +217 -209
- package/__tests__/components/dialog.spec.ts +51 -12
- package/components/affix/index.d.ts +1 -1
- package/components/badge/index.d.ts +1 -1
- package/components/breadcrumb/index.d.ts +1 -1
- package/components/breadcrumb/item.d.ts +1 -1
- package/components/button/group.d.ts +1 -1
- package/components/button/index.d.ts +1 -1
- package/components/card/column.d.ts +1 -1
- package/components/card/index.d.ts +1 -1
- package/components/carousel/index.d.ts +1 -1
- package/components/carousel/index.vdt.js +1 -1
- package/components/carousel/item.d.ts +1 -1
- package/components/carousel/item.vdt.js +1 -1
- package/components/carousel/useSlide.d.ts +1 -1
- package/components/cascader/index.d.ts +3 -3
- package/components/cascader/index.vdt.js +1 -0
- package/components/checkbox/index.d.ts +1 -1
- package/components/code/index.d.ts +1 -1
- package/components/collapse/index.d.ts +1 -1
- package/components/collapse/index.vdt.js +1 -1
- package/components/collapse/item.d.ts +1 -1
- package/components/collapse/item.vdt.js +1 -1
- package/components/colorpicker/drag.d.ts +1 -1
- package/components/colorpicker/index.d.ts +1 -1
- package/components/colorpicker/panel.d.ts +1 -1
- package/components/colorpicker/panel.vdt.js +1 -1
- package/components/config/index.d.ts +9 -2
- package/components/config/index.js +4 -3
- package/components/copy/index.d.ts +2 -1
- package/components/copy/index.js +2 -1
- package/components/copy/index.spec.js +64 -1
- package/components/copy/index.vdt.js +1 -1
- package/components/copy/useCopy.d.ts +1 -1
- package/components/copy/useCopy.js +3 -1
- package/components/datepicker/calendar.d.ts +1 -1
- package/components/datepicker/calendar.vdt.js +1 -1
- package/components/datepicker/index.d.ts +4 -4
- package/components/datepicker/index.vdt.js +1 -1
- package/components/datepicker/time.d.ts +1 -1
- package/components/datepicker/usePanel.d.ts +1 -1
- package/components/diagram/diagram.d.ts +1 -1
- package/components/diagram/layouts/layout.d.ts +1 -1
- package/components/diagram/shapes/line.d.ts +1 -1
- package/components/diagram/shapes/shape.d.ts +1 -1
- package/components/dialog/base.d.ts +2 -2
- package/components/dialog/base.js +1 -1
- package/components/dialog/base.vdt.js +4 -4
- package/components/dialog/index.spec.js +87 -5
- package/components/dialog/styles.js +1 -1
- package/components/drawer/index.d.ts +1 -1
- package/components/drawer/index.spec.js +6 -4
- package/components/dropdown/item.d.ts +1 -1
- package/components/dropdown/menu.d.ts +1 -1
- package/components/dropdown/menu.vdt.js +1 -1
- package/components/editable/index.d.ts +1 -1
- package/components/form/form.d.ts +1 -1
- package/components/form/item.d.ts +1 -1
- package/components/form/item.vdt.js +1 -1
- package/components/form/useError.d.ts +4 -4
- package/components/grid/col.d.ts +1 -1
- package/components/grid/row.d.ts +1 -1
- package/components/grid/useGutter.d.ts +3 -3
- package/components/icon/index.d.ts +1 -1
- package/components/input/index.d.ts +1 -1
- package/components/input/search.d.ts +1 -1
- package/components/input/styles.js +1 -1
- package/components/layout/aside.d.ts +1 -1
- package/components/layout/aside.vdt.js +1 -1
- package/components/layout/body.d.ts +1 -1
- package/components/layout/footer.d.ts +1 -1
- package/components/layout/header.d.ts +1 -1
- package/components/layout/layout.d.ts +1 -1
- package/components/menu/item.d.ts +1 -1
- package/components/menu/item.vdt.js +23 -3
- package/components/menu/menu.d.ts +2 -1
- package/components/menu/menu.js +2 -1
- package/components/menu/menu.vdt.js +1 -1
- package/components/menu/styles.d.ts +1 -0
- package/components/menu/styles.js +10 -2
- package/components/menu/useDropdown.d.ts +1 -1
- package/components/menu/useDropdown.js +3 -6
- package/components/message/message.d.ts +1 -1
- package/components/message/messages.d.ts +1 -1
- package/components/message/messages.vdt.js +1 -1
- package/components/pagination/index.d.ts +1 -1
- package/components/popover/content.d.ts +1 -1
- package/components/portal.d.ts +1 -1
- package/components/portal.js +7 -1
- package/components/progress/index.d.ts +1 -1
- package/components/radio/index.d.ts +1 -1
- package/components/rate/index.d.ts +1 -1
- package/components/rate/index.vdt.js +1 -1
- package/components/scrollSelect/index.d.ts +1 -1
- package/components/select/base.d.ts +1 -1
- package/components/select/base.vdt.js +1 -1
- package/components/select/group.d.ts +1 -1
- package/components/select/menu.d.ts +1 -1
- package/components/select/option.d.ts +1 -1
- package/components/select/option.vdt.js +1 -1
- package/components/select/select.d.ts +3 -3
- package/components/select/useCard.d.ts +1 -1
- package/components/select/useLabel.d.ts +1 -1
- package/components/select/useSearchable.d.ts +3 -3
- package/components/skeleton/item.d.ts +1 -1
- package/components/skeleton/skeleton.d.ts +1 -1
- package/components/slider/index.d.ts +1 -1
- package/components/slider/index.vdt.js +1 -1
- package/components/slider/useDraggable.d.ts +2 -2
- package/components/slider/useTooltip.d.ts +1 -1
- package/components/spin/index.d.ts +1 -1
- package/components/spin/index.vdt.js +1 -1
- package/components/spinner/index.d.ts +1 -1
- package/components/split/index.d.ts +1 -1
- package/components/split/memo.d.ts +1 -1
- package/components/split/useDraggable.d.ts +2 -2
- package/components/steps/context.d.ts +1 -1
- package/components/steps/index.d.ts +1 -1
- package/components/steps/step.d.ts +1 -1
- package/components/steps/step.vdt.js +1 -1
- package/components/switch/index.d.ts +1 -1
- package/components/table/cell.d.ts +1 -1
- package/components/table/column.d.ts +2 -2
- package/components/table/column.vdt.js +1 -1
- package/components/table/row.d.ts +1 -1
- package/components/table/row.vdt.js +3 -3
- package/components/table/styles.js +3 -2
- package/components/table/table.d.ts +2 -2
- package/components/table/table.vdt.js +2 -2
- package/components/table/useColumns.d.ts +5 -5
- package/components/table/useFixedColumns.d.ts +2 -2
- package/components/table/useGroup.d.ts +4 -4
- package/components/table/useResizable.d.ts +2 -2
- package/components/table/useSortable.d.ts +3 -3
- package/components/tabs/index.d.ts +1 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/useScroll.d.ts +1 -1
- package/components/tag/base.d.ts +1 -1
- package/components/tag/index.vdt.js +1 -1
- package/components/tag/tags.d.ts +1 -1
- package/components/tag/tags.vdt.js +1 -1
- package/components/tag/useChildren.d.ts +1 -1
- package/components/tag/useDraggable.d.ts +1 -1
- package/components/tag/useNowrap.d.ts +3 -3
- package/components/timeline/item.d.ts +1 -1
- package/components/timeline/timeline.d.ts +1 -1
- package/components/timepicker/index.d.ts +2 -2
- package/components/timepicker/panelPicker.d.ts +4 -4
- package/components/timepicker/selectPicker.d.ts +1 -1
- package/components/transfer/index.d.ts +1 -1
- package/components/transfer/index.vdt.js +1 -1
- package/components/tree/index.d.ts +6 -4
- package/components/tree/index.js +5 -0
- package/components/tree/index.spec.js +60 -39
- package/components/tree/index.vdt.js +1 -1
- package/components/tree/styles.js +1 -1
- package/components/tree/useDraggable.js +12 -12
- package/components/tree/useExpanded.d.ts +1 -0
- package/components/tree/useExpanded.js +23 -7
- package/components/tree/useNodes.d.ts +1 -0
- package/components/treeSelect/index.d.ts +2 -1
- package/components/treeSelect/index.js +4 -0
- package/components/treeSelect/useValue.d.ts +1 -1
- package/components/upload/index.d.ts +7 -6
- package/components/upload/index.js +1 -0
- package/components/upload/index.vdt.js +1 -1
- package/components/upload/useFiles.js +21 -8
- package/components/utils.d.ts +1 -1
- package/components/virtual.d.ts +1 -1
- package/components/wave/index.d.ts +1 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import { Checkbox } from '../checkbox';
|
|
|
11
11
|
import { context as GroupContext } from './useGroup';
|
|
12
12
|
import { context as SortableContext } from './useSortable';
|
|
13
13
|
import { Spin } from '../spin';
|
|
14
|
-
import { Transition, TransitionGroup, createComponentVNode } from 'intact';
|
|
14
|
+
import { Transition, TransitionGroup, createComponentVNode } from 'intact-vue-next';
|
|
15
15
|
import { _$ } from '../../i18n';
|
|
16
16
|
import { context as TableContext } from './useColumns';
|
|
17
17
|
import { expandAnimationCallbacks } from '../utils';
|
|
@@ -131,7 +131,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
131
131
|
return _$ce(2, 'tr', function () {
|
|
132
132
|
var ths = [$key === 0 && checkType !== 'none' ? _$cv('th', _extends({}, getClassAndStyleForFixed({
|
|
133
133
|
fixed: hasFixedLeft ? 'left' : false
|
|
134
|
-
}, 0), {
|
|
134
|
+
}, 0, k), {
|
|
135
135
|
'rowspan': maxRows,
|
|
136
136
|
'key': '$checktype'
|
|
137
137
|
}), checkType === 'checkbox' ? _$cc(Checkbox, {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { VNodeComponentClass, Props } from 'intact-vue-next';
|
|
2
2
|
import { TableColumn, TableColumnProps } from './column';
|
|
3
3
|
export declare const context: {
|
|
4
|
-
Provider: import(
|
|
5
|
-
Consumer: import(
|
|
6
|
-
useContext: () => import(
|
|
4
|
+
Provider: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ProviderProps<("none" | "radio" | "checkbox") | undefined>, {}, {}, {}>>;
|
|
5
|
+
Consumer: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ConsumerProps<("none" | "radio" | "checkbox") | undefined>, {}, {}, {}>>;
|
|
6
|
+
useContext: () => import('intact-vue-next').RefObject<("none" | "radio" | "checkbox") | undefined>;
|
|
7
7
|
};
|
|
8
8
|
export declare function useColumns(): {
|
|
9
9
|
getColumns: () => VNodeComponentClass<TableColumn<any>>[][];
|
|
10
|
-
getCols: () => Props<TableColumnProps, import(
|
|
10
|
+
getCols: () => Props<TableColumnProps, import('intact-vue-next').ComponentClass<any> | Element>[];
|
|
11
11
|
getData: () => {
|
|
12
12
|
columns: VNodeComponentClass<TableColumn<any>>[][];
|
|
13
|
-
cols: Props<TableColumnProps, import(
|
|
13
|
+
cols: Props<TableColumnProps, import('intact-vue-next').ComponentClass<any> | Element>[];
|
|
14
14
|
maxRows: number;
|
|
15
15
|
maxCols: number;
|
|
16
16
|
};
|
|
@@ -5,8 +5,8 @@ import { State } from '../../hooks/useState';
|
|
|
5
5
|
import type { useScroll } from './useScroll';
|
|
6
6
|
declare type ScrollPosition = 'left' | 'middle' | 'right';
|
|
7
7
|
export declare const context: {
|
|
8
|
-
Provider: import(
|
|
9
|
-
Consumer: import(
|
|
8
|
+
Provider: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
9
|
+
Consumer: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
10
10
|
useContext: () => RefObject<any>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useFixedColumns(getColumns: () => VNodeComponentClass<TableColumn>[][], { scrollRef, callbacks }: ReturnType<typeof useScroll>, widthMap: State<Record<TableRowKey, number>>): {
|
|
@@ -5,9 +5,9 @@ declare type ContextValue = {
|
|
|
5
5
|
onChange: (key: string, groupValue: any) => void;
|
|
6
6
|
};
|
|
7
7
|
export declare const context: {
|
|
8
|
-
Provider: import('intact-vue-next').ComponentConstructor<import(
|
|
9
|
-
Consumer: import(
|
|
10
|
-
useContext: () => import(
|
|
8
|
+
Provider: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ProviderProps<ContextValue>, {}, {}, {}>>;
|
|
9
|
+
Consumer: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ConsumerProps<ContextValue>, {}, {}, {}>>;
|
|
10
|
+
useContext: () => import('intact-vue-next').RefObject<ContextValue | undefined>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useGroup(): {
|
|
13
13
|
onSelect: (value: any, onChange: ContextValue['onChange']) => void;
|
|
@@ -17,7 +17,7 @@ export declare function useGroup(): {
|
|
|
17
17
|
onShow: (groupValue: any) => void;
|
|
18
18
|
reset: (onChange: ContextValue['onChange']) => void;
|
|
19
19
|
confirm: (onChange: ContextValue['onChange']) => void;
|
|
20
|
-
dropdownRef: import(
|
|
20
|
+
dropdownRef: import('intact-vue-next').RefObject<Dropdown>;
|
|
21
21
|
localGroupValue: import("../../hooks/useState").State<any>;
|
|
22
22
|
isEmptyValue: (groupValue: any) => boolean | undefined;
|
|
23
23
|
};
|
|
@@ -2,8 +2,8 @@ import { RefObject } from 'intact-vue-next';
|
|
|
2
2
|
import type { TableRowKey } from './table';
|
|
3
3
|
import { State } from '../../hooks/useState';
|
|
4
4
|
export declare const context: {
|
|
5
|
-
Provider: import(
|
|
6
|
-
Consumer: import(
|
|
5
|
+
Provider: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
6
|
+
Consumer: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
7
7
|
useContext: () => RefObject<any>;
|
|
8
8
|
};
|
|
9
9
|
export declare function useResizable(scrollRef: RefObject<HTMLElement>, tableRef: RefObject<HTMLElement>, tableWidth: State<number | null>, widthMap: State<Record<TableRowKey, number>>, storeWidth: () => void): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
|
-
Provider: import('intact-vue-next').ComponentConstructor<import(
|
|
3
|
-
Consumer: import(
|
|
4
|
-
useContext: () => import(
|
|
2
|
+
Provider: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
|
+
Consumer: import('intact-vue-next').ComponentConstructor<import('intact-vue-next').Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
|
+
useContext: () => import('intact-vue-next').RefObject<any>;
|
|
5
5
|
};
|
|
6
6
|
export declare function useSortable(): {
|
|
7
7
|
onChange: (key: string, event: Event & {
|
|
@@ -15,7 +15,7 @@ export interface TabsEvents<T = any> {
|
|
|
15
15
|
remove: [T];
|
|
16
16
|
}
|
|
17
17
|
export declare class Tabs<T = any> extends Component<TabsProps<T>, TabsEvents<T>> {
|
|
18
|
-
static template: string | import(
|
|
18
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
19
19
|
static typeDefs: Required<TypeDefs<TabsProps<any>>>;
|
|
20
20
|
static defaults: () => Partial<TabsProps<any>>;
|
|
21
21
|
static events: Events<TabsEvents<any>>;
|
package/components/tabs/tab.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface TabEvents {
|
|
|
9
9
|
click: [MouseEvent];
|
|
10
10
|
}
|
|
11
11
|
export declare class Tab extends Component<TabProps, TabEvents> {
|
|
12
|
-
static template: string | import(
|
|
12
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
13
13
|
private tabs;
|
|
14
14
|
private config;
|
|
15
15
|
private onClick;
|
package/components/tag/base.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface TagBlocks {
|
|
|
16
16
|
}
|
|
17
17
|
export declare const typeDefs: Required<TypeDefs<TagProps>>;
|
|
18
18
|
export declare class Tag<T extends TagProps = TagProps, E extends TagEvents = TagEvents, B extends TagBlocks = TagBlocks> extends Component<T, E, B> {
|
|
19
|
-
static template: string | import(
|
|
19
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
20
20
|
static typeDefs: Required<TypeDefs<TagProps>>;
|
|
21
21
|
static defaults: () => Partial<TagProps>;
|
|
22
22
|
static events: Events<TagEvents>;
|
|
@@ -3,7 +3,7 @@ import { createUnknownComponentVNode as _$cc, createVNode as _$cv, className as
|
|
|
3
3
|
import { Icon } from '../icon';
|
|
4
4
|
import { getRestProps } from '../utils';
|
|
5
5
|
import { makeStyles } from './styles';
|
|
6
|
-
import { Transition } from 'intact';
|
|
6
|
+
import { Transition } from 'intact-vue-next';
|
|
7
7
|
export default function ($props, $blocks, $__proto__) {
|
|
8
8
|
var _classNameObj;
|
|
9
9
|
|
package/components/tag/tags.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface TagsEvents {
|
|
|
17
17
|
dragend: [TagsDragEndParam];
|
|
18
18
|
}
|
|
19
19
|
export declare class Tags extends Component<TagsProps, TagsEvents> {
|
|
20
|
-
static template: string | import(
|
|
20
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
21
21
|
static typeDefs: Required<TypeDefs<TagsProps>>;
|
|
22
22
|
static defaults: () => Partial<TagsProps>;
|
|
23
23
|
static events: Events<TagsEvents>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createVNode as _$cv, className as _$cn, createUnknownComponentVNode as _$cc, createTextVNode as _$ct, extend as _$ex, EMPTY_OBJ as _$em, createElementVNode as _$ce, noop as _$no } from 'intact-vue-next';
|
|
3
|
-
import { TransitionGroup } from 'intact';
|
|
3
|
+
import { TransitionGroup } from 'intact-vue-next';
|
|
4
4
|
import { getRestProps } from '../utils';
|
|
5
5
|
import { makeTagsStyles } from './styles';
|
|
6
6
|
import { Tag } from './';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { VNode } from 'intact-vue-next';
|
|
2
|
-
export declare function useChildren(): import("../../hooks/useState").State<VNode<import(
|
|
2
|
+
export declare function useChildren(): import("../../hooks/useState").State<VNode<import('intact-vue-next').VNodeTag>[]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VNode } from 'intact-vue-next';
|
|
2
2
|
import { State } from '../../hooks/useState';
|
|
3
|
-
export declare function useDraggable(originVNodes: State<VNode[]>): State<VNode<import(
|
|
3
|
+
export declare function useDraggable(originVNodes: State<VNode[]>): State<VNode<import('intact-vue-next').VNodeTag>[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VNode } from 'intact-vue-next';
|
|
2
2
|
import { State } from '../../hooks/useState';
|
|
3
3
|
export declare function useNowrap(originVNodes: State<VNode[]>): {
|
|
4
|
-
containerRef: import(
|
|
5
|
-
children: State<VNode<import(
|
|
6
|
-
hiddenChildren: State<VNode<import(
|
|
4
|
+
containerRef: import('intact-vue-next').RefObject<HTMLDivElement>;
|
|
5
|
+
children: State<VNode<import('intact-vue-next').VNodeTag>[]>;
|
|
6
|
+
hiddenChildren: State<VNode<import('intact-vue-next').VNodeTag>[]>;
|
|
7
7
|
};
|
|
@@ -11,7 +11,7 @@ export interface TimelineItemBlocks {
|
|
|
11
11
|
dot: null;
|
|
12
12
|
}
|
|
13
13
|
export declare class TimelineItem extends Component<TimelineItemProps, TimelineItemEvents, TimelineItemBlocks> {
|
|
14
|
-
static template: string | import(
|
|
14
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
15
15
|
static typeDefs: Required<TypeDefs<TimelineItemProps>>;
|
|
16
16
|
static defaults: () => Partial<TimelineItemProps>;
|
|
17
17
|
private config;
|
|
@@ -2,6 +2,6 @@ import { Component } from 'intact-vue-next';
|
|
|
2
2
|
export interface TimelineProps {
|
|
3
3
|
}
|
|
4
4
|
export declare class Timeline extends Component<TimelineProps> {
|
|
5
|
-
static template: string | import(
|
|
5
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
6
6
|
private config;
|
|
7
7
|
}
|
|
@@ -5,6 +5,6 @@ import { SelectPicker } from './selectPicker';
|
|
|
5
5
|
export type { TimepickerProps, TimepickerEvents, TimepickerBlocks };
|
|
6
6
|
export declare class Timepicker<Multipe extends boolean = false, Range extends boolean = false> extends Component<TimepickerProps<Multipe, Range>, TimepickerEvents, TimepickerBlocks<Range>> {
|
|
7
7
|
static $doubleVNodes: boolean;
|
|
8
|
-
static template(this: Timepicker): import(
|
|
9
|
-
static typeDefs: Required<import(
|
|
8
|
+
static template(this: Timepicker): import('intact-vue-next').VNode<typeof SelectPicker> | import('intact-vue-next').VNode<typeof PanelPicker>;
|
|
9
|
+
static typeDefs: Required<import('intact-vue-next').TypeDefs<TimepickerProps<boolean, boolean>>>;
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ import { State } from '../../hooks/useState';
|
|
|
5
5
|
import { PanelTypes } from '../datepicker/usePanel';
|
|
6
6
|
import { TimepickerProps, TimepickerEvents, TimepickerBlocks } from './constants';
|
|
7
7
|
export declare class PanelPicker<Multipe extends boolean = false, Range extends boolean = false> extends BasePicker<TimepickerProps<Multipe, Range>, TimepickerEvents, TimepickerBlocks> {
|
|
8
|
-
static template: string | import(
|
|
8
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
9
9
|
static typeDefs: Required<TypeDefs<TimepickerProps<boolean, boolean>>>;
|
|
10
10
|
formats: {
|
|
11
11
|
getValueFormat: () => string;
|
|
@@ -29,8 +29,8 @@ export declare class PanelPicker<Multipe extends boolean = false, Range extends
|
|
|
29
29
|
changePanel: (type: PanelTypes, flag?: import("../datepicker/usePanel").PanelFlags) => void;
|
|
30
30
|
getPanel: (flag: import("../datepicker/usePanel").PanelFlags) => State<PanelTypes>;
|
|
31
31
|
reset: () => void;
|
|
32
|
-
startRef: import(
|
|
33
|
-
endRef: import(
|
|
32
|
+
startRef: import('intact-vue-next').RefObject<import("../datepicker/calendar").DatepickerCalendar>;
|
|
33
|
+
endRef: import('intact-vue-next').RefObject<import("../datepicker/calendar").DatepickerCalendar>;
|
|
34
34
|
};
|
|
35
35
|
value: {
|
|
36
36
|
format: () => string | string[];
|
|
@@ -49,6 +49,6 @@ export declare class PanelPicker<Multipe extends boolean = false, Range extends
|
|
|
49
49
|
label: string;
|
|
50
50
|
}[] | null>;
|
|
51
51
|
};
|
|
52
|
-
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import(
|
|
52
|
+
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import('intact-vue-next').Children[];
|
|
53
53
|
protected getLabel(): string | string[];
|
|
54
54
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, TypeDefs } from 'intact-vue-next';
|
|
2
2
|
import { TimepickerProps, TimepickerEvents, TimepickerBlocks } from './constants';
|
|
3
3
|
export declare class SelectPicker extends Component<TimepickerProps, TimepickerEvents, TimepickerBlocks> {
|
|
4
|
-
static template: string | import(
|
|
4
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
5
5
|
static typeDefs: Required<TypeDefs<TimepickerProps<boolean, boolean>>>;
|
|
6
6
|
formats: {
|
|
7
7
|
getValueFormat: () => string;
|
|
@@ -36,7 +36,7 @@ export interface TransferBlocks<T, V> {
|
|
|
36
36
|
label: [T, V, Model];
|
|
37
37
|
}
|
|
38
38
|
export declare class Transfer<K extends string = 'key', L extends string = 'label', T extends TransferDataItem<K, L> = TransferDataItem<K, L>, V extends T[K] = T[K]> extends Component<TransferProps<K, L, T, V>, TransferEvents, TransferBlocks<T, V>> {
|
|
39
|
-
static template: string | import(
|
|
39
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
40
40
|
static typeDefs: Required<TypeDefs<TransferProps<"key", "label", TransferDataItem<"key", "label">, Key>>>;
|
|
41
41
|
static defaults: () => Partial<TransferProps<"key", "label", TransferDataItem<"key", "label">, Key>>;
|
|
42
42
|
static events: Events<TransferEvents>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js/instance/filter";
|
|
3
3
|
import { createElementVNode as _$ce, createTextVNode as _$ct, className as _$cn, createUnknownComponentVNode as _$cc, noop as _$no, extend as _$ex, EMPTY_OBJ as _$em, map as _$ma, createVNode as _$cv } from 'intact-vue-next';
|
|
4
|
-
import { linkEvent, Transition, TransitionGroup } from 'intact';
|
|
4
|
+
import { linkEvent, Transition, TransitionGroup } from 'intact-vue-next';
|
|
5
5
|
import { getRestProps } from '../utils';
|
|
6
6
|
import { makeStyles } from './styles';
|
|
7
7
|
import { Input } from '../input';
|
|
@@ -2,7 +2,8 @@ import { Component, Key, TypeDefs } from 'intact-vue-next';
|
|
|
2
2
|
import { DataItem, Node } from './useNodes';
|
|
3
3
|
import { Mode } from './useDraggable';
|
|
4
4
|
import type { Events } from '../types';
|
|
5
|
-
export type { Node as TreeNode, DataItem as TreeDataItem,
|
|
5
|
+
export type { Node as TreeNode, DataItem as TreeDataItem, };
|
|
6
|
+
export { Mode as TreeMode };
|
|
6
7
|
export interface TreeProps<K extends Key = Key> {
|
|
7
8
|
data?: DataItem<K>[];
|
|
8
9
|
filter?: Filter<K>;
|
|
@@ -18,11 +19,11 @@ export interface TreeProps<K extends Key = Key> {
|
|
|
18
19
|
showLine?: boolean;
|
|
19
20
|
draggable?: boolean;
|
|
20
21
|
allowDrag?: (node: Node<K>) => boolean;
|
|
21
|
-
allowDrop?: (node: Node<K
|
|
22
|
+
allowDrop?: (node: Node<K>, srcNode: Node<K>, mode: Mode) => boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface TreeEvents<K extends Key> {
|
|
24
25
|
denydrag: [Node<K>];
|
|
25
|
-
denydrop: [Node<K
|
|
26
|
+
denydrop: [Node<K>, Node<K>, Mode];
|
|
26
27
|
dragend: [DragEndData<K>];
|
|
27
28
|
transitionEnd: [];
|
|
28
29
|
}
|
|
@@ -37,7 +38,7 @@ declare type DragEndData<K extends Key> = {
|
|
|
37
38
|
export declare type TreeDragEndData<K extends Key = Key> = DragEndData<K>;
|
|
38
39
|
declare type Filter<K extends Key> = (data: DataItem<K>, node: Node<K>) => boolean;
|
|
39
40
|
export declare class Tree<K extends Key = Key> extends Component<TreeProps<K>, TreeEvents<K>, TreeBlocks<K>> {
|
|
40
|
-
static template: string | import(
|
|
41
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
41
42
|
static typeDefs: Required<TypeDefs<TreeProps<Key>>>;
|
|
42
43
|
static defaults: () => Partial<TreeProps<Key>>;
|
|
43
44
|
static events: Events<TreeEvents<Key>>;
|
|
@@ -54,5 +55,6 @@ export declare class Tree<K extends Key = Key> extends Component<TreeProps<K>, T
|
|
|
54
55
|
expand(key: K): void;
|
|
55
56
|
shrink(key: K): void;
|
|
56
57
|
getNodes(): Node<K>[];
|
|
58
|
+
expandAll(): void;
|
|
57
59
|
private onClick;
|
|
58
60
|
}
|
package/components/tree/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { useFilter } from './useFilter';
|
|
|
13
13
|
import { useDraggable, Mode } from './useDraggable';
|
|
14
14
|
import { useTransitionEvent } from './useTransitionEvent';
|
|
15
15
|
import { useConfigContext } from '../config';
|
|
16
|
+
export { Mode as TreeMode };
|
|
16
17
|
var typeDefs = {
|
|
17
18
|
data: Array,
|
|
18
19
|
filter: Function,
|
|
@@ -98,6 +99,10 @@ export var Tree = /*#__PURE__*/function (_Component) {
|
|
|
98
99
|
return this.nodes.getNodes();
|
|
99
100
|
};
|
|
100
101
|
|
|
102
|
+
_proto.expandAll = function expandAll() {
|
|
103
|
+
this.expanded.expandAll();
|
|
104
|
+
};
|
|
105
|
+
|
|
101
106
|
_proto.onClick = function onClick(node) {
|
|
102
107
|
if (node.data.disabled) return;
|
|
103
108
|
|
|
@@ -306,7 +306,7 @@ describe('Tree', function () {
|
|
|
306
306
|
}, _callee6);
|
|
307
307
|
})));
|
|
308
308
|
it('draggable', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
309
|
-
var onDenyDrag, onDenyDrop, onDragEnd, _mount7, instance, element,
|
|
309
|
+
var onDenyDrag, onDenyDrop, onDragEnd, _mount7, instance, element, _element$querySelecto13, notAllowed, file1, file2, dir1, file3, dir2, disabled;
|
|
310
310
|
|
|
311
311
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
312
312
|
while (1) {
|
|
@@ -320,53 +320,74 @@ describe('Tree', function () {
|
|
|
320
320
|
DraggableDemo.prototype.onDenyDrop = onDenyDrop;
|
|
321
321
|
DraggableDemo.prototype.onDragEnd = onDragEnd;
|
|
322
322
|
_mount7 = mount(DraggableDemo), instance = _mount7[0], element = _mount7[1];
|
|
323
|
-
instance.set('expandedKeys', ['
|
|
323
|
+
instance.set('expandedKeys', ['guide']);
|
|
324
324
|
_context7.next = 11;
|
|
325
325
|
return wait(500);
|
|
326
326
|
|
|
327
327
|
case 11:
|
|
328
|
-
// can not drag disabled item
|
|
329
|
-
disabled = element.querySelector('.k-disabled'); // dispatchEvent(disabled, 'mousedown');
|
|
328
|
+
_element$querySelecto13 = element.querySelectorAll('.k-tree-label'), notAllowed = _element$querySelecto13[0], file1 = _element$querySelecto13[1], file2 = _element$querySelecto13[2], dir1 = _element$querySelecto13[3], file3 = _element$querySelecto13[4], dir2 = _element$querySelecto13[5], disabled = _element$querySelecto13[6]; // can not drag disabled item
|
|
330
329
|
|
|
331
330
|
dispatchEvent(disabled, 'dragstart');
|
|
332
|
-
expect(onDenyDrag.callCount).to.eql(1);
|
|
333
|
-
nodes = element.querySelectorAll('.k-tree-label'); // can not drag not-allowed item
|
|
334
|
-
|
|
335
|
-
notAllowed = nodes[2]; // dispatchEvent(notAllowed, 'mousedown');
|
|
331
|
+
expect(onDenyDrag.callCount).to.eql(1); // can not drag not-allowed item
|
|
336
332
|
|
|
337
333
|
dispatchEvent(notAllowed, 'dragstart');
|
|
338
|
-
expect(onDenyDrag.callCount).to.eql(2);
|
|
339
|
-
|
|
340
|
-
return
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}).then(function () {
|
|
356
|
-
expect(element.innerHTML).to.matchSnapshot();
|
|
357
|
-
expect(onDragEnd.callCount).to.eql(1);
|
|
358
|
-
expect(instance.get('data')).to.matchSnapshot();
|
|
359
|
-
return dragInsert(nodes[6], nodes[5], 'after');
|
|
360
|
-
}).then(function () {
|
|
361
|
-
expect(element.innerHTML).to.matchSnapshot();
|
|
362
|
-
expect(instance.get('data')).to.matchSnapshot();
|
|
363
|
-
return dragInsert(nodes[6], nodes[5]);
|
|
364
|
-
}).then(function () {
|
|
365
|
-
expect(element.innerHTML).to.matchSnapshot();
|
|
366
|
-
expect(instance.get('data')).to.matchSnapshot();
|
|
367
|
-
}));
|
|
334
|
+
expect(onDenyDrag.callCount).to.eql(2);
|
|
335
|
+
_context7.next = 18;
|
|
336
|
+
return dragInsert(dir1, dir1);
|
|
337
|
+
|
|
338
|
+
case 18:
|
|
339
|
+
// drag to self will do nothing
|
|
340
|
+
expect(element.innerHTML).to.matchSnapshot();
|
|
341
|
+
expect(onDragEnd.callCount).to.eql(0);
|
|
342
|
+
_context7.next = 22;
|
|
343
|
+
return dragInsert(file1, notAllowed);
|
|
344
|
+
|
|
345
|
+
case 22:
|
|
346
|
+
// drag to not-allowed item will do nothing
|
|
347
|
+
expect(element.innerHTML).to.matchSnapshot();
|
|
348
|
+
expect(onDragEnd.callCount).to.eql(0);
|
|
349
|
+
_context7.next = 26;
|
|
350
|
+
return dragInsert(file1, disabled);
|
|
368
351
|
|
|
369
|
-
case
|
|
352
|
+
case 26:
|
|
353
|
+
// drag to disabled item will do nothing
|
|
354
|
+
expect(element.innerHTML).to.matchSnapshot();
|
|
355
|
+
expect(onDragEnd.callCount).to.eql(0);
|
|
356
|
+
_context7.next = 30;
|
|
357
|
+
return dragInsert(file2, file1, 'before');
|
|
358
|
+
|
|
359
|
+
case 30:
|
|
360
|
+
expect(element.innerHTML).to.matchSnapshot();
|
|
361
|
+
expect(onDragEnd.callCount).to.eql(1);
|
|
362
|
+
expect(instance.get('data')).to.matchSnapshot();
|
|
363
|
+
_context7.next = 35;
|
|
364
|
+
return dragInsert(file2, file1, 'after');
|
|
365
|
+
|
|
366
|
+
case 35:
|
|
367
|
+
expect(element.innerHTML).to.matchSnapshot();
|
|
368
|
+
expect(onDragEnd.callCount).to.eql(2);
|
|
369
|
+
expect(instance.get('data')).to.matchSnapshot();
|
|
370
|
+
_context7.next = 40;
|
|
371
|
+
return dragInsert(file1, dir1);
|
|
372
|
+
|
|
373
|
+
case 40:
|
|
374
|
+
expect(onDragEnd.callCount).to.eql(3);
|
|
375
|
+
expect(element.innerHTML).to.matchSnapshot();
|
|
376
|
+
expect(instance.get('data')).to.matchSnapshot();
|
|
377
|
+
_context7.next = 45;
|
|
378
|
+
return dragInsert(dir2, dir1);
|
|
379
|
+
|
|
380
|
+
case 45:
|
|
381
|
+
expect(onDragEnd.callCount).to.eql(3);
|
|
382
|
+
expect(onDenyDrag.callCount).to.eql(2);
|
|
383
|
+
_context7.next = 49;
|
|
384
|
+
return dragInsert(dir2, file3, 'before');
|
|
385
|
+
|
|
386
|
+
case 49:
|
|
387
|
+
expect(onDragEnd.callCount).to.eql(3);
|
|
388
|
+
expect(onDenyDrag.callCount).to.eql(2);
|
|
389
|
+
|
|
390
|
+
case 51:
|
|
370
391
|
case "end":
|
|
371
392
|
return _context7.stop();
|
|
372
393
|
}
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
2
2
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
3
3
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js/instance/filter";
|
|
4
4
|
import { createElementVNode as _$ce, createUnknownComponentVNode as _$cc, className as _$cn, noop as _$no, createVNode as _$cv } from 'intact-vue-next';
|
|
5
|
-
import { Transition, TransitionGroup, linkEvent } from 'intact';
|
|
5
|
+
import { Transition, TransitionGroup, linkEvent } from 'intact-vue-next';
|
|
6
6
|
import { Checkbox } from '../checkbox';
|
|
7
7
|
import { getRestProps } from '../utils';
|
|
8
8
|
import { makeStyles } from './styles';
|
|
@@ -69,5 +69,5 @@ setDefault(function () {
|
|
|
69
69
|
}).tree;
|
|
70
70
|
});
|
|
71
71
|
export function makeStyles(k) {
|
|
72
|
-
return /*#__PURE__*/css("font-size:", tree.fontSize, ";line-height:", tree.lineHeight, ";position:relative;.", k, "-tree-label{position:relative;display:flex;align-items:center;&.", k, "-before,&.", k, "-after{&:before{position:absolute;content:'';display:block;border-top:", tree.dragging.border, ";width:100%;left:0;}}&.", k, "-before:before{top:0;}&.", k, "-after:before{bottom:0;}&.", k, "-inner{background:", tree.selected.bgColor, ";}}.", k, "-tree-icon,.", k, "-tree-text{cursor:pointer;}.", k, "-tree-text{padding:", tree.textPadding, ";border-radius:", tree.borderRadius, ";flex:1;}.", k, "-tree-leaf{padding-left:", tree.leafIndent, ";}.", k, "-tree-icon{width:", tree.iconWidth, ";text-align:center;color:", tree.iconColor, ";&:before{transform:rotate(-90deg);transition:transform ", tree.transition, ";}}.", k, "-tree-checkbox{margin-right:", tree.checkboxGap, ";}&.", k, "-selectable{.", k, "-tree-node{&.", k, "-selected{>.", k, "-tree-label .", k, "-tree-text{background:", tree.selected.bgColor, "!important;}}}}.", k, "-tree-node{background:#fff;&:not(.", k, "-disabled){>.", k, "-tree-label .", k, "-tree-text:hover{background:", theme.color.bg, ";}}&.", k, "-expanded{>.", k, "-tree-label .", k, "-tree-icon:before{transform:rotate(0);}}&.", k, "-disabled{>.", k, "-tree-label{color:", tree.disabledColor, ";.", k, "-tree-text{cursor:not-allowed;}}}&.", k, "-dragging{background:", tree.dragging.bgColor, ";.", k, "-tree-node{background:", tree.dragging.bgColor, ";}}}.", k, "-tree{margin-left:", tree.marginLeft, ";padding-left:", tree.paddingLeft, ";}&.", k, "-line .", k, "-tree{border-left:", tree.line, ";}");
|
|
72
|
+
return /*#__PURE__*/css("font-size:", tree.fontSize, ";line-height:", tree.lineHeight, ";position:relative;.", k, "-tree-label{position:relative;display:flex;align-items:center;&.", k, "-before,&.", k, "-after{&:before{position:absolute;content:'';display:block;border-top:", tree.dragging.border, ";width:100%;left:0;}}&.", k, "-before:before{top:0;}&.", k, "-after:before{bottom:0;}&.", k, "-inner{background:", tree.selected.bgColor, ";}}.", k, "-tree-icon,.", k, "-tree-text{cursor:pointer;}.", k, "-tree-text{padding:", tree.textPadding, ";border-radius:", tree.borderRadius, ";flex:1;display:flex;align-items:center;}.", k, "-tree-leaf{padding-left:", tree.leafIndent, ";}.", k, "-tree-icon{width:", tree.iconWidth, ";text-align:center;color:", tree.iconColor, ";&:before{transform:rotate(-90deg);transition:transform ", tree.transition, ";}}.", k, "-tree-checkbox{margin-right:", tree.checkboxGap, ";}&.", k, "-selectable{.", k, "-tree-node{&.", k, "-selected{>.", k, "-tree-label .", k, "-tree-text{background:", tree.selected.bgColor, "!important;}}}}.", k, "-tree-node{background:#fff;&:not(.", k, "-disabled){>.", k, "-tree-label .", k, "-tree-text:hover{background:", theme.color.bg, ";}}&.", k, "-expanded{>.", k, "-tree-label .", k, "-tree-icon:before{transform:rotate(0);}}&.", k, "-disabled{>.", k, "-tree-label{color:", tree.disabledColor, ";.", k, "-tree-text{cursor:not-allowed;}}}&.", k, "-dragging{background:", tree.dragging.bgColor, ";.", k, "-tree-node{background:", tree.dragging.bgColor, ";}}}.", k, "-tree{margin-left:", tree.marginLeft, ";padding-left:", tree.paddingLeft, ";}&.", k, "-line .", k, "-tree{border-left:", tree.line, ";}");
|
|
73
73
|
}
|
|
@@ -57,18 +57,18 @@ export function useDraggable() {
|
|
|
57
57
|
if (node !== overNode || newMode !== mode.value) {
|
|
58
58
|
overNode = node;
|
|
59
59
|
mode.set(newMode);
|
|
60
|
-
overKey.set(node.key); // if the node does not allow drop, prevent the dragging
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
overKey.set(node.key); // if the node does not allow drop, prevent the dragging node from inserting to it
|
|
61
|
+
// if (mode.value === Mode.Inner) {
|
|
62
|
+
|
|
63
|
+
var _instance$get2 = instance.get(),
|
|
64
|
+
allowDrop = _instance$get2.allowDrop;
|
|
65
|
+
|
|
66
|
+
if (node.data.disabled || allowDrop && !allowDrop(node, draggingNode, newMode)) {
|
|
67
|
+
instance.trigger('denydrop', node, draggingNode, newMode);
|
|
68
|
+
valid = false;
|
|
69
|
+
return;
|
|
70
|
+
} // }
|
|
71
|
+
|
|
72
72
|
|
|
73
73
|
valid = true;
|
|
74
74
|
}
|
|
@@ -10,8 +10,23 @@ export function useExpanded(getNodes) {
|
|
|
10
10
|
expandedKeys = new _Set(v);
|
|
11
11
|
});
|
|
12
12
|
onBeforeMount(function () {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* change the behavior
|
|
15
|
+
* if the data is undefined, we expand all keys after we received data
|
|
16
|
+
*/
|
|
17
|
+
var _instance$get = instance.get(),
|
|
18
|
+
defaultExpandAll = _instance$get.defaultExpandAll,
|
|
19
|
+
data = _instance$get.data;
|
|
20
|
+
|
|
21
|
+
if (defaultExpandAll) {
|
|
22
|
+
if (data && data.length) {
|
|
23
|
+
expandAll();
|
|
24
|
+
} else {
|
|
25
|
+
instance.on("$receive:data", function cb() {
|
|
26
|
+
expandAll();
|
|
27
|
+
instance.off("$receive:data", cb);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
15
30
|
}
|
|
16
31
|
});
|
|
17
32
|
|
|
@@ -21,13 +36,13 @@ export function useExpanded(getNodes) {
|
|
|
21
36
|
|
|
22
37
|
function _toggle() {
|
|
23
38
|
_toggle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(node) {
|
|
24
|
-
var _instance$
|
|
39
|
+
var _instance$get3, load, key, expanded;
|
|
25
40
|
|
|
26
41
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27
42
|
while (1) {
|
|
28
43
|
switch (_context.prev = _context.next) {
|
|
29
44
|
case 0:
|
|
30
|
-
_instance$
|
|
45
|
+
_instance$get3 = instance.get(), load = _instance$get3.load;
|
|
31
46
|
key = node.key;
|
|
32
47
|
expanded = expandedKeys.has(key);
|
|
33
48
|
|
|
@@ -64,8 +79,8 @@ export function useExpanded(getNodes) {
|
|
|
64
79
|
}
|
|
65
80
|
|
|
66
81
|
function expandAll() {
|
|
67
|
-
var _instance$
|
|
68
|
-
load = _instance$
|
|
82
|
+
var _instance$get2 = instance.get(),
|
|
83
|
+
load = _instance$get2.load;
|
|
69
84
|
|
|
70
85
|
var loop = function loop(nodes) {
|
|
71
86
|
for (var i = 0; i < nodes.length; i++) {
|
|
@@ -89,6 +104,7 @@ export function useExpanded(getNodes) {
|
|
|
89
104
|
get: function get() {
|
|
90
105
|
return expandedKeys;
|
|
91
106
|
},
|
|
92
|
-
toggle: toggle
|
|
107
|
+
toggle: toggle,
|
|
108
|
+
expandAll: expandAll
|
|
93
109
|
};
|
|
94
110
|
}
|
|
@@ -16,11 +16,12 @@ export interface TreeSelectEvents extends BaseSelectEvents {
|
|
|
16
16
|
export interface TreeSelectBlocks<K> extends BaseSelectBlocks<K> {
|
|
17
17
|
}
|
|
18
18
|
export declare class TreeSelect<K extends Key = Key, Checkbox extends boolean = false, Multipe extends boolean = Checkbox extends true ? true : false> extends BaseSelect<TreeSelectProps<K, Multipe, Checkbox>, TreeSelectEvents, TreeSelectBlocks<K>> {
|
|
19
|
-
static template: string | import(
|
|
19
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
20
20
|
static typeDefs: Required<TypeDefs<TreeSelectProps<Key, boolean, boolean>>>;
|
|
21
21
|
static defaults: () => Partial<TreeSelectProps<Key, boolean, boolean>>;
|
|
22
22
|
private value;
|
|
23
23
|
init(): void;
|
|
24
|
+
expandAll(): void;
|
|
24
25
|
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | Children[];
|
|
25
26
|
protected getLabel(): Children;
|
|
26
27
|
private filter;
|