@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.
Files changed (195) hide show
  1. package/bin/fang-ui.js +2 -2
  2. package/dist/components/box-fun/index.cjs +1 -0
  3. package/dist/components/box-fun/index.js +1 -0
  4. package/dist/components/box-fun/index.scss +8 -0
  5. package/dist/components/box-fun/style/index2.scss +4 -0
  6. package/dist/components/buttons/src/data.d.ts +14 -11
  7. package/dist/components/cascaders/src/data.d.ts +14 -11
  8. package/dist/components/cascaders/src/index2.cjs +15 -8
  9. package/dist/components/cascaders/src/index2.js +15 -8
  10. package/dist/components/checks/src/data.d.ts +14 -11
  11. package/dist/components/checks/src/index2.cjs +6 -6
  12. package/dist/components/checks/src/index2.js +6 -6
  13. package/dist/components/common/list.cjs +34 -15
  14. package/dist/components/common/list.d.ts +25 -12
  15. package/dist/components/common/list.js +34 -15
  16. package/dist/components/common/use.cjs +9 -5
  17. package/dist/components/common/use.js +9 -5
  18. package/dist/components/dates/src/data.d.ts +14 -11
  19. package/dist/components/dates2/src/data.d.ts +14 -11
  20. package/dist/components/draggable/style/index2.scss +1 -0
  21. package/dist/components/edit-data/index.cjs +9 -0
  22. package/dist/components/edit-data/index.css +144 -0
  23. package/dist/components/edit-data/index.d.ts +5 -0
  24. package/dist/components/edit-data/index.js +9 -0
  25. package/dist/components/edit-data/index.scss +95 -0
  26. package/dist/components/edit-data/src/area/array-json.cjs +4 -0
  27. package/dist/components/edit-data/src/area/array-json.js +4 -0
  28. package/dist/components/edit-data/src/area/array-json2.cjs +109 -0
  29. package/dist/components/edit-data/src/area/array-json2.js +109 -0
  30. package/dist/components/edit-data/src/area/array.cjs +4 -0
  31. package/dist/components/edit-data/src/area/array.js +4 -0
  32. package/dist/components/edit-data/src/area/array2.cjs +135 -0
  33. package/dist/components/edit-data/src/area/array2.js +135 -0
  34. package/dist/components/edit-data/src/area/code.cjs +4 -0
  35. package/dist/components/edit-data/src/area/code.js +4 -0
  36. package/dist/components/edit-data/src/area/code2.cjs +52 -0
  37. package/dist/components/edit-data/src/area/code2.js +52 -0
  38. package/dist/components/edit-data/src/area/editor.cjs +4 -0
  39. package/dist/components/edit-data/src/area/editor.js +4 -0
  40. package/dist/components/edit-data/src/area/editor2.cjs +170 -0
  41. package/dist/components/edit-data/src/area/editor2.js +170 -0
  42. package/dist/components/edit-data/src/area/general.cjs +4 -0
  43. package/dist/components/edit-data/src/area/general.js +4 -0
  44. package/dist/components/edit-data/src/area/general2.cjs +88 -0
  45. package/dist/components/edit-data/src/area/general2.js +88 -0
  46. package/dist/components/edit-data/src/area/object-json.cjs +4 -0
  47. package/dist/components/edit-data/src/area/object-json.js +4 -0
  48. package/dist/components/edit-data/src/area/object-json2.cjs +109 -0
  49. package/dist/components/edit-data/src/area/object-json2.js +109 -0
  50. package/dist/components/edit-data/src/area/object.cjs +4 -0
  51. package/dist/components/edit-data/src/area/object.js +4 -0
  52. package/dist/components/edit-data/src/area/object2.cjs +116 -0
  53. package/dist/components/edit-data/src/area/object2.js +116 -0
  54. package/dist/components/edit-data/src/data/array.cjs +4 -0
  55. package/dist/components/edit-data/src/data/array.js +4 -0
  56. package/dist/components/edit-data/src/data/array2.cjs +68 -0
  57. package/dist/components/edit-data/src/data/array2.js +68 -0
  58. package/dist/components/edit-data/src/data/bigint.cjs +4 -0
  59. package/dist/components/edit-data/src/data/bigint.js +4 -0
  60. package/dist/components/edit-data/src/data/bigint2.cjs +42 -0
  61. package/dist/components/edit-data/src/data/bigint2.js +42 -0
  62. package/dist/components/edit-data/src/data/boolean.cjs +4 -0
  63. package/dist/components/edit-data/src/data/boolean.js +4 -0
  64. package/dist/components/edit-data/src/data/boolean2.cjs +53 -0
  65. package/dist/components/edit-data/src/data/boolean2.js +53 -0
  66. package/dist/components/edit-data/src/data/function.cjs +4 -0
  67. package/dist/components/edit-data/src/data/function.js +4 -0
  68. package/dist/components/edit-data/src/data/function2.cjs +61 -0
  69. package/dist/components/edit-data/src/data/function2.js +61 -0
  70. package/dist/components/edit-data/src/data/not.cjs +4 -0
  71. package/dist/components/edit-data/src/data/not.js +4 -0
  72. package/dist/components/edit-data/src/data/not2.cjs +56 -0
  73. package/dist/components/edit-data/src/data/not2.js +56 -0
  74. package/dist/components/edit-data/src/data/null.cjs +4 -0
  75. package/dist/components/edit-data/src/data/null.js +4 -0
  76. package/dist/components/edit-data/src/data/null2.cjs +24 -0
  77. package/dist/components/edit-data/src/data/null2.js +24 -0
  78. package/dist/components/edit-data/src/data/number.cjs +4 -0
  79. package/dist/components/edit-data/src/data/number.js +4 -0
  80. package/dist/components/edit-data/src/data/number2.cjs +42 -0
  81. package/dist/components/edit-data/src/data/number2.js +42 -0
  82. package/dist/components/edit-data/src/data/object.cjs +4 -0
  83. package/dist/components/edit-data/src/data/object.js +4 -0
  84. package/dist/components/edit-data/src/data/object2.cjs +68 -0
  85. package/dist/components/edit-data/src/data/object2.js +68 -0
  86. package/dist/components/edit-data/src/data/other.cjs +4 -0
  87. package/dist/components/edit-data/src/data/other.js +4 -0
  88. package/dist/components/edit-data/src/data/other2.cjs +59 -0
  89. package/dist/components/edit-data/src/data/other2.js +59 -0
  90. package/dist/components/edit-data/src/data/string.cjs +4 -0
  91. package/dist/components/edit-data/src/data/string.js +4 -0
  92. package/dist/components/edit-data/src/data/string2.cjs +43 -0
  93. package/dist/components/edit-data/src/data/string2.js +43 -0
  94. package/dist/components/edit-data/src/data/symbol.cjs +4 -0
  95. package/dist/components/edit-data/src/data/symbol.js +4 -0
  96. package/dist/components/edit-data/src/data/symbol2.cjs +55 -0
  97. package/dist/components/edit-data/src/data/symbol2.js +55 -0
  98. package/dist/components/edit-data/src/data/undefined.cjs +4 -0
  99. package/dist/components/edit-data/src/data/undefined.js +4 -0
  100. package/dist/components/edit-data/src/data/undefined2.cjs +24 -0
  101. package/dist/components/edit-data/src/data/undefined2.js +24 -0
  102. package/dist/components/edit-data/src/data.cjs +57 -0
  103. package/dist/components/edit-data/src/data.d.ts +131 -0
  104. package/dist/components/edit-data/src/data.js +57 -0
  105. package/dist/components/edit-data/src/index.cjs +4 -0
  106. package/dist/components/edit-data/src/index.js +4 -0
  107. package/dist/components/edit-data/src/index2.cjs +134 -0
  108. package/dist/components/edit-data/src/index2.js +134 -0
  109. package/dist/components/edit-data/src/util.cjs +99 -0
  110. package/dist/components/edit-data/src/util.d.ts +1 -0
  111. package/dist/components/edit-data/src/util.js +99 -0
  112. package/dist/components/edit-data/style/index2.scss +13 -0
  113. package/dist/components/edit-data-add/index.cjs +9 -0
  114. package/dist/components/edit-data-add/index.d.ts +5 -0
  115. package/dist/components/edit-data-add/index.js +9 -0
  116. package/dist/components/edit-data-add/index.scss +5 -0
  117. package/dist/components/edit-data-add/src/data.cjs +24 -0
  118. package/dist/components/edit-data-add/src/data.d.ts +36 -0
  119. package/dist/components/edit-data-add/src/data.js +24 -0
  120. package/dist/components/edit-data-add/src/index.cjs +4 -0
  121. package/dist/components/edit-data-add/src/index.js +4 -0
  122. package/dist/components/edit-data-add/src/index2.cjs +241 -0
  123. package/dist/components/edit-data-add/src/index2.js +241 -0
  124. package/dist/components/edit-data-add/style/comm.scss +38 -0
  125. package/dist/components/edit-data-add/style/index2.scss +2 -0
  126. package/dist/components/history/src/data.cjs +9 -1
  127. package/dist/components/history/src/data.d.ts +13 -1
  128. package/dist/components/history/src/data.js +9 -1
  129. package/dist/components/history/src/index2.cjs +27 -9
  130. package/dist/components/history/src/index2.js +27 -9
  131. package/dist/components/index.cjs +60 -56
  132. package/dist/components/index.d.ts +2 -0
  133. package/dist/components/index.js +4 -0
  134. package/dist/components/index.scss +3 -0
  135. package/dist/components/index2.scss +5 -2
  136. package/dist/components/labels/src/data.d.ts +14 -11
  137. package/dist/components/labels/src/index2.cjs +13 -2
  138. package/dist/components/labels/src/index2.js +13 -2
  139. package/dist/components/page/index.css +8 -0
  140. package/dist/components/retract/index.css +20 -0
  141. package/dist/components/retract/index.scss +24 -0
  142. package/dist/components/retract/src/data.cjs +10 -0
  143. package/dist/components/retract/src/data.d.ts +10 -0
  144. package/dist/components/retract/src/data.js +10 -0
  145. package/dist/components/retract/src/index2.cjs +24 -4
  146. package/dist/components/retract/src/index2.js +23 -3
  147. package/dist/components/retract/style/index2.scss +1 -0
  148. package/dist/components/selects/src/data.d.ts +14 -11
  149. package/dist/components/selects/src/index2.cjs +1 -1
  150. package/dist/components/selects/src/index2.js +1 -1
  151. package/dist/components/switchs/src/data.d.ts +14 -11
  152. package/dist/components/switchs/src/index2.cjs +9 -5
  153. package/dist/components/switchs/src/index2.js +9 -5
  154. package/dist/components/tables/common/com-limit.cjs +4 -0
  155. package/dist/components/tables/common/com-limit.js +4 -0
  156. package/dist/components/tables/common/com-limit2.cjs +91 -0
  157. package/dist/components/tables/common/com-limit2.js +91 -0
  158. package/dist/components/tables/common/com.scss +12 -0
  159. package/dist/components/tables/index.css +9 -0
  160. package/dist/components/tables/index.scss +2 -0
  161. package/dist/components/tables/src/columns2.cjs +3 -1
  162. package/dist/components/tables/src/columns2.js +7 -5
  163. package/dist/components/tablesp/index.css +9 -0
  164. package/dist/components/tablespd/index.css +9 -0
  165. package/dist/components/uploads/src/data.d.ts +14 -11
  166. package/dist/css/edit-data.css +144 -0
  167. package/dist/css/index.css +149 -0
  168. package/dist/css/page.css +8 -0
  169. package/dist/css/retract.css +20 -0
  170. package/dist/css/tables.css +9 -0
  171. package/dist/css/tablesp.css +9 -0
  172. package/dist/css/tablespd.css +9 -0
  173. package/dist/directives/adjust/index.cjs +14 -6
  174. package/dist/directives/adjust/index.js +14 -6
  175. package/dist/directives/adjustment/index.cjs +622 -0
  176. package/dist/directives/adjustment/index.d.ts +7 -0
  177. package/dist/directives/adjustment/index.js +622 -0
  178. package/dist/directives/index.cjs +18 -16
  179. package/dist/directives/index.d.ts +1 -0
  180. package/dist/directives/index.js +16 -14
  181. package/dist/expand/{chunk-A7IW6WRD.cjs → chunk-BJVT6JH7.cjs} +6 -0
  182. package/dist/expand/{chunk-L4FI5HCY.js → chunk-I5UJEJJB.js} +6 -0
  183. package/dist/expand/components.cjs +5 -5
  184. package/dist/expand/components.js +1 -1
  185. package/dist/expand/config.cjs +2 -2
  186. package/dist/expand/config.js +1 -1
  187. package/dist/icons/index.json +1 -1
  188. package/dist/index.cjs +84 -78
  189. package/dist/index.css +149 -0
  190. package/dist/index.js +20 -14
  191. package/dist/utils/util.cjs +1 -1
  192. package/dist/utils/util.js +2 -2
  193. package/dist/utils/vues/withInstall.cjs +2 -1
  194. package/dist/utils/vues/withInstall.js +2 -1
  195. package/package.json +9 -8
