@fangzhongya/fang-ui 0.1.51 → 0.1.53
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.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.css +144 -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 +103 -0
- package/dist/components/tables/common/com-limit2.js +103 -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-add.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 +12 -11
- /package/dist/components/{draggable → keep-com}/index.css +0 -0
- /package/dist/css/{draggable.css → keep-com.css} +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--on: rgb(91, 189, 246);
|
|
3
|
+
--color-primary: #409eff;
|
|
4
|
+
--bag-primary: #409eff;
|
|
5
|
+
--bag-primary-text: #ffffff;
|
|
6
|
+
--border: #eee;
|
|
7
|
+
--layout-panel-gap: 10px;
|
|
8
|
+
--layout-panel-padding: 20px;
|
|
9
|
+
--layout-form-item-padding-right: var(
|
|
10
|
+
--layout-panel-gap
|
|
11
|
+
);
|
|
12
|
+
--g-main-bg: var(--bg-color-page);
|
|
13
|
+
--lable-array-height: 20px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.com-footer {
|
|
17
|
+
border-top: 1px solid var(--border);
|
|
18
|
+
padding: 20px 20px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.com-lable-array {
|
|
22
|
+
line-height: var(--lable-array-height);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.edit-data-add {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
}
|
|
31
|
+
.edit-data-add-main {
|
|
32
|
+
flex: 1;
|
|
33
|
+
width: 100%;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
}
|
|
37
|
+
.edit-data-add-main-top {
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
.edit-data-add-main-top-li {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
padding: 10px;
|
|
44
|
+
}
|
|
45
|
+
.edit-data-add-main-top-li-value {
|
|
46
|
+
flex: 1;
|
|
47
|
+
}
|
|
48
|
+
.edit-data-add-main-content {
|
|
49
|
+
flex: 1;
|
|
50
|
+
width: 100%;
|
|
51
|
+
margin: 10px;
|
|
52
|
+
}
|
|
53
|
+
.edit-data-add-main-content-name {
|
|
54
|
+
margin-bottom: 10px;
|
|
55
|
+
}
|
|
56
|
+
.edit-data-add-footer {
|
|
57
|
+
padding-top: 20px;
|
|
58
|
+
text-align: right;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.edit-data-general-set {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
.edit-data-editor {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
}
|
|
71
|
+
.edit-data-editor-main {
|
|
72
|
+
flex: 1;
|
|
73
|
+
position: relative;
|
|
74
|
+
}
|
|
75
|
+
.edit-data-editor-content {
|
|
76
|
+
position: absolute;
|
|
77
|
+
inset: 0;
|
|
78
|
+
overflow-y: auto;
|
|
79
|
+
}
|
|
80
|
+
.edit-data-editor-content .edit-data-code {
|
|
81
|
+
height: 100%;
|
|
82
|
+
width: 100%;
|
|
83
|
+
}
|
|
84
|
+
.edit-data-editor-content .edit-data-code .inputs {
|
|
85
|
+
height: 100%;
|
|
86
|
+
width: 100%;
|
|
87
|
+
}
|
|
88
|
+
.edit-data-editor-content .edit-data-code .inputs textarea {
|
|
89
|
+
height: 100%;
|
|
90
|
+
width: 100%;
|
|
91
|
+
}
|
|
92
|
+
.edit-data-editor-footer {
|
|
93
|
+
padding-top: 20px;
|
|
94
|
+
text-align: right;
|
|
95
|
+
}
|
|
96
|
+
.edit-data-area-array, .edit-data-area-object {
|
|
97
|
+
width: 100%;
|
|
98
|
+
height: 100%;
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
}
|
|
102
|
+
.edit-data-area-array-main, .edit-data-area-object-main {
|
|
103
|
+
flex: 1;
|
|
104
|
+
width: 100%;
|
|
105
|
+
position: relative;
|
|
106
|
+
}
|
|
107
|
+
.edit-data-area-array-content, .edit-data-area-object-content {
|
|
108
|
+
position: absolute;
|
|
109
|
+
inset: 0;
|
|
110
|
+
overflow-y: auto;
|
|
111
|
+
}
|
|
112
|
+
.edit-data-area-array-json, .edit-data-area-object-json {
|
|
113
|
+
width: 100%;
|
|
114
|
+
height: 100%;
|
|
115
|
+
}
|
|
116
|
+
.edit-data-area-array-json .tabs, .edit-data-area-object-json .tabs {
|
|
117
|
+
width: 100%;
|
|
118
|
+
height: 100%;
|
|
119
|
+
}
|
|
120
|
+
.edit-data-area-array-json .tabs .tab-pane, .edit-data-area-object-json .tabs .tab-pane {
|
|
121
|
+
position: absolute;
|
|
122
|
+
inset: 0;
|
|
123
|
+
overflow-y: auto;
|
|
124
|
+
}
|
|
125
|
+
.edit-data-area-array-add, .edit-data-area-object-add {
|
|
126
|
+
margin-bottom: 10px;
|
|
127
|
+
}
|
|
128
|
+
.edit-data-area-comp {
|
|
129
|
+
width: 100%;
|
|
130
|
+
}
|
|
131
|
+
.edit-data-area-comp-li {
|
|
132
|
+
min-height: 40px;
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
}
|
|
137
|
+
.edit-data-area-comp-li-div {
|
|
138
|
+
flex: 1;
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
}
|
|
142
|
+
.edit-data-area-comp-li-name {
|
|
143
|
+
padding: 0 10px;
|
|
144
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import "./src/index.js";
|
|
3
|
+
import { withInstall } from "../../utils/vues/withInstall.js";
|
|
4
|
+
import _sfc_main from "./src/index2.js";
|
|
5
|
+
const EditDataAdd = withInstall(_sfc_main, "EditDataAdd");
|
|
6
|
+
export {
|
|
7
|
+
EditDataAdd,
|
|
8
|
+
EditDataAdd as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildProps = require("../../../utils/vues/buildProps.cjs");
|
|
4
|
+
const name = "edit-data-add";
|
|
5
|
+
const dataProps = buildProps.buildProps({
|
|
6
|
+
title: { type: String, default: "新增" },
|
|
7
|
+
labelName: { type: String, default: "属性" },
|
|
8
|
+
label: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const dataEmits = ["submit"];
|
|
14
|
+
const dataSlot = {
|
|
15
|
+
default: "default"
|
|
16
|
+
};
|
|
17
|
+
const dataExpose = {
|
|
18
|
+
name
|
|
19
|
+
};
|
|
20
|
+
exports.dataEmits = dataEmits;
|
|
21
|
+
exports.dataExpose = dataExpose;
|
|
22
|
+
exports.dataProps = dataProps;
|
|
23
|
+
exports.dataSlot = dataSlot;
|
|
24
|
+
exports.name = name;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* @title {h3} EditDataAdd
|
|
4
|
+
* @text edit-data-add
|
|
5
|
+
*/
|
|
6
|
+
export declare const name = "edit-data-add";
|
|
7
|
+
export declare const dataProps: {
|
|
8
|
+
title: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
labelName: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
label: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
|
|
22
|
+
export declare const dataEmits: string[];
|
|
23
|
+
export type DataEmits = typeof dataEmits;
|
|
24
|
+
/**
|
|
25
|
+
* @slot default 默认插槽
|
|
26
|
+
*/
|
|
27
|
+
export declare const dataSlot: {
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @expose setValue (val:<string>设置的数据 )
|
|
32
|
+
* 设置值
|
|
33
|
+
*/
|
|
34
|
+
export declare const dataExpose: {
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vues/buildProps.js";
|
|
2
|
+
const name = "edit-data-add";
|
|
3
|
+
const dataProps = buildProps({
|
|
4
|
+
title: { type: String, default: "新增" },
|
|
5
|
+
labelName: { type: String, default: "属性" },
|
|
6
|
+
label: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ""
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const dataEmits = ["submit"];
|
|
12
|
+
const dataSlot = {
|
|
13
|
+
default: "default"
|
|
14
|
+
};
|
|
15
|
+
const dataExpose = {
|
|
16
|
+
name
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
dataEmits,
|
|
20
|
+
dataExpose,
|
|
21
|
+
dataProps,
|
|
22
|
+
dataSlot,
|
|
23
|
+
name
|
|
24
|
+
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const data = require("./data.cjs");
|
|
5
|
+
const data$1 = require("../../edit-data/src/data.cjs");
|
|
6
|
+
const util = require("../../edit-data/src/util.cjs");
|
|
7
|
+
const index = require("../../../hooks/cssname/index.cjs");
|
|
8
|
+
const index$1 = require("../../../hooks/locale/index.cjs");
|
|
9
|
+
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
10
|
+
const index$8 = require("../../button/index.cjs");
|
|
11
|
+
const index$4 = require("../../window/index.cjs");
|
|
12
|
+
const index$5 = require("../../inputs/index.cjs");
|
|
13
|
+
const index$6 = require("../../selects/index.cjs");
|
|
14
|
+
const index$7 = require("../../edit-data/index.cjs");
|
|
15
|
+
const index$3 = require("../../message/index.cjs");
|
|
16
|
+
const _hoisted_1 = { key: 0 };
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
18
|
+
...{
|
|
19
|
+
inheritAttrs: false
|
|
20
|
+
},
|
|
21
|
+
__name: "index",
|
|
22
|
+
props: index$2.getProps({ ...data$1.dataProps, ...data.dataProps }),
|
|
23
|
+
emits: [...data$1.dataEmits, ...data.dataEmits],
|
|
24
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
25
|
+
const cs = index.useCssName(data.name);
|
|
26
|
+
const { getLocale } = index$1.useLocale();
|
|
27
|
+
const prs = __props;
|
|
28
|
+
const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
|
|
29
|
+
const emit = __emit;
|
|
30
|
+
const label = vue.ref(props.label);
|
|
31
|
+
const value = vue.computed({
|
|
32
|
+
get() {
|
|
33
|
+
const v = props.modelValue;
|
|
34
|
+
if (v) {
|
|
35
|
+
onEmptied();
|
|
36
|
+
}
|
|
37
|
+
return v;
|
|
38
|
+
},
|
|
39
|
+
set(value2) {
|
|
40
|
+
emit("update:modelValue", value2);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const typevalue = vue.ref("");
|
|
44
|
+
const valueData = vue.ref();
|
|
45
|
+
const Map = {
|
|
46
|
+
string: "字符串",
|
|
47
|
+
number: "数字",
|
|
48
|
+
boolean: "是否",
|
|
49
|
+
object: "对象",
|
|
50
|
+
array: "数组",
|
|
51
|
+
function: "方法",
|
|
52
|
+
symbol: "唯一值",
|
|
53
|
+
bigint: "大数字",
|
|
54
|
+
not: "不存在",
|
|
55
|
+
null: "空值",
|
|
56
|
+
undefined: "未定义",
|
|
57
|
+
other: "其他"
|
|
58
|
+
};
|
|
59
|
+
const getAll = () => {
|
|
60
|
+
const arr = [
|
|
61
|
+
"string",
|
|
62
|
+
"number",
|
|
63
|
+
"boolean",
|
|
64
|
+
"object",
|
|
65
|
+
"array",
|
|
66
|
+
"function",
|
|
67
|
+
"symbol",
|
|
68
|
+
"bigint",
|
|
69
|
+
"other"
|
|
70
|
+
];
|
|
71
|
+
if (props.isNot) {
|
|
72
|
+
arr.push("not");
|
|
73
|
+
} else {
|
|
74
|
+
arr.push("null", "undefined");
|
|
75
|
+
}
|
|
76
|
+
return arr;
|
|
77
|
+
};
|
|
78
|
+
const tps = vue.ref([]);
|
|
79
|
+
const getType = (type) => {
|
|
80
|
+
const t = type.toLowerCase();
|
|
81
|
+
if (t.startsWith("array")) {
|
|
82
|
+
tps.value = util.getObjTypes(t);
|
|
83
|
+
console.log("tps.value ", tps.value);
|
|
84
|
+
return "array";
|
|
85
|
+
} else if (t.startsWith("object")) {
|
|
86
|
+
tps.value = util.getObjTypes(t);
|
|
87
|
+
return "object";
|
|
88
|
+
} else {
|
|
89
|
+
return t;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const options = vue.computed(() => {
|
|
93
|
+
let arr = [];
|
|
94
|
+
if (props.typeObj) {
|
|
95
|
+
if (typeof props.typeObj === "string") {
|
|
96
|
+
arr.push(props.typeObj);
|
|
97
|
+
} else {
|
|
98
|
+
arr = props.typeObj;
|
|
99
|
+
}
|
|
100
|
+
arr = arr.filter((v2) => Boolean(v2)).map((v2) => getType(v2));
|
|
101
|
+
}
|
|
102
|
+
if (arr.length == 0) {
|
|
103
|
+
arr = getAll();
|
|
104
|
+
}
|
|
105
|
+
const v = arr.map((v2) => ({ label: Map[v2], value: v2 }));
|
|
106
|
+
if (v.length > 0) {
|
|
107
|
+
typevalue.value = v[0].value;
|
|
108
|
+
}
|
|
109
|
+
return v;
|
|
110
|
+
});
|
|
111
|
+
const typeobjs = vue.computed(() => {
|
|
112
|
+
if (tps.value.length > 0) {
|
|
113
|
+
return tps.value;
|
|
114
|
+
} else {
|
|
115
|
+
if (props.typeObj) {
|
|
116
|
+
if (typeof props.typeObj === "string") {
|
|
117
|
+
return [props.typeObj];
|
|
118
|
+
} else {
|
|
119
|
+
return props.typeObj;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return [];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
function onEmptied() {
|
|
126
|
+
label.value = props.label;
|
|
127
|
+
valueData.value = void 0;
|
|
128
|
+
}
|
|
129
|
+
function onClick(key) {
|
|
130
|
+
if (key == 1) {
|
|
131
|
+
if (props.type === "object" && !label.value) {
|
|
132
|
+
index$3.Message.error("请输入" + props.labelName + "名称");
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
emit("submit", {
|
|
136
|
+
label: label.value,
|
|
137
|
+
type: typevalue.value,
|
|
138
|
+
value: valueData.value
|
|
139
|
+
});
|
|
140
|
+
value.value = false;
|
|
141
|
+
} else {
|
|
142
|
+
value.value = false;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
__expose({
|
|
146
|
+
...data.dataExpose
|
|
147
|
+
});
|
|
148
|
+
return (_ctx, _cache) => {
|
|
149
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$4.Window), {
|
|
150
|
+
isMin: false,
|
|
151
|
+
title: vue.unref(props).title,
|
|
152
|
+
modelValue: value.value,
|
|
153
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => value.value = $event)
|
|
154
|
+
}, {
|
|
155
|
+
default: vue.withCtx(() => [
|
|
156
|
+
vue.createElementVNode("div", {
|
|
157
|
+
class: vue.normalizeClass(vue.unref(cs).z())
|
|
158
|
+
}, [
|
|
159
|
+
vue.createElementVNode("div", {
|
|
160
|
+
class: vue.normalizeClass(vue.unref(cs).z("main"))
|
|
161
|
+
}, [
|
|
162
|
+
vue.createElementVNode("div", {
|
|
163
|
+
class: vue.normalizeClass(vue.unref(cs).z("main-top"))
|
|
164
|
+
}, [
|
|
165
|
+
_ctx.type === "object" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
166
|
+
key: 0,
|
|
167
|
+
class: vue.normalizeClass(vue.unref(cs).z("main-top-li"))
|
|
168
|
+
}, [
|
|
169
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(props).labelName + "名称") + ":", 1),
|
|
170
|
+
vue.createVNode(vue.unref(index$5.Inputs), {
|
|
171
|
+
class: vue.normalizeClass(vue.unref(cs).z("main-top-li-value")),
|
|
172
|
+
placeholder: "请输入" + vue.unref(props).labelName + "名称",
|
|
173
|
+
modelValue: label.value,
|
|
174
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => label.value = $event)
|
|
175
|
+
}, null, 8, ["class", "placeholder", "modelValue"])
|
|
176
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
177
|
+
vue.createElementVNode("div", {
|
|
178
|
+
class: vue.normalizeClass(vue.unref(cs).z("main-top-li"))
|
|
179
|
+
}, [
|
|
180
|
+
_cache[7] || (_cache[7] = vue.createElementVNode("span", null, "类型:", -1)),
|
|
181
|
+
vue.createVNode(vue.unref(index$6.Selects), {
|
|
182
|
+
class: vue.normalizeClass(vue.unref(cs).z("main-top-li-value")),
|
|
183
|
+
placeholder: "类型",
|
|
184
|
+
options: options.value,
|
|
185
|
+
modelValue: typevalue.value,
|
|
186
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => typevalue.value = $event),
|
|
187
|
+
onChange: _cache[2] || (_cache[2] = ($event) => valueData.value = void 0)
|
|
188
|
+
}, null, 8, ["class", "options", "modelValue"])
|
|
189
|
+
], 2)
|
|
190
|
+
], 2),
|
|
191
|
+
vue.createElementVNode("div", {
|
|
192
|
+
class: vue.normalizeClass(vue.unref(cs).z("main-content"))
|
|
193
|
+
}, [
|
|
194
|
+
vue.createElementVNode("div", {
|
|
195
|
+
class: vue.normalizeClass(vue.unref(cs).z("main-content-name"))
|
|
196
|
+
}, [
|
|
197
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(props).labelName) + "值:", 1)
|
|
198
|
+
], 2),
|
|
199
|
+
typevalue.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
200
|
+
(vue.openBlock(), vue.createBlock(vue.unref(index$7.EditData), vue.mergeProps({ key: typevalue.value }, vue.unref(props), {
|
|
201
|
+
typeObj: typeobjs.value,
|
|
202
|
+
type: typevalue.value,
|
|
203
|
+
modelValue: valueData.value,
|
|
204
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => valueData.value = $event)
|
|
205
|
+
}), null, 16, ["typeObj", "type", "modelValue"]))
|
|
206
|
+
])) : vue.createCommentVNode("", true)
|
|
207
|
+
], 2)
|
|
208
|
+
], 2),
|
|
209
|
+
vue.createElementVNode("div", {
|
|
210
|
+
class: vue.normalizeClass(vue.unref(cs).z("footer"))
|
|
211
|
+
}, [
|
|
212
|
+
vue.createElementVNode("div", {
|
|
213
|
+
class: vue.normalizeClass(vue.unref(cs).z("top-but"))
|
|
214
|
+
}, [
|
|
215
|
+
vue.createVNode(vue.unref(index$8.Button), {
|
|
216
|
+
onClick: _cache[4] || (_cache[4] = ($event) => onClick(0))
|
|
217
|
+
}, {
|
|
218
|
+
default: vue.withCtx(() => [..._cache[8] || (_cache[8] = [
|
|
219
|
+
vue.createTextVNode("取消", -1)
|
|
220
|
+
])]),
|
|
221
|
+
_: 1
|
|
222
|
+
}),
|
|
223
|
+
vue.createVNode(vue.unref(index$8.Button), {
|
|
224
|
+
onClick: _cache[5] || (_cache[5] = ($event) => onClick(1)),
|
|
225
|
+
type: "primary"
|
|
226
|
+
}, {
|
|
227
|
+
default: vue.withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
228
|
+
vue.createTextVNode("确认", -1)
|
|
229
|
+
])]),
|
|
230
|
+
_: 1
|
|
231
|
+
})
|
|
232
|
+
], 2)
|
|
233
|
+
], 2)
|
|
234
|
+
], 2)
|
|
235
|
+
]),
|
|
236
|
+
_: 1
|
|
237
|
+
}, 8, ["title", "modelValue"]);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
exports.default = _sfc_main;
|