@veltra/utils 1.7.12 → 1.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dom/class-name.d.ts +3 -4
- package/dist/dom/expand-transition.d.ts +2 -3
- package/dist/dom/highlight.d.ts +1 -2
- package/dist/dom/position.d.ts +3 -4
- package/dist/dom/style.d.ts +3 -4
- package/dist/dom/z-index.d.ts +1 -2
- package/dist/helper/create-increase.d.ts +1 -2
- package/dist/helper/create-toggle.d.ts +1 -2
- package/dist/helper/frame.d.ts +1 -2
- package/dist/helper/make-bem.d.ts +3 -4
- package/dist/helper/overflow-nav.d.ts +6 -7
- package/dist/helper/tween.d.ts +3 -4
- package/dist/helper/vue.d.ts +7 -8
- package/dist/reactive/proxy.d.ts +1 -2
- package/dist/shared/constants.d.ts +3 -4
- package/dist/types/component-common.d.ts +8 -9
- package/dist/types/form-context.d.ts +5 -6
- package/dist/types/helper.d.ts +6 -7
- package/package.json +1 -1
package/dist/dom/class-name.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { BEMFactory } from "../helper/make-bem.js";
|
|
2
2
|
import { CLS_PREFIX } from "../shared/constants.js";
|
|
3
3
|
//#region src/dom/class-name.d.ts
|
|
4
|
-
declare const bem: BEMFactory<typeof CLS_PREFIX>;
|
|
5
|
-
declare function addClass(el: HTMLElement, className: string | string[]): void;
|
|
6
|
-
declare function removeClass(el: HTMLElement, className: string | string[]): void;
|
|
4
|
+
export declare const bem: BEMFactory<typeof CLS_PREFIX>;
|
|
5
|
+
export declare function addClass(el: HTMLElement, className: string | string[]): void;
|
|
6
|
+
export declare function removeClass(el: HTMLElement, className: string | string[]): void;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { addClass, bem, removeClass };
|
|
9
8
|
//# sourceMappingURL=class-name.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/dom/expand-transition.d.ts
|
|
2
|
-
interface ExpandTransitionOptions {
|
|
2
|
+
export interface ExpandTransitionOptions {
|
|
3
3
|
transition?: string;
|
|
4
4
|
enterTransition?: string;
|
|
5
5
|
leaveTransition?: string;
|
|
6
6
|
opacity?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare class ExpandTransition {
|
|
8
|
+
export declare class ExpandTransition {
|
|
9
9
|
private options;
|
|
10
10
|
private cleanupMap;
|
|
11
11
|
constructor(options?: ExpandTransitionOptions);
|
|
@@ -28,5 +28,4 @@ declare class ExpandTransition {
|
|
|
28
28
|
private resetTemporaryStyles;
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
|
-
export { ExpandTransition, ExpandTransitionOptions };
|
|
32
31
|
//# sourceMappingURL=expand-transition.d.ts.map
|
package/dist/dom/highlight.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ interface HighlightChunk {
|
|
|
8
8
|
* @param string 字符串
|
|
9
9
|
* @param substrings 需要匹配的字串列表
|
|
10
10
|
*/
|
|
11
|
-
declare function getHighlightChunks(str: string, substrings: string[]): HighlightChunk[];
|
|
11
|
+
export declare function getHighlightChunks(str: string, substrings: string[]): HighlightChunk[];
|
|
12
12
|
//#endregion
|
|
13
|
-
export { getHighlightChunks };
|
|
14
13
|
//# sourceMappingURL=highlight.d.ts.map
|
package/dist/dom/position.d.ts
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* @param el 元素
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
declare function getScrollParents(el: HTMLElement): HTMLElement[];
|
|
8
|
+
export declare function getScrollParents(el: HTMLElement): HTMLElement[];
|
|
9
9
|
/**
|
|
10
10
|
* 获取最近的可滚动父级(纵向或横向可滚动均计入)
|
|
11
11
|
* @param el 元素
|
|
12
12
|
* @returns 最近的可滚动父级
|
|
13
13
|
*/
|
|
14
|
-
declare function getNearestScrollParent(el: HTMLElement): HTMLElement | null;
|
|
14
|
+
export declare function getNearestScrollParent(el: HTMLElement): HTMLElement | null;
|
|
15
15
|
type ScrollViewPosition = 'center' | 'start' | 'end';
|
|
16
16
|
/**
|
|
17
17
|
* 滚动元素到容器视图中
|
|
@@ -20,10 +20,9 @@ type ScrollViewPosition = 'center' | 'start' | 'end';
|
|
|
20
20
|
* @param container 可滚动容器
|
|
21
21
|
* @param options 滚动选项
|
|
22
22
|
*/
|
|
23
|
-
declare function scrollIntoContainerView(el: HTMLElement, container: HTMLElement | null, options?: {
|
|
23
|
+
export declare function scrollIntoContainerView(el: HTMLElement, container: HTMLElement | null, options?: {
|
|
24
24
|
block?: ScrollViewPosition;
|
|
25
25
|
inline?: ScrollViewPosition;
|
|
26
26
|
}): void;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { getNearestScrollParent, getScrollParents, scrollIntoContainerView };
|
|
29
28
|
//# sourceMappingURL=position.d.ts.map
|
package/dist/dom/style.d.ts
CHANGED
|
@@ -6,19 +6,18 @@ import { CSSProperties } from "vue";
|
|
|
6
6
|
* @param unit 单位
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
declare function withUnit(value: number | string | undefined, unit: string): string | undefined;
|
|
9
|
+
export declare function withUnit(value: number | string | undefined, unit: string): string | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* 设置元素样式,优先使用高性能的方式
|
|
12
12
|
* @param el 元素
|
|
13
13
|
* @param styles 样式
|
|
14
14
|
*/
|
|
15
|
-
declare function setStyles(el: HTMLElement, styles: CSSProperties): void;
|
|
15
|
+
export declare function setStyles(el: HTMLElement, styles: CSSProperties): void;
|
|
16
16
|
/**
|
|
17
17
|
* 移除样式
|
|
18
18
|
* @param el dom元素
|
|
19
19
|
* @param props 要移除的样式属性
|
|
20
20
|
*/
|
|
21
|
-
declare function removeStyles(el: HTMLElement, props: string[]): void;
|
|
21
|
+
export declare function removeStyles(el: HTMLElement, props: string[]): void;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { removeStyles, setStyles, withUnit };
|
|
24
23
|
//# sourceMappingURL=style.d.ts.map
|
package/dist/dom/z-index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* @param initial 初始值
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
|
-
declare function createIncrease(initial?: number): () => number;
|
|
7
|
+
export declare function createIncrease(initial?: number): () => number;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { createIncrease };
|
|
10
9
|
//# sourceMappingURL=create-increase.d.ts.map
|
|
@@ -9,7 +9,6 @@ type ToggleReturn = [{
|
|
|
9
9
|
* @param onChange 值变化时的回调
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
|
-
declare function createToggle(initial?: boolean, onChange?: (active: boolean) => void): ToggleReturn;
|
|
12
|
+
export declare function createToggle(initial?: boolean, onChange?: (active: boolean) => void): ToggleReturn;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { createToggle };
|
|
15
14
|
//# sourceMappingURL=create-toggle.d.ts.map
|
package/dist/helper/frame.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/helper/make-bem.d.ts
|
|
2
2
|
/** BEM实例 */
|
|
3
|
-
type BEM<N extends string, P extends string = 'u-', B extends string = `${P}${N}`> = {
|
|
3
|
+
export type BEM<N extends string, P extends string = 'u-', B extends string = `${P}${N}`> = {
|
|
4
4
|
/** BEM中的块 */
|
|
5
5
|
b: B;
|
|
6
6
|
/**
|
|
@@ -29,7 +29,7 @@ type BEM<N extends string, P extends string = 'u-', B extends string = `${P}${N}
|
|
|
29
29
|
em<const E extends string, const M extends string>(e: E, m: M): `${B}__${E}--${M}`;
|
|
30
30
|
};
|
|
31
31
|
/** BEM工厂 */
|
|
32
|
-
interface BEMFactory<Prefix extends string> {
|
|
32
|
+
export interface BEMFactory<Prefix extends string> {
|
|
33
33
|
<N extends string>(name: N): BEM<N, Prefix>;
|
|
34
34
|
/**
|
|
35
35
|
* 生成is辅助类
|
|
@@ -47,7 +47,6 @@ interface BEMFactory<Prefix extends string> {
|
|
|
47
47
|
* 创建一个bem函数
|
|
48
48
|
* @param prefix 前缀
|
|
49
49
|
*/
|
|
50
|
-
declare function makeBEM<Prefix extends '' | `${string}-`>(prefix: Prefix): BEMFactory<Prefix>;
|
|
50
|
+
export declare function makeBEM<Prefix extends '' | `${string}-`>(prefix: Prefix): BEMFactory<Prefix>;
|
|
51
51
|
//#endregion
|
|
52
|
-
export { BEM, BEMFactory, makeBEM };
|
|
53
52
|
//# sourceMappingURL=make-bem.d.ts.map
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* composable 按需组合(三处的监听源与生命周期有真实差异,不强行统一)。
|
|
6
6
|
*/
|
|
7
7
|
/** 视口滚动几何(scrollTo 兼容 HTMLElement 与 vue 模板 ref) */
|
|
8
|
-
interface OverflowNavViewport {
|
|
8
|
+
export interface OverflowNavViewport {
|
|
9
9
|
scrollLeft: number;
|
|
10
10
|
scrollWidth: number;
|
|
11
11
|
clientWidth: number;
|
|
12
12
|
}
|
|
13
13
|
/** 导航按钮状态 */
|
|
14
|
-
interface OverflowNavState {
|
|
14
|
+
export interface OverflowNavState {
|
|
15
15
|
/** 内容是否溢出视口 */
|
|
16
16
|
overflowing: boolean;
|
|
17
17
|
/** 可向前(左/上)滚动 */
|
|
@@ -20,7 +20,7 @@ interface OverflowNavState {
|
|
|
20
20
|
canNext: boolean;
|
|
21
21
|
}
|
|
22
22
|
/** 依据视口与内容尺寸推导滚动按钮可用状态 */
|
|
23
|
-
declare function computeOverflowNavState(vp: OverflowNavViewport): OverflowNavState;
|
|
23
|
+
export declare function computeOverflowNavState(vp: OverflowNavViewport): OverflowNavState;
|
|
24
24
|
type ScrollableElement = OverflowNavViewport & {
|
|
25
25
|
scrollTo(options: {
|
|
26
26
|
left: number;
|
|
@@ -28,14 +28,13 @@ type ScrollableElement = OverflowNavViewport & {
|
|
|
28
28
|
}): void;
|
|
29
29
|
};
|
|
30
30
|
/** 箭头按钮:按视口宽度 80% 的步长平滑滚动 */
|
|
31
|
-
declare function scrollViewportByStep(vp: ScrollableElement, dir: 1 | -1): void;
|
|
31
|
+
export declare function scrollViewportByStep(vp: ScrollableElement, dir: 1 | -1): void;
|
|
32
32
|
/** 目标元素滚入视口(左/右越界时对齐到边缘,留 offset 边距) */
|
|
33
|
-
declare function scrollElementIntoView(vp: HTMLElement, el: HTMLElement, offset?: number): void;
|
|
33
|
+
export declare function scrollElementIntoView(vp: HTMLElement, el: HTMLElement, offset?: number): void;
|
|
34
34
|
/**
|
|
35
35
|
* 鼠标滚轮(纵向)驱动水平滚动;触控板横滑(已有 deltaX)不拦截。
|
|
36
36
|
* navActive = 导航按钮是否可见(内容未溢出时不消费滚轮)。
|
|
37
37
|
*/
|
|
38
|
-
declare function applyWheelHorizontalScroll(e: WheelEvent, vp: HTMLElement, navActive: boolean): void;
|
|
38
|
+
export declare function applyWheelHorizontalScroll(e: WheelEvent, vp: HTMLElement, navActive: boolean): void;
|
|
39
39
|
//#endregion
|
|
40
|
-
export { OverflowNavState, OverflowNavViewport, applyWheelHorizontalScroll, computeOverflowNavState, scrollElementIntoView, scrollViewportByStep };
|
|
41
40
|
//# sourceMappingURL=overflow-nav.d.ts.map
|
package/dist/helper/tween.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
//#region src/helper/tween.d.ts
|
|
2
2
|
/** 自 cat-kit 3.x Tween 行为对齐的轻量动画(原 `cat-kit/fe` 导出) */
|
|
3
|
-
interface AnimeConfig<State extends Record<string, number>> {
|
|
3
|
+
export interface AnimeConfig<State extends Record<string, number>> {
|
|
4
4
|
duration?: number;
|
|
5
5
|
easingFunction?: (progress: number) => number;
|
|
6
6
|
onComplete?(state: State): void;
|
|
7
7
|
}
|
|
8
|
-
interface TweenConfig<State extends Record<string, number>> {
|
|
8
|
+
export interface TweenConfig<State extends Record<string, number>> {
|
|
9
9
|
duration?: number;
|
|
10
10
|
onUpdate?(state: State): void;
|
|
11
11
|
onComplete?(state: State): void;
|
|
12
12
|
easingFunction?: (progress: number) => number;
|
|
13
13
|
}
|
|
14
|
-
declare class Tween<State extends Record<string, number> = Record<string, number>> {
|
|
14
|
+
export declare class Tween<State extends Record<string, number> = Record<string, number>> {
|
|
15
15
|
readonly state: State;
|
|
16
16
|
protected duration: number;
|
|
17
17
|
protected onUpdate?: (state: State) => void;
|
|
@@ -39,5 +39,4 @@ declare class Tween<State extends Record<string, number> = Record<string, number
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
|
-
export { AnimeConfig, Tween, TweenConfig };
|
|
43
42
|
//# sourceMappingURL=tween.d.ts.map
|
package/dist/helper/vue.d.ts
CHANGED
|
@@ -8,13 +8,13 @@ interface TextVNode extends VNode {
|
|
|
8
8
|
* @param node
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
|
-
declare function isTextNode(node: VNode): node is TextVNode;
|
|
11
|
+
export declare function isTextNode(node: VNode): node is TextVNode;
|
|
12
12
|
/**
|
|
13
13
|
* 是否为片段
|
|
14
14
|
* @param node
|
|
15
15
|
* @returns
|
|
16
16
|
*/
|
|
17
|
-
declare function isFragment(node: any): node is VNode;
|
|
17
|
+
export declare function isFragment(node: any): node is VNode;
|
|
18
18
|
interface CommentVNode extends VNode {
|
|
19
19
|
children: string;
|
|
20
20
|
}
|
|
@@ -23,23 +23,22 @@ interface CommentVNode extends VNode {
|
|
|
23
23
|
* @param node
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
|
-
declare function isComment(node: VNode): node is CommentVNode;
|
|
26
|
+
export declare function isComment(node: VNode): node is CommentVNode;
|
|
27
27
|
/**
|
|
28
28
|
* 是否为模板
|
|
29
29
|
* @param node
|
|
30
30
|
* @returns
|
|
31
31
|
*/
|
|
32
|
-
declare function isTemplate(node: unknown): node is VNode;
|
|
32
|
+
export declare function isTemplate(node: unknown): node is VNode;
|
|
33
33
|
/**
|
|
34
34
|
* 提取常规虚拟节点(移除type为fragment、template的节点)
|
|
35
35
|
* @param nodes VNodeArrayChildren
|
|
36
36
|
* @param results 虚拟节点
|
|
37
37
|
* @returns
|
|
38
38
|
*/
|
|
39
|
-
declare function extractNormalVNodes(nodes: VNodeArrayChildren, results?: VNode[]): VNode[];
|
|
39
|
+
export declare function extractNormalVNodes(nodes: VNodeArrayChildren, results?: VNode[]): VNode[];
|
|
40
40
|
/** 字段名:空串 / null / undefined 时回退默认值 */
|
|
41
|
-
declare function fieldKey(key: string | null | undefined, fallback: string): string;
|
|
42
|
-
declare function shallowComputed<T>(getter: () => T): ShallowRef<T>;
|
|
41
|
+
export declare function fieldKey(key: string | null | undefined, fallback: string): string;
|
|
42
|
+
export declare function shallowComputed<T>(getter: () => T): ShallowRef<T>;
|
|
43
43
|
//#endregion
|
|
44
|
-
export { extractNormalVNodes, fieldKey, isComment, isFragment, isTemplate, isTextNode, shallowComputed };
|
|
45
44
|
//# sourceMappingURL=vue.d.ts.map
|
package/dist/reactive/proxy.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param config 代理配置
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
declare function middleProxy<O extends Record<string, any>>(o: O, handler?: {
|
|
8
|
+
export declare function middleProxy<O extends Record<string, any>>(o: O, handler?: {
|
|
9
9
|
set?: (field: string, val: any) => void;
|
|
10
10
|
get?: (field: string) => any;
|
|
11
11
|
/**
|
|
@@ -15,5 +15,4 @@ declare function middleProxy<O extends Record<string, any>>(o: O, handler?: {
|
|
|
15
15
|
changed?: (fields: string[]) => void;
|
|
16
16
|
}): O;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { middleProxy };
|
|
19
18
|
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
//#region src/shared/constants.d.ts
|
|
2
2
|
/** 命名前缀 */
|
|
3
|
-
declare const NAME_SPACE = "U";
|
|
3
|
+
export declare const NAME_SPACE = "U";
|
|
4
4
|
/** 类前缀 */
|
|
5
|
-
declare const CLS_PREFIX: "u-";
|
|
5
|
+
export declare const CLS_PREFIX: "u-";
|
|
6
6
|
/** 表单空内容 */
|
|
7
|
-
declare const FORM_EMPTY_CONTENT = "-";
|
|
7
|
+
export declare const FORM_EMPTY_CONTENT = "-";
|
|
8
8
|
//#endregion
|
|
9
|
-
export { CLS_PREFIX, FORM_EMPTY_CONTENT, NAME_SPACE };
|
|
10
9
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
//#region src/types/component-common.d.ts
|
|
2
|
-
type ComponentSize = 'small' | 'default' | 'large';
|
|
3
|
-
type ColorType = 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
2
|
+
export type ComponentSize = 'small' | 'default' | 'large';
|
|
3
|
+
export type ColorType = 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
4
4
|
/** 断点名称 */
|
|
5
|
-
type BreakpointName = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type BreakpointName = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
6
|
/** 组件通用属性 */
|
|
7
|
-
interface ComponentProps {
|
|
7
|
+
export interface ComponentProps {
|
|
8
8
|
/** 组件尺寸 */
|
|
9
9
|
size?: ComponentSize;
|
|
10
10
|
}
|
|
11
|
-
type PresetRule = 'email' | 'phone' | 'num' | 'url' | 'idCard';
|
|
11
|
+
export type PresetRule = 'email' | 'phone' | 'num' | 'url' | 'idCard';
|
|
12
12
|
/** 字段校验规则 */
|
|
13
|
-
interface ValidateRule {
|
|
13
|
+
export interface ValidateRule {
|
|
14
14
|
/** 是否必填 */
|
|
15
15
|
required?: boolean | string;
|
|
16
16
|
/** 长度单位 */
|
|
@@ -31,7 +31,7 @@ interface ValidateRule {
|
|
|
31
31
|
validator?: (value: any, data: Record<string, any>) => Promise<string> | string;
|
|
32
32
|
}
|
|
33
33
|
/** 表单组件通用属性 */
|
|
34
|
-
interface FormComponentProps extends ComponentProps {
|
|
34
|
+
export interface FormComponentProps extends ComponentProps {
|
|
35
35
|
/** 在表单控件内时的提示 */
|
|
36
36
|
tips?: string;
|
|
37
37
|
/** 所占列的大小 */
|
|
@@ -50,12 +50,11 @@ interface FormComponentProps extends ComponentProps {
|
|
|
50
50
|
rules?: ValidateRule;
|
|
51
51
|
}
|
|
52
52
|
/** 带有服务端交互功能的组件属性 */
|
|
53
|
-
interface PropsWithServerQuery {
|
|
53
|
+
export interface PropsWithServerQuery {
|
|
54
54
|
/** 请求接口地址 */
|
|
55
55
|
api?: string;
|
|
56
56
|
/** 请求查询参数 */
|
|
57
57
|
query?: Record<string, any>;
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
|
-
export { BreakpointName, ColorType, ComponentProps, ComponentSize, FormComponentProps, PresetRule, PropsWithServerQuery, ValidateRule };
|
|
61
60
|
//# sourceMappingURL=component-common.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ComponentSize } from "./component-common.js";
|
|
2
2
|
//#region src/types/form-context.d.ts
|
|
3
|
-
interface FormContextModel {
|
|
3
|
+
export interface FormContextModel {
|
|
4
4
|
errors: Map<any, string[] | undefined>;
|
|
5
5
|
fields: Record<string, {
|
|
6
6
|
required?: unknown;
|
|
7
7
|
}>;
|
|
8
8
|
}
|
|
9
|
-
interface FormContextProps {
|
|
9
|
+
export interface FormContextProps {
|
|
10
10
|
/** 表单列宽 */
|
|
11
11
|
labelWidth?: string | number;
|
|
12
12
|
/** 表单项 label 位置 */
|
|
@@ -23,7 +23,7 @@ interface FormContextProps {
|
|
|
23
23
|
model?: Record<string, any>;
|
|
24
24
|
}
|
|
25
25
|
type FormPropsLike = Partial<FormContextProps> & Record<string, any>;
|
|
26
|
-
interface FormFieldItem {
|
|
26
|
+
export interface FormFieldItem {
|
|
27
27
|
validate: () => Promise<boolean>;
|
|
28
28
|
clearValidate?: () => void;
|
|
29
29
|
}
|
|
@@ -41,11 +41,10 @@ type DIContext = {
|
|
|
41
41
|
/** 处理字段 model 更新(watch 触发) */
|
|
42
42
|
handleFieldUpdate: (field: string, value: any) => void;
|
|
43
43
|
};
|
|
44
|
-
declare function provideFormContext(context: DIContext): void;
|
|
45
|
-
declare function injectFormContext(): {
|
|
44
|
+
export declare function provideFormContext(context: DIContext): void;
|
|
45
|
+
export declare function injectFormContext(): {
|
|
46
46
|
/** 是否在表单中 */
|
|
47
47
|
inForm: boolean;
|
|
48
48
|
} & Partial<DIContext>;
|
|
49
49
|
//#endregion
|
|
50
|
-
export { FormContextModel, FormContextProps, FormFieldItem, injectFormContext, provideFormContext };
|
|
51
50
|
//# sourceMappingURL=form-context.d.ts.map
|
package/dist/types/helper.d.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { VNode } from "vue";
|
|
2
2
|
//#region src/types/helper.d.ts
|
|
3
|
-
type Null<T> = null | T;
|
|
4
|
-
type Undef<T> = undefined | T;
|
|
3
|
+
export type Null<T> = null | T;
|
|
4
|
+
export type Undef<T> = undefined | T;
|
|
5
5
|
/** 自定义事件, 可以指定target类型 */
|
|
6
|
-
interface DefineEvent<T = HTMLElement> extends Omit<Event, 'target'> {
|
|
6
|
+
export interface DefineEvent<T = HTMLElement> extends Omit<Event, 'target'> {
|
|
7
7
|
target: T;
|
|
8
8
|
}
|
|
9
9
|
/** 解构VueExpose中被引用的实例 */
|
|
10
|
-
type DeconstructValue<E extends Record<string, any>> = { [K in keyof E]: E[K] extends {
|
|
10
|
+
export type DeconstructValue<E extends Record<string, any>> = { [K in keyof E]: E[K] extends {
|
|
11
11
|
value: infer V;
|
|
12
12
|
} ? V : E[K]; };
|
|
13
13
|
/** 索引类型 */
|
|
14
|
-
type Index<Keys extends string, Val> = { [key in Keys]?: Val; };
|
|
14
|
+
export type Index<Keys extends string, Val> = { [key in Keys]?: Val; };
|
|
15
15
|
/**
|
|
16
16
|
* 渲染函数返回内容
|
|
17
17
|
*/
|
|
18
|
-
type RenderReturn = (undefined | VNode | string | null | number)[] | undefined | VNode | string | null | number;
|
|
18
|
+
export type RenderReturn = (undefined | VNode | string | null | number)[] | undefined | VNode | string | null | number;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { DeconstructValue, DefineEvent, Index, Null, RenderReturn, Undef };
|
|
21
20
|
//# sourceMappingURL=helper.d.ts.map
|