@@ -0,0 +1,99 @@
1
+ const splitIgnoringNesting = (str, delimiter) => {
2
+ let bracketStack = [];
3
+ let parts = [];
4
+ let current = "";
5
+ for (let i = 0; i < str.length; i++) {
6
+ const char = str[i];
7
+ if (char === "[" || char === "<" || char === "(") {
8
+ bracketStack.push(char);
9
+ current += char;
10
+ } 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] === "(") {
11
+ bracketStack.pop();
12
+ current += char;
13
+ } else if (char === delimiter && bracketStack.length === 0) {
14
+ parts.push(current.trim());
15
+ current = "";
16
+ } else {
17
+ current += char;
18
+ }
19
+ }
20
+ if (current.trim() !== "") {
21
+ parts.push(current.trim());
22
+ }
23
+ return parts;
24
+ };
25
+ const parseTypeDefinition = (typeDef) => {
26
+ if (!typeDef) {
27
+ return [];
28
+ } else if (typeDef.startsWith("[") && typeDef.endsWith("]") || typeDef.startsWith("(") && typeDef.endsWith(")")) {
29
+ const inner = typeDef.slice(1, -1).trim();
30
+ if (!inner) return [];
31
+ const types = splitIgnoringNesting(inner, ",");
32
+ return types;
33
+ } else if (typeDef.startsWith("{") && typeDef.endsWith("}")) {
34
+ return ["object"];
35
+ } else if (typeDef.startsWith("<") && typeDef.endsWith(">")) {
36
+ const inner = typeDef.slice(1, -1).trim();
37
+ if (!inner) return [];
38
+ const types = splitIgnoringNesting(inner, "|");
39
+ return types;
40
+ } else {
41
+ if (typeDef.includes("|")) {
42
+ const types = splitIgnoringNesting(typeDef, "|");
43
+ return types;
44
+ } else {
45
+ const types = splitIgnoringNesting(typeDef, ",");
46
+ return types;
47
+ }
48
+ }
49
+ };
50
+ const splitIgnoring = (str) => {
51
+ let bracketStack = [];
52
+ let isArr = false;
53
+ let is = false;
54
+ let top = 0;
55
+ for (let i = 0; i < str.length; i++) {
56
+ const char = str[i];
57
+ if (char === "[" || char === "<" || char === "(") {
58
+ is = true;
59
+ bracketStack.push(char);
60
+ if (char == "[") {
61
+ isArr = true;
62
+ }
63
+ if (top == 0) {
64
+ top = i;
65
+ }
66
+ } else if (char === "]" && bracketStack[bracketStack.length - 1] === "[" || char === ">" && bracketStack[bracketStack.length - 1] === "<" || char === ")" && bracketStack[bracketStack.length - 1] === "(") {
67
+ bracketStack.pop();
68
+ }
69
+ if (is && bracketStack.length === 0) {
70
+ if (isArr) {
71
+ if (top + 1 == i) {
72
+ return {
73
+ top: "array",
74
+ type: str.substring(0, top)
75
+ };
76
+ }
77
+ }
78
+ return {
79
+ top: str.substring(0, top),
80
+ type: str.substring(top + 1, i)
81
+ };
82
+ }
83
+ }
84
+ return {
85
+ top: str,
86
+ type: ""
87
+ };
88
+ };
89
+ function getObjTypes(str) {
90
+ const obj = splitIgnoring(str);
91
+ if (obj.type) {
92
+ return parseTypeDefinition(obj.type);
93
+ } else {
94
+ return [];
95
+ }
96
+ }
97
+ export {
98
+ getObjTypes
99
+ };
@@ -0,0 +1,13 @@
1
+ @use '../../inputs/style/index2.scss' as *;
2
+ @use '../../input-num/style/index2.scss' as *;
3
+ @use '../../switchs/style/index2.scss' as *;
4
+ @use '../../checks/style/index2.scss' as *;
5
+ @use '../../button/style/index2.scss' as *;
6
+ @use '../../window/style/index2.scss' as *;
7
+ @use '../../message/style/index2.scss' as *;
8
+ @use '../../tabs/style/index2.scss' as *;
9
+ @use '../../tab-pane/style/index2.scss' as *;
10
+ @use '../../selects/style/index2.scss' as *;
11
+ @use '../../icon/style/index2.scss' as *;
12
+ @use '../../no-data/style/index2.scss' as *;
13
+ @use '../index.scss' as *;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ ;/* empty css */
4
+ require("./src/index.cjs");
5
+ const withInstall = require("../../utils/vues/withInstall.cjs");
6
+ const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
7
+ const EditDataAdd = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "EditDataAdd");
8
+ exports.EditDataAdd = EditDataAdd;
9
+ exports.default = EditDataAdd;
@@ -0,0 +1,5 @@
1
+ import { SFCWithInstall } from '../../utils/vues';
2
+ import { DefineComponent } from 'vue';
3
+ declare const EditDataAdd: SFCWithInstall<DefineComponent<{}, {}, any>>;
4
+ export { EditDataAdd };
5
+ export default EditDataAdd;
@@ -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,5 @@
1
+ @use '../scss/common.scss' as *;
2
+ @use '../edit-data/index.scss' as *;
3
+ $edit-data-add: 'edit-data-add';
4
+ @include b($edit-data-add) {
5
+ }
@@ -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,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const index_vue_vue_type_script_setup_true_lang = require("./index2.cjs");
4
+ exports.default = index_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./index2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -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;