@fangzhongya/fang-ui 0.1.51 → 0.1.52
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/bin/fang-ui.js +2 -2
- package/dist/components/box-fun/index.cjs +1 -0
- package/dist/components/box-fun/index.js +1 -0
- package/dist/components/box-fun/index.scss +8 -0
- package/dist/components/box-fun/style/index2.scss +4 -0
- package/dist/components/buttons/src/data.d.ts +14 -11
- package/dist/components/cascaders/src/data.d.ts +14 -11
- package/dist/components/cascaders/src/index2.cjs +15 -8
- package/dist/components/cascaders/src/index2.js +15 -8
- package/dist/components/checks/src/data.d.ts +14 -11
- package/dist/components/checks/src/index2.cjs +6 -6
- package/dist/components/checks/src/index2.js +6 -6
- package/dist/components/common/list.cjs +34 -15
- package/dist/components/common/list.d.ts +25 -12
- package/dist/components/common/list.js +34 -15
- package/dist/components/common/use.cjs +9 -5
- package/dist/components/common/use.js +9 -5
- package/dist/components/dates/src/data.d.ts +14 -11
- package/dist/components/dates2/src/data.d.ts +14 -11
- package/dist/components/draggable/style/index2.scss +1 -0
- package/dist/components/edit-data/index.cjs +9 -0
- package/dist/components/edit-data/index.css +144 -0
- package/dist/components/edit-data/index.d.ts +5 -0
- package/dist/components/edit-data/index.js +9 -0
- package/dist/components/edit-data/index.scss +95 -0
- package/dist/components/edit-data/src/area/array-json.cjs +4 -0
- package/dist/components/edit-data/src/area/array-json.js +4 -0
- package/dist/components/edit-data/src/area/array-json2.cjs +109 -0
- package/dist/components/edit-data/src/area/array-json2.js +109 -0
- package/dist/components/edit-data/src/area/array.cjs +4 -0
- package/dist/components/edit-data/src/area/array.js +4 -0
- package/dist/components/edit-data/src/area/array2.cjs +135 -0
- package/dist/components/edit-data/src/area/array2.js +135 -0
- package/dist/components/edit-data/src/area/code.cjs +4 -0
- package/dist/components/edit-data/src/area/code.js +4 -0
- package/dist/components/edit-data/src/area/code2.cjs +52 -0
- package/dist/components/edit-data/src/area/code2.js +52 -0
- package/dist/components/edit-data/src/area/editor.cjs +4 -0
- package/dist/components/edit-data/src/area/editor.js +4 -0
- package/dist/components/edit-data/src/area/editor2.cjs +170 -0
- package/dist/components/edit-data/src/area/editor2.js +170 -0
- package/dist/components/edit-data/src/area/general.cjs +4 -0
- package/dist/components/edit-data/src/area/general.js +4 -0
- package/dist/components/edit-data/src/area/general2.cjs +88 -0
- package/dist/components/edit-data/src/area/general2.js +88 -0
- package/dist/components/edit-data/src/area/object-json.cjs +4 -0
- package/dist/components/edit-data/src/area/object-json.js +4 -0
- package/dist/components/edit-data/src/area/object-json2.cjs +109 -0
- package/dist/components/edit-data/src/area/object-json2.js +109 -0
- package/dist/components/edit-data/src/area/object.cjs +4 -0
- package/dist/components/edit-data/src/area/object.js +4 -0
- package/dist/components/edit-data/src/area/object2.cjs +116 -0
- package/dist/components/edit-data/src/area/object2.js +116 -0
- package/dist/components/edit-data/src/data/array.cjs +4 -0
- package/dist/components/edit-data/src/data/array.js +4 -0
- package/dist/components/edit-data/src/data/array2.cjs +68 -0
- package/dist/components/edit-data/src/data/array2.js +68 -0
- package/dist/components/edit-data/src/data/bigint.cjs +4 -0
- package/dist/components/edit-data/src/data/bigint.js +4 -0
- package/dist/components/edit-data/src/data/bigint2.cjs +42 -0
- package/dist/components/edit-data/src/data/bigint2.js +42 -0
- package/dist/components/edit-data/src/data/boolean.cjs +4 -0
- package/dist/components/edit-data/src/data/boolean.js +4 -0
- package/dist/components/edit-data/src/data/boolean2.cjs +53 -0
- package/dist/components/edit-data/src/data/boolean2.js +53 -0
- package/dist/components/edit-data/src/data/function.cjs +4 -0
- package/dist/components/edit-data/src/data/function.js +4 -0
- package/dist/components/edit-data/src/data/function2.cjs +61 -0
- package/dist/components/edit-data/src/data/function2.js +61 -0
- package/dist/components/edit-data/src/data/not.cjs +4 -0
- package/dist/components/edit-data/src/data/not.js +4 -0
- package/dist/components/edit-data/src/data/not2.cjs +56 -0
- package/dist/components/edit-data/src/data/not2.js +56 -0
- package/dist/components/edit-data/src/data/null.cjs +4 -0
- package/dist/components/edit-data/src/data/null.js +4 -0
- package/dist/components/edit-data/src/data/null2.cjs +24 -0
- package/dist/components/edit-data/src/data/null2.js +24 -0
- package/dist/components/edit-data/src/data/number.cjs +4 -0
- package/dist/components/edit-data/src/data/number.js +4 -0
- package/dist/components/edit-data/src/data/number2.cjs +42 -0
- package/dist/components/edit-data/src/data/number2.js +42 -0
- package/dist/components/edit-data/src/data/object.cjs +4 -0
- package/dist/components/edit-data/src/data/object.js +4 -0
- package/dist/components/edit-data/src/data/object2.cjs +68 -0
- package/dist/components/edit-data/src/data/object2.js +68 -0
- package/dist/components/edit-data/src/data/other.cjs +4 -0
- package/dist/components/edit-data/src/data/other.js +4 -0
- package/dist/components/edit-data/src/data/other2.cjs +59 -0
- package/dist/components/edit-data/src/data/other2.js +59 -0
- package/dist/components/edit-data/src/data/string.cjs +4 -0
- package/dist/components/edit-data/src/data/string.js +4 -0
- package/dist/components/edit-data/src/data/string2.cjs +43 -0
- package/dist/components/edit-data/src/data/string2.js +43 -0
- package/dist/components/edit-data/src/data/symbol.cjs +4 -0
- package/dist/components/edit-data/src/data/symbol.js +4 -0
- package/dist/components/edit-data/src/data/symbol2.cjs +55 -0
- package/dist/components/edit-data/src/data/symbol2.js +55 -0
- package/dist/components/edit-data/src/data/undefined.cjs +4 -0
- package/dist/components/edit-data/src/data/undefined.js +4 -0
- package/dist/components/edit-data/src/data/undefined2.cjs +24 -0
- package/dist/components/edit-data/src/data/undefined2.js +24 -0
- package/dist/components/edit-data/src/data.cjs +57 -0
- package/dist/components/edit-data/src/data.d.ts +131 -0
- package/dist/components/edit-data/src/data.js +57 -0
- package/dist/components/edit-data/src/index.cjs +4 -0
- package/dist/components/edit-data/src/index.js +4 -0
- package/dist/components/edit-data/src/index2.cjs +134 -0
- package/dist/components/edit-data/src/index2.js +134 -0
- package/dist/components/edit-data/src/util.cjs +99 -0
- package/dist/components/edit-data/src/util.d.ts +1 -0
- package/dist/components/edit-data/src/util.js +99 -0
- package/dist/components/edit-data/style/index2.scss +13 -0
- package/dist/components/edit-data-add/index.cjs +9 -0
- package/dist/components/edit-data-add/index.d.ts +5 -0
- package/dist/components/edit-data-add/index.js +9 -0
- package/dist/components/edit-data-add/index.scss +5 -0
- package/dist/components/edit-data-add/src/data.cjs +24 -0
- package/dist/components/edit-data-add/src/data.d.ts +36 -0
- package/dist/components/edit-data-add/src/data.js +24 -0
- package/dist/components/edit-data-add/src/index.cjs +4 -0
- package/dist/components/edit-data-add/src/index.js +4 -0
- package/dist/components/edit-data-add/src/index2.cjs +241 -0
- package/dist/components/edit-data-add/src/index2.js +241 -0
- package/dist/components/edit-data-add/style/comm.scss +38 -0
- package/dist/components/edit-data-add/style/index2.scss +2 -0
- package/dist/components/history/src/data.cjs +9 -1
- package/dist/components/history/src/data.d.ts +13 -1
- package/dist/components/history/src/data.js +9 -1
- package/dist/components/history/src/index2.cjs +27 -9
- package/dist/components/history/src/index2.js +27 -9
- package/dist/components/index.cjs +60 -56
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.scss +3 -0
- package/dist/components/index2.scss +5 -2
- package/dist/components/labels/src/data.d.ts +14 -11
- package/dist/components/labels/src/index2.cjs +13 -2
- package/dist/components/labels/src/index2.js +13 -2
- package/dist/components/page/index.css +8 -0
- package/dist/components/retract/index.css +20 -0
- package/dist/components/retract/index.scss +24 -0
- package/dist/components/retract/src/data.cjs +10 -0
- package/dist/components/retract/src/data.d.ts +10 -0
- package/dist/components/retract/src/data.js +10 -0
- package/dist/components/retract/src/index2.cjs +24 -4
- package/dist/components/retract/src/index2.js +23 -3
- package/dist/components/retract/style/index2.scss +1 -0
- package/dist/components/selects/src/data.d.ts +14 -11
- package/dist/components/selects/src/index2.cjs +1 -1
- package/dist/components/selects/src/index2.js +1 -1
- package/dist/components/switchs/src/data.d.ts +14 -11
- package/dist/components/switchs/src/index2.cjs +9 -5
- package/dist/components/switchs/src/index2.js +9 -5
- package/dist/components/tables/common/com-limit.cjs +4 -0
- package/dist/components/tables/common/com-limit.js +4 -0
- package/dist/components/tables/common/com-limit2.cjs +91 -0
- package/dist/components/tables/common/com-limit2.js +91 -0
- package/dist/components/tables/common/com.scss +12 -0
- package/dist/components/tables/index.css +9 -0
- package/dist/components/tables/index.scss +2 -0
- package/dist/components/tables/src/columns2.cjs +3 -1
- package/dist/components/tables/src/columns2.js +7 -5
- package/dist/components/tablesp/index.css +9 -0
- package/dist/components/tablespd/index.css +9 -0
- package/dist/components/uploads/src/data.d.ts +14 -11
- package/dist/css/edit-data.css +144 -0
- package/dist/css/index.css +149 -0
- package/dist/css/page.css +8 -0
- package/dist/css/retract.css +20 -0
- package/dist/css/tables.css +9 -0
- package/dist/css/tablesp.css +9 -0
- package/dist/css/tablespd.css +9 -0
- package/dist/directives/adjust/index.cjs +14 -6
- package/dist/directives/adjust/index.js +14 -6
- package/dist/directives/adjustment/index.cjs +622 -0
- package/dist/directives/adjustment/index.d.ts +7 -0
- package/dist/directives/adjustment/index.js +622 -0
- package/dist/directives/index.cjs +18 -16
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/index.js +16 -14
- package/dist/expand/{chunk-A7IW6WRD.cjs → chunk-BJVT6JH7.cjs} +6 -0
- package/dist/expand/{chunk-L4FI5HCY.js → chunk-I5UJEJJB.js} +6 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +84 -78
- package/dist/index.css +149 -0
- package/dist/index.js +20 -14
- package/dist/utils/util.cjs +1 -1
- package/dist/utils/util.js +2 -2
- package/dist/utils/vues/withInstall.cjs +2 -1
- package/dist/utils/vues/withInstall.js +2 -1
- package/package.json +9 -8
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildProps = require("../../../utils/vues/buildProps.cjs");
|
|
4
|
+
const name = "edit-data";
|
|
5
|
+
const dataProps = buildProps.buildProps({
|
|
6
|
+
/**
|
|
7
|
+
* @props { String } type=string ( )
|
|
8
|
+
* 类型
|
|
9
|
+
*/
|
|
10
|
+
type: {
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
typeObj: { type: [Array, String] },
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: null
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* 代码编辑器组件
|
|
19
|
+
*/
|
|
20
|
+
compon: {
|
|
21
|
+
type: Object
|
|
22
|
+
},
|
|
23
|
+
isJson: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
isNot: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
},
|
|
31
|
+
addable: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: true
|
|
34
|
+
},
|
|
35
|
+
editable: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: true
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const dataEmits = ["update:modelValue"];
|
|
41
|
+
const dataSlot = {
|
|
42
|
+
default: "default"
|
|
43
|
+
};
|
|
44
|
+
const dataExpose = {
|
|
45
|
+
name
|
|
46
|
+
};
|
|
47
|
+
const dataDataProps = buildProps.buildProps({
|
|
48
|
+
...dataProps
|
|
49
|
+
});
|
|
50
|
+
const dataDataEmits = [...dataEmits];
|
|
51
|
+
exports.dataDataEmits = dataDataEmits;
|
|
52
|
+
exports.dataDataProps = dataDataProps;
|
|
53
|
+
exports.dataEmits = dataEmits;
|
|
54
|
+
exports.dataExpose = dataExpose;
|
|
55
|
+
exports.dataProps = dataProps;
|
|
56
|
+
exports.dataSlot = dataSlot;
|
|
57
|
+
exports.name = name;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* @title {h3} EditData
|
|
4
|
+
* @text edit-data
|
|
5
|
+
*/
|
|
6
|
+
export declare const name = "edit-data";
|
|
7
|
+
export declare const dataProps: {
|
|
8
|
+
/**
|
|
9
|
+
* @props { String } type=string ( )
|
|
10
|
+
* 类型
|
|
11
|
+
*/
|
|
12
|
+
type: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
typeObj: {
|
|
16
|
+
type: (StringConstructor | {
|
|
17
|
+
(arrayLength: number): string[];
|
|
18
|
+
(...items: string[]): string[];
|
|
19
|
+
new (arrayLength: number): string[];
|
|
20
|
+
new (...items: string[]): string[];
|
|
21
|
+
isArray(arg: any): arg is any[];
|
|
22
|
+
readonly prototype: any[];
|
|
23
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
24
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
25
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
26
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
27
|
+
of<T>(...items: T[]): T[];
|
|
28
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
29
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
30
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
31
|
+
})[];
|
|
32
|
+
};
|
|
33
|
+
modelValue: {
|
|
34
|
+
type: null;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 代码编辑器组件
|
|
38
|
+
*/
|
|
39
|
+
compon: {
|
|
40
|
+
type: ObjectConstructor;
|
|
41
|
+
};
|
|
42
|
+
isJson: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
isNot: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
addable: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
editable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
|
|
60
|
+
/**
|
|
61
|
+
* @emits change (val:[String, Array])
|
|
62
|
+
* 选择的时间
|
|
63
|
+
*/
|
|
64
|
+
export declare const dataEmits: string[];
|
|
65
|
+
export type DataEmits = typeof dataEmits;
|
|
66
|
+
/**
|
|
67
|
+
* @slot default 默认插槽
|
|
68
|
+
*/
|
|
69
|
+
export declare const dataSlot: {
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* @expose setValue (val:<string>设置的数据 )
|
|
74
|
+
* 设置值
|
|
75
|
+
*/
|
|
76
|
+
export declare const dataExpose: {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
export declare const dataDataProps: {
|
|
80
|
+
/**
|
|
81
|
+
* @props { String } type=string ( )
|
|
82
|
+
* 类型
|
|
83
|
+
*/
|
|
84
|
+
type: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
};
|
|
87
|
+
typeObj: {
|
|
88
|
+
type: (StringConstructor | {
|
|
89
|
+
(arrayLength: number): string[];
|
|
90
|
+
(...items: string[]): string[];
|
|
91
|
+
new (arrayLength: number): string[];
|
|
92
|
+
new (...items: string[]): string[];
|
|
93
|
+
isArray(arg: any): arg is any[];
|
|
94
|
+
readonly prototype: any[];
|
|
95
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
96
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
97
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
98
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
99
|
+
of<T>(...items: T[]): T[];
|
|
100
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
101
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
102
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
103
|
+
})[];
|
|
104
|
+
};
|
|
105
|
+
modelValue: {
|
|
106
|
+
type: null;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* 代码编辑器组件
|
|
110
|
+
*/
|
|
111
|
+
compon: {
|
|
112
|
+
type: ObjectConstructor;
|
|
113
|
+
};
|
|
114
|
+
isJson: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
118
|
+
isNot: {
|
|
119
|
+
type: BooleanConstructor;
|
|
120
|
+
default: boolean;
|
|
121
|
+
};
|
|
122
|
+
addable: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
editable: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export declare const dataDataEmits: string[];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vues/buildProps.js";
|
|
2
|
+
const name = "edit-data";
|
|
3
|
+
const dataProps = buildProps({
|
|
4
|
+
/**
|
|
5
|
+
* @props { String } type=string ( )
|
|
6
|
+
* 类型
|
|
7
|
+
*/
|
|
8
|
+
type: {
|
|
9
|
+
type: String
|
|
10
|
+
},
|
|
11
|
+
typeObj: { type: [Array, String] },
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: null
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* 代码编辑器组件
|
|
17
|
+
*/
|
|
18
|
+
compon: {
|
|
19
|
+
type: Object
|
|
20
|
+
},
|
|
21
|
+
isJson: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
isNot: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
addable: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
editable: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const dataEmits = ["update:modelValue"];
|
|
39
|
+
const dataSlot = {
|
|
40
|
+
default: "default"
|
|
41
|
+
};
|
|
42
|
+
const dataExpose = {
|
|
43
|
+
name
|
|
44
|
+
};
|
|
45
|
+
const dataDataProps = buildProps({
|
|
46
|
+
...dataProps
|
|
47
|
+
});
|
|
48
|
+
const dataDataEmits = [...dataEmits];
|
|
49
|
+
export {
|
|
50
|
+
dataDataEmits,
|
|
51
|
+
dataDataProps,
|
|
52
|
+
dataEmits,
|
|
53
|
+
dataExpose,
|
|
54
|
+
dataProps,
|
|
55
|
+
dataSlot,
|
|
56
|
+
name
|
|
57
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const util = require("./util.cjs");
|
|
5
|
+
const data = require("./data.cjs");
|
|
6
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
7
|
+
const index$2 = require("../../../hooks/locale/index.cjs");
|
|
8
|
+
const index = require("../../../hooks/props-default/index.cjs");
|
|
9
|
+
require("./data/string.cjs");
|
|
10
|
+
require("./data/number.cjs");
|
|
11
|
+
require("./data/boolean.cjs");
|
|
12
|
+
require("./data/object.cjs");
|
|
13
|
+
require("./data/function.cjs");
|
|
14
|
+
require("./data/symbol.cjs");
|
|
15
|
+
require("./data/array.cjs");
|
|
16
|
+
require("./data/not.cjs");
|
|
17
|
+
require("./data/bigint.cjs");
|
|
18
|
+
require("./data/other.cjs");
|
|
19
|
+
require("./data/null.cjs");
|
|
20
|
+
require("./data/undefined.cjs");
|
|
21
|
+
const undefined_vue_vue_type_script_setup_true_lang = require("./data/undefined2.cjs");
|
|
22
|
+
const null_vue_vue_type_script_setup_true_lang = require("./data/null2.cjs");
|
|
23
|
+
const other_vue_vue_type_script_setup_true_lang = require("./data/other2.cjs");
|
|
24
|
+
const bigint_vue_vue_type_script_setup_true_lang = require("./data/bigint2.cjs");
|
|
25
|
+
const not_vue_vue_type_script_setup_true_lang = require("./data/not2.cjs");
|
|
26
|
+
const array_vue_vue_type_script_setup_true_lang = require("./data/array2.cjs");
|
|
27
|
+
const symbol_vue_vue_type_script_setup_true_lang = require("./data/symbol2.cjs");
|
|
28
|
+
const function_vue_vue_type_script_setup_true_lang = require("./data/function2.cjs");
|
|
29
|
+
const object_vue_vue_type_script_setup_true_lang = require("./data/object2.cjs");
|
|
30
|
+
const boolean_vue_vue_type_script_setup_true_lang = require("./data/boolean2.cjs");
|
|
31
|
+
const number_vue_vue_type_script_setup_true_lang = require("./data/number2.cjs");
|
|
32
|
+
const string_vue_vue_type_script_setup_true_lang = require("./data/string2.cjs");
|
|
33
|
+
const _hoisted_1 = ["title"];
|
|
34
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
35
|
+
...{
|
|
36
|
+
inheritAttrs: false,
|
|
37
|
+
name: data.name
|
|
38
|
+
},
|
|
39
|
+
__name: "index",
|
|
40
|
+
props: index.getProps(data.dataProps),
|
|
41
|
+
emits: data.dataEmits,
|
|
42
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
43
|
+
const obj = {
|
|
44
|
+
string: string_vue_vue_type_script_setup_true_lang.default,
|
|
45
|
+
number: number_vue_vue_type_script_setup_true_lang.default,
|
|
46
|
+
boolean: boolean_vue_vue_type_script_setup_true_lang.default,
|
|
47
|
+
object: object_vue_vue_type_script_setup_true_lang.default,
|
|
48
|
+
function: function_vue_vue_type_script_setup_true_lang.default,
|
|
49
|
+
symbol: symbol_vue_vue_type_script_setup_true_lang.default,
|
|
50
|
+
array: array_vue_vue_type_script_setup_true_lang.default,
|
|
51
|
+
not: not_vue_vue_type_script_setup_true_lang.default,
|
|
52
|
+
bigint: bigint_vue_vue_type_script_setup_true_lang.default,
|
|
53
|
+
other: other_vue_vue_type_script_setup_true_lang.default,
|
|
54
|
+
null: null_vue_vue_type_script_setup_true_lang.default,
|
|
55
|
+
undefined: undefined_vue_vue_type_script_setup_true_lang.default
|
|
56
|
+
};
|
|
57
|
+
const cs = index$1.useCssName(data.name);
|
|
58
|
+
const { getLocale } = index$2.useLocale();
|
|
59
|
+
const prs = __props;
|
|
60
|
+
const props = index.usePropsDefault(data.name, prs, data.dataProps);
|
|
61
|
+
const emit = __emit;
|
|
62
|
+
const value = vue.computed({
|
|
63
|
+
get() {
|
|
64
|
+
return props.modelValue;
|
|
65
|
+
},
|
|
66
|
+
set(value2) {
|
|
67
|
+
emit("update:modelValue", value2);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const tps = vue.ref([]);
|
|
71
|
+
const type = vue.computed(() => {
|
|
72
|
+
if (props.type) {
|
|
73
|
+
const t = props.type.toLowerCase();
|
|
74
|
+
if (t.startsWith("array")) {
|
|
75
|
+
tps.value = util.getObjTypes(t);
|
|
76
|
+
console.log("tps.value ", tps.value);
|
|
77
|
+
return "array";
|
|
78
|
+
} else if (t.startsWith("object")) {
|
|
79
|
+
tps.value = util.getObjTypes(t);
|
|
80
|
+
return "object";
|
|
81
|
+
} else {
|
|
82
|
+
return t;
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
const v = value.value;
|
|
86
|
+
if (v === null || v === void 0) {
|
|
87
|
+
if (props.isNot) {
|
|
88
|
+
return "not";
|
|
89
|
+
} else {
|
|
90
|
+
return String(v);
|
|
91
|
+
}
|
|
92
|
+
} else if (Array.isArray(v)) {
|
|
93
|
+
return "array";
|
|
94
|
+
}
|
|
95
|
+
return typeof v;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const typeobjs = vue.computed(() => {
|
|
99
|
+
if (tps.value.length > 0) {
|
|
100
|
+
return tps.value;
|
|
101
|
+
} else {
|
|
102
|
+
if (props.typeObj) {
|
|
103
|
+
if (typeof props.typeObj === "string") {
|
|
104
|
+
return [props.typeObj];
|
|
105
|
+
} else {
|
|
106
|
+
return props.typeObj;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return [];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const compon = vue.computed(() => {
|
|
113
|
+
const t = type.value;
|
|
114
|
+
return obj[t] || other_vue_vue_type_script_setup_true_lang.default;
|
|
115
|
+
});
|
|
116
|
+
__expose({
|
|
117
|
+
...data.dataExpose
|
|
118
|
+
});
|
|
119
|
+
return (_ctx, _cache) => {
|
|
120
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
121
|
+
class: vue.normalizeClass(vue.unref(cs).z()),
|
|
122
|
+
title: type.value
|
|
123
|
+
}, [
|
|
124
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(compon.value), vue.mergeProps(vue.unref(props), {
|
|
125
|
+
typeObj: typeobjs.value,
|
|
126
|
+
type: type.value,
|
|
127
|
+
modelValue: value.value,
|
|
128
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
129
|
+
}), null, 16, ["typeObj", "type", "modelValue"]))
|
|
130
|
+
], 10, _hoisted_1);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, createElementBlock, openBlock, normalizeClass, unref, createBlock, resolveDynamicComponent, mergeProps } from "vue";
|
|
2
|
+
import { getObjTypes } from "./util.js";
|
|
3
|
+
import { dataEmits, name, dataProps, dataExpose } from "./data.js";
|
|
4
|
+
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
5
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
6
|
+
import { getProps, usePropsDefault } from "../../../hooks/props-default/index.js";
|
|
7
|
+
import "./data/string.js";
|
|
8
|
+
import "./data/number.js";
|
|
9
|
+
import "./data/boolean.js";
|
|
10
|
+
import "./data/object.js";
|
|
11
|
+
import "./data/function.js";
|
|
12
|
+
import "./data/symbol.js";
|
|
13
|
+
import "./data/array.js";
|
|
14
|
+
import "./data/not.js";
|
|
15
|
+
import "./data/bigint.js";
|
|
16
|
+
import "./data/other.js";
|
|
17
|
+
import "./data/null.js";
|
|
18
|
+
import "./data/undefined.js";
|
|
19
|
+
import _sfc_main$1 from "./data/undefined2.js";
|
|
20
|
+
import _sfc_main$2 from "./data/null2.js";
|
|
21
|
+
import _sfc_main$3 from "./data/other2.js";
|
|
22
|
+
import _sfc_main$4 from "./data/bigint2.js";
|
|
23
|
+
import _sfc_main$5 from "./data/not2.js";
|
|
24
|
+
import _sfc_main$6 from "./data/array2.js";
|
|
25
|
+
import _sfc_main$7 from "./data/symbol2.js";
|
|
26
|
+
import _sfc_main$8 from "./data/function2.js";
|
|
27
|
+
import _sfc_main$9 from "./data/object2.js";
|
|
28
|
+
import _sfc_main$a from "./data/boolean2.js";
|
|
29
|
+
import _sfc_main$b from "./data/number2.js";
|
|
30
|
+
import _sfc_main$c from "./data/string2.js";
|
|
31
|
+
const _hoisted_1 = ["title"];
|
|
32
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
|
+
...{
|
|
34
|
+
inheritAttrs: false,
|
|
35
|
+
name
|
|
36
|
+
},
|
|
37
|
+
__name: "index",
|
|
38
|
+
props: getProps(dataProps),
|
|
39
|
+
emits: dataEmits,
|
|
40
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
41
|
+
const obj = {
|
|
42
|
+
string: _sfc_main$c,
|
|
43
|
+
number: _sfc_main$b,
|
|
44
|
+
boolean: _sfc_main$a,
|
|
45
|
+
object: _sfc_main$9,
|
|
46
|
+
function: _sfc_main$8,
|
|
47
|
+
symbol: _sfc_main$7,
|
|
48
|
+
array: _sfc_main$6,
|
|
49
|
+
not: _sfc_main$5,
|
|
50
|
+
bigint: _sfc_main$4,
|
|
51
|
+
other: _sfc_main$3,
|
|
52
|
+
null: _sfc_main$2,
|
|
53
|
+
undefined: _sfc_main$1
|
|
54
|
+
};
|
|
55
|
+
const cs = useCssName(name);
|
|
56
|
+
const { getLocale } = useLocale();
|
|
57
|
+
const prs = __props;
|
|
58
|
+
const props = usePropsDefault(name, prs, dataProps);
|
|
59
|
+
const emit = __emit;
|
|
60
|
+
const value = computed({
|
|
61
|
+
get() {
|
|
62
|
+
return props.modelValue;
|
|
63
|
+
},
|
|
64
|
+
set(value2) {
|
|
65
|
+
emit("update:modelValue", value2);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const tps = ref([]);
|
|
69
|
+
const type = computed(() => {
|
|
70
|
+
if (props.type) {
|
|
71
|
+
const t = props.type.toLowerCase();
|
|
72
|
+
if (t.startsWith("array")) {
|
|
73
|
+
tps.value = getObjTypes(t);
|
|
74
|
+
console.log("tps.value ", tps.value);
|
|
75
|
+
return "array";
|
|
76
|
+
} else if (t.startsWith("object")) {
|
|
77
|
+
tps.value = getObjTypes(t);
|
|
78
|
+
return "object";
|
|
79
|
+
} else {
|
|
80
|
+
return t;
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
const v = value.value;
|
|
84
|
+
if (v === null || v === void 0) {
|
|
85
|
+
if (props.isNot) {
|
|
86
|
+
return "not";
|
|
87
|
+
} else {
|
|
88
|
+
return String(v);
|
|
89
|
+
}
|
|
90
|
+
} else if (Array.isArray(v)) {
|
|
91
|
+
return "array";
|
|
92
|
+
}
|
|
93
|
+
return typeof v;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
const typeobjs = computed(() => {
|
|
97
|
+
if (tps.value.length > 0) {
|
|
98
|
+
return tps.value;
|
|
99
|
+
} else {
|
|
100
|
+
if (props.typeObj) {
|
|
101
|
+
if (typeof props.typeObj === "string") {
|
|
102
|
+
return [props.typeObj];
|
|
103
|
+
} else {
|
|
104
|
+
return props.typeObj;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const compon = computed(() => {
|
|
111
|
+
const t = type.value;
|
|
112
|
+
return obj[t] || _sfc_main$3;
|
|
113
|
+
});
|
|
114
|
+
__expose({
|
|
115
|
+
...dataExpose
|
|
116
|
+
});
|
|
117
|
+
return (_ctx, _cache) => {
|
|
118
|
+
return openBlock(), createElementBlock("div", {
|
|
119
|
+
class: normalizeClass(unref(cs).z()),
|
|
120
|
+
title: type.value
|
|
121
|
+
}, [
|
|
122
|
+
(openBlock(), createBlock(resolveDynamicComponent(compon.value), mergeProps(unref(props), {
|
|
123
|
+
typeObj: typeobjs.value,
|
|
124
|
+
type: type.value,
|
|
125
|
+
modelValue: value.value,
|
|
126
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
127
|
+
}), null, 16, ["typeObj", "type", "modelValue"]))
|
|
128
|
+
], 10, _hoisted_1);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
export {
|
|
133
|
+
_sfc_main as default
|
|
134
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const splitIgnoringNesting = (str, delimiter) => {
|
|
4
|
+
let bracketStack = [];
|
|
5
|
+
let parts = [];
|
|
6
|
+
let current = "";
|
|
7
|
+
for (let i = 0; i < str.length; i++) {
|
|
8
|
+
const char = str[i];
|
|
9
|
+
if (char === "[" || char === "<" || char === "(") {
|
|
10
|
+
bracketStack.push(char);
|
|
11
|
+
current += char;
|
|
12
|
+
} else if (char === "]" && bracketStack.length > 0 && bracketStack[bracketStack.length - 1] === "[" || char === ">" && bracketStack.length > 0 && bracketStack[bracketStack.length - 1] === "<" || char === ")" && bracketStack.length > 0 && bracketStack[bracketStack.length - 1] === "(") {
|
|
13
|
+
bracketStack.pop();
|
|
14
|
+
current += char;
|
|
15
|
+
} else if (char === delimiter && bracketStack.length === 0) {
|
|
16
|
+
parts.push(current.trim());
|
|
17
|
+
current = "";
|
|
18
|
+
} else {
|
|
19
|
+
current += char;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (current.trim() !== "") {
|
|
23
|
+
parts.push(current.trim());
|
|
24
|
+
}
|
|
25
|
+
return parts;
|
|
26
|
+
};
|
|
27
|
+
const parseTypeDefinition = (typeDef) => {
|
|
28
|
+
if (!typeDef) {
|
|
29
|
+
return [];
|
|
30
|
+
} else if (typeDef.startsWith("[") && typeDef.endsWith("]") || typeDef.startsWith("(") && typeDef.endsWith(")")) {
|
|
31
|
+
const inner = typeDef.slice(1, -1).trim();
|
|
32
|
+
if (!inner) return [];
|
|
33
|
+
const types = splitIgnoringNesting(inner, ",");
|
|
34
|
+
return types;
|
|
35
|
+
} else if (typeDef.startsWith("{") && typeDef.endsWith("}")) {
|
|
36
|
+
return ["object"];
|
|
37
|
+
} else if (typeDef.startsWith("<") && typeDef.endsWith(">")) {
|
|
38
|
+
const inner = typeDef.slice(1, -1).trim();
|
|
39
|
+
if (!inner) return [];
|
|
40
|
+
const types = splitIgnoringNesting(inner, "|");
|
|
41
|
+
return types;
|
|
42
|
+
} else {
|
|
43
|
+
if (typeDef.includes("|")) {
|
|
44
|
+
const types = splitIgnoringNesting(typeDef, "|");
|
|
45
|
+
return types;
|
|
46
|
+
} else {
|
|
47
|
+
const types = splitIgnoringNesting(typeDef, ",");
|
|
48
|
+
return types;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const splitIgnoring = (str) => {
|
|
53
|
+
let bracketStack = [];
|
|
54
|
+
let isArr = false;
|
|
55
|
+
let is = false;
|
|
56
|
+
let top = 0;
|
|
57
|
+
for (let i = 0; i < str.length; i++) {
|
|
58
|
+
const char = str[i];
|
|
59
|
+
if (char === "[" || char === "<" || char === "(") {
|
|
60
|
+
is = true;
|
|
61
|
+
bracketStack.push(char);
|
|
62
|
+
if (char == "[") {
|
|
63
|
+
isArr = true;
|
|
64
|
+
}
|
|
65
|
+
if (top == 0) {
|
|
66
|
+
top = i;
|
|
67
|
+
}
|
|
68
|
+
} else if (char === "]" && bracketStack[bracketStack.length - 1] === "[" || char === ">" && bracketStack[bracketStack.length - 1] === "<" || char === ")" && bracketStack[bracketStack.length - 1] === "(") {
|
|
69
|
+
bracketStack.pop();
|
|
70
|
+
}
|
|
71
|
+
if (is && bracketStack.length === 0) {
|
|
72
|
+
if (isArr) {
|
|
73
|
+
if (top + 1 == i) {
|
|
74
|
+
return {
|
|
75
|
+
top: "array",
|
|
76
|
+
type: str.substring(0, top)
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
top: str.substring(0, top),
|
|
82
|
+
type: str.substring(top + 1, i)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
top: str,
|
|
88
|
+
type: ""
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
function getObjTypes(str) {
|
|
92
|
+
const obj = splitIgnoring(str);
|
|
93
|
+
if (obj.type) {
|
|
94
|
+
return parseTypeDefinition(obj.type);
|
|
95
|
+
} else {
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.getObjTypes = getObjTypes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getObjTypes(str: string): string[];
|